OSDN Git Service

2011-08-29 Thomas Quinot <quinot@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2
3         * a-synbar-posix.adb: Minor reformatting.
4
5 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6
7         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
8         a-exetim-default.ads (Interrupt_Clocks_Supported,
9         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
10         definitions to be compliant with AI-0171. The target systems do not
11         support separate account for the execution time of interrupt handlers.
12
13 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
14
15         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
16         in the barrier to put first the easiest to evaluate (and the one which
17         will be True more often). More efficient.
18
19 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
20
21         * s-atocou-x86.adb: Fix constraint in machine code insertion.
22
23 2011-08-29  Bob Duff  <duff@adacore.com>
24
25         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
26         attributes that are now aspects, as specified by AI05-0229-1.
27         * sem_ch13.adb (Analyze_Aspect_Specifications,
28         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
29         pragmas or attribute references, as appropriate.
30
31 2011-08-29  Robert Dewar  <dewar@adacore.com>
32
33         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
34         a-synbar-posix.ads: Minor reformatting.
35
36 2011-08-29  Yannick Moy  <moy@adacore.com>
37
38         * snames.ads-tmpl: Add name Force.
39
40 2011-08-29  Pascal Obry  <obry@adacore.com>
41
42         * prj-nmsc.adb: Minor reformatting.
43
44 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
45
46         * a-exetim.ads (Interrupt_Clocks_Supported,
47         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
48         definitions to be compliant with AI-0171.
49
50 2011-08-29  Robert Dewar  <dewar@adacore.com>
51
52         * a-ngelfu.adb: Add comments.
53
54 2011-08-29  Geert Bosch  <bosch@adacore.com>
55
56         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
57         the closest machine number to Pi / 2.0.
58
59 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
60
61         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
62         package Ada.Synchronous_Barriers.
63         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
64         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
65         default implementation using protected objects and another one
66         a-synbar-posix using POSIX barriers as the underlying support.
67         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
68         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
69         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
70         Clean up dependencies.
71         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
72
73 2011-08-29  Robert Dewar  <dewar@adacore.com>
74
75         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
76         exp_dist.adb: Minor code reorganization.
77         Minor reformatting.
78
79 2011-08-29  Thomas Quinot  <quinot@adacore.com>
80
81         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
82         primitive operation must support external streaming if it is not a
83         controlling access result.
84
85 2011-08-29  Thomas Quinot  <quinot@adacore.com>
86
87         * sinfo.ads, sem_ch7.adb: Minor reformatting.
88
89 2011-08-29  Bob Duff  <duff@adacore.com>
90
91         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
92         restriction on allocators, as required by AI05-0013-1.
93         * restrict.ads: Minor comment fix.
94
95 2011-08-29  Tristan Gingold  <gingold@adacore.com>
96
97         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
98         (To_Jmpbuf_Address): Ditto
99         (builtin_longjmp): Ditto
100
101 2011-08-29  Thomas Quinot  <quinot@adacore.com>
102
103         * sem_res.adb: Minor reformatting.
104
105 2011-08-29  Vincent Celier  <celier@adacore.com>
106
107         * make.adb (Gnatmake): Move special processing for VM targets after the
108         call to Get_Target_Parameters.
109
110 2011-08-29  Thomas Quinot  <quinot@adacore.com>
111
112         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
113
114 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
115
116         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
117         where an anonymous access discriminant of a limited designated type
118         appears in a non-immutably limited discriminated type and issue an
119         error message. Add local variable Desig_T and replace all occurrences
120         of Designated_Type.
121
122 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
123
124         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
125         implementation is compliant to RM D.15(15/2) after the modification
126         imposed by AI05-0094-1 (binding interpretation).
127
128 2011-08-29  Robert Dewar  <dewar@adacore.com>
129
130         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
131         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
132
133 2011-08-29  Thomas Quinot  <quinot@adacore.com>
134
135         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
136         the scope name, do not report a missing label as a style violation (it
137         will be diagnosed as an illegality).
138         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
139         variant records: Get_Enum_Lit_From_Pos already returns a usage
140         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
141         on Expr in Integer_Literal case so that it can be used by
142         Build_To_Any_Call.
143
144 2011-08-29  Tristan Gingold  <gingold@adacore.com>
145
146         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
147         Adjust comment.
148         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
149         (Build_Abort_Block_Handler): New function to build an Abort_Signal
150         exception handler.
151         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
152         Build_Abort_Block_Handler to build the exception handler. Do not
153         undefer aborts for the Abort_Signal exception handler if back-end
154         exception mechanism.
155         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
156         back_end exceptions for all others and abort_signal.
157         * s-except.ads (ZCX_By_Default): New constant.
158         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
159         (Raise_Exception_Always): Ditto.
160         (Raise_From_Signal_Handler): Ditto.
161         (Raise_With_Location_And_Msg): Ditto.
162         (Raise_With_Msg): Ditto.
163         (Reraise): Ditto.
164         (Reraise_Occurence): Ditto.
165         (Reraise_Occurrence_Always): Ditto.
166         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
167         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
168
169 2011-08-29  Thomas Quinot  <quinot@adacore.com>
170
171         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
172
173 2011-08-29  Robert Dewar  <dewar@adacore.com>
174
175         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
176         Minor code reorganization.
177
178 2011-08-29  Bob Duff  <duff@adacore.com>
179
180         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
181         2012, not just Ada 2005.
182
183 2011-08-29  Vincent Celier  <celier@adacore.com>
184
185         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
186         with a project file or with gprbuid, if -gnatep= is specified, the
187         builder may need to be invoked with -x.
188
189 2011-08-29  Tristan Gingold  <gingold@adacore.com>
190
191         * a-exexpr-gcc.adb: Minor comment fix.
192
193 2011-08-29  Robert Dewar  <dewar@adacore.com>
194
195         * sem_ch8.adb: Minor reformatting.
196
197 2011-08-29  Bob Duff  <duff@adacore.com>
198
199         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
200         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
201         treating "some" as unreserved in earlier Ada versions. This is now
202         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
203         rather than Name_Some, since Tok_Some is now recognized as reserved.
204         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
205         reserved word.
206         * scans.ads: Minor comment fixes.
207         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
208         for other language versions.
209         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
210         treating "some" as unreserved in earlier Ada versions. This is now
211         handled in Snames.Is_Keyword_Name.
212         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
213         Ada 2012.
214         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
215         unreserved in earlier Ada versions. This is now handled in
216         Snames.Is_Keyword_Name.
217         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
218         words as for other language versions.
219         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
220         Ada 2012, not just Ada 2005.
221
222 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
223
224         * sem_ch13.adb: Additional semantic checks for aspects involved in
225         iterators.
226
227 2011-08-29  Matthew Heaney  <heaney@adacore.com>
228
229         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
230         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
231         Container parameter.
232         (Ancestor_Find): ditto.
233
234 2011-08-29  Thomas Quinot  <quinot@adacore.com>
235
236         * par-endh.adb: Minor reformatting.
237
238 2011-08-29  Tristan Gingold  <gingold@adacore.com>
239
240         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
241         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
242         (Adjust_N_CLeanups_For): Remove.
243         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
244         stack is reached.
245         (Propgate_Exception): Adjust.
246         * raise-gcc.c: Add a few static/const.
247         (Adjust_N_Cleanups_For): Remove declaration.
248         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
249
250 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
251
252         * sem_ch8.adb: Use type of function return when rewriting as object
253         declaration.
254
255 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
256
257         * sem_type.adb: Minor reformatting.
258
259 2011-08-29  Robert Dewar  <dewar@adacore.com>
260
261         * makeutl.adb: Minor reformatting.
262
263 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
264
265         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
266         function call of a limited type, the expansion of the renaming is
267         complicated by the presence of various temporaries and subtypes that
268         capture constraints of the renamed object.
269         Rewrite node as an object declaration, whose expansion is simpler.
270         Given that the object is limited there is no copy involved and no
271         performance hit.
272
273 2011-08-29  Robert Dewar  <dewar@adacore.com>
274
275         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
276         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
277
278 2011-08-29  Tristan Gingold  <gingold@adacore.com>
279
280         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
281         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
282         system-linux-hppa.ads, system-linux-s390.ads,
283         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
284         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
285         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
286         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
287         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
288         system-solaris-sparc.ads, system-lynxos-x86.ads,
289         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
290         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
291         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
292         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
293         system-vxworks-x86.ads: Remove GCC_ZCX_Support
294         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
295         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
296         * opt.ads: Adjust comment.
297         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
298         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
299         * system.ads: Move GCC_ZCX_Support to obsolete entries.
300
301 2011-08-29  Emmanuel Briot  <briot@adacore.com>
302
303         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
304         file name is specified on the gnatmake or gprbuild command line, and
305         before we search for that file in the project.
306
307 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
308
309         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
310         used to determine whether a possible interpretation for an overloadable
311         entity is declared within the current instantiation and should be
312         included in the candidate set.
313
314 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
315
316         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
317
318 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
319
320         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
321         access subtype is access_to_subprogram, when applying checks for
322         RM 3.10.2 (27).
323
324 2011-08-29  Matthew Heaney  <heaney@adacore.com>
325
326         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
327         for sibling when common parent.
328
329 2011-08-29  Thomas Quinot  <quinot@adacore.com>
330
331         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
332         "pragma_".
333
334 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
335
336         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
337         for the return type when in ASIS mode.
338
339 2011-08-29  Vincent Celier  <celier@adacore.com>
340
341         * make.adb (Gnatmake): Get the default search dirs, then the target
342         parameters after getting the Builder switches, as the Builder switches
343         may include --RTS= and that could change the default search dirs.
344
345 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
346
347         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
348         Make_Final_Call. Move the processing for class-wide types before the
349         processing for derivations from [Limited_]Controlled.
350         (Make_Final_Call): Move the processing for class-wide types before the
351         processing for derivations from [Limited_]Controlled.
352         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
353         Add code to account for alignments larger than the list header. Add a
354         comment illustrating the structure of the allocated object + padding +
355         header.
356         (Deallocate_Any_Controlled): Add code to account for alignments larger
357         than the list header.
358
359 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
360
361         * sinfo.ads, sinfo.adb: New node kind
362         N_Formal_Incomplete_Type_Definition, related flags.
363         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
364         Parse formal incomplete types.
365         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
366         sem_ch12.
367         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
368         Formal incomplete types do not need completion.
369         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
370         Validate_Incomplete_Type_Instance): New procedures to handle formal
371         incomplete types.
372         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
373         that corresponds to a formal incomplete type.
374         * sprint.adb: Handle formal incomplete type declarations.
375         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
376         an insertion point.
377
378 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
379
380         * a-fihema.ads, a-fihema.adb: Unit removed.
381         * a-undesu.ads, a-undesu.adb: New unit implementing
382         Ada.Unchecked_Deallocate_Subpool.
383         * einfo.adb: Remove Associated_Collection from the node usage.
384         Add Finalization_Master to the node usage.
385         (Associated_Collection): Removed.
386         (Finalization_Master): New routine.
387         (Set_Associated_Collection): Removed.
388         (Set_Finalization_Master): New routine.
389         (Write_Field23_Name): Remove Associated_Collection from the output. Add
390         Finalization_Master to the output.
391         * einfo.ads: Remove attribute Associated_Collection and its uses in
392         entities.
393         Add new attribute Finalization_Master along with its uses in entitites.
394         (Associated_Collection): Removed along with its pragma import.
395         (Finalization_Master): New routine along with a pragma import.
396         (Set_Associated_Collection): Removed along with its pragma import.
397         (Set_Finalization_Master): New routine along with a pragma import.
398         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
399         Build_Finalization_Collection with Build_Finalization_Master.
400         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
401         before the bodies of the predefined routines. Add comment explaining
402         this. Replace call to Build_Finalization_Collection with
403         Build_Finalization_Master.
404         (Freeze_Type): Replace call to Build_Finalization_Collection with
405         Build_Finalization_Master.
406         (Make_Finalize_Address_Body): Comment reformatting.
407         (Make_Predefined_Primitive_Specs): Code reformatting.
408         (Stream_Operation_OK): Update comment mentioning finalization
409         collections. Replace RE_Finalization_Collection with
410         RE_Finalization_Master.
411         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
412         Associated_Collection with Finalization_Master. Replace call to
413         Build_Finalization_Collection with Build_Finalization_Master.
414         (Expand_Allocator_Expression): Replace call to Associated_Collection
415         with Finalization_Master. Replace call to Set_Associated_Collection with
416         Set_Finalization_Master. Remove the generation of
417         Set_Finalize_Address_Ptr.
418         (Expand_N_Allocator): Replace call to Associated_Collection with
419         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
420         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
421         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
422         comment on usage. Replace call to Needs_BIP_Collection with
423         Needs_BIP_Finalization_Master Remplace BIP_Collection with
424         BIP_Finalization_Master. Update all comments which mention finalization
425         collections. Replace Associated_Collection with
426         Finalization_Master. Replace Build_Finalization_Collection with
427         Build_Finalization_Master.
428         (BIP_Formal_Suffix): Update BIP_Collection's case.
429         (Build_Heap_Allocator): Update the related comment. Rename local
430         variable Collect to Fin_Mas_Id and update its occurrences. Update
431         comments which mention finalization collections. Replace
432         Set_Associated_Collection with Set_Finalization_Master.
433         (Expand_Call): Update the code which detects a special piece of library
434         code for .NET/JVM.
435         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
436         Add_Collection_Actual_To_Build_In_Place_Call with
437         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
438         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
439         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
440         Add_Collection_Actual_To_Build_In_Place_Call with
441         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
442         (Make_Build_In_Place_Call_In_Assignment): Replace call to
443         Add_Collection_Actual_To_Build_In_Place_Call with
444         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
445         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
446         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
447         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
448         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
449         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
450         Replace call to Set_Associated_Collection with Set_Finalization_Master.
451         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
452         Replace the call to Associated_Collection with Finalization_Master.
453         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
454         Update the way finalization master names are generated. Update the
455         retrieval of the correct access type which will carry the pool and
456         master attributes.
457         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
458         (Make_Finalize_Address_Body): Abstract types do not need
459         Finalize_Address. Code reformatting.
460         (Make_Finalize_Address_Stmts): Update comment on usage.
461         (Make_Set_Finalize_Address_Ptr_Call): Removed.
462         (Process_Declarations): Update comments.
463         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
464         Build_Finalization_Master. Update associated comment.
465         (Make_Set_Finalize_Address_Ptr_Call): Removed.
466         * exp_ch13.adb: Update comments which mention finalization collections.
467         (Expand_N_Free_Statement): Replace the call to Associated_Collection
468         with Finalization_Master.
469         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
470         create calls to routines Allocate_Any_Controlled and
471         Deallocate_Any_Controlled.
472         (Find_Finalize_Address): New routine.
473         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
474         comparison.
475         (Requires_Cleanup_Actions): Update the comment on freeze node
476         inspection.
477         * exp_util.ads: Remove comment on generated code for
478         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
479         is better to simply look in the body.
480         * freeze.adb (Freeze_All): Update the comment of finalization
481         collections. Replace the call to Associated_Collection with
482         Finalization_Master. Replace the call to Build_Finalization_Collection
483         with Build_Finalization_Master.
484         * impunit.adb: Add a-undesu and s-stposu to the list of units.
485         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
486         a-fihema.
487         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
488         Ada.Finalization. Add processing for children of System.Storage_Pools.
489         * rtsfind.ads: Remove the naming of second level children of
490         Ada.Finalization.
491         Remove Ada_Finalization_Heap_Management from the list of units.
492         Remove subtype Ada_Finalization_Child.
493         Remove the following subprogram entities:
494         
495            RE_Allocate
496            RE_Deallocate
497            RE_Finalization_Collection
498            RE_Finalization_Collection_Ptr
499            RE_Set_Finalize_Address_Ptr
500         
501         Add the naming of second level children of System.Storage_Pools.
502         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
503         the list of units.
504         Add subtype System_Storage_Pools_Child.
505         Add the following subprogram entities to System.Finalization_Masters:
506         
507            RE_Finalization_Master
508            RE_Finalization_Master_Ptr
509         
510         Add the following subprogram entities to System.Storage_Pools.Subpools:
511         
512            RE_Allocate_Any_Controlled
513            RE_Deallocate_Any_Controlled
514            RE_Root_Storage_Pool_With_Subpools
515            RE_Root_Subpool
516            RE_Subpool_Handle
517         
518         Move the following subprogram entities from
519         Ada.Finalization.Heap_Management to System.Finalization_Masters:
520         
521            RE_Add_Offset_To_Address
522            RE_Attach
523            RE_Base_Pool
524            RE_Detach
525         
526         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
527         Set_Associated_Collection with Set_Finalization_Master.
528         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
529         BIP_Finalization_Master is created.
530         * s-finmas.adb: New unit System.Finalization_Masters.
531         * s-finmas.ads: New unit System.Finalization_Masters.
532         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
533         * s-stposu.ads, s-stposu.adb: New unit implementing
534         System.Storage_Pools.Subpools.
535
536 2011-08-29  Bob Duff  <duff@adacore.com>
537
538         * tbuild.adb: Add assertion.
539
540 2011-08-29  Thomas Quinot  <quinot@adacore.com>
541
542         * s-pooglo.adb: Minor reformatting.
543
544 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
545
546         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
547         an indexed component of a packed array whose element type is a record
548         with a representation clause different from that of the right-hand
549         side, generate a temporary to minimuze the number of bit-field
550         operations generated.
551
552 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
553
554         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
555         declarations, and thus are likely insertion points for actions.
556
557 2011-08-29  Bob Duff  <duff@adacore.com>
558
559         * einfo.ads: Minor comment fix.
560
561 2011-08-29  Robert Dewar  <dewar@adacore.com>
562
563         * frontend.adb, gnat1drv.adb: Minor reformatting.
564
565 2011-08-29  Tristan Gingold  <gingold@adacore.com>
566
567         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
568         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
569         space in front of the header.
570
571 2011-08-29  Johannes Kanig  <kanig@adacore.com>
572
573         * frontend.adb (Frontend): Exit after creating Standard package when
574         -gnatd.H is present.
575         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
576         present.
577
578 2011-08-29  Robert Dewar  <dewar@adacore.com>
579
580         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
581         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
582         snames.ads-tmpl: Minor reformatting.
583
584 2011-08-29  Philippe Gil  <gil@adacore.com>
585
586         * prj.adb (Reset_Units_In_Table): New procedure.
587         Reset units to avoid access to freed memory.
588
589 2011-08-29  Thomas Quinot  <quinot@adacore.com>
590
591         * get_scos.adb: When reading a P statement SCO without a pragma name
592         (from an older ALI file), ensure that the Pragma_Name component is set
593         to Unknown_Pragma (not left uninitialized).
594
595 2011-08-29  Vincent Celier  <celier@adacore.com>
596
597         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
598         modified to compute correctly the object path of a SAL project that is
599         extending another library project.
600         (Write_Path_File): New procedure.
601         * makeutl.ads (Directories): New table moved from Buildgpr
602         (Get_Directories): New procedure moved from Buildgpr
603         (Write_Path_File): New procedure
604         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
605         paths before binding SALs, instead of Set_Ada_Paths.
606         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
607         Prj.
608         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
609         (Current_Source_Path_File_Of): New function
610         (Set_Current_Object_Path_File_Of): New procedure
611         (Current_Source_Object_File_Of): New function
612         (Set_Current_Object_Path_File_Of): New procedure
613         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
614         (Current_Source_Path_File_Of): New function
615         (Set_Current_Object_Path_File_Of): New procedure
616         (Current_Source_Object_File_Of): New function
617         (Set_Current_Object_Path_File_Of): New procedure
618
619 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
620
621         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
622         packed entity, use a bit-field assignment only if there is no change of
623         representation.
624
625 2011-08-29  Thomas Quinot  <quinot@adacore.com>
626
627         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
628         Is_RTU instead of using Chars comparisons.
629
630 2011-08-29  Thomas Quinot  <quinot@adacore.com>
631
632         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
633         temporary object if the actual is constrained, and the discriminants
634         read from the stream don't match.
635
636 2011-08-29  Tristan Gingold  <gingold@adacore.com>
637
638         * sem_attr.adb, exp_attr.adb: Add handling of
639         Attribute_System_Allocator_Alignment
640         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
641         Attribute_System_Allocator_Alignment.
642         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
643         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
644         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
645         get_target_system_allocator_alignment.
646
647 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
648
649         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
650         dependencies.
651
652 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
653
654         * exp_ch3.adb (In_Runtime): Fix typo.
655
656 2011-08-29  Bob Duff  <duff@adacore.com>
657
658         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
659
660 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
661
662         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
663         and a separate tag assignment is generated, ensure that the tag
664         assignment is analyzed.
665
666 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
667
668         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
669         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
670         of statement lists that may contain local declarations.
671         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
672         duplicate the triggering statements needed for the expansion of this
673         construct, when the trigger is a dispatching call to a synchronized
674         primitive.
675
676 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
677
678         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
679         * bindgen.adb: Add comments.
680         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
681         in CodePeer mode.
682
683 2011-08-29  Robert Dewar  <dewar@adacore.com>
684
685         * exp_attr.adb: Minor reformatting.
686         Minor code reorganization and commenting.
687         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
688         reformatting.
689
690 2011-08-29  Thomas Quinot  <quinot@adacore.com>
691
692         * get_scos.adb: Ignore chaining indicators not currently supported
693         by Ada.
694
695 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
696
697         * system.ads: Minor editing.
698
699 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
700
701         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
702         CodePeer mode.
703         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
704         Attribute_Elab_Subp_Body.
705         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
706         * sem_util.adb: Update comments.
707
708 2011-08-29  Thomas Quinot  <quinot@adacore.com>
709
710         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
711         pragma name for each SCO statement corresponding to a pragma.
712
713 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
714
715         * opt.ads: Minor editing.
716
717 2011-08-29  Yannick Moy  <moy@adacore.com>
718
719         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
720         that only made sense for CodePeer mode.
721
722 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
723
724         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
725         which is no longer used.
726         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
727         handling of the 64-bit division check.
728         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
729         division available.
730         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
731         longer used.
732
733 2011-08-29  Thomas Quinot  <quinot@adacore.com>
734
735         * get_scos.adb: Minor reformatting.
736
737 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
738
739         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
740         statement list is wrapped in a block, the block is explicitly analyzed
741         in order to properly redecorate the entities and create a servicing
742         finalizer.
743
744 2011-08-29  Tristan Gingold  <gingold@adacore.com>
745
746         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
747         (Set_Zero_Cost_Handling): Remove.
748
749 2011-08-29  Thomas Quinot  <quinot@adacore.com>
750
751         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
752
753 2011-08-29  Geert Bosch  <bosch@adacore.com>
754
755         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
756         instruction, as the latter may produce -0.0, which is not a valid VAX
757         F float number.
758         (Neg_G): Likewise for VAX F float.
759
760 2011-08-29  Robert Dewar  <dewar@adacore.com>
761
762         * exp_util.adb: Minor reformatting.
763
764 2011-08-29  Yannick Moy  <moy@adacore.com>
765
766         * sem_ch3.adb: Minor comment update.
767
768 2011-08-29  Thomas Quinot  <quinot@adacore.com>
769
770         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
771         the operand type.
772
773 2011-08-29  Thomas Quinot  <quinot@adacore.com>
774
775         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
776         current statement sequence on a generic instantiation or a subprogram
777         declaration.
778
779 2011-08-29  Robert Dewar  <dewar@adacore.com>
780
781         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
782         Minor reformatting.
783
784 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
785
786         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
787         Correct the check which involves the freeze node of a controlled or
788         access-to-controlled type.
789
790 2011-08-29  Geert Bosch  <bosch@adacore.com>
791
792         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
793         statements.
794         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
795         Asm statements.
796
797 2011-08-29  Yannick Moy  <moy@adacore.com>
798
799         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
800         for every index type and component type that is not a subtype_mark.
801         (Process_Subtype): Set Etype of subtype.
802
803 2011-08-29  Robert Dewar  <dewar@adacore.com>
804
805         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
806         reorganization.  Minor reformatting.
807
808 2011-08-29  Steve Baird  <baird@adacore.com>
809
810         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
811         for CodePeer and ALFA modes.
812
813 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
814
815         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
816         that comes from an enclosing scope if it is not the renaming of an
817         actual, to handle properly a spurious ambiguity in an instance.
818
819 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
820
821         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
822         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
823         use it instead of the Esize of the first parameter.
824         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
825         above change.
826         <Size>: Likewise.  Call it for composite types on the RM size.
827
828 2011-08-29  Yannick Moy  <moy@adacore.com>
829
830         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
831         * sem_util.adb (Unique_Name): Correct behaviour for names of
832         compilation units.
833
834 2011-08-29  Yannick Moy  <moy@adacore.com>
835
836         * sem_prag.adb (Check_Precondition_Postcondition): In formal
837         verification mode, analyze pragma expression for correctness, for
838         pre/post on library-level subprogram, as it is not expanded later.
839
840 2011-08-29  Yannick Moy  <moy@adacore.com>
841
842         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
843         in formal verification.
844
845 2011-08-29  Thomas Quinot  <quinot@adacore.com>
846
847         * sem_util.adb: Minor reformatting.
848         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
849         there's no pragma.
850         * par_sco.ads, par_sco.adb: Update comments.
851
852 2011-08-29  Yannick Moy  <moy@adacore.com>
853
854         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
855         associated getter/setter.
856         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
857
858 2011-08-29  Vincent Celier  <celier@adacore.com>
859
860         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
861         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
862         with declarations for Language_Kind and Dependency_Kind for Ada.
863         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
864         (Process_Compiler): Take into account the new attributes Dependency_Kind
865         and Language_Kind.
866         (Check_Configuration): Check if language kind is unit based, not if the
867         language name is Ada.
868         (Process_Exceptions_Unit_Based): Ditto
869         (Add_Language): Remove default additions of language and dependency kind
870         * prj.ads: Minor comment change
871         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
872
873 2011-08-29  Johannes Kanig  <kanig@adacore.com>
874
875         * debug.adb: Update comments.
876
877 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
878
879         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
880         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
881         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
882         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
883         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
884
885 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
886
887         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
888         (GNATLIBCFLAGS_FOR_C): Replace
889         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
890         (gnatlib-shared-default, gnatlib-shared-dual-win32)
891         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
892         (gnatlib-sjlj, gnatlib-zcx): Likewise.
893
894 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
895
896         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
897
898         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
899
900         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
901
902 2011-08-05  Nicolas Roche  <roche@adacore.com>
903
904         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
905         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
906         canadian cross.
907         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
908
909 2011-08-05  Matthew Heaney  <heaney@adacore.com>
910
911         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
912         subprogram bodies declared out-of-order.
913
914 2011-08-05  Yannick Moy  <moy@adacore.com>
915
916         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
917         entities directly in package Standard, otherwise skip the standard
918         prefix.
919
920 2011-08-05  Robert Dewar  <dewar@adacore.com>
921
922         * a-cbmutr.adb: Minor reformatting
923         (Allocate_Node): refactor node allocation algorithm
924
925 2011-08-05  Robert Dewar  <dewar@adacore.com>
926
927         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
928         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
929         mode.
930         (Analyze_Pragma, case Check_Policy): Ditto.
931         * sem_prag.ads (Check_Disabled): New function
932         * snames.ads-tmpl: Add Name_Disable.
933
934 2011-08-05  Robert Dewar  <dewar@adacore.com>
935
936         * gnat_rm.texi: Document implementation-defined policy DISABLE for
937         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
938
939 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
940
941         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
942         that appears in a generic formal part and applies to a formal
943         subprogram.
944
945 2011-08-05  Robert Dewar  <dewar@adacore.com>
946
947         * a-cbmutr.ads: Minor reformatting.
948
949 2011-08-05  Matthew Heaney  <heaney@adacore.com>
950
951         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
952         to check count, check sign of value instead.
953         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
954         (Copy_Subtree): allocate copy of source element
955         (Equal_Subtree): compare elements, not access objects
956
957 2011-08-05  Vincent Celier  <celier@adacore.com>
958
959         * gnat_ugn.texi: Fix VMS alternative.
960
961 2011-08-05  Thomas Quinot  <quinot@adacore.com>
962
963         * sem_ch11.adb: Add comment.
964
965 2011-08-05  Robert Dewar  <dewar@adacore.com>
966
967         * exp_util.adb: Minor comment fix.
968
969 2011-08-05  Robert Dewar  <dewar@adacore.com>
970
971         * scng.adb (Error_Unterminated_String): Improve flag position when
972         comma present.
973
974 2011-08-05  Matthew Heaney  <heaney@adacore.com>
975
976         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
977         tree containers).
978         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
979         multiway tree containers.
980
981 2011-08-05  Robert Dewar  <dewar@adacore.com>
982
983         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
984         * stylesw.adb: Implement -gnatyC to control comment spacing
985         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
986         -gnatyc/C).
987         * usage.adb: Add line for -gnatyC.
988
989 2011-08-05  Robert Dewar  <dewar@adacore.com>
990
991         * gnat_ugn.texi: Document -gnatyC.
992         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
993         synonym for COMMENTS2).
994
995 2011-08-05  Robert Dewar  <dewar@adacore.com>
996
997         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
998         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
999         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1000         a-comutr.ads, lib-xref.adb: Minor reformatting.
1001
1002 2011-08-05  Robert Dewar  <dewar@adacore.com>
1003
1004         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1005         warning if there is an exception handler present.
1006
1007 2011-08-05  Pascal Obry  <obry@adacore.com>
1008
1009         * a-iteint.ads: Fix copyright year.
1010
1011 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1012
1013         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1014         statement SCO for a USE clause or a representation clause.
1015
1016 2011-08-05  Yannick Moy  <moy@adacore.com>
1017
1018         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1019         between body and spec for stub.
1020         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1021         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1022         pragma precondition or postcondition, for which the enclosing
1023         subprogram or package in the AST is not the desired one, return empty.
1024
1025 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1026
1027         * g-expect.adb: Minor reformatting.
1028
1029 2011-08-05  Bob Duff  <duff@adacore.com>
1030
1031         * a-fihema.adb: Comment out OS_Lib.
1032
1033 2011-08-05  Matthew Heaney  <heaney@adacore.com>
1034
1035         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1036         (unbounded multiway tree containers) and a-iteint.ads.
1037         * a-comutr.ads, a-comutr.adb:
1038         This is the new Ada 2012 unit for unbounded multiway tree containers
1039         * a-cimutr.ads, a-cimutr.adb
1040         This is the new Ada 2012 unit for indefinite multiway tree containers
1041         * a-iteint.ads: New file.
1042
1043 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1044
1045         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1046
1047 2011-08-05  Bob Duff  <duff@adacore.com>
1048
1049         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1050         subpools.
1051         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1052
1053 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1054
1055         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1056         general indexing aspects of Ada2012. Called when analyzing indexed
1057         components when other interpretations fail.
1058         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1059         in an expression context where overloading is meaningful. This excludes
1060         the occurrence in an aspect specification (efficiency only).
1061         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1062         related to iterators can be set by an attribute specification, but
1063         cannot be queried.
1064         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1065         Constant_Indexing and Variable_Indexing.
1066         (Check_Indexing_Functions): New procedure to perform legality checks.
1067         Additional semantic checks at end of declarations.
1068
1069 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1070
1071         * tree_io.ads: Update ASIS_Version_Number because of the change of the
1072         order of calling Tree_Write/Tree_Read routines made for aspects.
1073
1074 2011-08-05  Bob Duff  <duff@adacore.com>
1075
1076         * a-fihema.adb (Finalize): Fix race condition.
1077
1078 2011-08-05  Yannick Moy  <moy@adacore.com>
1079
1080         * sem_ch12.adb (Analyze_Package_Instantiation,
1081         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1082         mode.
1083
1084 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1085
1086         * sem_type.adb (Specific_Type): in an instance, the type-specific
1087         operand of an equality check that involves null may have a private
1088         type. Use full view to determine legality of construct.
1089
1090 2011-08-05  Vincent Celier  <celier@adacore.com>
1091
1092         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1093         delete or close the file when the call to gnatmake was successful.
1094
1095 2011-08-05  Yannick Moy  <moy@adacore.com>
1096
1097         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1098         Global_Discard_Names.
1099
1100 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1101
1102         * sinfo.ads: comments on use of entity field for aspect specifications.
1103
1104 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1105
1106         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1107         node is not itself an entity but a selected component, it is a
1108         rewritten parameterless call to an en enclosing synchronized operation,
1109         and this expansion will be performed again in the instance, so there is
1110         no global information to preserve.
1111
1112 2011-08-05  Javier Miranda  <miranda@adacore.com>
1113
1114         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1115         for renamings of predefined primitives.
1116         (In_Predef_Prims_DT): New subprogram.
1117
1118 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1119
1120         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1121         possible interpretation of name is a reference type, add an
1122         interpretation that is the designated type of the reference
1123         discriminant of that type.
1124         * sem_res.adb (resolve): If the interpretation imposed by context is an
1125         implicit dereference, rewrite the node as the deference of the
1126         reference discriminant.
1127         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1128         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1129         parent type or base type.
1130         * sem_ch4.adb (Process_Indexed_Component,
1131         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1132         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1133         Check for implicit dereference.
1134         (List_Operand_Interps): Indicate when an implicit dereference is
1135         ambiguous.
1136         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1137
1138 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1139
1140         * scos.ads: Update documentation of SCO table. Pragma statements can now
1141         be marked as disabled (using 'p' instead of 'P' as the statement kind).
1142         * par_sco.ads, par_sco.adb: Implement the above change.
1143         (Process_Decisions_Defer): Generate a P decision for the first parameter
1144         of a dyadic pragma Debug.
1145         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1146         necessary.
1147         * put_scos.adb: Code simplification based on above change.
1148
1149 2011-08-05  Robert Dewar  <dewar@adacore.com>
1150
1151         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1152         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1153         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1154         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1155
1156 2011-08-05  Bob Duff  <duff@adacore.com>
1157
1158         * a-stunau.ads, g-spipat.adb: Update comments.
1159
1160 2011-08-05  Bob Duff  <duff@adacore.com>
1161
1162         * a-fihema.ads: Minor comment fix.
1163         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1164         correct.
1165         (Attach, Detach): Remove some unnecessary code.
1166         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1167
1168 2011-08-05  Bob Duff  <duff@adacore.com>
1169
1170         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1171         allocation for Objects component. This simplifies the code somewhat. It
1172         is also a little more efficient in the not-so-unusual case where there
1173         are no controlled objects allocated.
1174         Make Finalization_Started flag atomic.
1175         (Finalize): Avoid unnecessary detachment of items from the list.
1176         (pcol): Minor cleanup.
1177
1178 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1179
1180         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1181         package whose name is the same as that of the generic unit, or its
1182         ultimate prefix.
1183
1184 2011-08-05  Bob Duff  <duff@adacore.com>
1185
1186         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1187         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1188         Minor comment fixes.
1189
1190 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
1191
1192         * make.adb (Linking_Phase): No longer need to set source search path
1193         before calling gnatlink in CodePeer mode.
1194         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1195         gcc in CodePeer mode, since the binder generated file no longer has a
1196         'with Main'.
1197         * switch.ads, switch.adb (Is_Language_Switch): Removed.
1198         * switch-c.adb: Update comment.
1199
1200 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1201
1202         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1203
1204 2011-08-05  Nicolas Roche  <roche@adacore.com>
1205
1206         * gnat_ugn.texi: Fix minor syntax error issue.
1207
1208 2011-08-05  Vincent Celier  <celier@adacore.com>
1209
1210         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1211         delete or close the file when the call to gnatmake returns a non
1212         successful return code.
1213
1214 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1215
1216         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1217         check, indicate that the copy of the original node does not come from
1218         source, to prevent an infinite recursion of the expansion.
1219
1220 2011-08-05  Johannes Kanig  <kanig@adacore.com>
1221
1222         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1223         VC generation for subprogram bodies.
1224
1225 2011-08-05  Yannick Moy  <moy@adacore.com>
1226
1227         * einfo.ads: Typo.
1228         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1229         the base type with the smallest allowed base type.
1230
1231 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1232
1233         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1234         aspects.
1235
1236 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1237
1238         * sem_ch12.ads: minor comment updates.
1239
1240 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1241
1242         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1243         instantiation and a formal package the compiler generates a package
1244         renaming declaration so that the generic name within the declaration
1245         is interpreted as a renaming of the instance. At the end of a formal
1246         package declaration, this renaming must become invisible.
1247
1248 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1249
1250         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1251         comparison and rely on concrete entities instead.
1252
1253 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1254
1255         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1256         and discriminants, to indicate that the type has an access discriminant
1257         that supports implicit dereference.
1258         * snames.ads-tmpl: Add names of aspects and attributes related to
1259         Ada2012 iterators: constant_indexing, default_iterator,
1260         iterator_element, implicit_dereference, variable_indexing.
1261         * aspects.ads, aspects.adb: entries for iterator-related aspects.
1262         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1263         iterator-related aspects.
1264         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1265
1266 2011-08-05  Sergey Rybin  <rybin@adacore.com>
1267
1268         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1269         metrics in gnatmetric to cover new kinds of coupling mentrics.
1270
1271 2011-08-05  Steve Baird  <baird@adacore.com>
1272
1273         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1274         of calling the user-defined main subprogram.
1275         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
1276         is set) Call_Main_Subprogram ahead of, as opposed to
1277         inside of, Main.
1278         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1279         generation of a "with" of the user-defined main subprogram.
1280         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1281         (which is now called from Gen_Main instead).
1282
1283 2011-08-05  Emmanuel Briot  <briot@adacore.com>
1284
1285         * projects.texi: Added reference to the Makefile package.
1286
1287 2011-08-05  Thomas Quinot  <quinot@adacore.com>
1288
1289         * exp_ch7.adb: Minor comment rewording.
1290
1291 2011-08-05  Ed Falis  <falis@adacore.com>
1292
1293         * env.c: Fix comment.
1294
1295 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1296
1297         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1298         character comparison and rely on concrete entities instead.
1299
1300 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1301
1302         * sem_ch3.adb: (Check_Private_Overriding): better error message,
1303         suggested by AI95-0068.
1304
1305 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
1306
1307         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1308         the two potential initialization calls. This accounts for any
1309         access-before-elaboration checks which may precede the initialization
1310         calls.
1311         (Next_Suitable_Statement): New routine. Returns the next real statement
1312         after the input node while skipping generated checks.
1313         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1314         with comment on usage.
1315         Do not generate Elaborate_All when the trigger is a finalization call
1316         coming from a type init proc.
1317         (Check_Elab_Call): Propagate the initialization procedure context to
1318         subsequent calls to Check_A_Call.
1319         (Check_Internal_Call_Continue): Propagate the initialization procedure
1320         context to subsequent calls to Check_Elab_Call.
1321         (Is_Finalization_Procedure): New routine. Returns True if the input
1322         entity denotes a [Deep_]Finalize routine.
1323         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1324         along with comment on usage.
1325
1326 2011-08-05  Vadim Godunko  <godunko@adacore.com>
1327
1328         * s-atocou.ads: Add list of supported platforms.
1329
1330 2011-08-05  Yannick Moy  <moy@adacore.com>
1331
1332         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1333
1334         * opt.ads (Disable_ALI_File): new Boolean flag
1335         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1336
1337 2011-08-05  Ed Falis  <falis@adacore.com>
1338
1339         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1340         environ is properly defined.
1341
1342 2011-08-05  Vincent Celier  <celier@adacore.com>
1343
1344         * make.adb (Compilation_Phase): Exit immediately when all objects have
1345         been found up to date, to avoid multiple exit messages.
1346         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1347         same project for languages with no compiler.
1348         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1349         -eI.
1350 2011-08-05  Robert Dewar  <dewar@adacore.com>
1351
1352         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1353         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1354         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1355         s-atocou-builtin.adb: Minor reformatting.
1356
1357 2011-08-05  Yannick Moy  <moy@adacore.com>
1358
1359         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1360         if the node to wrap is a pragma check, this node and enclosed
1361         expression are not expanded, so do not apply any transformations here.
1362         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1363         introducing transient scopes.
1364
1365 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
1366
1367         * adaint.c (__gnat_set_writable, __gnat_set_readable,
1368         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1369         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1370         routine is available, so we use the default implementation of these
1371         functions.
1372         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1373         support for copying attributes on VxWorks 6.
1374
1375 2011-08-05  Yannick Moy  <moy@adacore.com>
1376
1377         * debug.adb: Remove use of -gnatd.D.
1378         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1379         * opt.ads: Simplify variables for ALFA mode, to keep one only
1380         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1381         to ALFA mode.
1382
1383 2011-08-05  Vincent Celier  <celier@adacore.com>
1384
1385         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1386         Builder'Default_Switches.
1387
1388 2011-08-05  Vincent Celier  <celier@adacore.com>
1389
1390         * makeusg.adb: Add lines for --create-map-file switches.
1391
1392 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
1393
1394         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1395         profile is incomplete and the full view is available, replace it with
1396         the full view.
1397         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1398         incomplete, freezing the subprogram is delayed until the full view is
1399         frozen.
1400         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1401         fixed-point multiplication operator and the predefined operator is
1402         resolved in favor of the user-defined one.
1403
1404 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1405
1406         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1407         CONST_CAST.
1408
1409 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1410
1411         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1412         whether a type lacks user-defined Read or Write operations, or has a
1413         component that lacks them.
1414         * sem_attr.adb (Check_Stream_Attribute): if restriction
1415         No_Default_Stream_Attributes is active, verify that all subcomponent
1416         types of the target have user-defined stream operations, and report
1417         error otherwise.
1418         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1419         * exp_strm.adb: Build_Elementary_Input_Call,
1420         Build_Elementary_Write_Call): remove checks for restriction
1421         No_Default_Stream_Attributes, now checked in semantics.
1422
1423 2011-08-04  Vincent Celier  <celier@adacore.com>
1424
1425         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1426         switches on the command line, look for all valid --RTS switches in the
1427         Builder switches and for each language use the first runtime name found
1428         to invoke gprconfig.
1429         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1430         command line and there is no auto-configuration.
1431         (Runtime_Name_Set_For): New function.
1432
1433 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1434
1435         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1436         elaborate initialization expression for variable Abort when processing
1437         a package body or a declaration.
1438         (Create_Finalizer): Propagate the package context when creating the
1439         exception-related variables.
1440         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1441         For_Package along with usage comment.
1442
1443 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1444
1445         * gcc-interface/Makefile.in: Clean up targets.
1446         Enable new package for atomic counters and copy-on-write implementation
1447         of unbounded strings on x86 platforms.
1448         * gcc-interface/Make-lang.in: Update dependencies.
1449
1450 2011-08-04  Robert Dewar  <dewar@adacore.com>
1451
1452         * exp_ch7.adb: Minor reformatting.
1453
1454 2011-08-04  Robert Dewar  <dewar@adacore.com>
1455
1456         * exp_strm.adb: Minor reformatting.
1457
1458 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1459
1460         * s-atocou.adb: Replace by dummy version and use on targets where atomic
1461         operations are not supported.
1462         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1463         * s-atocou-x86.adb: New file.
1464         * Makefile.rtl: Add s-atocou.o file
1465
1466 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1467
1468         * make.adb (Compile): Move setting of CodePeer_Mode to ...
1469         (Compilation_Phase): ... here.
1470         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1471
1472 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1473
1474         * Make-generated.in: Fix minor typo in comment.
1475
1476 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1477
1478         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1479         the project path.
1480
1481 2011-08-04  Robert Dewar  <dewar@adacore.com>
1482
1483         * a-coinho.adb: Minor reformatting.
1484
1485 2011-08-04  Robert Dewar  <dewar@adacore.com>
1486
1487         * a-coinho.ads: Minor reformatting.
1488
1489 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1490
1491         * s-atocou.ads, s-atocou.adb: New files.
1492         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1493         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1494         direct use of GCC's atomic builtins and replace them by use of new
1495         atomic counter package.
1496
1497 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1498
1499         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1500
1501 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1502
1503         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1504         with a call to Get_External_Tag.
1505         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1506         subprogram usage. Remove the guard against package declarations and
1507         bodies since Build_Cleanup_Statements is no longer invoked in that
1508         context.
1509         (Build_Components): Initialize Tagged_Type_Stmts when the context
1510         contains at least one library-level tagged type.
1511         (Build_Finalizer): New local variables Has_Tagged_Types and
1512         Tagged_Type_Stmts along with associated comments on usage. Update the
1513         logic to include tagged type processing.
1514         (Create_Finalizer): Insert all library-level tagged type unregistration
1515         code before the jump block circuitry.
1516         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1517         (Expand_N_Package_Declaration): Remove the call to
1518         Build_Cleanup_Statements.
1519         (Process_Tagged_Type_Declaration): New routine. Generate a call to
1520         unregister the external tag of a tagged type.
1521         (Processing_Actions): Reimplemented to handle tagged types.
1522         (Process_Declarations): Detect the declaration of a library-level
1523         tagged type and carry out the appropriate actions.
1524         (Unregister_Tagged_Types): Removed. The machinery has been directly
1525         merged with Build_Finalizer.
1526
1527 2011-08-04  Robert Dewar  <dewar@adacore.com>
1528
1529         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1530         gnatls.adb, exp_ch3.adb: Minor reformatting.
1531
1532 2011-08-04  Marc Sango  <sango@adacore.com>
1533
1534         * sem_attr.adb (Analyze_Attribute): Replace the message
1535         "invisible attribute of}" of the spark restriction violation in
1536         attribute reference by the simple message "invisible attribute of type".
1537         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1538         two insertion characters: '&' and '}'.
1539
1540 2011-08-04  Vadim Godunko  <godunko@adacore.com>
1541
1542         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1543         * a-coinho.ads, a-coinho.adb: New file.
1544         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1545
1546 2011-08-04  Nicolas Roche  <roche@adacore.com>
1547
1548         * alfa_test.adb: Not all ali files are containing alfa information even
1549         if compiled with -gnatd.F. So suppress warning about missing ALFA
1550         information.
1551
1552 2011-08-04  Yannick Moy  <moy@adacore.com>
1553
1554         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1555         scope.
1556         * put_alfa.adb: Check that scope name is not empty.
1557
1558 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1559
1560         * exp_ch3.adb (Stream_Operation_Ok): new predicate
1561         Needs_Elementary_Stream_Operation, to determine whether user-defined
1562         Read and Write attributes are available for the elementary components
1563         of the given type. If only the predefined attributes are available,
1564         then when restriction No_Default_Stream_Attributes is active the
1565         predefined stream attributes for the composite type cannot be created.
1566
1567 2011-08-04  Robert Dewar  <dewar@adacore.com>
1568
1569         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1570         Put routines in alpha order
1571
1572 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
1573
1574         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1575         * gcc-interface/Make-lang.in: Update dependencies.
1576
1577 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1578
1579         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1580         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1581         gnat1why).
1582
1583 2011-08-04  Robert Dewar  <dewar@adacore.com>
1584
1585         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1586         lib-xref-alfa.adb: Minor reformatting.
1587
1588 2011-08-04  Marc Sango  <sango@adacore.com>
1589
1590         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1591         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1592         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1593         mode.
1594
1595 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1596
1597         * bindgen.adb (Gen_Adainit_C): Remove.
1598         (Gen_Adafinal_C): Ditto.
1599         (Gen_Elab_Externals_C): Ditto.
1600         (Gen_Elab_Calls_C): Ditto.
1601         (Gen_Elab_Order_C): Ditto.
1602         (Gen_Elab_Defs_C): Ditto.
1603         (Gen_Finalize_Library_C): Ditto.
1604         (Gen_Finalize_Library_Defs_C): Ditto.
1605         (Gen_Main_C): Ditto.
1606         (Gen_Output_File_C): Ditto.
1607         (Gen_Restrictions_C): Ditto.
1608         (Gen_Versions_C): Ditto.
1609         (Write_Info_Ada_C): Ditto.
1610         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1611         (Gen_Output_File): Do not force Ada_Bind_File anymore.
1612         Always call Gen_Output_File_Ada.
1613         * gnatlink.adb (Begin_Info): Now a constant.
1614         (End_Info): Ditto.
1615         (Ada_Bind_File): Remove
1616         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
1617         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1618         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1619         * opt.ads (Ada_Bind_File): Remove.
1620
1621 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1622
1623         * projects.texi: Document target-specific directory in default project
1624         path for gnatmake.
1625
1626 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1627
1628         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1629         path in all cases .
1630
1631 2011-08-04  Yannick Moy  <moy@adacore.com>
1632
1633         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1634         opt.ads, lib-xref.ads: Code clean up.
1635
1636 2011-08-04  Yannick Moy  <moy@adacore.com>
1637
1638         * gnat_rm.texi: Update description of Test_Case
1639         * gnat_ugn.texi: Typo.
1640
1641 2011-08-04  Ed Falis  <falis@adacore.com>
1642
1643         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1644
1645 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1646
1647         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1648         it is of type Root_Controlled. This action eliminates fields Prev and
1649         Next from type equality.
1650
1651 2011-08-04  Yannick Moy  <moy@adacore.com>
1652
1653         * lib-xref-alfa.adb: Correct typo.
1654
1655 2011-08-04  Matthew Heaney  <heaney@adacore.com>
1656
1657         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1658         component.
1659
1660 2011-08-04  Yannick Moy  <moy@adacore.com>
1661
1662         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1663         (Analyze_Pragma): allow static string expression for name of Test_Case,
1664         instead of simply string literals.
1665         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1666         expressions.
1667
1668 2011-08-04  Vincent Celier  <celier@adacore.com>
1669
1670         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1671         case suffixes to find truncated main sources.
1672
1673 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1674
1675         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1676         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1677         (Compute_Current_Task): Ditto.
1678
1679 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1680
1681         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1682
1683 2011-08-04  Yannick Moy  <moy@adacore.com>
1684
1685         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1686         library-level constant.
1687         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1688         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1689         used as selector of parameter association, in ALFA mode.
1690
1691 2011-08-04  Robert Dewar  <dewar@adacore.com>
1692
1693         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1694         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1695         reformatting.
1696
1697 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1698
1699         * make.adb (Linking_Phase): Set source search path before calling
1700         gnatlink in CodePeer mode.
1701
1702 2011-08-04  Javier Miranda  <miranda@adacore.com>
1703
1704         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1705         Remove code which takes care of building TSDs.
1706         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1707         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1708         the accessibility check in VM targets.
1709         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1710         (Building_Static_DT): Now returns false for VM targets.
1711         (Build_VM_TSDs): Removed.
1712         (Expand_Interface_Conversion): Generate missing runtime check for
1713         conversions to interface types whose target type is unknown at compile
1714         time.
1715         (Make_VM_TSD): Add missing code to disable the generation of calls to
1716         Check_TSD if the tagged type is not defined at library level, or not
1717         has a representation clause specifying its external tag, or -gnatdQ is
1718         active.
1719         * exp_disp.ads (Build_VM_TSDs): Removed.
1720         (Make_VM_TSDs): Spec relocated from exp_disp.adb
1721         * sem_disp.adb (Check_Dispatching_Operation): No code required to
1722         register primitives in the dispatch tables in VM targets.
1723         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1724         initialization of class-wide interface objects in VM targets.
1725         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1726         of Make_DT).
1727
1728 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
1729
1730         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1731         when dotnet-ld cannot be found.
1732
1733 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
1734
1735         * bindgen.adb: Simplify significantly generation of binder body file in
1736         CodePeer mode.
1737         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1738         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1739         not expanded).
1740
1741 2011-08-04  Yannick Moy  <moy@adacore.com>
1742
1743         * sem_prag.adb, sem.ads: Code cleanup.
1744
1745 2011-08-04  Tristan Gingold  <gingold@adacore.com>
1746
1747         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1748         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1749         results if possible.
1750         * s-stusta.adb (Print): Adjust after changes in s-stausa.
1751         * gnat_ugn.texi: Update dynamic stack usage section.
1752
1753 2011-08-04  Steve Baird  <baird@adacore.com>
1754
1755         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1756         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1757         contains only a call to the user-defined main subprogram.
1758         (Gen_Main_Ada) - If CodePeer_Mode is set, then
1759         call the "wrapper" subprogram instead of directly
1760         calling the user-defined main subprogram.
1761
1762 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1763
1764         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1765         alternatives of a case statement for controlled objects. Rename local
1766         variable A to Dead_Alt.
1767         (Expand_N_If_Statement): Check the then and else statements of an if
1768         statement for controlled objects. Check the then statements of all
1769         elsif parts of an if statement for controlled objects.
1770         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1771         objects.
1772         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1773         detects a loop associated with the expansion of an array object.
1774         Augment the processing of the loop statements to account for a possible
1775         wrap done by Process_Statements_For_Controlled_Objects.
1776         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1777         statements and abortable part of an asynchronous select for controlled
1778         objects.
1779         (Expand_N_Conditional_Entry_Call): Check the else statements of a
1780         conditional entry call for controlled objects.
1781         (Expand_N_Selective_Accept): Check the alternatives of a selective
1782         accept for controlled objects.
1783         (Expand_N_Timed_Entry_Call): Check the entry call and delay
1784         alternatives of a timed entry call for controlled objects.
1785         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1786         exception handler for controlled objects.
1787         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1788         Add formal parameter Nested_Constructs along with its associated
1789         comment.
1790         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1791         Requires_Cleanup_Actions.
1792         (Process_Statements_For_Controlled_Objects): New routine.
1793         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1794         routine. Inspect a node which contains a non-handled sequence of
1795         statements for controlled objects. If such an object is found, the
1796         statements are wrapped in a block.
1797
1798 2011-08-04  Bob Duff  <duff@adacore.com>
1799
1800         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1801         need to compare with Class_Wide_Type (T2), in order to get at the
1802         original class-wide type node.
1803         * sem_type.ads (Covers): Improve the comment.
1804         * einfo.ads (Class_Wide_Type): Improve the comment.
1805         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1806         the type of the Deref.
1807
1808 2011-08-04  Yannick Moy  <moy@adacore.com>
1809
1810         * gnat_rm.texi: Document that Test_Case pragma can only appear on
1811         separate declarations.
1812         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1813         check identifier of pragma argument.
1814         (Chain_TC): check that no other test case associated to the same entity
1815         share the same name.
1816         (Check_Test_Case): disallow test case inside subprogram body
1817         (Analyze_Pragma): correct call to check identifier and not argument
1818         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1819         function gets name from test case pragma.
1820
1821 2011-08-04  Yannick Moy  <moy@adacore.com>
1822
1823         * gnat_rm.texi: Document new pragma and aspect.
1824         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1825         (No_Duplicates_Allowed): new constant array defining whether duplicates
1826         aspects of each kind can appear on the same declaration.
1827         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1828         field, which points to a node holding the previous Spec_PPC_List.
1829         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1830         through the indirection with Contract.
1831         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1832         * par-prag.adb (Prag): do nothing on Test_Case pragma
1833         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1834         be called directly.
1835         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1836         component Ensures of Test_Case.
1837         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1838         (Analyze_Generic_Subprogram_Declaration,
1839         Analyze_Subprogram_Instantiation,
1840         Analyze_Abstract_Subprogram_Declaration,
1841         Analyze_Subprogram_Body_Helper,
1842         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1843         insert contract in subprogram node at point of definition
1844         * sem_ch13.adb
1845         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1846         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1847         corresponding pragma
1848         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1849         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1850         similar to the analysis of pre/post
1851         (Derive_Subprogram): insert contract in subprogram node at point of
1852         derivation.
1853         * sem_prag.adb, sem_prag.ads
1854         (Check_Arg_Is_String_Literal, Check_Identifier):
1855         new checking procedures to be called in treatment of pragmas
1856         (Check_Test_Case): new procedure to check that a Test_Case aspect or
1857         pragma is well-formed. This does not check currently that 'Result is
1858         used only in the Ensures component of a Test_Case.
1859         (Analyze_Pragma): add case for Test_Case
1860         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1861         components of a Test_Case.
1862         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1863         expressions in the 3rd (and 4th if present) arguments of a Test_Case
1864         pragma, treated as spec expressions.
1865         (Sig_Flags): add value -1 for Test_Case.
1866         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1867         Get_Requires_From_Test_Case_Pragma): getters for both expression
1868         components of a Test_Case.
1869         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1870         indirection between an entry or [generic] subprogram entity and its
1871         pre/post + test-cases.
1872         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1873         get/set for fields of an N_Contract node.
1874         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1875         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1876         names and pragma for Test_Case.
1877         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1878
1879 2011-08-04  Vincent Celier  <celier@adacore.com>
1880
1881         * gnat_ugn.texi: Improve documentation of gnatmake switch
1882         --source-info-file=.
1883
1884 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1885
1886         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1887         type). Initialize Atyp to the appropriate type which is later checked
1888         for completion. Rewrite the assertion associated with private type
1889         completion.
1890
1891 2011-08-04  Ed Falis  <falis@adacore.com>
1892
1893         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1894         initialize the number of CPUs.
1895
1896 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1897
1898         * sem_type.adb (Disambiguate): New subsidiary routine
1899         In_Same_Declaration_List, to implement AI05-0020: a user-defined
1900         equality on an anonymous access type whose designated type is private
1901         does not lead to an ambiguity with the universal access equality
1902         operator in the body or child units of the defining package. The same
1903         is true for a multiplication operator on a private type completed with
1904         a fixed-point-type.
1905
1906 2011-08-04  Javier Miranda  <miranda@adacore.com>
1907
1908         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1909         (Normalize_Scalars_Config): Removed.
1910         * opt.adb
1911         (Register_Opt_Config_Switches): Remove registering config values of
1912         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1913         (Restore_Opt_Config_Switches): Remove code which restores the values of
1914         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1915         Init_Or_Norm_Scalars.
1916         (Save_Opt_Config_Switches): Remove code which saves values of
1917         Init_Or_Norm_Scalars and Normalize_Scalars.
1918         (Set_Opt_Config_Switches): Remove code which restores config values of
1919         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1920         Init_Or_Norm_Scalars.
1921
1922 2011-08-04  Yannick Moy  <moy@adacore.com>
1923
1924         * frontend.adb (Frontend): remove previous patch to avoid full
1925         qualification in ALFA mode.
1926         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1927         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1928         unique name for an entity, which could be used to identify the entity
1929         across compilation units.
1930
1931 2011-08-04  Thomas Quinot  <quinot@adacore.com>
1932
1933         * prj-env.adb
1934         (Initialize_Default_Project_Path): Add target specific directory
1935         ($prefix/$target/lib/gnat) in front of project path in all cases
1936         (making gnatmake's behaviour consistent with gprbuild).
1937         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1938         Pass target name from Sdefault to project subsystem.
1939         * gnatls.adb: Show new target specific default project directory.
1940
1941 2011-08-04  Johannes Kanig  <kanig@adacore.com>
1942
1943         * cstand.adb: Add Information to Identifier in Standard
1944         (Identifer_For): Set Entity to the corresponding entity
1945
1946 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1947
1948         * gnat_ugn.texi: Update doc on gnatcheck.
1949
1950 2011-08-04  Yannick Moy  <moy@adacore.com>
1951
1952         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1953         xrefs in a scope.
1954
1955 2011-08-04  Yannick Moy  <moy@adacore.com>
1956
1957         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1958         performing expansion.
1959         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1960         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1961         it is not called in ALFA mode.
1962
1963 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1964
1965         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1966         after all, so removed.
1967
1968 2011-08-04  Sergey Rybin  <rybin@adacore.com>
1969
1970         * vms_data.ads: Add missing VMS qualifiers.
1971
1972 2011-08-04  Emmanuel Briot  <briot@adacore.com>
1973
1974         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1975         the list of files on the command line after processing it through
1976         Complete_Mains.
1977
1978 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1979
1980         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1981         processing for .NET/JVM. These targets can now benefit from
1982         Raise_From_Controlled_Operation and they share the same processing with
1983         standard targets.
1984         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1985         These targets need transient scopes in order to properly finalize short
1986         lived controlled objects.
1987         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1988          NET/JVM. These targets can now benefit from
1989         Raise_From_Controlled_Operation and they share the same processing with
1990         standard targets.
1991
1992 2011-08-04  Geert Bosch  <bosch@adacore.com>
1993
1994         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1995
1996 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
1997
1998         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1999         Expand_Record_Aggregate, to determine whether aggregate must be
2000         expanded into assignments. This is the case if the ancestor part is
2001         private, regarless of the setting of the flag Has_Private_Ancestor.
2002
2003 2011-08-04  Ed Falis  <falis@adacore.com>
2004
2005         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2006
2007 2011-08-04  Bob Duff  <duff@adacore.com>
2008
2009         * sinfo.ads: Fix comment.
2010
2011 2011-08-04  Steve Baird  <baird@adacore.com>
2012
2013         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2014         choose a package name in much the same way as is
2015         done for JGNAT when VM_Target /= No_VM, except that
2016         a slightly more distinctive prefix string is used.
2017
2018 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2019
2020         * makeutl.adb (Complete_Mains): no longer accept unit names on the
2021         gnatmake command line.
2022         This behavior was never documented (and was supported only because of
2023         an early bug in the code). This case might lead to ambiguous cases
2024         (between unit names and truncated base names without suffixes).
2025
2026 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2027
2028         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2029         Remove the external tag of a tagged type from the internal hash table.
2030         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2031         expanded usage of the routine. Strenghten the check for Is_Master. Add
2032         processing for tagged types.
2033         (Build_Finalizer): Create all the necessary lists used in finalizer
2034         creation when the processed context is a package that may contain
2035         tagged types.
2036         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2037         Requires_Cleanup_Actions.
2038         (Expand_N_Package_Body): Package bodies may need clean up code
2039         depending on whether they contain tagged types.
2040         (Expand_N_Package_Declaration): Package declarations may need clean up
2041         code depending on whether they contain tagged types.
2042         (Unregister_Tagged_Types): New routine. Search through a list of
2043         declarations or statements, looking for non-abstract Ada tagged types.
2044         For each such type, generate code to unregister the external tag.
2045         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2046         Requires_Cleanup_Actions.
2047         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2048         through a list of declarations or statements looking for non-abstract
2049         Ada tagged types or controlled objects.
2050         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2051         Requires_Cleanup_Actions.
2052         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2053         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2054         RE_Unit_Table.
2055
2056 2011-08-04  Vincent Celier  <celier@adacore.com>
2057
2058         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2059         has Ada sources, not project Project, because if the root project
2060         Project has no sources of its own, all projects will be deemed without
2061         sources.
2062
2063 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2064
2065         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2066         of the No_Param_Proc acc-to-subp type used for initialization of
2067         __gnat_finalize_library_objects so that it's declared at library level
2068         rather than nested inside of the adainit routine.
2069
2070 2011-08-04  Javier Miranda  <miranda@adacore.com>
2071
2072         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2073         if the tagged type has a representation clause which specifies its
2074         external tag.
2075
2076 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2077
2078         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2079         Remove previous procedure with that name.
2080         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2081         when appropriate.
2082         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2083         subtype mark, the ancestor cannot have unknown discriminants.
2084         (Resolve_Record_Aggregate): if the type has invisible components
2085         because of a private ancestor, the aggregate is illegal.
2086
2087 2011-08-04  Vincent Celier  <celier@adacore.com>
2088
2089         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2090         account switches -gnat2005, -gnat12 and -gnat2012.
2091
2092 2011-08-04  Bob Duff  <duff@adacore.com>
2093
2094         * s-tasdeb.ads: Minor comment fix.
2095
2096 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2097
2098         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2099         CodePeer mode.
2100         * switch.ads, switch.adb (Is_Language_Switch): New function.
2101
2102 2011-08-04  Vincent Celier  <celier@adacore.com>
2103
2104         * switch-c.adb: Minor comment addition.
2105
2106 2011-08-04  Vincent Celier  <celier@adacore.com>
2107
2108         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2109         ending with '=' is followed by a space (missing file name).
2110
2111 2011-08-04  Pascal Obry  <obry@adacore.com>
2112
2113         * g-regist.ads: Fix size of HKEY on x86_64-windows.
2114
2115 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2116
2117         * sem_ch12.adb (Analyze_Associations): New routine
2118         Check_Overloaded_Formal_Subprogram to reject a formal package when
2119         there is a named association or a box initialisation for an overloaded
2120         formal subprogram of the corresponding generic.
2121
2122 2011-08-04  Yannick Moy  <moy@adacore.com>
2123
2124         * alfa.ads (ALFA_Xref_Record): add component for type of entity
2125         * get_alfa.adb, put_alfa.adb: Read and write new component of
2126         cross-reference.
2127         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2128
2129 2011-08-04  Pascal Obry  <obry@adacore.com>
2130
2131         * urealp.adb: Minor reformatting.
2132
2133 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2134
2135         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2136         Handle the case when Cleanup_Protected_Object returns Empty.
2137
2138 2011-08-04  Yannick Moy  <moy@adacore.com>
2139
2140         * frontend.adb (Frontend): only qualify names in non-ALFA mode
2141
2142 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2143
2144         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2145         call, ignore functions.
2146
2147 2011-08-04  Geert Bosch  <bosch@adacore.com>
2148
2149         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2150         point.
2151
2152 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2153
2154         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2155         as an index for Builder'Switches. This conforms to the documentation.
2156         * make.adb (Insert_Project_Sources): avoid duplicate code
2157
2158 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2159
2160         * makeutl.adb (Complete_Mains): if the user has passed a relative file
2161         name on the command line (for instance "../dummy"), never assume it can
2162         be a unit name.
2163
2164 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2165
2166         * bindgen.adb: Remove code the reference or create the
2167         Break_Start/__gnat_break_start procedure.
2168         * s-stalib.adb (Break_Start): Removed.
2169
2170 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2171
2172         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2173         shared with gprbuild.
2174
2175 2011-08-04  Yannick Moy  <moy@adacore.com>
2176
2177         * par-ch4.adb (P_Primary): preferentially issue an error message about
2178         a missing parenthesis arount a conditional or case expression in Ada
2179         2012 mode, if we detect that the alignment is not correct for a
2180         statement.
2181
2182 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2183
2184         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2185         tag-to-class-wide conversion as needing finalization actions.
2186         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2187         a tag-to-class-wide conversion as needing finalization actions.
2188         (Is_Finalizable_Transient): The result of a tag-to-class-wide
2189         conversion does not need finalization actions.
2190         (Is_Tag_To_CW_Conversion): New routine.
2191         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2192         whether an object is the result of a tag-to-class-wide conversion.
2193
2194 2011-08-04  Yannick Moy  <moy@adacore.com>
2195
2196         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2197         the left-hand-side and right-hand-side of a conjunct are inserted when
2198         translating a pre- or postcondition
2199         * sem_ch6.adb: Correct typo in comment
2200
2201 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2202
2203         * gnat_rm.texi: Ravenscar does not prohibit dependence on
2204         Unchecked_Conversion and Unchecked_Deallocation.
2205
2206 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2207
2208         * make.adb: Minor reformatting.
2209
2210 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2211
2212         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2213         sources in the project and its imported projects, but not in the whole
2214         tree.
2215
2216 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2217
2218         * make.adb: Remove debug trace.
2219
2220 2011-08-04  Vincent Celier  <celier@adacore.com>
2221
2222         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2223         path in canonical form, to be able to compare path names on platforms
2224         such as Windows or Darwin.
2225
2226 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2227
2228         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2229         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2230         * scos.ads: Update documentation accordingly.
2231         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2232         pragmas.
2233
2234 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2235
2236         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2237         attribute only if prefix type is scalar.
2238
2239 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2240
2241         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2242         in gnatmake for specifying mains on the command line that do not belong
2243         to the main project. These mains must currently all belong to the same
2244         project, though.
2245         (Ultimate_Extension_Of): removed, since duplicated
2246         Ultimate_Extending_Project.
2247
2248 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2249
2250         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2251         instead.
2252         (CodePeer_Mode_String): New.
2253         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2254         CodePeer mode.
2255         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2256         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2257         mode, since no useful elaboration subprogram is needed by CodePeer.
2258         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2259         In this mode, compile binder file with -gnatC and do stop after this
2260         step.
2261
2262 2011-08-04  Vincent Celier  <celier@adacore.com>
2263
2264         * exp_ch7.adb: Minor comment fix.
2265
2266 2011-08-04  Robert Dewar  <dewar@adacore.com>
2267
2268         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2269         exp_ch4.adb, makeutl.adb: Minor reformatting.
2270
2271 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2272
2273         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2274         Create several new subprograms to move code out of Make. This makes the
2275         code more readable, removes code duplication, and is a preparation work
2276         for adding support for aggregate projects.
2277
2278 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2279
2280         * s-po32gl.ads, s-po32gl.adb: New files.
2281         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2282         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2283         (Build_Finalization_Collection): Use it.
2284         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2285         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2286         literals.
2287         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2288         * gcc-interface/Make-lang.in: Update dependencies.
2289
2290 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2291
2292         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2293         the command line.
2294
2295 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2296
2297         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2298         command line is not a file name, also check whether it could be a unit
2299         name.
2300
2301 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2302
2303         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2304         the header of the finalization routine.
2305         If the unit has no finalizer but is a body whose spec has one, then
2306         generate the decrement of the elaboration entity only.
2307         If the unit has a finalizer and is a spec, then do not generate the
2308         decrement of the elaboration entity.
2309         (Gen_Finalize_Library_C): Likewise.
2310
2311 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2312
2313         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2314         (Bounds_Size_Expression): Removed.
2315         (Double_Alignment_Of): New subsidiary routine.
2316         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2317         for a hole in the dope vector of unconstrained arrays due to different
2318         index and element alignments.
2319
2320 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2321
2322         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2323         raise program_error because body has not been seen yet.
2324
2325 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2326
2327         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2328         an unresolved name.
2329
2330 2011-08-04  Vincent Celier  <celier@adacore.com>
2331
2332         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2333
2334 2011-08-04  Yannick Moy  <moy@adacore.com>
2335
2336         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2337         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2338
2339 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2340
2341         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2342         instantiation in RCI.
2343
2344 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2345
2346         * make.adb: Share more code with gprbuild
2347
2348 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2349
2350         * projects.texi: Added documentation for the IDE'Gnat project file
2351         attribute.
2352
2353 2011-08-04  Nicolas Roche  <roche@adacore.com>
2354
2355         * gnat_rm.texi: Minor editing.
2356
2357 2011-08-04  Javier Miranda  <miranda@adacore.com>
2358
2359         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2360         and the library case for VM targets.
2361         (Gen_Adainit_Ada): Likewise.
2362
2363 2011-08-04  Robert Dewar  <dewar@adacore.com>
2364
2365         * g-altive.ads: Minor comment updates.
2366         * prj-nmsc.adb: Minor reformatting.
2367
2368 2011-08-04  Javier Miranda  <miranda@adacore.com>
2369
2370         * opt.ads
2371         (Normalize_Scalars_Config): Value of the configuration switch set by
2372         pragma Normalize_Scalars when it appears in the gnat.adc file.
2373         (Normalize_Scalars): New field for record Config_Switches_Type. Used
2374         to save and restore settings of this pragma.
2375         * opt.adb
2376         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2377         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2378
2379 2011-08-04  Vincent Celier  <celier@adacore.com>
2380
2381         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2382
2383 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2384
2385         * makeutl.adb: Minor reformatting.
2386
2387 2011-08-04  Olivier Hainque  <hainque@adacore.com>
2388
2389         * g-altive.ads: Update comments to reflect that only the soft
2390         binding is available today.
2391
2392 2011-08-04  Robert Dewar  <dewar@adacore.com>
2393
2394         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2395         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2396         * gcc-interface/Make-lang.in: Update dependencies.
2397
2398 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2399
2400         * prj-env.adb: Remove local debug traces.
2401
2402 2011-08-04  Yannick Moy  <moy@adacore.com>
2403
2404         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2405         was used instead of Hi_OK, which could cause a read of an uninitialized
2406         value later on. Detected while working on the new warning.
2407         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2408         to local variable.
2409         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2410         in more cases, in order to detect more unreferenced values.
2411         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2412         object for expression, if any.
2413
2414 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2415
2416         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2417         the operand types instead of the Esize.
2418
2419 2011-08-04  Steve Baird  <baird@adacore.com>
2420
2421         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2422         enable CodePeer_Mode.
2423         * bindusg.adb (Display): Add help message describing -P binder switch.
2424         * gnat_ugn.texi: Document -P binder switch.
2425         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2426         user-defined main program directly.
2427         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2428         user-defined main program in the context clause of the package body.
2429
2430 2011-08-04  Yannick Moy  <moy@adacore.com>
2431
2432         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2433         duplicate of Defining_Entity
2434         (Get_Unique_Entity_For_Decl): rename function into
2435         Unique_Defining_Entity
2436         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2437         (Formal_Proof_On): remove synthesized flag
2438         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2439         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2440         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2441         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2442         Annotate (Formal_Proof)
2443
2444 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2445
2446         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2447         source files with non-standard naming schemes, in imported projects
2448
2449 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2450
2451         * makeutl.adb (Complete_Mains): when a multi-unit source file is
2452         specified on the gprbuild command line, we need to compile all units
2453         within that file, not just the first one we find
2454         Fix error message for mains that are not found.
2455
2456 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2457
2458         * sem_ch6.adb: Update comment.
2459         * sem_ch12.adb: Minor reformatting.
2460
2461 2011-08-04  Bob Duff  <duff@adacore.com>
2462
2463         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2464         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2465         race condition whose symptom is to fail to lock Parent. That, in turn,
2466         causes Parent.Awake_Count to be accessed without locking Parent, which
2467         causes another race condition whose symptom is that Parent.Awake_Count
2468         can be off by 1 (either too high or too low). The solution is to lock
2469         Parent unconditionally, and then lock Acceptor, before reading
2470         Acceptor.Terminate_Alternative.
2471
2472 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2473
2474         * debug.adb: Update comment.
2475
2476 2011-08-04  Robert Dewar  <dewar@adacore.com>
2477
2478         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2479         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2480         exp_ch6.adb: Minor reformatting.
2481
2482 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2483
2484         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2485         checks for -gnateE.
2486
2487 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2488
2489         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2490
2491 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2492
2493         * sinfo.ads: Minor reformatting.
2494
2495 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2496
2497         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2498         even if there is no location.
2499
2500 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2501
2502         * sem_res.adb, sem_ch4.adb: move check for restriction
2503         No_Task_Hierarchy to resolve_allocator.
2504
2505 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2506
2507         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2508         This flag of N_Pragma nodes is not used, remove it as well as all of
2509         the associated circuitry.
2510
2511 2011-08-04  Javier Miranda  <miranda@adacore.com>
2512
2513         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2514         runtime check on duplicated externa tags
2515         * debug.adb Document switch -gnatdQ.
2516
2517 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
2518
2519         * a-fihema.ads: Minor typo fix.
2520
2521 2011-08-04  Yannick Moy  <moy@adacore.com>
2522
2523         * sem_ch10.adb: Minor comment update.
2524
2525 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2526
2527         * einfo.adb: Update the node field usage to reflect the renaming of
2528         Return_Flag to Return_ Flag_Or_Transient_Decl.
2529         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2530         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2531         (Write_Field15_Name): Change Return_Flag to
2532         Return_Flag_Or_Transient_Decl.
2533         * einfo.ads: Rename node field Return_Flag to
2534         Return_Flag_Or_Transient_Decl. Update the associated comment and all
2535         occurrences in entities.
2536         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2537         associated Inline pragma.
2538         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2539         associated Inline pragma.
2540         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2541         routine.
2542         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2543         Return_Flag and Set_Return_Flag.
2544         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2545         objects generated for controlled transients declared inside an
2546         Exception_With_Actions. Update the calls to Return_Flag.
2547         (Process_Object_Declaration): Add code to add a null guard for hook
2548         objects generated for controlled transients declared inside an
2549         Exception_With_Actions. Update related comment.
2550         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2551         objects generated for controlled transients declared inside an
2552         Exception_With_Actions. Update the calls to Return_Flag.
2553         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2554
2555 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2556
2557         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2558         positional aggregate.
2559
2560 2011-08-04  Vincent Celier  <celier@adacore.com>
2561
2562         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2563         SLOC only for pragmas.
2564
2565 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2566
2567         * projects.texi: Minor typo fix.
2568
2569 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2570
2571         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2572         on case-sensitive file systems.
2573
2574 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2575
2576         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2577         nested in a disabled pragma.
2578         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2579         enclosing pragma, if any, for X decisions.
2580
2581 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2582
2583         * sem_prag.adb: Minor reformatting.
2584
2585 2011-08-04  Vincent Celier  <celier@adacore.com>
2586
2587         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2588         allowed in no run time mode.
2589
2590 2011-08-04  Vincent Celier  <celier@adacore.com>
2591
2592         * make.adb (Check): When -gnatc is used, check for the source file
2593         inside the ALI file with a canonical case file name.
2594
2595 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2596
2597         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2598         overriding the separator.
2599
2600 2011-08-04  Robert Dewar  <dewar@adacore.com>
2601
2602         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2603         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2604
2605 2011-08-04  Robert Dewar  <dewar@adacore.com>
2606
2607         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2608
2609 2011-08-04  Yannick Moy  <moy@adacore.com>
2610
2611         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2612         'Result only appears in postcondition of function.
2613
2614 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2615
2616         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2617         external tag, include the value of the external tag in the exception
2618         message.
2619
2620 2011-08-04  Yannick Moy  <moy@adacore.com>
2621
2622         * sem_attr.adb (Result): modify error message for misplaced 'Result
2623
2624 2011-08-04  Sergey Rybin  <rybin@adacore.com>
2625
2626         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2627         clear that the second argument must be an identifier.
2628
2629 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2630
2631         * exp_ch9.adb (Build_Barrier_Function): When compiling with
2632         -fpreserve-control-flow, insert an IF statement on the barrier
2633         condition to ensure that a conditional branch instruction is generated.
2634
2635 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2636
2637         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2638         (Processing_Flags.Ignore_Missing_With): new flag.
2639
2640 2011-08-04  Emmanuel Briot  <briot@adacore.com>
2641
2642         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2643         Source_List_File on case-insensitive systems where the file is actually
2644         on a case-sensitive file system (NFS,...).
2645
2646 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2647
2648         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2649         function return contains a controlled [extension] aggregate and the
2650         return statement is not part of a handled sequence of statements, wrap
2651         the return in a block. This ensures that all controlled temporaries
2652         generated during aggregate resolution will be picked up by the
2653         finalization machinery.
2654
2655 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2656
2657         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2658         components, freeze type before resolution, to ensure that default
2659         initializations are present for all components.
2660         * sem_res.adb (Resolve_Actuals): the designated object of an
2661         accces-to-constant type is a legal actual in a call to an
2662         initialization procedure.
2663
2664 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2665
2666         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2667         N_Unchecked_Type_Conversion to the possible containers of a renamed
2668         transient variable.
2669
2670 2011-08-04  Yannick Moy  <moy@adacore.com>
2671
2672         * par-ch13.adb (Aspect_Specifications_Present): recognize
2673         "with Identifier'Class =>" as an aspect, so that a meaningful warning
2674         is issued in Strict mode.
2675         * par.adb: Fix typos in comments.
2676
2677 2011-08-04  Yannick Moy  <moy@adacore.com>
2678
2679         * sem_attr.adb (Result): modify error message to take into account Post
2680         aspect when compiling Ada 2012 (or newer) code.
2681
2682 2011-08-04  Nicolas Roche  <roche@adacore.com>
2683
2684         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2685         remove need for GCC exceptions.
2686
2687 2011-08-04  Vincent Celier  <celier@adacore.com>
2688
2689         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2690         project, not the source file name.
2691         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2692         excluded, continue looking. This excluded source will only be returned
2693         if there is no other source with the same base name that is not locally
2694         removed.
2695
2696 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2697
2698         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2699         private and one of the operands is a real literal, use a qualified
2700         expression rather than a conversion which is not meaningful to the
2701         back-end.
2702
2703 2011-08-04  Yannick Moy  <moy@adacore.com>
2704
2705         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2706         corresponding aspect X'Class are allowed, proceed with analysis of the
2707         aspect instead of skipping it.
2708
2709 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2710
2711         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2712         This will allow to have an Ada implementation for the subprogram.
2713
2714 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2715
2716         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2717         completion and aspects are present, apply them to the entity for the
2718         type which is currently the partial view, but which is the one that
2719         will be frozen.
2720         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2721         applies to a partial view, indicate that the full view has predicates
2722         and delayed aspects.
2723         (Replace_Type_Reference): Handle properly predicates that apply to the
2724         full view of a private completion.
2725
2726 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2727
2728         * layout.adb (Layout_Type): For composite types, do not set Esize.
2729         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2730         set Esize.
2731         (Size_Known): Look at the RM size of components instead of the Esize.
2732         (Freeze_Record_Type): Look at the RM size instead of the Esize to
2733         issue warning and activate Implicit_Packing.
2734         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
2735         if the Esize is not known.
2736         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2737         for elementary types only.
2738         (Analyze_Record_Representation_Clause): Look at the RM size instead
2739         of the Esize to issue errors.
2740         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2741         is not known.
2742         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
2743         obsolete block.
2744         Look at the RM size instead of the Esize for types if the latter is
2745         not known.
2746         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2747
2748 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2749
2750         * sem_type.adb: proper handling of equality not involving anonymous
2751         access types.
2752
2753 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2754
2755         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2756         Vis_Decls. When creating a library-level finalizer for a package spec,
2757         both the declaration and body of the finalizer are inserted either in
2758         the visible or private declarations of the package spec.
2759
2760 2011-08-04  Javier Miranda  <miranda@adacore.com>
2761
2762         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2763         use of the full-view of a type when invoking Is_Ancestor.
2764         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2765         the full-view of private parents is requested, then use also the
2766         full-view of the parent of the first derivation.
2767
2768 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2769
2770         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2771         instead of the locally imported procedure.
2772         * s-taprop-mingw.adb (Enter_Task): Ditto.
2773         * s-valrea.adb (Scan_Real): Ditto.
2774         * s-imgrea.adb (Set_Image_Real): Ditto.
2775         * s-flocon.ads: Make the package pure.
2776
2777 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2778
2779         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2780         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2781         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2782         New subprogram, moved here from...
2783         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2784         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2785         rewriting of the last argument into a procedure call statement here...
2786         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2787         instead.
2788
2789 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2790
2791         * par_sco.adb: Minor reformatting.
2792
2793 2011-08-04  Robert Dewar  <dewar@adacore.com>
2794
2795         * erroutc.adb: Minor reformatting.
2796
2797 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2798
2799         * par_sco.adb: Comment update.
2800
2801 2011-08-04  Tristan Gingold  <gingold@adacore.com>
2802
2803         * s-flocon.ads: New file.
2804         * g-flocon.ads: Now a renaming of s-flocon.
2805         * Makefile.rtl: Add s-flocon.o
2806
2807 2011-08-04  Javier Miranda  <miranda@adacore.com>
2808
2809         * exp_strm.adb (Build_Array_Input_Function): if the array type is
2810         constrained, do not attempt to build a subtype of it.
2811
2812 2011-08-04  Yannick Moy  <moy@adacore.com>
2813
2814         * errout.ads Change comments: remove 'R'M as an example where quotes
2815         are needed; add ALFA as another case where quotes are not needed
2816         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2817         case where quotes are not needed.
2818         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2819         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2820         Remove all occurrences of 'A'L'F'A
2821
2822 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2823
2824         * sem_ch13.adb: check legality of invariant pragma.
2825
2826 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2827
2828         * bindgen.adb: Add comments.
2829
2830 2011-08-04  Yannick Moy  <moy@adacore.com>
2831
2832         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2833         synthesized flag.
2834         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2835         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2836
2837 2011-08-04  Robert Dewar  <dewar@adacore.com>
2838
2839         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2840         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2841         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2842
2843 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2844
2845         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2846
2847 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2848
2849         PR ada/47880
2850         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2851         allocated object.
2852
2853 2011-08-04  Robert Dewar  <dewar@adacore.com>
2854
2855         * einfo.ads, exp_ch4.adb: Minor reformatting.
2856
2857 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2858
2859         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2860
2861 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
2862
2863         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2864         type in all cases to compute list of primitive operations, because full
2865         view may be an itype that is not attached to the list of declarations.
2866
2867 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2868
2869         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2870         library has already been finalized.
2871         (Gen_Adafinal_C): Likewise.
2872         (Gen_Adainit_Ada): Generate an early return if the library has
2873         already been elaborated.
2874         (Gen_Adainit_C): Likewise.
2875         (Gen_Output_File_Ada): Generate an elaboration flag.
2876         (Gen_Output_File_C): Likewise.
2877
2878 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2879
2880         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2881         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2882         built in the first place.
2883         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2884         for CodePeer because Finalize_Address was not built to begin with.
2885         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2886
2887 2011-08-04  Pascal Obry  <obry@adacore.com>
2888
2889         * adaint.c (__gnat_tmp_name): Use current process id to create temp
2890         filenames, this ensures unicity of filenames across processes.
2891
2892 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2893
2894         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2895         Raise_Controlled to Raise_From_Controlled_Operation. Update the
2896         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2897         Add False as the actual to From_Abort in the generated call to
2898         Raise_From_Controlled_Operation.
2899
2900 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2901
2902         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2903         so that the ali file name can be retrieved from outside of this package.
2904         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2905         doing nothing in the general case, but used to update the object file
2906         timestamp if directly generated by the backend.
2907         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2908         to a later time than the ali file one.
2909
2910 2011-08-04  Yannick Moy  <moy@adacore.com>
2911
2912         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2913         entities whose body contains an Annotate pragma which forces formal
2914         proof on this body.
2915         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2916         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2917         Mark_Non_ALFA_Subprogram to pass in a message and node.
2918         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2919         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2920         surrounding subprogram.
2921         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2922         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2923         as not in ALFA is annotated with Formal_Proof being On, then an error
2924         is issued based on the additional parameters for message and node.
2925         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2926         * gcc-interface/Make-lang.in: Update dependencies.
2927
2928 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2929
2930         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2931         Finalize_Address when CodePeer is enabled.
2932
2933 2011-08-04  Pascal Obry  <obry@adacore.com>
2934
2935         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2936         the latter returns a pointer to a static buffer which is deallocated
2937         at the end of the routine.
2938
2939 2011-08-04  Yannick Moy  <moy@adacore.com>
2940
2941         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2942         after index creation; mark unconstrained base array type generated as
2943         being in/not in ALFA as well
2944         (Make_Index): mark subtype created as in/not in ALFA
2945         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2946         over a loop as in/not in ALFA, depending on its type and form of loop
2947         iteration.
2948
2949 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2950
2951         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2952         directly to False on .NET and JVM.
2953
2954 2011-08-04  Yannick Moy  <moy@adacore.com>
2955
2956         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2957         constraint that subtype must come from source code to be in ALFA, so
2958         that anonymous subtypes can be in ALFA too.
2959
2960 2011-08-04  Yannick Moy  <moy@adacore.com>
2961
2962         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2963         reference for ALFA mode.
2964         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2965         procedure public so as to use it from formal verification back-end.
2966
2967 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
2968
2969         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2970         invalid checks of the Parameter, making Remove_Switch not working
2971         correctly.
2972
2973 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
2974
2975         * targparm.ads: Update header: no run-time exception is needed on this
2976         file.
2977
2978 2011-08-04  Vincent Celier  <celier@adacore.com>
2979
2980         * a-fihema.adb: Use System.IO instead of GNAT.IO
2981
2982 2011-08-04  Thomas Quinot  <quinot@adacore.com>
2983
2984         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2985         are forbidden in Compiler_Unit mode.
2986
2987 2011-08-04  Robert Dewar  <dewar@adacore.com>
2988
2989         * sem_util.adb: Minor reformatting.
2990
2991 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2992
2993         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2994         library-level finalizers.
2995         (Gen_Finalize_Library_C): Update the import string for library-level
2996         finalizers.
2997         (Gen_Finalize_Library_Defs_C): Update the definition name of a
2998         library-level finalizer.
2999         * exp_ch7.adb: Remove with and use clauses for Stringt.
3000         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3001         Spec_Decl. Add local variable Body_Id. The names of library-level
3002         finalizers are now manually fully qualified and are no longer external.
3003         A single name is now capable of servicing .NET, JVM and non-VM targets.
3004         Pragma Export is no longer required to provide visibility for the name.
3005         (Create_Finalizer_String): Removed.
3006         (New_Finalizer_Name): New routine which mimics New_..._Name.
3007
3008 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3009
3010         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3011         elaboration counter to Standard_Short_Integer.
3012         * sem_util.adb (Build_Elaboration_Entity): Likewise.
3013         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3014         (Gen_Elab_Externals_C): Likewise.
3015
3016 2011-08-04  Ed Falis  <falis@adacore.com>
3017
3018         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3019         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3020         system-vxworks-mips.ads, system-vxworks-x86.ads
3021         (Always_Compatible_Rep): set to False for all VxWorks targets.
3022
3023 2011-08-04  Robert Dewar  <dewar@adacore.com>
3024
3025         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3026         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3027         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3028         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3029         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3030         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3031         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3032         Minor reformatting and code reorganization.
3033
3034 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3035
3036         * projects.texi: Added doc for aggregate projects.
3037
3038 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3039
3040         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3041         Add support for overriding the Project_Path in aggregate projects.
3042
3043 2011-08-04  Robert Dewar  <dewar@adacore.com>
3044
3045         * a-cofove.ads: Minor reformatting.
3046
3047 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3048
3049         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3050         on the generated code.
3051         (Build_Finalize_Statements): Update the comment on the generated code.
3052         (Build_Initialize_Statements): Update the comment on the generated code.
3053         (Build_Object_Declarations): Add local variable Result. The object
3054         declarations are now built in sequence.
3055         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3056         RE_Unit_Table.
3057
3058 2011-08-04  Robert Dewar  <dewar@adacore.com>
3059
3060         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3061
3062 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
3063
3064         * einfo.ads (Elaboration_Entity): Document new definition and use.
3065         (Elaboration_Entity_Required): Adjust to above change.
3066         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3067         * exp_ch12.adb: And with and use for Snames.
3068         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3069         * exp_util.adb (Set_Elaboration_Flag): Likewise.
3070         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3071         <Check_Unit_Name>: Deal with N_Expanded_Name.
3072         <Attribute_Elaborated>: Extend to all unit names.
3073         * sem_elab.adb: And with and use for Uintp.
3074         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3075         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3076         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3077         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3078         from Gen_Adainit_Ada.
3079         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3080         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
3081         case, do not call System.Standard_Library.Adafinal; instead call
3082         finalize_library if needed.
3083         (Gen_Adafinal_C): Likewise.
3084         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3085         non-main program case.
3086         (Gen_Adainit_C): Generate a couple of external declarations here.
3087         In the main program case, set SSL.Finalize_Library_Objects.
3088         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3089         (Gen_Elab_Calls_C): Likewise.
3090         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
3091         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
3092         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3093         objects here.
3094         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3095         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
3096         Gen_Adafinal_Ada.
3097         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3098         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
3099         of external declarations.  Call Gen_Finalize_Library_C.
3100
3101 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3102
3103         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3104         Compute_Compilation_Phases): new subprogram.
3105         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3106         The number of mains as well as the various compilation phases that
3107         need to be run are now project tree specific, since various
3108         aggregated trees might have different requirements. In particular,
3109         they do not all require bind or link phases.
3110
3111 2011-08-04  Emmanuel Briot  <briot@adacore.com>
3112
3113         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3114         (Project_Tree_Appdata): New type.
3115         It is now possible to associate application-specific data to a project
3116         tree. In particular, this is used in the gprbuild builder to avoid a
3117         number of global tables and htables, especially now that there can be
3118         several project trees loaded at once because of aggregate projects.
3119         (Debug_Name): new procedure.
3120         * projects.texi: Clarify syntax of "**" for Source_Dirs
3121
3122 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3123
3124         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3125         the "roots" for a main.
3126         (Fill_From_Project): add support for aggregate projects. Main units
3127         in aggregated projects are now automatically added in the list of
3128         files to build (although this fails later on in gprbuild, because
3129         these files are not using the root proejct tree, so this needs
3130         further cleanup)
3131         * gcc-interface/Make-lang.in: Update dependencies.
3132
3133 2011-08-03  Yannick Moy  <moy@adacore.com>
3134
3135         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3136         conditional expression in ALFA.
3137         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3138         expressions as not in ALFA.
3139
3140 2011-08-03  Robert Dewar  <dewar@adacore.com>
3141
3142         * a-cofove.adb: Minor reformatting.
3143
3144 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3145
3146         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3147         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3148         gprbuild sources.
3149         These packages are more logically placed in the Queue package, since
3150         they manipulate the queue. It is also likely that they can be adapted
3151         for gnatmake, thus sharing more code.
3152         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3153         that we could move the above.
3154
3155 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3156
3157         * errutil.adb (Finalize): clean up the list of error messages on exit.
3158         Calling this subprogram multiple times will no longer show duplicate
3159         error messages on stderr.
3160
3161 2011-08-03  Emmanuel Briot  <briot@adacore.com>
3162
3163         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3164         Getopt_Switches when we have already define a command line
3165         configuration.
3166
3167 2011-08-03  Yannick Moy  <moy@adacore.com>
3168
3169         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3170         in ALFA. Instead, they are considered as assertions to prove.
3171         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3172         nodes as not in ALFA. Instead, include conditional expressions in ALFA
3173         if they have no ELSE part, or if they occur in pre- and postconditions,
3174         where the Condition cannot have side-effects in ALFA
3175         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3176         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3177         Instead, include type conversion between scalar types in ALFA.
3178         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3179         if-and-only-if its type is in ALFA.
3180
3181 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3182
3183         * scos.adb, get_scos.adb, put_scos.adb
3184         New code letter for decisions: G (entry guard)
3185         * par_sco.adb
3186         (Traverse_Subprogram_Body): Rename to...
3187         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3188         (Traverse_Protected_Body): New subprogram
3189         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3190         protected bodies and entry bodies.
3191
3192 2011-08-03  Yannick Moy  <moy@adacore.com>
3193
3194         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3195         entities with get/set subprograms, which is set on procedure entities
3196         generated by the compiler for a postcondition.
3197         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3198         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3199         entity for a declaration
3200         (Get_Unique_Entity_For_Decl): new function returning an entity which
3201         represents a declaration, so that matching spec and body have the same
3202         entity.
3203
3204 2011-08-03  Robert Dewar  <dewar@adacore.com>
3205
3206         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3207         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3208
3209 2011-08-03  Yannick Moy  <moy@adacore.com>
3210
3211         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3212         library-level because retriction No_Implicit_Dynamic_Code in the
3213         front-end prevents its definition as a local subprogram
3214         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3215         for reuse in other contexts
3216         (Traverse_Declarations_Or_Statements,
3217         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3218         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3219         procedures take a callback parameter to be called on all declarations
3220         * lib-xref.ads
3221         (Traverse_All_Compilation_Units): new generic function to traverse a
3222         compilation unit and call a callback parameter on all declarations
3223
3224 2011-08-03  Javier Miranda  <miranda@adacore.com>
3225
3226         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3227         in Java since they are always enclosed in a namespace that
3228         differentiates them, and overloaded entities are supported by the VM.
3229
3230 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3231
3232         * checks.adb (Determine_Range): If a computed bound of an operation is
3233         outside the range of the base type of the expression, and overflow
3234         checks are enabled, the result is unknown and cannot be used for any
3235         subsequent constant folding.
3236         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3237         unknown, so is the result of the comparison.
3238
3239 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3240
3241         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3242         From_Abort. When finalization was triggered by an abort, propagate
3243         Standard'Abort_Signal rather than Program_Error.
3244         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3245         From_Abort.
3246         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3247         From_Abort. When finalization was triggered by an abort, propagate
3248         Standard'Abort_Signal rather than Program_Error.
3249         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3250         From_Abort.
3251         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3252         Abort_Id. Update the calls to Build_Object_Declarations and
3253         Build_Raise_Statement to include Abort_Id.
3254         (Build_Adjust_Statements): New local variable Abort_Id. Update the
3255         calls to Build_Object_Declarations and Build_Raise_Statement to include
3256         Abort_Id.
3257         (Build_Finalize_Statements): New local variable Abort_Id. Update the
3258         calls to Build_Object_Declarations and Build_Raise_Statement to include
3259         Abort_Id.
3260         (Build_Components): Create an entity for Abort_Id when exceptions are
3261         allowed on the target.
3262         (Build_Finalizer): New local variable Abort_Id.
3263         (Build_Initialize_Statements): New local variable Abort_Id. Update the
3264         calls to Build_Object_Declarations and Build_Raise_Statement to include
3265         Abort_Id.
3266         (Build_Object_Declarations): Add new formal Abort_Id. Create the
3267         declaration of flag Abort_Id to preserve the original abort status
3268         before finalization code is executed.
3269         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3270         runtime routine Raise_From_Controlled_Operation.
3271         (Create_Finalizer): Update the call to Build_Raise_Statement to include
3272         Abort_Id. Update the call to Build_Object_Declarations to include
3273         Abort_Id. Update the layout of the finalizer body.
3274         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3275         (Process_Transient_Objects): New local variable Abort_Id. Remove the
3276         clunky code to create all flags and objects related to
3277         exception propagation and replace it with a call to
3278         Build_Object_Declarations. Update the call to Build_Raise_Statement to
3279         include Abort_Id.
3280         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3281         Add new formal Abort_Id and associated comment on its use.
3282         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3283         on its use.
3284         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3285         Remove the clunky code to create all flags and objects related to
3286         exception propagation and replace it with a call to
3287         Build_Object_Declarations. Update the call to Build_Raise_Statement.
3288
3289 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3290
3291         * s-tassta.adb: Fix minor typos.
3292
3293 2011-08-03  Robert Dewar  <dewar@adacore.com>
3294
3295         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3296         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3297
3298 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3299
3300         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3301         to packages. This ensures that the finalizer body will not end up
3302         inside the freeze node.
3303         (Process_Declarations): Add code to detect whether a freeze node has a
3304         nested finalization collection.
3305
3306 2011-08-03  Pascal Obry  <obry@adacore.com>
3307
3308         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3309         (Current_Session): Return a not null access to Session_Type.
3310         (Default_Session): Likewise.
3311
3312 2011-08-03  Robert Dewar  <dewar@adacore.com>
3313
3314         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3315         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3316
3317 2011-08-03  Pascal Obry  <obry@adacore.com>
3318
3319         * g-awk.ads: Minor comment fix.
3320
3321 2011-08-03  Sergey Rybin  <rybin@adacore.com>
3322
3323         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3324         the tree structure related to discriminant constraints.
3325         Original_Discriminant cannot be used any more for computing the
3326         defining name for the reference to a discriminant.
3327
3328 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3329
3330         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3331         function is not visibly tagged, this is not a dispatching call and
3332         therfore is not Tag_Indeterminate, even if the function is marked as
3333         dispatching on result.
3334
3335 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3336
3337         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3338         (Expand_N_Free_Statement): Add a guard to protect against run-times
3339         which do not support controlled types.
3340         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3341         against run-times which do not support controlled types.
3342         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3343         against run-times which do not support controlled types.
3344         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3345         against run-times which do not support controlled types.
3346         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3347         protect against run-times which do not support controlled types.
3348
3349 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
3350
3351         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3352         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3353
3354 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3355
3356         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3357         modified in the source, to prevent spurious warnings when compiling
3358         with -gnatg.
3359
3360 2011-08-03  Thomas Quinot  <quinot@adacore.com>
3361
3362         * a-except-2005.adb: Minor reformatting.
3363
3364 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3365
3366         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3367         is a renaming declaration in the private part of a package, do not emit
3368         a warning that the with_clause could be moved because the renaming may
3369         be used in the body or in a child unit.
3370
3371 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3372
3373         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3374         Propagate the Comes_From_Source attribute from the original return
3375         object to the renaming.
3376
3377 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
3378
3379         * exp_ch7.adb (Build_Raise_Statement): Do not call
3380         Raise_From_Controlled_Operation when this routine is not present in
3381         the run-time library.
3382         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3383         libraries (Ravenscar), tasks are non-terminating, and protected objects
3384         and tasks can only appear at library level, so we do not want
3385         finalization of protected objects nor tasks.
3386         * exp_intr.adb: Minor clarification in comment.
3387         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3388         Gen_Output_File_C): Remove references to finalization of library-level
3389         objects when using restricted run-time libraries.
3390
3391 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
3392
3393         * sem_ch3.adb (Build_Discriminant_Constraints): Set
3394         Original_Discriminant only if the parent type is a generic formal.
3395
3396 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3397
3398         * exp_ch13.adb: Add with and use clause for Targparm;
3399         (Expand_N_Free_Statement): Prevent the generation of a custom
3400         Deallocate on .NET/JVM targets since this requires pools and address
3401         arithmetic.
3402         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3403         .NET/JVM targets, attach the newly allocated object to the access
3404         type's finalization collection. Do not generate a call to
3405         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3406         exist in the runtime.
3407         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3408         create a custom Allocate for object that do not require initialization.
3409         Attach a newly allocated object to the access type's finalization
3410         collection on .NET/JVM.
3411         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3412         assignment of controlled types on .NET/JVM. The two hidden pointers
3413         Prev and Next and stored and later restored after the assignment takes
3414         place.
3415         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3416         kludge for .NET/JVM to recognize a particular piece of code coming from
3417         Heap_Management and change the call to Finalize into Deep_Finalize.
3418         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3419         finalization collections on .NET/JVM only for types derived from
3420         Controlled. Separate the association of storage pools with a collection
3421         and only allow it on non-.NET/JVM targets.
3422         (Make_Attach_Call): New routine.
3423         (Make_Detach_Call): New routine.
3424         (Process_Object_Declarations): Suppress the generation of
3425         build-in-place return object clean up code on .NET/JVM since it uses
3426         pools.
3427         * exp_ch7.ads (Make_Attach_Call): New routine.
3428         (Make_Detach_Call): New routine.
3429         * exp_intr.adb Add with and use clause for Targparm.
3430         (Expand_Unc_Deallocation): Detach a controlled object from a collection
3431         on .NET/JVM targets.
3432         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3433         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3434         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3435         names used in finalization.
3436
3437 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3438
3439         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3440         (Attach, Detach): Lock the current task when chaining an object onto a
3441         collection.
3442
3443 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
3444
3445         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3446         Rewritten to create the message strings when the exception is not
3447         raised by an abort during finalization.
3448         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3449         Raise_From_Controlled_Operation and update its associated comment.
3450         * a-fihema.ads, a-fihema.adb: New GNAT unit.
3451         Ada.Finalization.Heap_Management provides key functionality
3452         associated with controlled objects on the heap, their creation,
3453         finalization and reclamation. Type Finalization_Collection is
3454         effectively a wrapper which sits ontop of a storage pool and performs
3455         all necessary bookkeeping for all the objects it contains. Each
3456         access-to-controlled or access-to-class-wide type receives a collection
3457         as part of its expansion. The compiler generates buffer code and
3458         invokes Allocate / Deallocate to create and destroy allocated
3459         controlled objects.
3460         * a-finali.adb ("="): Removed.
3461         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3462         fields Prev and Next.
3463         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3464         A library unit with at least one controlled object on the library level
3465         has a special finalizer which is invoked by the binder. To signal this,
3466         ali files carry field PF.
3467         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3468         associated comment on field usage.
3469         * a-tags.adb (Get_RC_Offset): Removed.
3470         (Needs_Finalization): New routine.
3471         * a-tags.ads: Update the structure of the GNAT dispatch tables.
3472         Dispatch tables now carry field Needs_Finalization which provides
3473         runtime indication whether a type is controlled or has controlled
3474         components or both. Remove field RC_Offset.
3475         (Get_RC_Offset): Removed along with its associated pragma Export.
3476         Since tagged types with controlled components no longer carry hidden
3477         field _controller, the special mechanism to retrieve its location is no
3478         longer needed.
3479         (Needs_Finalization): New routine.
3480         * atree.ads, atree.adb (Elist24): New routine.
3481         (Set_Elist24): New routine.
3482         * atree.h: Add a define clause for Elist24.
3483         * bindgen.adb New library-level variable Lib_Final_Built.
3484         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3485         presence of a VM target, the routine generates calls to the proper
3486         library finalization routine.
3487         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3488         targets. Set the correct library finalization routine depending on
3489         whether the library has controlled objects or this is a VM compilation.
3490         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3491         to library-level finalizers of compiled units in reverse order of
3492         elaboration. It also produces exception management code and reraises a
3493         potential exception after all units have been finalized.
3494         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3495         library-level finalizers of compiled units in reverse order of
3496         elaboration.
3497         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3498         definitions of all library-level finalizers available to the compilation
3499         (Gen_Main_Ada): Directly call Adafinal which now contails all target
3500         dependent code.
3501         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3502         System.Standard_Library.Adafinal directly. If the library needs
3503         finalization actions, create the sequence of finalization calls.
3504         (Gen_Output_File_Ada): Alphabetize local variables and constants.
3505         Generate a with clause for System.Soft_Links when compiling for a VM.
3506         Remove the code which imports System.Standard_Library.Adafinal as
3507         Do_Finalize. Generate the library finalization routine.
3508         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3509         If the library needs finalization actions, create all the definitions
3510         of library- level finalizers.
3511         (Has_Finalizer): New routine. Determines whether at least one compiled
3512         unit has a library-level finalizer.
3513         Add type Qualification_Mode.
3514         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3515         * einfo.adb: New usage of field 15 as Return_Flag.
3516         Remove Finalization_Chain_Entity from the usages of field 19.
3517         Remove Associated_Final_Chain from the usages of field 23.
3518         New usage of field 23 as Associated_Collection.
3519         New usage of field 24 as Finalizer.
3520         New usage of flag 252 as Is_Processed_Transient.
3521         (Associated_Final_Chain): Removed.
3522         (Associated_Collection): New routine.
3523         (Finalization_Chain_Entity): Removed.
3524         (Finalizer): New routine.
3525         (Is_Finalizer): New routine.
3526         (Is_Processed_Transient): New routine.
3527         (Return_Flag): New routine.
3528         (Set_Associated_Final_Chain): Removed.
3529         (Set_Associated_Collection): New routine.
3530         (Set_Finalization_Chain_Entity): Removed.
3531         (Set_Finalizer): New routine.
3532         (Set_Is_Processed_Transient): New routine.
3533         (Set_Return_Flag): New routine.
3534         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3535         displayed flags.
3536         (Write_Field8_Name): Alphabetize the output.
3537         (Write_Field11_Name): Alphabetize the output.
3538         (Write_Field12_Name): Alphabetize the output.
3539         (Write_Field13_Name): Alphabetize the output.
3540         (Write_Field14_Name): Alphabetize the output.
3541         (Write_Field15_Name): Alphabetize the output.
3542         (Write_Field16_Name): Alphabetize the output.
3543         (Write_Field17_Name): Alphabetize the output.
3544         (Write_Field18_Name): Alphabetize the output.
3545         (Write_Field19_Name): Alphabetize the output. Remove the output of
3546         Finalization_Chain_Entity.
3547         (Write_Field20_Name): Alphabetize the output.
3548         (Write_Field21_Name): Alphabetize the output.
3549         (Write_Field22_Name): Alphabetize the output.
3550         (Write_Field23_Name): Alphabetize the output. Remove the output of
3551         Associated_Final_Chain. Add output for Associated_Collection.
3552         (Write_Field24_Name): Alphabetize the output.
3553         (Write_Field25_Name): Add output for Finalizer.
3554         (Write_Field26_Name): Alphabetize the output.
3555         (Write_Field27_Name): Alphabetize the output.
3556         (Write_Field28_Name): Alphabetize the output.
3557         * einfo.ads: Add new field description for Associated_Collection and
3558         its uses in nodes.
3559         Remove Associated_Final_Chain and its uses in nodes.
3560         Remove Finalization_Chain_Entity and its uses in nodes.
3561         Add new field description for Finalizer and its uses in nodes.
3562         Add new synthesized attribute Is_Finalizer.
3563         Add new flag description for Is_Processed_Transient and its uses in
3564         nodes.
3565         Add new field description for Return_Flag and its uses in nodes.
3566         (Associated_Final_Chain): Removed along with its pragma Inline.
3567         (Associated_Collection): New routine and pragma Inline.
3568         (Finalization_Chain_Entity): Removed along with its pragma Inline.
3569         (Finalizer): New routine and pragma Inline.
3570         (Is_Finalizer): New routine and pragma Inline.
3571         (Is_Processed_Transient): New routine and pragma Inline.
3572         (Return_Flag): New routine and pragma Inline.
3573         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3574         (Set_Associated_Collection): New routine and pragma Inline.
3575         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3576         (Set_Finalizer): New routine and pragma Inline.
3577         (Set_Is_Processed_Transient): New routine and pragma Inline.
3578         (Set_Return_Flag): New routine and pragma Inline.
3579         * exp_aggr.adb: Alphabetize subprograms.
3580         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3581         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3582         associated comments. Remove local variables External_Final_List and
3583         Attach.
3584         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3585         Ancestor. Remove the retrieval of finalization lists. Update the call to
3586         Make_Adjust_Call.
3587         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3588         lists. Update the call to Late_Expansion.
3589         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3590         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3591         (Gen_Assign): Remove the retrieval of the finalization list used to
3592         build the assignment. Update the calls to Make_Init_Call and
3593         Make_Adjust_Call.
3594         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3595         Remove the mechanism to determine attachment levels and finalization
3596         list retrieval. Remove the processing for coextensions.
3597         (Init_Controller): Removed. Controllers no longer exist.
3598         (Late_Expansion): Remove formals Flist and Obj along with their
3599         associated comments. Update the calls to Build_Record_Aggr_Code and
3600         Build_Array_Aggr_Code.
3601         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3602         (Expand_N_Freeze_Entity): Add special processing for finalizers which
3603         appear in entry bodies, protected subprograms and task bodies.
3604         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3605         * exp_ch3.adb (Add_Final_Chain): Removed.
3606         (Build_Array_Init_Proc): Alphabetize local variables.
3607         (Build_Assignment): Alphabetize local variables. Update the call to
3608         Maked_Adjust_Call.
3609         (Build_Class_Wide_Master): Rename local variables to better reflect
3610         their role.
3611         (Build_Discriminant_Assignments): Code reformatting.
3612         (Build_Init_Call_Thru): Code reformatting.
3613         (Build_Init_Procedure): Code reformatting. Generate a special version
3614         of Deep_Finalize which is capable of finalizing all initialized
3615         components and ignore the rest.
3616         (Build_Init_Statements): Rename local variables to better reflect their
3617         role.
3618         Reimplement the mechanism to include the creation and update of an index
3619         variable called a "counter". It is used as a bookmark for tracing
3620         initialized and non-initialized components.
3621         (Build_Initialization_Call): Remove local variable Controller_Typ.
3622         Alphabetize all local variables. Remove the initialization of the
3623         record controller and update the call to Make_Init_Call.
3624         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3625         New local variable Counter.
3626         (Constrain_Array): Alphabetize.
3627         (Expand_Freeze_Array_Type): Create a collection instead of a
3628         finalization list.
3629         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3630         Finalize_Address which is used in conjunction with allocated controlled
3631         objects.
3632         (Expand_N_Object_Declaration): Remove the creation of a finalization
3633         list for anonymous access types. Update the calls to Make_Init_Call and
3634         Make_Adjust_Call.
3635         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3636         retrieval of finalization lists. Remove the expansion of the record
3637         controller. Create TSS primitive Finalize_Address used in conjunction
3638         with controlled objects on the heap. Create finalization collections
3639         for access-to-controlled record components.
3640         (Expand_Record_Controller): Removed.
3641         (Freeze_Type): Remove the freezing of record controllers. Freezing of
3642         class-wide types now requires additional processing. Create
3643         finalization collections for access-to-controlled types.
3644         (Increment_Counter): New routine.
3645         (Make_Counter): New routine.
3646         (Make_Eq_If): Remove the mention of Name_uController.
3647         (Make_Predefined_Primitive_Specs): There is no longer need to skip
3648         types coming from System.Finalization_Root.
3649         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3650         (Predefined_Primitive_Bodies): There is no longer need to skip types
3651         coming from System.Finalization_Root.
3652         (Stream_Operation_OK): Do not generate stream routines for
3653         type Ada.Finalization.Heap_Management.Finalization_Collection.
3654         * exp_ch3.ads: Alphabetize subprograms.
3655         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3656         Add with and use clause for Lib.
3657         (Complete_Coextension_Finalization): Removed.
3658         (Complete_Controlled_Allocation): New routine. Create a finalization
3659         collection for anonymous access-to-controlled types. Create a custom
3660         Allocate which interfaces with the back end and the machinery in
3661         Heap_Management.
3662         (Expand_Allocator_Expression): Add necessary calls to
3663         Complete_Controlled_Allocation. Remove the retrieval of finalization
3664         lists. Update the calls to Make_Adjust_Call. Generate a call to
3665         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3666         the associated collection.
3667         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3668         Code clean up. Remove the retrieval of finalization lists and
3669         attachment levels.
3670         Update the call to Make_Init_Call. Generate a call to
3671         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3672         the associated collection.
3673         (Get_Allocator_Final_List): Removed. Finalization lists are not
3674         available.
3675         (Suitable_Element): Remove the mention of Name_uController.
3676         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3677         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3678         the left hand side, carry out the assignment and adjust the left hand
3679         side.
3680         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3681         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3682         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3683         BIP_Collection and BIPcollection.
3684         (Build_Heap_Allocator): New routine used to allocate the return object
3685         of a build-in-place function onto a collection.
3686         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3687         (Expand_Call): Do not replace direct calls to Deep routines with their
3688         aliases.
3689         (Expand_N_Extended_Return_Statement): Give all variables shorter names
3690         and update their occurrences. Add a special return flag to monitor the
3691         [ab]normal execution of the function. The flag is set right before the
3692         return statement.
3693         Rewrite the mechanism used to allocate a build-in-place return object
3694         on the heap or on a storage pool.
3695         (Is_Direct_Deep_Call): New routine.
3696         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3697         build-in-place function call instead of a final list. Build a call to
3698         Set_Finalize_Address_Ptr to decorate the associated collection.
3699         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3700         order to name the build-in-place function call's result for later
3701         finalization. Add a collection to a build-in-place function call
3702         instead of a final list.
3703         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3704         build-in-place function call instead of a final list. Remove the code
3705         which moves one final list and transforms it into the actual in a
3706         nested build-in-place call.
3707         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3708         build-in-place function call instead of a final list.
3709         (Move_Final_List): Removed.
3710         (Needs_BIP_Collection): New routine.
3711         (Needs_BIP_Final_List): Removed.
3712         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3713         enumeration type BIP_Formal_Kind.
3714         Update the related comment.
3715         (Needs_BIP_Collection): New routine.
3716         (Needs_BIP_Final_List): Removed.
3717         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3718         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3719         majority of subprograms in this unit. Add Name_Finalize_Address to
3720         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3721         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3722         statements for an array type.
3723         (Build_Adjust_Statements): Create the adjust statements for a record
3724         type.
3725         (Build_Cleanup_Statements): New routine. A procedure which given any
3726         construct containing asynchronous calls, references to _master, or is a
3727         task body, a task allocation or a protected body produces the necessary
3728         runtime calls to clean up these constructs.
3729         (Build_Exception_Handler): New routine.
3730         (Build_Final_List): Removed.
3731         (Build_Finalization_Collection): New routine. A core procedure which
3732         creates a collection to service heap allocated controlled objects
3733         associated with an access-to-controlled type.
3734         (Build_Finalize_Statements): Create the finalization statements for a
3735         record types.
3736         (Build_Finalizer): New routine. A core procedure which given any
3737         construct with declarations and/or statements detects all objects which
3738         need any type of clean up (controlled objects, protected objects) and
3739         generates all necessary code to clean up the said objects in the proper
3740         order.
3741         (Build_Finalizer_Call): New routine.
3742         (Build_Initialize_Statements): Create the initialization statements for
3743         an array type. The generated routine contains code to finalize partially
3744         initialized arrays.
3745         (Build_Object_Declarations): New routine.
3746         (Build_Raise_Statement): New routine.
3747         (Clean_Simple_Protected_Objects): Removed.
3748         (Controller_Component): Removed.
3749         (Enclosing_Function): New routine.
3750         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3751         either declarations or statements or both.
3752         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3753         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3754         package.
3755         (Find_Final_List): Removed.
3756         (Global_Flist_Ref): Removed.
3757         (In_Finalization_Root): Removed.
3758         (Insert_Actions_In_Scope_Around): Determine the range of the transient
3759         scope in terms of tree nodes. Process all transient variables within
3760         that range.
3761         (Make_Adjust_Call): Rewritten. There is no longer an attach call
3762         generated after the adjust.
3763         (Make_Attach_Call): Removed.
3764         (Make_Call): New routine.
3765         (Make_Clean): Removed.
3766         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3767         build routines.
3768         (Make_Deep_Proc): Rewritten to generate the new profile signature used
3769         in Deep routines.
3770         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3771         build routines.
3772         (Make_Final_Call): Modified to simply create a call to either
3773         Deep_Finalize or Finalize.
3774         (Make_Finalize_Address_Body): New routine.
3775         (Make_Finalize_Address_Stmts): New routine. A function which produces
3776         TSS primitive Finalize_Address used in conjunction with heap allocated
3777         controlled objects.
3778         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3779         (Make_Init_Call): Rewritten. There is no longer an attach call
3780         generated after initialization.
3781         (Make_Local_Deep_Finalize): New routine.
3782         (Make_Set_Finalize_Address_Ptr_Call): New routine.
3783         (Make_Transient_Block): Remove the finalization list retrieval and
3784         manipulation.
3785         (Needs_Finalization): Moved to Exp_Util.
3786         (Parent_Field_Type): New routine.
3787         (Preprocess_Components): New routine.
3788         (Process_Transient_Objects): New routine.
3789         (Wrap_HSS_In_Block): New routine.
3790         (Wrap_Transient_Declaration): Remove finalization list management and
3791         controller insertion.
3792         (Wrap_Transient_Expression): Code reformatting.
3793         (Wrap_Transient_Statement): Code reformatting.
3794         * exp_ch7.ads (Build_Final_List): Removed.
3795         (Build_Finalization_Collection): New routine.
3796         (Build_Raise_Statement): New routine.
3797         (Controller_Component): Removed.
3798         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3799         (Find_Final_List): Removed.
3800         (In_Finalization_Root): Removed.
3801         (Is_Simple_Protected_Type): Update related comment.
3802         (Make_Adjust_Call): New parameter profile and associated comments.
3803         (Make_Attach_Call): Removed.
3804         (Make_Final_Call): New parameter profile and associated comments.
3805         (Make_Finalize_Address_Body): New routine.
3806         (Make_Init_Call): New parameter profile and associated comments.
3807         (Make_Local_Deep_Finalize): New routine.
3808         (Make_Set_Finalize_Address_Ptr_Call): New routine.
3809         (Needs_Finalization): Moved to Exp_Util.
3810         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3811         (Expand_N_Protected_Body): Remove the handling of finalization lists.
3812         (Find_Protection_Type): Moved to Exp_Util.
3813         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3814         (Make_DT): Update sequence of dispatch table initialization. Remove the
3815         initialization of field RC_Offset. Add initialization of field Needs_
3816         Finalization.
3817         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3818         Reimplement how an object is first finalized, then deallocated.
3819         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3820         Code reformatting.
3821         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3822         Register TSS_Finalize_Address with type TSS_Names.
3823         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3824         procedure provides the interface between an allocation / deallocation
3825         and the support machinery in Ada.Finalization.Heap_Management.
3826         (Find_Init_Call): Code reformatting.
3827         (Find_Init_Call_In_List): Code reformatting.
3828         (Find_Protection_Type): Moved from Exp_Ch9.
3829         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3830         (Has_Controlled_Coextensions): Removed.
3831         (Has_Controlled_Objects): New routine.
3832         (In_Library_Level_Package_Body): New routine.
3833         (Insert_Action_After): New routine.
3834         (Is_Finalizable_Transient): New routine. This predicate determines
3835         whether an object declaration is one of the many variants of controlled
3836         transients.
3837         (Is_Null_Access_BIP_Func_Call): New routine.
3838         (Is_Non_BIP_Func_Call): New routine.
3839         (Is_Related_To_Func_Return): New routine.
3840         (Needs_Finalization): Moved from Exp_Ch7.
3841         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3842         (Find_Protection_Type): Moved from Exp_Ch9.
3843         (Has_Controlled_Coextensions): Removed.
3844         (Has_Controlled_Objects): New routine.
3845         (In_Library_Level_Package_Body): New routine.
3846         (Insert_Action_After): New routine.
3847         (Is_Finalizable_Transient): New routine.
3848         (Is_Null_Access_BIP_Func_Call): New routine.
3849         (Is_Non_BIP_Func_Call): New routine.
3850         (Is_Related_To_Func_Return): New routine.
3851         (Needs_Finalization): Moved from Exp_ch7.
3852         * expander.adb (Expand): Add a case for N_Free_Statement.
3853         * freeze.adb (Freeze_All): Replace the generation of a finalization
3854         list with a collection for access-to-controlled types.
3855         (Freeze_Entity): Code reformatting.
3856         (Freeze_Record_Type): Remove the freezing of a record controller
3857         component.
3858         (Freeze_Subprogram): Code reformatting.
3859         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3860         finalization list.
3861         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3862         has a library-level finalizer.
3863         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3864         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3865         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3866         files. Add a-fihema to the list of object files.
3867         * par-ch4.adb:
3868         Alphabetize the associations in type Is_Parameterless_Attribute.
3869         * rtsfind.ads: Ada.Finalization_List.Controller and
3870         System.Finalization_Implementation are no longer a GNAT unit.
3871         Update the range of type Ada_Finalization_Child. Remove the following
3872         recoverable entities:
3873
3874            RE_Attach_To_Final_List
3875            RE_Deep_Tag_Attach
3876            RE_Finalize_List
3877            RE_Finalize_One
3878            RE_Finalizable_Ptr_Ptr
3879            RE_Global_Final_List
3880            RE_Limited_Record_Controller
3881            RE_List_Controller
3882            RE_Move_Final_List
3883            RE_Record_Controller
3884            RE_Simple_List_Controller
3885
3886         Add the following recoverable entities:
3887
3888            RE_Add_Offset_To_Address
3889            RE_Allocate
3890            RE_Base_Pool
3891            RE_Deallocate
3892            RE_Exception_Identity
3893            RE_Finalization_Collection
3894            RE_Finalization_Collection_Ptr
3895            RE_Needs_Finalization
3896            RE_Save_Library_Occurrence
3897            RE_Set_Finalize_Address_Ptr
3898            RE_Set_Storage_Pool_Ptr
3899            RE_Storage_Count
3900         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3901         Name_uController.
3902         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3903         (First_Stored_Discriminant): Remove the mention of Name_uController.
3904         * sem_aux.ads: Comment reformatting.
3905         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3906         to redecorate an already existing class-wide type.
3907         (Decorate_Tagged_Type): New parameter profile and associated comment.
3908         Create a "shadow class-wide type" for a shadow entity.
3909         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3910         of the final chain along with the associated comment.
3911         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3912         Full_Desig and set it to the full view of the designated type.
3913         Initialize the finalization collection to empty.
3914         (Build_Derived_Record_Type): Alphabetize local variables. Code
3915         reformatting.
3916         (Collect_Fixed_Components): Remove the mention of Name_uController.
3917         (Create_Constrained_Components): Remove the mention of Name_uController.
3918         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3919         class-wide type of a shadow entity.
3920         (Process_Full_View): Update the machinery which marks type
3921         Limited_Controlled's entity as limited.
3922         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3923         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3924         list, instead make a collection build-in-place formal.
3925         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3926         a designated type in order to establish a match between the renaming
3927         and the renamed entity.
3928         (Find_Selected_Component): Add guard to prevent spurious exceptions
3929         from being raised on .NET/JVM.
3930         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3931         to the list of primitive that need special processing. Update arrays
3932         C_Names and D_Names.
3933         (Replace_Types): Handle class-wide types.
3934         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3935         different parameter profile, look at the first formal.
3936         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3937         use clauses for Exp_Util.
3938         * sem_res.adb: Remove with and use clauses for Elists.
3939         (Propagate_Coextensions): Removed.
3940         (Resolve_Allocator): Do not propagate the list of coextensions from one
3941         allocator to another.
3942         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3943         Deaccessed_T to Desig_Typ.
3944         (Enter_Name): Remove the mention of Name_uController.
3945         (Gather_Components): Remove the mention of Name_uController.
3946         (Incomplete_Or_Private_View): New routine.
3947         (Is_Coextension_Root): Removed.
3948         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3949         * sem_util.ads (Incomplete_Or_Private_View): New routine.
3950         (Is_Coextension_Root): Removed.
3951         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3952         Controlled types are now derived from a null tagged record. Remove
3953         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3954         * sinfo.adb (Coextensions): Removed.
3955         (Set_Coextensions): Removed.
3956         * sinfo.ads: Remove Coextensions from the explanation of node fields
3957         and its uses in nodes.
3958         Update the field usage of N_Allocator.
3959         (Coextensions): Removed along with its pragma Inline.
3960         (Set_Coextensions): Removed along with its pragma Inline.
3961         * snames.ads-tmpl: Remove names
3962
3963           Name_uClean
3964           Name_uController
3965           Name_uFinal_List
3966           Name_uLocal_Final_List
3967           Name_Finalization_Root
3968           Name_Next
3969           Name_Prev
3970
3971         Add names
3972
3973           Name_uFinalizer
3974           Name_Finalize_Address
3975         * s-pooglo.adb (Allocate): Add overriding indicator.
3976         (Deallocate): Add overriding indicator.
3977         (Storage_Size): Add overriding indicator.
3978         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3979         than Finalize_Global_List.
3980         (Null_Finalize_Global_List): Removed.
3981         (Save_Library_Occurrence): New routine.
3982         * s-soflin.ads: Remove variable Finalize_Global_List along with its
3983         initialization. Add variable Finalize_Library_Objects along with its
3984         pragma Export. Add variables Library_Exception and
3985         Library_Exception_Set along with their pragma Export.
3986         (Null_Finalize_Global_List): Removed.
3987         (Save_Library_Occurrence): New routine.
3988         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3989         rather than Finalize_Global_List.
3990         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3991         of the constructed node.
3992
3993 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3994
3995         * link.c: Include "auto-host.h" before system headers.
3996
3997 2011-08-03  Vincent Celier  <celier@adacore.com>
3998
3999         * make.adb (Gnatmake): Add to table Library_Projs only library projects
4000         that are not extended. Do not check if a library project that is
4001         extended should be regenerated. Do not add to table Library_Paths the
4002         libraries that are in extended projects. Link only with libraries that
4003         are in libray projects that are not extended.
4004         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4005         for a library project that is extended.
4006
4007 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4008
4009         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4010         conforming subprogram renamings that appear to be completions if they
4011         are not fully conformant.
4012         Such renamings are homographs but not completions.
4013         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4014         names in a subprogram renaming that appears in an instance.
4015
4016 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4017
4018         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4019         not immutably limited, build actual subtype from expression to provide
4020         proper bounds to caller.
4021
4022 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4023
4024         * sem_ch8.adb: Minor comment correction.
4025
4026 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4027
4028         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4029         returning a limited array, use an extended return statement.
4030
4031 2011-08-03  Vincent Celier  <celier@adacore.com>
4032
4033         * make.adb (Initialize): If --subdirs= is used, but no project file is
4034         specified, attempt to create the specify subdir if it does not already
4035         exist and use it as the object directory as if -D had been specified.
4036
4037 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4038
4039         * s-tpopsp-vms.adb: New file.
4040         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4041         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4042
4043 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4044
4045         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4046         package.
4047
4048 2011-08-03  Yannick Moy  <moy@adacore.com>
4049
4050         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4051         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4052         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4053         detect that an array has static bounds.
4054
4055 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4056
4057         * exp_dist.adb: Minor reformatting.
4058
4059 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4060
4061         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4062         (ATCB_Key): Removed, not always used.
4063
4064 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4065
4066         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4067         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4068         most remaining global variables.
4069
4070 2011-08-03  Robert Dewar  <dewar@adacore.com>
4071
4072         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4073         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4074         reformatting.
4075
4076 2011-08-03  Javier Miranda  <miranda@adacore.com>
4077
4078         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4079         that must be passed by copy in VM targets.
4080
4081 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4082
4083         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4084         duplicates a similar htable now in the project tree.
4085
4086 2011-08-03  Claire Dross  <dross@adacore.com>
4087
4088         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4089         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4090         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4091         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4092         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4093         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4094         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4095         update.
4096
4097 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4098
4099         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4100         (ATCB_Key): Removed, not always used.
4101         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4102         s-taprop-posix.adb.
4103         * s-tpopsp-tls.adb: New file.
4104         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4105         x86/x64/ia64/powerpc/sparc Linux.
4106
4107 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4108
4109         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4110         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4111
4112 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4113
4114         * rtsfind.ads, exp_dist.adb, exp_dist.ads
4115         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4116         Fix type selection for mapping integer types to PolyORB types.
4117
4118 2011-08-03  Bob Duff  <duff@adacore.com>
4119
4120         * sem_ch7.adb: Minor comment clarification.
4121
4122 2011-08-03  Bob Duff  <duff@adacore.com>
4123
4124         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4125         an error analyzing a choice, skip further processing. Further
4126         processing could cause a crash or cascade errors.
4127
4128 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4129
4130         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4131         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4132         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4133         prj-env.ads (Shared_Project_Tree_Data): new type
4134         An aggregate project and its aggregated trees need to share the common
4135         data structures used for lists of strings, packages,... This makes the
4136         code simpler since otherwise we have to pass the root tree (also used
4137         for the configuration file data) in addition to the current project
4138         tree. This also avoids ambiguities as to which tree should be used.
4139         And finally this saves a bit of memory.
4140         (For_Every_Project_Imported): new parameter Tree.
4141         Since aggregated projects are using a different tree, we need to let
4142         the caller know which tree to use to manipulate the returned project.
4143
4144 2011-08-03  Robert Dewar  <dewar@adacore.com>
4145
4146         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4147         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4148         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4149         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4150
4151 2011-08-03  Javier Miranda  <miranda@adacore.com>
4152
4153         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4154         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4155
4156 2011-08-03  Bob Duff  <duff@adacore.com>
4157
4158         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4159         the Base_Type.
4160
4161 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
4162
4163         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4164         g-sehash.ads: Fix typo. Update header.
4165
4166 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4167
4168         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4169         expansion.
4170
4171 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4172
4173         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4174         prefixes of private types along with records, since the selector may be
4175         a discriminant.
4176         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4177         private types along with records, since the selector may be a
4178         discriminant.
4179
4180 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4181
4182         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4183
4184 2011-08-03  Javier Miranda  <miranda@adacore.com>
4185
4186         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4187         Tagged_Type_Expansion.
4188
4189 2011-08-03  Yannick Moy  <moy@adacore.com>
4190
4191         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4192         violation when the argument of concatenation is the name of a
4193         constant.
4194
4195 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4196
4197         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4198         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4199         (Process_Declarative_Items): new parameter Child_Env.
4200
4201 2011-08-03  Yannick Moy  <moy@adacore.com>
4202
4203         * alfa.ads: Update format of ALFA section in ALI file in order to
4204         add a mapping from bodies to specs when both are present.
4205         (ALFA_Scope_Record): Add components for spec file/scope.
4206         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4207         present.
4208         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4209         collected, fill in the spec information when relevant.
4210         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4211         present.
4212
4213 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4214
4215         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4216         code unit to decide whether to add internally generated subprograms.
4217
4218 2011-08-03  Javier Miranda  <miranda@adacore.com>
4219
4220         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4221         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4222         be handled by copy in VM targets.
4223
4224 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4225
4226         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4227         code with Makeutl.Get_Switches.
4228         * prj-tree.adb: Update comment.
4229
4230 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4231
4232         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4233         subprogram with a limited formal that does not support external
4234         streaming.
4235
4236 2011-08-03  Yannick Moy  <moy@adacore.com>
4237
4238         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4239         continuation line
4240         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4241         not from current unit in two phases, because it is not possible to
4242         change the table while iterating over its content.
4243         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4244
4245 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4246
4247         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4248         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4249
4250 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4251
4252         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4253         and the component type is composite, this is ambiguous for predefined
4254         concatenation, but if the node is not overloaded and the entity is a use
4255         -defined function its profile can be used to resolve that aggregate.
4256
4257 2011-08-03  Robert Dewar  <dewar@adacore.com>
4258
4259         * exp_ch4.adb: Minor code cleanup.
4260
4261 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4262
4263         * exp_dist.adb: Do not generate distribution stubs if serious errors
4264         have been diagnosed.
4265
4266 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4267
4268         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4269         the first formal of a primitive operation, go to the base type to
4270         handle properly an access to a derived type with constrained
4271         discriminants.
4272         * sem_type.adb (Disambiguate): an immediately visible operator hides a
4273         user-defined function that is only use-visible.
4274
4275 2011-08-03  Robert Dewar  <dewar@adacore.com>
4276
4277         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4278         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4279         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4280         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4281         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4282         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4283         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4284         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4285
4286 2011-08-03  Robert Dewar  <dewar@adacore.com>
4287
4288         * repinfo.adb (List_Mechanism): Add handling of
4289         Convention_Ada_Pass_By_XXX.
4290         * sem_mech.adb (Set_Mechanism): Ditto.
4291         * sem_prag.adb (Process_Convention): Add entries for
4292         Convention_Ada_Pass_By_XXX.
4293         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4294
4295 2011-08-03  Pascal Obry  <obry@adacore.com>
4296
4297         * makeutl.adb: Minor reformatting.
4298
4299 2011-08-03  Vincent Celier  <celier@adacore.com>
4300
4301         * fname-uf.adb
4302         (Get_File_Name) If the file cannot be found when there are no config
4303         pragmas file and May_Fail is True, return No_File instead of the file
4304         name, to be consistent.
4305
4306 2011-08-03  Pascal Obry  <obry@adacore.com>
4307
4308         * adaint.c (__gnat_is_executable_file_attr): Avoid access
4309         to null pointer.
4310
4311 2011-08-03  Javier Miranda  <miranda@adacore.com>
4312
4313         * sem_ch13.adb
4314         (Same_Representation): In VM targets the representation of arrays with
4315         aliased components differs from arrays with non-aliased components.
4316
4317 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4318
4319         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4320         not systematically lower case attribute indexes that contain no "."
4321         Fix definition of several Naming attributes, which take
4322         a unit name as index and therefore should be case insensitive.
4323         Minor refactoring (reduce length of variable names).
4324
4325 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4326
4327         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4328
4329 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4330
4331         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4332         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4333         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4334         prj-tree.ads (Prj.Tree.Environment): new type.
4335
4336 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4337
4338         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4339         prj-tree.adb, prj-tree.ads (Environment): new type.
4340
4341 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4342
4343         * prj-tree.ads: Remove unused variable.
4344
4345 2011-08-03  Yannick Moy  <moy@adacore.com>
4346
4347         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4348         issuing messages related to SPARK restriction violation.
4349
4350 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4351
4352         * sem_ch6.adb: guard against error nodes in return statements.
4353
4354 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4355
4356         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4357         a warning can only appear on a configuration file, so emit warning
4358         without further checks.
4359
4360 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
4361
4362         * s-interr.ads: add overriding keyword.
4363
4364 2011-08-03  Geert Bosch  <bosch@adacore.com>
4365
4366         * exp_attr.adb: Fix minor typo.
4367
4368 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4369
4370         * par-ch4.adb: improve error recovery.
4371
4372 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4373
4374         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4375         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4376         to Errout_Handling.
4377
4378 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4379
4380         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4381         "external" as an attribute name in aggregate projects.
4382
4383 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4384
4385         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4386         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4387         from 0, so we need to adjust.
4388
4389 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4390
4391         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4392         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4393
4394 2011-08-03  Yannick Moy  <moy@adacore.com>
4395
4396         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4397         restriction on overloaded entity if the entity is not an operator.
4398
4399 2011-08-03  Yannick Moy  <moy@adacore.com>
4400
4401         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4402         restrict.ads: Rename remaining Check_Formal_Restriction* into
4403         Check_SPARK_Restriction*.
4404
4405 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4406
4407         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4408         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4409         qualifier.
4410         (Project_Empty): removed
4411         (Empty_Project): new parameter Qualifier
4412         This is used to have fields specific to aggregate projects, cleaner
4413         New field to store the list of aggregated projects.
4414         (Check_Aggregate_Project): removed
4415         (Process_Aggregated_Projects, Free): new subprograms.
4416
4417 2011-08-03  Olivier Hainque  <hainque@adacore.com>
4418
4419         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4420
4421 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4422
4423         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4424         explicit dereference of an unconstrained type, create a constrained
4425         subtype for it, as is done for function calls that return an
4426         unconstrained type.
4427
4428 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4429
4430         * g-pehage.adb (Finalize): Avoid possible double-free.
4431
4432 2011-08-03  Steve Baird  <baird@adacore.com>
4433
4434         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4435         Elab_Spec/Body attrs in CodePeer_Mode.
4436
4437 2011-08-03  Javier Miranda  <miranda@adacore.com>
4438
4439         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4440         low bound is not known at compile time but they have no others choice.
4441         Done because in this case the bounds can be obtained directly from the
4442         aggregate.
4443
4444 2011-08-03  Ed Falis  <falis@adacore.com>
4445
4446         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4447         on VxWorks SMP. Remove unusable constant ANY_CPU.
4448
4449 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4450
4451         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4452         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4453         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4454         Prj.Env.Initialize_Empty): new subprograms
4455         (Get_Env, Find_Project): remove parameter Target_Name.
4456
4457 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4458
4459         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4460         as a condition for the delayed call to Derived_Subprograms done for the
4461         case of the rewriting of a derived type that constrains the
4462         discriminants of its parent type.
4463         Avoids redundant subprogram derivations for private subtype derivations.
4464
4465 2011-08-03  Javier Miranda  <miranda@adacore.com>
4466
4467         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4468         Build_Record_Aggr_Code.
4469         (Build_Record_Aggr_Code): Add missing support to initialize hidden
4470         discriminants in extension aggregates.
4471
4472 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4473
4474         * prj-pp.adb (Print): also output project qualifiers, since in
4475         particular "aggregate" is mandatory in an aggregate project.
4476
4477 2011-08-03  Emmanuel Briot  <briot@adacore.com>
4478
4479         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4480         (Debug_Output): new function.
4481
4482 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4483
4484         * gnat_ugn.texi: Document -Wstack-usage.
4485         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4486
4487 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4488
4489         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4490         have keyword LIMITED.
4491
4492 2011-08-03  Yannick Moy  <moy@adacore.com>
4493
4494         * alfa.adb, alfa.ads, alfa_test.adb: New files.
4495         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4496         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4497         section (does not happen in compiler, only if code directly calls
4498         Scan_ALI).
4499         * get_alfa.adb, get_alfa.ads: New files.
4500         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4501         needed.
4502         * lib-xref-alfa.adb: New file.
4503         * lib-xref.adb, lib-xref.ads
4504         (Xref_Entry): redefine information needed in cross-references for ALFA.
4505         Push ALFA treatments in separated local package.
4506         (Enclosing_Subpragram_Or_Package): treat specially subprogram
4507         identifiers. Return entity of package body instead of spec. Return
4508         Empty for a scope with no location.
4509         (Generate_Reference): adapt to new components for ALFA information.
4510         Remove the need for D references on definitions.
4511         (Is_Local_Reference): moved to ALFA local package
4512         (Output_References): extract subfunction as Extract_Source_Name
4513         (Output_Local_References): remove procedure, replaced by filtering of
4514         cross-references in package ALFA and printing in Put_ALFA.
4515         (Write_Entity_Name): remove procedure
4516         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4517         print exact name of entity as it appears in source file
4518         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4519         * put_alfa.adb, put_alfa.ads: New files.
4520         * xref_lib.adb (Search_Xref): protect read of cross-references against
4521         reading other sections of the ALI file, in gnatxref
4522         (Search): protect read of cross-references against reading other
4523         sections of the ALI file, in gnatfind.
4524         * gcc-interface/Make-lang.in: Update dependencies.
4525
4526 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4527
4528         * sem_ch3.adb: Minor reformatting.
4529
4530 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
4531
4532         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4533         raising an exception.
4534
4535 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4536
4537         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4538         type, always use 1 as the lower bound or string, even if lower bound of
4539         context is not static, to handle properly null strings in a non-static
4540         context.
4541
4542 2011-08-03  Bob Duff  <duff@adacore.com>
4543
4544         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4545         always legal on the right-hand side of an assignment statement; there
4546         is always an applicable index constraint in this case. Therefore, the
4547         check for Pkind = N_Assignment_Statement is now unconditional -- it
4548         doesn't depend on whether Is_Constrained (Typ).
4549
4550 2011-08-03  Robert Dewar  <dewar@adacore.com>
4551
4552         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4553
4554 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4555
4556         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4557         for an itype created within a generic unit.
4558
4559 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
4560
4561         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4562         suppresses all inlining.
4563
4564 2011-08-03  Robert Dewar  <dewar@adacore.com>
4565
4566         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4567         exp_aggr.adb: Minor reformatting.
4568
4569 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4570
4571         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4572         tagged assignment when discriminant checks are suppressed. This is
4573         useless and extremely costly in terms of static stack usage.
4574
4575 2011-08-03  Bob Duff  <duff@adacore.com>
4576
4577         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4578         of generics, because this leads to the wrong entity in the wrong scope,
4579         causing (e.g.) pragma Export_Procedure to get an error if the entity is
4580         an instance.
4581         (Process_Interface_Name): Follow Alias for instances of generics, to
4582         correct for the above change.
4583
4584 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4585
4586         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4587         is an integer literal it is always safe to replace the reference. In
4588         addition, if the reference appears in the generated code for an object
4589         declaration it is necessary to copy because otherwise the reference
4590         might be to the uninitilized value of the discriminant of the object
4591         itself.
4592
4593 2011-08-03  Pascal Obry  <obry@adacore.com>
4594
4595         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4596         ACL used, in this case we want to check for ending .exe, not .exe
4597         anywhere in the path.
4598
4599 2011-08-03  Sergey Rybin  <rybin@adacore.com>
4600
4601         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4602         the tree structure (semantic decoration of references to record
4603         discriminants).
4604
4605 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
4606
4607         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4608         choices of a named array aggregate, bail out when any choices are
4609         marked as Errors_Posted.
4610
4611 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4612
4613         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4614         in which entity is frozen, to handle properly loop variables in
4615         iterators.
4616
4617 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4618
4619         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4620         subtype is not static, compute the upper bound using attributes, to
4621         handle properly index types that are not integer types.
4622
4623 2011-08-03  Bob Duff  <duff@adacore.com>
4624
4625         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4626         Update copyright notice.
4627
4628 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4629
4630         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4631         Original_Discriminant if within an instance.
4632         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4633
4634 2011-08-03  Thomas Quinot  <quinot@adacore.com>
4635
4636         * einfo.ads: Minor reformatting.
4637
4638 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4639
4640         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4641         composite type with an unfrozen subcomponent, in the profile of a
4642         primitive operation.
4643
4644 2011-08-03  Robert Dewar  <dewar@adacore.com>
4645
4646         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4647
4648 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4649
4650         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4651         unconstrained type with discriminants is initialized with an aggregate,
4652         use the constrained subtype of the aggregate as the type of the object,
4653         because it is immutable, and this allows the back-end to generate no
4654         code for the object declaration.
4655
4656 2011-08-03  Robert Dewar  <dewar@adacore.com>
4657
4658         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4659         comparison operand is variable, and turns out to be zero or negative.
4660
4661 2011-08-03  Javier Miranda  <miranda@adacore.com>
4662
4663         * exp_intr.adb
4664         (Expand_Dispatching_Constructor_Call): Disable expansion of
4665         code required for native targets. Done to avoid generating
4666         references to unavailable runtime entities in VM targets.
4667         * exp_ch3.adb
4668         (Expand_N_Object_Declaration): Add missing support to handle
4669         the explicit initialization of class-wide interface objects.
4670         Fix documentation.
4671
4672 2011-08-03  Matthew Heaney  <heaney@adacore.com>
4673
4674         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4675
4676 2011-08-03  Matthew Heaney  <heaney@adacore.com>
4677
4678         * a-cbdlli.adb (Splice): move source items from first to last
4679
4680 2011-08-03  Yannick Moy  <moy@adacore.com>
4681
4682         * sem_util.ads: comment added.
4683
4684 2011-08-03  Javier Miranda  <miranda@adacore.com>
4685
4686         * exp_aggr.adb
4687         (Expand_Record_Aggregate): In VM targets disable the expansion into
4688         assignments of aggregates whose type is not known at compile time.
4689
4690 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
4691
4692         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4693         protected entries and task entries, to build the proper renaming
4694         declaration for entry formals, used in debugging.
4695         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4696         parameters in the same way.
4697
4698 2011-08-02  Robert Dewar  <dewar@adacore.com>
4699
4700         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4701         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4702         code reorganization.
4703
4704 2011-08-02  Robert Dewar  <dewar@adacore.com>
4705
4706         * debug.adb: Debug flag d.P to suppress length comparison optimization
4707         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4708         comparison of Length by comparing First/Last instead.
4709
4710 2011-08-02  Matthew Heaney  <heaney@adacore.com>
4711
4712         * a-cobove.ads: Code clean up.
4713
4714 2011-08-02  Vincent Celier  <celier@adacore.com>
4715
4716         * adaint.c (file_names_case_sensitive_cache): New static int.
4717         (__gnat_get_file_names_case_sensitive): Cache the return value in
4718         file_names_case_sensitive_cache at the first invocation, to avoid
4719         multiple calls to getenv.
4720
4721 2011-08-02  Bob Duff  <duff@adacore.com>
4722
4723         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4724
4725 2011-08-02  Yannick Moy  <moy@adacore.com>
4726
4727         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4728         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4729         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4730         indicate that we are in a precondition or postcondition. This is used in
4731         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4732         decide whether to flag the spec or body of the current subprogram as
4733         not in ALFA.
4734
4735 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
4736
4737         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4738         list.
4739         * a-extiin.ads: New file.
4740
4741 2011-08-02  Bob Duff  <duff@adacore.com>
4742
4743         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4744         now raises Name_Error instead of Use_Error in certain cases. The other
4745         parts of this AI were already implemented properly.
4746
4747 2011-08-02  Vincent Celier  <celier@adacore.com>
4748
4749         * link.c: Only import "auto-host.h" when building the gnattools.
4750
4751 2011-08-02  Yannick Moy  <moy@adacore.com>
4752
4753         * sem_util.adb: Inter-unit inlining does not work for a subprogram
4754         which calls a local subprogram, so extract subprogram
4755         from Mark_Non_ALFA_Subprogram_Body.
4756
4757 2011-08-02  Javier Miranda  <miranda@adacore.com>
4758
4759         * exp_ch9.adb
4760         (Extract_Dispatching_Call): If the type of the dispatching object is an
4761         access type then return an explicit dereference in the Object out-mode
4762         parameter.
4763
4764 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4765
4766         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4767         compatibility checks for all indexes of an array subtype, not just the
4768         first. Reset Has_Dynamic_Range_Check on the subtype before each
4769         potential check to ensure that Insert_Range_Checks will not elide any
4770         of the dynamic checks.
4771
4772 2011-08-02  Yannick Moy  <moy@adacore.com>
4773
4774         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4775         SPARK restriction at parsing time.
4776         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4777         directive only if the SPARK restriction is set for this unit.
4778
4779 2011-08-02  Yannick Moy  <moy@adacore.com>
4780
4781         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4782         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4783         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4784         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4785         Mark_Non_ALFA_Subprogram_Body.
4786         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4787         inlined.
4788
4789 2011-08-02  Yannick Moy  <moy@adacore.com>
4790
4791         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4792         might be costly.
4793
4794 2011-08-02  Robert Dewar  <dewar@adacore.com>
4795
4796         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4797         exp_ch3.adb: Minor reformatting.
4798
4799 2011-08-02  Emmanuel Briot  <briot@adacore.com>
4800
4801         * adaint.c (__gnat_locate_exec_on_path): only returns executable
4802         files, not any regular file.
4803         (__gnat_locate_file_with_predicate): new subprogram.
4804
4805 2011-08-02  Yannick Moy  <moy@adacore.com>
4806
4807         * sinfo.adb, sinfo.ads: Restrict the use of flags
4808         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4809         nodes, plus N_Subtype_Declaration for the 2nd one.
4810
4811 2011-08-02  Sergey Rybin  <rybin@adacore.com>
4812
4813         * gnat_rm.texi: Ramification of pragma Eliminate documentation
4814          - fix bugs in the description of Source_Trace;
4815          - get rid of UNIT_NAME;
4816
4817 2011-08-02  Javier Miranda  <miranda@adacore.com>
4818
4819         * exp_ch9.adb
4820         (Build_Dispatching_Requeue): Adding support for VM targets
4821         since we cannot directly reference the Tag entity.
4822         * exp_sel.adb (Build_K): Adding support for VM targets.
4823         (Build_S_Assignment): Adding support for VM targets.
4824         * exp_disp.adb
4825         (Default_Prim_Op_Position): In VM targets do not restrict availability
4826         of predefined interface primitives to compiling in Ada 2005 mode.
4827         (Is_Predefined_Interface_Primitive): In VM targets this service is not
4828         restricted to compiling in Ada 2005 mode.
4829         (Make_VM_TSD): Generate code that declares and initializes the OSD
4830         record. Needed to support dispatching calls through synchronized
4831         interfaces.
4832         * exp_ch3.adb
4833         (Make_Predefined_Primitive_Specs): Enable generation of predefined
4834         primitives associated with synchronized interfaces.
4835         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4836         primitives associated with synchronized interfaces.
4837
4838 2011-08-02  Yannick Moy  <moy@adacore.com>
4839
4840         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4841         statements hidden in SPARK if preceded by the HIDE directive
4842         (Parse_Exception_Handlers): mark each exception handler in a sequence of
4843         exception handlers as hidden in SPARK if preceded by the HIDE directive
4844         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4845         if starting with the HIDE directive
4846         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4847         starting with the HIDE directive; mark the declarations in a private
4848         part as hidden in SPARK if the private part starts with the HIDE
4849         directive
4850         * restrict.adb, restrict.ads
4851         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4852         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4853         argument node belongs to a part which is hidden in SPARK
4854         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4855         parts in SPARK; protect the possibly costly call to
4856         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4857         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4858         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4859         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4860         Tok_SPARK_Hide.
4861         (Scan): recognize special comment starting with '#' and followed by
4862         SPARK keyword "hide" as a HIDE directive.
4863
4864 2011-08-02  Yannick Moy  <moy@adacore.com>
4865
4866         * types.ads, erroutc.ads: Minor reformatting.
4867
4868 2011-08-02  Vincent Celier  <celier@adacore.com>
4869
4870         * link.c: Add response file support for cross platforms.
4871
4872 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4873
4874         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4875         in an association, set parent field of copy before partial analysis.
4876         * sem_res.adb (Resolve_Slice): create reference to itype only when
4877         expansion is enabled.
4878
4879 2011-08-02  Yannick Moy  <moy@adacore.com>
4880
4881         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4882         for new flag denoting which subprogram bodies are in ALFA
4883         * restrict.adb, sem_ch7.adb: Update comment
4884         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4885         sem_ch9.adb, sem_res.adb: Add calls to
4886         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4887         * sem_ch6.adb (Analyze_Function_Return): add calls to
4888         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4889         middle of the body, and extended return.
4890         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4891         False when missing return.
4892         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4893         to True for subprograms whose spec is in ALFA. Remove later on the flag
4894         on the entity used for a subprogram body when there exists a separate
4895         declaration.
4896         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4897         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4898         False, otherwise do nothing.
4899
4900 2011-08-02  Robert Dewar  <dewar@adacore.com>
4901
4902         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4903
4904 2011-08-02  Yannick Moy  <moy@adacore.com>
4905
4906         * sem_ch4.ads: minor formatting.
4907
4908 2011-08-02  Yannick Moy  <moy@adacore.com>
4909
4910         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4911         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4912         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4913         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4914         opt.ads: cleanup of SPARK mode
4915
4916 2011-08-02  Yannick Moy  <moy@adacore.com>
4917
4918         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4919         types.
4920         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4921         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4922         * sem_ch3.adb
4923         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4924         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4925         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4926         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4927         types.
4928         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4929         non-static range.
4930         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4931         functions whose return type is not in ALFA.
4932         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4933         specifications.
4934         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4935         parameter's type is not in ALFA.
4936         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4937         types are in ALFA.
4938
4939 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4940
4941         * sem_ch6 (Analyze_Expression_Function): treat the function as
4942         Inline_Always, and introduce a subprogram declaration for it when it is
4943         not a completion.
4944         * inline.adb (Add_Inlined_Body): recognize bodies that come from
4945         expression functions, so that the back-end can determine whether they
4946         can in fact be inlined.
4947         * sem_util.adb (Is_Expression_Function): predicate to determine whether
4948         a function body comes from an expression function.
4949
4950 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
4951
4952         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4953         null exclusions to test Can_Never_Be_Null on the anonymous access types
4954         of the formals rather than testing the formals themselves. Exclude this
4955         check in cases where the Old_Formal is marked as a controlling formal,
4956         to avoid issuing spurious errors for bodies completing dispatching
4957         operations (due to the flag not getting set on controlling access
4958         formals in body specs).
4959         (Find_Corresponding_Spec): When checking full and subtype conformance of
4960         subprogram bodies in instances, pass Designated and E in that order, for
4961         consistency with the expected order of the formals (New_Id followed by
4962         Old_Id).
4963
4964 2011-08-02  Robert Dewar  <dewar@adacore.com>
4965
4966         * sem_ch8.adb: Minor reformatting.
4967
4968 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
4969
4970         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4971         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4972         primitive operations of class-wide actuals.
4973
4974 2011-08-02  Javier Miranda  <miranda@adacore.com>
4975
4976         * exp_atag.ads, exp_atag.adb
4977         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4978         since its value is implicitly passed in argument Typ.
4979         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4980         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4981         Build_Common_Dispatching_Select_Statements.
4982
4983 2011-08-02  Robert Dewar  <dewar@adacore.com>
4984
4985         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4986         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4987         Minor reformatting.
4988
4989 2011-08-02  Robert Dewar  <dewar@adacore.com>
4990
4991         * sem_res.adb: Minor reformatting.
4992         * sem_prag.adb: Minor reformatting.
4993
4994 2011-08-02  Javier Miranda  <miranda@adacore.com>
4995
4996         * exp_atag.adb, exp_atags.ads
4997         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4998         by the tagged type Entity. Required to use this routine in the VM
4999         targets since we do not have available the Tag entity in the VM
5000         platforms.
5001         * exp_ch6.adb
5002         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5003         Ada.Tags has not been previously loaded.
5004         * exp_ch7.adb
5005         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5006         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5007         * sem_aux.adb
5008         (Enclosing_Dynamic_Scope): Add missing support to handle the full
5009         view of enclosing scopes. Required to handle enclosing scopes that
5010         are synchronized types whose full view is a task type.
5011         * exp_disp.adb
5012         (Build_VM_TSDs): Minor code improvement to avoid generating and
5013         analyzing lists with empty nodes.
5014         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5015         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5016         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5017         (Make_Disp_Timed_Select_Body): Add support for VM targets.
5018         (Make_Select_Specific_Data_Table): Add support for VM targets.
5019         (Make_VM_TSD): Generate code to initialize the SSD structure of
5020         the TSD.
5021
5022 2011-08-02  Yannick Moy  <moy@adacore.com>
5023
5024         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5025         cross-references section in ALI.
5026         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5027         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5028         Sub).
5029         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5030         subprogram or package entity of a node
5031         (Is_Local_Reference_Type): new function returns True for references
5032         selected in local cross-references.
5033         (Lt): function extracted from Lt in Output_References
5034         (Write_Entity_Name): function extracted from Output_References
5035         (Generate_Definition): generate reference with type 'D' for definition
5036         of objects (object declaration and parameter specification), with
5037         appropriate locations and units, for use in local cross-references.
5038         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5039         references of type 'I' for initialization in object definition.
5040         (Output_References): move part of function Lt and procedure
5041         Write_Entity_Name outside of the body. Ignore references of types 'D'
5042         and 'I' introduced for local cross-references.
5043         (Output_Local_References): new procedure to output the local
5044         cross-references sections.
5045         (Lref_Entity_Status): new array defining whether an entity is a local
5046         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5047         with 'I' type when initialization expression is present.
5048         * get_scos.adb, get_scos.ads: Correct comments and typos
5049
5050 2011-08-02  Javier Miranda  <miranda@adacore.com>
5051
5052         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5053         the JVM target.
5054         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5055         the JVM target.
5056         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5057         TSD support.
5058
5059 2011-08-02  Vincent Celier  <celier@adacore.com>
5060
5061         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5062         (No_Space_Img): New function
5063         (Find_Excluded_Sources): When reading from a file, record the file name
5064         and the line number for each excluded source.
5065         (Mark_Excluded_Sources): When reporting an error, if the excluded
5066         sources were read from a file, include file name and line number in
5067         the error message.
5068
5069 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5070
5071         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5072
5073 2011-08-02  Robert Dewar  <dewar@adacore.com>
5074
5075         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5076
5077 2011-08-02  Javier Miranda  <miranda@adacore.com>
5078
5079         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5080         generation of TSDs to the DOTNET compiler.
5081         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5082         generation of TSDs to the DOTNET compiler.
5083
5084 2011-08-02  Javier Miranda  <miranda@adacore.com>
5085
5086         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5087         record of all the tagged types declared inside library level package
5088         declarations, library level package bodies or library level subprograms.
5089         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5090         associated with a given tagged type.
5091         (Build_VM_TSDs): New subprogram.
5092         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5093         compilation units that are subprograms.
5094         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5095         compilation units that are package bodies.
5096         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5097         units that are a package declaration or a package instantiation.
5098         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5099         reorganization to improve the error generated by the frontend when the
5100         function Ada.Tags.Secondary_Tag is not available.
5101         * rtsfind.ads (RE_Register_TSD): New runtime entity.
5102         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5103
5104 2011-08-02  Javier Miranda  <miranda@adacore.com>
5105
5106         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5107
5108 2011-08-02  Robert Dewar  <dewar@adacore.com>
5109
5110         * s-imenne.ads: Minor reformatting.
5111
5112 2011-08-02  Robert Dewar  <dewar@adacore.com>
5113
5114         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5115         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5116         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5117
5118 2011-08-02  Robert Dewar  <dewar@adacore.com>
5119
5120         * einfo.ads (Materialize_Entity): Document this is only for renamings
5121         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5122         required debug information in the case where we transform the object
5123         declaration into a renaming declaration.
5124         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5125         object
5126         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5127         Materialize_Entity.
5128
5129 2011-08-02  Robert Dewar  <dewar@adacore.com>
5130
5131         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5132         Suppress_Init_Procs.
5133         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5134         Suppress_Initialization/Initialization_Suppressed.
5135         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5136         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5137         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5138         * sem_prag.adb: New processing for pragma Suppress_Initialization.
5139
5140 2011-08-02  Robert Dewar  <dewar@adacore.com>
5141
5142         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5143         Minor reformatting.
5144
5145 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5146
5147         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5148         only have inheritable classwide pre/postconditions.
5149
5150 2011-08-02  Javier Miranda  <miranda@adacore.com>
5151
5152         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5153         * rtsfind.ads (RE_Check_TSD): New runtime entity.
5154         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5155         checks if the external tag of a type is the same as the external tag
5156         of some other declaration.
5157
5158 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5159
5160         * s-taskin.ads: Minor reformatting.
5161
5162 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5163
5164         * g-comlin.adb (Display_Help): swap the order in which it prints the
5165         short help and the general usage.
5166
5167 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5168
5169         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5170         the aspect declarations and attach them to the generic copy for
5171         subsequent analysis.
5172         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5173         declarations of the generic tree to the new subprogram declarations.
5174         * sem_attr.adb (Check_Precondition_Postcondition): recognize
5175         conditions that apply to a subprogram instance.
5176
5177 2011-08-02  Robert Dewar  <dewar@adacore.com>
5178
5179         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5180
5181 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5182
5183         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5184         private type with a tagged full view is not derived in the immediate
5185         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5186
5187 2011-08-02  Robert Dewar  <dewar@adacore.com>
5188
5189         * exp_ch4.adb: Minor reformatting.
5190
5191 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5192
5193         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
5194         Ada2012 iterator, the loop will be rewritten during expansion into a
5195         while loop with a cursor and an element declaration. Do not analyze the
5196         body in this case, because if the container is for indefinite types the
5197         actual subtype of the elements will only be determined when the cursor
5198         declaration is analyzed.
5199
5200 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5201
5202         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5203         size/alignment related attributes in CodePeer_Mode.
5204
5205 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5206
5207         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5208         Prepend_Element, since this can result in the operation getting the
5209         wrong slot in the full type's dispatch table if the full type has
5210         inherited operations. The incomplete type's operation will get added
5211         to the proper position in the full type's primitives
5212         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5213         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5214         dispatching operations, since there are cases where nonprimitive
5215         subprograms can get added to the list of incomplete dependents (such
5216         as subprograms in nested packages).
5217         * sem_ch6.adb (Process_Formals): First, remove test for being in a
5218         private part when determining whether to add a primitive with a
5219         parameter of a tagged incomplete type to the Private_Dependents list.
5220         Such primitives can also occur in the visible part, and should not have
5221         been excluded from being private dependents.
5222         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5223         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5224         list of a Taft-amendment incomplete type is a primitive before issuing
5225         an error that the full type must appear in the same unit. There are
5226         cases where nonprimitives can be in the list (such as subprograms in
5227         nested packages).
5228         * sem_disp.adb (Derives_From): Use correct condition for checking that
5229         a formal's type is derived from the type of the corresponding formal in
5230         the parent subprogram (the condition was completely wrong). Add
5231         checking that was missing for controlling result types being derived
5232         from the result type of the parent operation.
5233
5234 2011-08-02  Yannick Moy  <moy@adacore.com>
5235
5236         * errout.adb (First_Node): minor renaming
5237         * restrict.adb (Check_Formal_Restriction): put restriction warning on
5238         first node.
5239
5240 2011-08-02  Yannick Moy  <moy@adacore.com>
5241
5242         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5243         before accessing operands.
5244         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5245         decide whether an initialization expression respects SPARK rules, as
5246         the plain node is the expanded one. This allows for more valid warnings
5247         to be issued.
5248         * gnat_rm.texi: Minor update.
5249
5250 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5251
5252         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5253         previous change.
5254
5255 2011-08-02  Robert Dewar  <dewar@adacore.com>
5256
5257         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5258
5259 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5260
5261         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5262         loop statements and the element renaming declaration with a block when
5263         the element type is controlled.
5264
5265 2011-08-02  Yannick Moy  <moy@adacore.com>
5266
5267         * sinfo.ads: Minor formatting.
5268
5269 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5270
5271         * sem_aggr.adb (Add_Association): if the association has a box and no
5272         expression, use the Sloc of the aggregate itself for the new
5273         association.
5274         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5275         the Original_Node.
5276
5277 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5278
5279         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5280         When a container is provided via a function call, generate a renaming
5281         of the function result. This avoids the creation of a transient scope
5282         and the premature finalization of the container.
5283         * exp_ch7.adb (Is_Container_Cursor): Removed.
5284         (Wrap_Transient_Declaration): Remove the supression of the finalization
5285         of the list controller when the declaration denotes a container cursor,
5286         it is not needed.
5287
5288 2011-08-02  Yannick Moy  <moy@adacore.com>
5289
5290         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5291         node is from source, instead of the original node being from source.
5292         * sem_aggr.adb
5293         (Resolve_Array_Aggregate): refine the check for a static expression, to
5294         recognize also static ranges
5295         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5296         Array_Type_Declaration): postpone the test for the type being a subtype
5297         mark after the type has been resolved, so that component-selection and
5298         expanded-name are discriminated.
5299         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5300         to distinguish the case of an iteration scheme, so that an error is
5301         issed on a non-static range in SPARK except in an iteration scheme.
5302         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5303         In_Iter_Schm = True.
5304         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5305         user-defined operators so that they are allowed in renaming
5306         * sem_ch8.adb
5307         (Find_Selected_Component): refine the check for prefixing of operators
5308         so that they are allowed in renaming. Move the checks for restrictions
5309         on selector name after analysis discriminated between
5310         component-selection and expanded-name.
5311         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5312         concatenation argument of string type if it is static.
5313         * sem_util.adb, sem_util.ads
5314         (Check_Later_Vs_Basic_Declarations): add a new function
5315         Is_Later_Declarative_Item to decice which declarations are allowed as
5316         later items, in the two different modes Ada 83 and SPARK. In the SPARK
5317         mode, add that renamings are considered as later items.
5318         (Enclosing_Package): new function to return the enclosing package
5319         (Enter_Name): correct the rule for homonyms in SPARK
5320         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5321         from source (result of expansion) to avoid issuing wrong warnings.
5322
5323 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5324
5325         * errout.adb: On anything but an expression First_Node returns its
5326         argument.
5327
5328 2011-08-02  Pascal Obry  <obry@adacore.com>
5329
5330         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5331
5332 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5333
5334         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5335         Set the associated loop as the related expression of internally
5336         generated cursors.
5337         * exp_ch7.adb (Is_Container_Cursor): New routine.
5338         (Wrap_Transient_Declaration): Supress the finalization of the list
5339         controller when the declaration denotes a container cursor.
5340
5341 2011-08-02  Yannick Moy  <moy@adacore.com>
5342
5343         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5344         command line now.
5345         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5346         expression is a simple expression. This check cannot be performed in
5347         the semantics, so just drop it.
5348         (P_Index_Or_Discriminant_Constraint): move check that the index or
5349         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5350         semantics. Other cases were previously checked in the semantics.
5351         * par-ch4.adb (P_Name): move checks that a selector name is not
5352         character literal or an operator symbol to Find_Selected_Component in
5353         the semantics
5354         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5355         declarations are not placed after later declarations in a separate
5356         procedure in Sem_Util (possibly not the best choice?), to be used both
5357         during parsing, for Ada 83 mode, and during semantic analysis, for
5358         SPARK mode.
5359         * par-endh.adb (Check_End): move check that end label is not missing
5360         to Process_End_Label in the semantics
5361         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5362         the special case for SPARK restriction
5363         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5364         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5365         parameter Force to issue the error message even on internal node (used
5366         for generated end label). Call Check_Restriction to check when an error
5367         must be issued. In SPARK mode, issue an error message even if the
5368         restriction is not set.
5369         (Check_Restriction): new procedure with an additional out parameter to
5370         inform the caller that a message has been issued
5371         * sem_aggr.adb: Minor modification of message
5372         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5373         instead of issuing an error message directly
5374         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5375         declarations are not placed after later declarations, by calling
5376         Check_Later_Vs_Basic_Declarations
5377         (Analyze_Subtype_Declaration): move here the check that an index or
5378         discriminant constraint must be a subtype mark. Change the check that
5379         a subtype of String must start at one so that it works on subtype marks.
5380         * sem_ch4.adb (Analyze_Call): move here the check that a named
5381         association cannot follow a positional one in a call
5382         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5383         instead of issuing an error message directly
5384         * sem_ch8.adb (Find_Selected_Component): move here the check that a
5385         selector name is not a character literal or an operator symbol. Move
5386         here the check that the prefix of an expanded name cannot be a
5387         subprogram or a loop statement.
5388         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5389         procedure called from parsing and semantics to check that basic
5390         declarations are not placed after later declarations
5391         (Process_End_Label): move here the check that end label is not missing
5392
5393 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5394
5395         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5396         representation clause in codepeer mode, since it confuses CodePeer and
5397         does not bring useful info.
5398
5399 2011-08-02  Ed Falis  <falis@adacore.com>
5400
5401         * init.c: initialize fp hw on MILS.
5402
5403 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5404
5405         * errout.adb (First_Node): for bodies, return the node itself (small
5406         optimization). For other nodes, do not check source_unit if the node
5407         comes from Standard.
5408
5409 2011-08-02  Robert Dewar  <dewar@adacore.com>
5410
5411         * exp_ch3.adb: Minor comment additions.
5412         * sem_ch13.adb: Minor reformatting.
5413
5414 2011-08-02  Pascal Obry  <obry@adacore.com>
5415
5416         * make.adb, makeutl.adb: Removes some superfluous directory separator.
5417
5418 2011-08-02  Robert Dewar  <dewar@adacore.com>
5419
5420         * sem_attr.adb: Minor reformatting.
5421
5422 2011-08-02  Robert Dewar  <dewar@adacore.com>
5423
5424         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5425         (Has_Default_Component_Value): Removed
5426         * einfo.ads Comment updates
5427         (Has_Default_Aspect): Replaces Has_Default_Value
5428         (Has_Default_Component_Value): Removed
5429         * exp_ch13.adb
5430         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5431         * exp_ch3.adb
5432         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5433         (Get_Simple_Init_Val): Handle Default_Value aspect
5434         (Needs_Simple_Initialization): Handle Default_Value aspect
5435         * exp_ch3.ads: Needs_Simple_Initialization
5436         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5437         * par-prag.adb (Pragma_Default[_Component]Value) Removed
5438         * sem_ch13.adb
5439         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5440         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5441         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5442
5443 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5444
5445         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5446         package containing iteration primitives.
5447         exp_ch5.adb (Expand_Iterator_Loop): ditto.
5448
5449 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5450
5451         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5452         "of", pre-analyze expression in case it is a function call with
5453         finalization actions that must be placed ahead of the loop.
5454         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5455         on an Ada2012 iterator, insert them ahead of the rewritten loop.
5456
5457 2011-08-02  Geert Bosch  <bosch@adacore.com>
5458
5459         * cstand.adb (Create_Float_Types): Only consider C's long double for
5460         Long_Long_Float, in addition to double.
5461
5462 2011-08-02  Robert Dewar  <dewar@adacore.com>
5463
5464         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5465         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5466         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5467         Minor reformatting.
5468
5469 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5470
5471         * sem_attr.adb: handle properly 'Result when it is a prefix of an
5472         indexed component.
5473
5474 2011-08-02  Javier Miranda  <miranda@adacore.com>
5475
5476         * einfo.ads, einfo.adb
5477         (Original_Access_Type): Move this attribute to Node26 since there was
5478         an undocumented use of Node21 in E_Access_Subprogram_Type entities
5479         which causes conflicts and breaks the generation of the .NET compiler.
5480         (Interface_Name): Add missing documentation on JGNAT only uses of
5481         this attribute.
5482
5483 2011-08-02  Geert Bosch  <bosch@adacore.com>
5484
5485         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5486         (Find_Back_End_Float_Type): Likewise
5487         (Create_Back_End_Float_Types): Likewise
5488         (Create_Float_Types): Likewise
5489         (Register_Float_Type): Likewise
5490         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5491         Nlist and split out type selection in new local Find_Base_Type function.
5492         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5493         Nlist
5494         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5495
5496 2011-08-02  Robert Dewar  <dewar@adacore.com>
5497
5498         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5499         alpha order).
5500         * opt.ads: Minor comment change.
5501         * sem_ch12.adb: Minor code reorganization.
5502
5503 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5504
5505         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5506         subtype's list of rep items to the list on the full subtype in the case
5507         where the lists are the same.
5508
5509 2011-08-02  Geert Bosch  <bosch@adacore.com>
5510
5511         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5512         using the one from System.Strings, which also deallocates all strings.
5513
5514 2011-08-02  Geert Bosch  <bosch@adacore.com>
5515
5516         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5517         function.
5518         * gcc-interface/Make-lang.in: Update dependencies.
5519
5520 2011-08-02  Olivier Hainque  <hainque@adacore.com>
5521
5522         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5523         end_locus.
5524
5525 2011-08-02  Javier Miranda  <miranda@adacore.com>
5526
5527         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5528         associated with anonymous access to subprograms.
5529
5530 2011-08-02  Geert Bosch  <bosch@adacore.com>
5531
5532         * opt.ads
5533         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5534         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5535         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5536         (Add_Symbol_Definition): Move to switch-c.adb
5537         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5538         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5539         (Add_Symbol_Definition): Move to switch-c.adb.
5540         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5541         * sem_warn.adb
5542         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5543         Move to warnsw.adb.
5544         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5545         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5546         Move to warnsw.adb.
5547         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5548         (Add_Symbol_Definition): Moved from Prepcomp.
5549         * switch-c.ads: Update copyright notice. Use String_List instead of
5550         Argument_List, removing dependency on System.OS_Lib.
5551
5552 2011-08-02  Yannick Moy  <moy@adacore.com>
5553
5554         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5555         mode on initialization expression which does not respect SPARK
5556         restrictions.
5557         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5558         if the tree referenced by its argument represents an initialization
5559         expression in SPARK, suitable for initializing an object in an object
5560         declaration.
5561
5562 2011-08-02  Javier Miranda  <miranda@adacore.com>
5563
5564         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5565         internally generated access to subprogram with its associated protected
5566         subprogram type.
5567         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5568
5569 2011-08-02  Geert Bosch  <bosch@adacore.com>
5570
5571         * cstand.adb (Register_Float_Type): Print information about type to
5572         register, if the Debug_Flag_Dot_B is set.
5573         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5574         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5575         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5576         with a requested precision of more than Max_Digits digits and no more
5577         than Max_Base_Digits digits, if a range specification is present and the
5578         Predefined_Float_Types list has a suitable type to derive from.
5579         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5580         case of type completion with pragma Import
5581         * sem_prag.adb
5582         (Process_Import_Predefined_Type): Processing to complete a type
5583         with pragma Import. Currently supports floating point types only.
5584         (Set_Convention_From_Pragma): Do nothing without underlying type.
5585         (Process_Convention): Guard against absence of underlying type,
5586         which may happen when importing incomplete types.
5587         (Process_Import_Or_Interface): Handle case of importing predefined
5588         types. Tweak error message.
5589
5590 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5591
5592         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5593         functions to previous change.  Reorganize code slightly.
5594
5595 2011-08-02  Geert Bosch  <bosch@adacore.com>
5596
5597         * back_end.ads (Register_Type_Proc): New call back procedure type for
5598         allowing the back end to provide information about available types.
5599         (Register_Back_End_Types): New procedure to register back end types.
5600         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5601         available types.
5602         * cstand.adb (Back_End_Float_Types): New list for floating point types
5603         supported by the back end.
5604         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5605         (Copy_Float_Type): New procedure to make new copies of predefined types.
5606         (Register_Float_Type): New call back procedure to populate the BEFT list
5607         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5608         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5609         (Create_Float_Types): New procedure to create entities for floating
5610         point types predefined in Standard, and put these and any remaining
5611         BEFTs on the Predefined_Float_Types list.
5612         * stand.ads (Predefined_Float_Types): New list for predefined floating
5613         point types that do not have declarations in package Standard.
5614
5615 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5616
5617         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
5618         entity node for the unit containing the parameter.
5619         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5620         (Add_Inlined_Subprogram): Likewise.
5621         * gcc-interface/Make-lang.in: Update dependencies.
5622
5623 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5624
5625         * s-stusta.adb (Print): Make sure Pos is always initialized to a
5626         suitable value.
5627
5628 2011-08-02  Geert Bosch  <bosch@adacore.com>
5629
5630         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5631
5632 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5633
5634         * sem_type.adb (Covers): Move trivial case to the top and reuse the
5635         computed value of Base_Type.
5636
5637 2011-08-02  Yannick Moy  <moy@adacore.com>
5638
5639         * restrict.adb (Check_Restriction): issue an error for any use of
5640         class-wide, even if the No_Dispatch restriction is not set.
5641         * sem_aggr.adb: Correct typos in comments and messages in formal mode
5642         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5643         when completing a private extension, the type named in the private part
5644         is not the same as that named in the visible part.
5645         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5646         of an inherited primitive operations of a tagged type or type extension
5647         that returns the tagged type.
5648         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5649         function which returns True for an implicit operation inherited by the
5650         derived type declaration for the argument type.
5651         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5652         order.
5653
5654 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5655
5656         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5657         Process_Bounds, to perform analysis with expansion of a range or an
5658         expression that is the iteration scheme for a loop.
5659         (Analyze_Iterator_Specification): If domain of iteration is given by a
5660         function call with a controlled result, as is the case if call returns
5661         a predefined container, ensure that finalization actions are properly
5662         generated.
5663         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5664
5665 2011-08-02  Javier Miranda  <miranda@adacore.com>
5666
5667         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5668         * gcc-interface/Make-lang.in: Update dependencies.
5669
5670 2011-08-02  Javier Miranda  <miranda@adacore.com>
5671
5672         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5673         determine if the analysis is performed using N or Original_Node (N).
5674         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5675         functionality of routine Is_Variable avoids code duplication.
5676         * checks.adb (Determine_Range): Handle temporaries generated by
5677         Remove_Side_Effects.
5678
5679 2011-08-02  Javier Miranda  <miranda@adacore.com>
5680
5681         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5682         expansion of the condition. Required since the previous analysis was
5683         done with expansion disabled (see Resolve_Quantified_Expression) and
5684         hence checks were not inserted and record comparisons have not been
5685         expanded.
5686
5687 2011-08-02  Ed Falis  <falis@adacore.com>
5688
5689         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5690         Update header.
5691
5692 2011-08-02  Bob Duff  <duff@adacore.com>
5693
5694         * opt.ads: Minor comment fix.
5695
5696 2011-08-02  Bob Duff  <duff@adacore.com>
5697
5698         * sem_ch12.adb (Analyze_Package_Instantiation,
5699         Analyze_Subprogram_Instantiation): Turn off style checking while
5700         analyzing an instance. Whatever style checks that apply to the generic
5701         unit should apply, so it makes no sense to apply them in an instance.
5702         This was causing trouble when compiling an instance of a runtime
5703         unit that violates the -gnatyO switch.
5704         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5705         one of the two case statements, causing spurious errors.
5706
5707 2011-08-02  Robert Dewar  <dewar@adacore.com>
5708
5709         * uname.adb: Minor reformatting.
5710         * gnatcmd.adb: Minor reformatting.
5711         * exp_attr.adb: Minor reformatting.
5712
5713 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5714
5715         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5716         No_Dispatching_Calls, do not look for the Assign primitive, because
5717         predefined primitives are not created in this case.
5718
5719 2011-08-02  Bob Duff  <duff@adacore.com>
5720
5721         * stylesw.ads: Minor comment fixes.
5722
5723 2011-08-02  Robert Dewar  <dewar@adacore.com>
5724
5725         * freeze.adb (Add_To_Result): New procedure.
5726
5727 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
5728
5729         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5730         time, if the specific run-time routines for handling streams of strings
5731         are not available, use the default mechanism.
5732
5733 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5734
5735         * s-regpat.ads: Fix typo.
5736
5737 2011-08-02  Vincent Celier  <celier@adacore.com>
5738
5739         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5740         not null, call it to create the in memory config project file without
5741         parsing an existing default config project file.
5742
5743 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5744
5745         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5746
5747 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5748
5749         * sem_elim.adb: an abstract subprogram does not need an eliminate
5750         pragma for its descendant to be eliminable.
5751
5752 2011-08-02  Ed Falis  <falis@adacore.com>
5753
5754         * init.c: revert to handling before previous checkin for VxWorks
5755         * s-intman-vxworks.adb: delete unnecessary declarations related to
5756         using Ada interrupt facilities for handling signals.
5757         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5758         * s-intman-vxworks.ads: Import __gnat_install_handler as
5759         Initialize_Interrupts.
5760         * s-taprop-vxworks.adb: Delete Signal_Mask.
5761         (Abort_Handler): change construction of mask to unblock exception
5762         signals.
5763
5764 2011-08-02  Jerome Guitton  <guitton@adacore.com>
5765
5766         * a-except-2005.adb (Raise_From_Signal_Handler): Call
5767         Debug_Raise_Exception before propagation starts.
5768
5769 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5770
5771         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5772         to Restriction_Check_Required.
5773         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5774         * sem_res.adb (Resolve_Call): Likewise.
5775         * sem_attr.adb (Check_Stream_Attribute): Likewise.
5776
5777 2011-08-02  Bob Duff  <duff@adacore.com>
5778
5779         * stylesw.ads: Update comment.
5780         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5781         * errout.ads: Remove obsolete comment.
5782
5783 2011-08-02  Javier Miranda  <miranda@adacore.com>
5784
5785         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5786         (Set_Is_Safe_To_Reevaluate): new procedure.
5787         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5788         assignment is allowed on safe-to-reevaluate variables.
5789         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5790         temporary created to remove side effects in expressions that use
5791         the secondary stack as safe-to-reevaluate.
5792         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5793         variables that are not true constants.
5794
5795 2011-08-02  Robert Dewar  <dewar@adacore.com>
5796
5797         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5798         sem_res.adb, sem_ch6.adb: Minor reformatting.
5799
5800 2011-08-02  Jerome Guitton  <guitton@adacore.com>
5801
5802         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5803
5804 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5805
5806         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5807         not set Overridden_Operation if subprogram is an initialization
5808         procedure.
5809
5810 2011-08-02  Yannick Moy  <moy@adacore.com>
5811
5812         * par-ch6.adb: Correct obsolete name in comments
5813         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5814         which takes two message arguments (existing function takes one), with
5815         second message used for continuation.
5816         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5817         block statements that originate from a source block statement, not
5818         generated block statements
5819         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5820         symmetry with procedure case
5821         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5822         function to issue an error in formal mode if a package specification
5823         contains more than one tagged type or type extension.
5824         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5825         parameters matching formals of tagged types are objects (or ancestor
5826         type conversions of objects), not general expressions. Issue an error
5827         on view conversions that are not involving ancestor conversion of an
5828         extended type.
5829         (Resolve_Type_Conversion): in formal mode, issue an error on the
5830         operand of an ancestor type conversion which is not an object
5831         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5832         procedure so that it works also for actuals of function calls
5833         (Is_Actual_Tagged_Parameter): new function which determines if its
5834         argument is an actual parameter of a formal of tagged type in a
5835         subprogram call
5836         (Is_SPARK_Object_Reference): new function which determines if the tree
5837         referenced by its argument represents an object in SPARK
5838
5839 2011-08-02  Robert Dewar  <dewar@adacore.com>
5840
5841         * sem_ch3.adb: Minor reformatting
5842         Minor comment addition
5843         Minor error msg text change
5844
5845 2011-08-02  Javier Miranda  <miranda@adacore.com>
5846
5847         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5848         function. Used to be more precise when we generate a variable plus one
5849         assignment to remove side effects in the evaluation of the Bound
5850         expressions.
5851         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5852         of the bound expression to force its re-analysis and thus expand the
5853         associated transient scope (if required). Code cleanup replacing the
5854         previous code that declared the constant entity by an invocation to
5855         routine Force_Evaluation which centralizes this work in the frontend.
5856
5857 2011-08-02  Robert Dewar  <dewar@adacore.com>
5858
5859         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5860         (Base_Type): Now uses improved Is_Base_Type function
5861         * einfo.ads (Base_Type): Inline this function
5862
5863 2011-08-02  Robert Dewar  <dewar@adacore.com>
5864
5865         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5866         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5867
5868 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5869
5870         * gcc-interface/Make-lang.in: Update dependencies.
5871         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5872         targets.
5873
5874 2011-08-02  Yannick Moy  <moy@adacore.com>
5875
5876         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5877         non-simple expression used in delta constraint
5878         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5879         index constraint which is not a subtype mark
5880         * par.adb: With and use Restrict
5881         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5882         mode on component type which is not a subtype mark and default
5883         expression on component
5884         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5885         of string which does not have a lower index bound equal to 1
5886         (Array_Type_Declaration): issue an error in formal mode on index or
5887         component type which is not a subtype mark, and on aliased keyword on
5888         component
5889         (Derived_Type_Declaration): issue an error in formal mode on interface,
5890         limited or abstract type
5891         (Record_Type_Declaration): issue an error in formal mode on interface
5892         (Record_Type_Definition): issue an error in formal mode on tagged types
5893         and type extensions not declared in the specification of a library unit
5894         package; on null non-tagged record; on variant part
5895
5896 2011-08-02  Vincent Celier  <celier@adacore.com>
5897
5898         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5899         not declared for qualified library project when Library_Name is not
5900         declared, but Library_Dir is.
5901
5902 2011-08-02  Robert Dewar  <dewar@adacore.com>
5903
5904         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5905         pragmas (affects aspects [Component_]Default_Value
5906         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5907         component type for the resolution
5908
5909 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5910
5911         * einfo.adb (Base_Type): Tune implementation for speed.
5912
5913 2011-08-02  Robert Dewar  <dewar@adacore.com>
5914
5915         * freeze.adb: Minor reformatting.
5916
5917 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5918
5919         * scos.ads: Update comments.
5920
5921 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5922
5923         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5924         base type, because the parent may be a subtype of a private type whose
5925         convention is established in a private part.
5926
5927 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5928
5929         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5930         statement in a block when the expansion of the return expression has
5931         created a finalization chain.
5932         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5933         with the parent node.
5934         Add N_Extended_Return_Statement to handle the case where a transient
5935         object declaration appears in the Return_Object_Declarations list of
5936         an extended return statement.
5937
5938 2011-08-02  Matthew Gingell  <gingell@adacore.com>
5939
5940         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5941         unused parameter 'name'.
5942
5943 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5944
5945         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5946         inherited operation, check whether its alias, which is the source
5947         operastion that it renames, has been marked eliminated.
5948
5949 2011-08-02  Javier Miranda  <miranda@adacore.com>
5950
5951         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5952         in-mode parameter whose type is an access type since it can be used to
5953         modify its designated object. Enforce code that handles as safe an
5954         access type that is not access-to-constant but it is the result of a
5955         previous removal of side-effects.
5956         (Remove_Side_Effects): Minor code reorganization of cases which require
5957         no action. Done to incorporate documentation on new cases uncovered
5958         working in this ticket: no action needed if this routine was invoked
5959         too early and the nodes are not yet decorated.
5960         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5961         to routine Remove_Side_Effects by calls to Force_Evaluation since they
5962         were issued with actuals that are implicitly provided by
5963         Force_Evaluation.
5964
5965 2011-08-02  Robert Dewar  <dewar@adacore.com>
5966
5967         * sem_ch3.adb, sem_res.adb: Minor reformatting.
5968
5969 2011-08-02  Yannick Moy  <moy@adacore.com>
5970
5971         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5972         to issue an error in formal mode on attribute not supported in this mode
5973         (Analyze_Attribute): issue errors on standard attributes not supported
5974         in formal mode.
5975         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5976         comment, and issue error in formal mode on modulus which is not a power
5977         of 2.
5978         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5979         range.
5980         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5981         subtype mark.
5982         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5983         operator on modular type (except 'not').
5984
5985 2011-08-02  Robert Dewar  <dewar@adacore.com>
5986
5987         * gnat_rm.texi: Minor reformatting.
5988
5989 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5990
5991         * s-osinte-linux.ads: Minor comment update and reformatting.
5992         * i-cexten.ads: Make this unit pure, as for its parent.
5993         Will allow its usage in more contexts if needed.
5994
5995 2011-08-02  Robert Dewar  <dewar@adacore.com>
5996
5997         * s-utf_32.ads: Minor comment fix.
5998
5999 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6000
6001         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6002         operation of a tagged synchronized type, handle the case where the
6003         controlling argument is overloaded.
6004
6005 2011-08-02  Yannick Moy  <moy@adacore.com>
6006
6007         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6008         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6009         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6010         SPARK mode and formal verification mode on processing SPARK restriction
6011         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6012         requiring consistency checking.
6013
6014 2011-08-02  Robert Dewar  <dewar@adacore.com>
6015
6016         * sem_res.adb: Minor reformatting.
6017
6018 2011-08-02  Robert Dewar  <dewar@adacore.com>
6019
6020         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6021         a-cforse.ads: Remove unneeded with of Ada.Containers
6022         Remove commented out pragma Inline's
6023         Move specifications of new subprograms to the actual specs
6024
6025 2011-08-02  Yannick Moy  <moy@adacore.com>
6026
6027         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6028         a-cforse.ads: Update comments.
6029
6030 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6031
6032         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6033
6034 2011-08-02  Robert Dewar  <dewar@adacore.com>
6035
6036         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6037         a-cforse.ads, a-cofove.ads: Minor reformatting.
6038
6039 2011-08-02  Claire Dross  <dross@adacore.com>
6040
6041         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6042         a-cofove.ads: Add comments.
6043
6044 2011-08-02  Yannick Moy  <moy@adacore.com>
6045
6046         * gnat_rm.texi: Document formal containers.
6047
6048 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6049
6050         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6051         are empty sections.
6052
6053 2011-08-02  Robert Dewar  <dewar@adacore.com>
6054
6055         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6056         reformatting.
6057
6058 2011-08-02  Robert Dewar  <dewar@adacore.com>
6059
6060         * aspects.adb: New aspects Default_Value and Default_Component_Value
6061         New format of Aspect_Names table checks for omitted entries
6062         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6063         handling of boolean aspects for derived types.
6064         New aspects Default_Value and Default_Component_Value
6065         New format of Aspect_Names table checks for omitted entries
6066         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6067         (Has_Default_Value): New flag
6068         (Has_Default_Component_Value): New flag
6069         (Has_Default_Value): New flag
6070         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6071         table.
6072         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6073         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6074         Default_Value and Default_Component_Value
6075         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6076         New aspects Default_Value and Default_Component_Value
6077         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6078         * sprint.adb: Print N_Aspect_Specification node when called from gdb
6079
6080 2011-08-02  Vincent Celier  <celier@adacore.com>
6081
6082         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6083         inherit library kind.
6084
6085 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6086
6087         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6088         Minor reformatting.
6089
6090 2011-08-02  Robert Dewar  <dewar@adacore.com>
6091
6092         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6093
6094 2011-08-02  Yannick Moy  <moy@adacore.com>
6095
6096         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6097
6098 2011-08-02  Robert Dewar  <dewar@adacore.com>
6099
6100         * impunit.adb: Add comment.
6101
6102 2011-08-02  Yannick Moy  <moy@adacore.com>
6103
6104         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6105         qualification of aggregates in formal mode
6106         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6107         another aggregate
6108         (Resolve_Aggregate): complete the test that an aggregate is adequately
6109         qualified in formal mode
6110
6111 2011-08-02  Pascal Obry  <obry@adacore.com>
6112
6113         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6114         * mlib-prj.adb: Supress warning when compiling binder generated file.
6115         (Build_Library): Supress all warnings when compiling the binder
6116         generated file.
6117
6118 2011-08-02  Yannick Moy  <moy@adacore.com>
6119
6120         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6121         from here...
6122         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6123         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6124         Add with/use clauses to make Check_Formal_Restriction visible
6125
6126 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6127
6128         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6129         in-parameters when type of the generic formal is private in the generic
6130         spec and non-private in the body.
6131
6132 2011-08-02  Claire Dross  <dross@adacore.com>
6133
6134         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6135         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6136         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6137         * impunit.adb, Makefile.rtl: Take new files into account.
6138
6139 2011-08-02  Robert Dewar  <dewar@adacore.com>
6140
6141         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6142         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6143
6144 2011-08-02  Yannick Moy  <moy@adacore.com>
6145
6146         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6147         formal mode
6148         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6149         matching static array bounds, taking into account the special case of
6150         string literals
6151         * sem_ch3.adb: Typo in comment.
6152
6153 2011-08-02  Yannick Moy  <moy@adacore.com>
6154
6155         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6156         which issues an error in formal mode if its argument node is originally
6157         from source
6158         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6159         has a discriminant specification so that it does not include the case
6160         of derived types
6161         (Derived_Type_Declaration): move here the test that a derived type has a
6162         discriminant specification
6163         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6164         first element of a component association before accessing its choices
6165         (presence of component association is not enough)
6166         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6167         declaration is a library item before accessing the next element in a
6168         list, as library items are not member of lists
6169         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6170         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6171         Check_Formal_Restriction whenever possible.
6172
6173 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6174
6175         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6176         reference when needed.
6177
6178 2011-08-02  Bob Duff  <duff@adacore.com>
6179
6180         * gnat_ugn.texi: Fix typo.
6181
6182 2011-08-02  Vincent Celier  <celier@adacore.com>
6183
6184         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6185         archive file name. Do not use the full path name of archives for Open
6186         VMS.
6187
6188 2011-08-02  Robert Dewar  <dewar@adacore.com>
6189
6190         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6191         Analyze_Aspect_Specifications
6192         * sem_ch13.adb
6193         (Analyze_Aspect_Specifications): New handling for boolean aspects
6194         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6195         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6196         sequence for Analyze_Aspect_Specifications
6197         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6198         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6199
6200 2011-08-02  Robert Dewar  <dewar@adacore.com>
6201
6202         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6203         aspects, since these no longer exist.
6204
6205 2011-08-02  Robert Dewar  <dewar@adacore.com>
6206
6207         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6208         semicolon, do not try to see if there are aspects following it.
6209         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6210         aspect spec.
6211
6212 2011-08-02  Robert Dewar  <dewar@adacore.com>
6213
6214         * sem_ch8.adb, aspects.ads: Minor reformatting.
6215
6216 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6217
6218         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6219         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6220         extracted from...
6221         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
6222
6223 2011-08-02  Yannick Moy  <moy@adacore.com>
6224
6225         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6226         mode on subprogram declaration outside of package specification, unless
6227         it is followed by a pragma Import
6228         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6229         Access_Type_Declaration): issue error in formal mode on access type
6230         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6231         incomplete type
6232         (Analyze_Object_Declaration): issue error in formal mode on object
6233         declaration which does not respect SPARK restrictions
6234         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6235         declaration which does not respect SPARK restrictions
6236         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6237         error in formal mode on digits or delta constraint
6238         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6239         decimal fixed point type
6240         (Derived_Type_Declaration): issue error in formal mode on derived type
6241         other than type extensions of tagged record types
6242         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6243         with check on access definition
6244         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6245         mode on protected definition.
6246         (Analyze_Task_Definition): issue error in formal mode on task definition
6247
6248 2011-08-02  Robert Dewar  <dewar@adacore.com>
6249
6250         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6251
6252 2011-08-02  Javier Miranda  <miranda@adacore.com>
6253
6254         * sem_ch6.adb (Can_Override_Operator): New function.
6255         (Verify_Overriding_Indicator): Add missing code to check overriding
6256         indicator in operators. Fixes regression.
6257         (Check_Overriding_Indicator): Minor reformating after replacing the
6258         code that evaluates if the subprogram can override an operator by
6259         invocations to the above new function.
6260         * einfo.adb
6261         (Write_Field26_Name): Add missing code to ensure that, following
6262         the documentation in einfo.ads, this field is not shown as attribute
6263         "Static_Initialization" on non-dispatching functions.
6264
6265 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6266
6267         * sem_res.adb (Resolve_Call): A call to
6268         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6269         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6270         i.e., when the second parameter is of type Time_Span.
6271
6272 2011-08-02  Vincent Celier  <celier@adacore.com>
6273
6274         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6275         with an archive instead of -L<library dir> -l<library name>.
6276
6277 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6278
6279         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6280         mark the base types In_Use in addition to making the operations
6281         use_visible.
6282
6283 2011-08-02  Ed Falis  <falis@adacore.com>
6284
6285         * init.c: add and setup __gnat_signal_mask for the exception signals
6286         * s-inmaop-vxworks.adb: new file.
6287         * s-intman-vxworks.adb: remove unnecessary initializations and
6288         simplify remaining
6289         * s-intman-vxworks.ads: remove unnecessary variable
6290         * s-taprop-vxworks.adb: simplify signal initialization
6291
6292 2011-08-02  Robert Dewar  <dewar@adacore.com>
6293
6294         * sem_ch8.adb: Minor code reorganization, comment updates.
6295
6296 2011-08-02  Robert Dewar  <dewar@adacore.com>
6297
6298         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6299         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6300         here from Sem_Res.
6301         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6302         (Matching_Static_Array_Bounds): Moved here from Sem_Res
6303
6304 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6305
6306         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6307         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6308         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6309         use_type_clauses, to handle more efficiently use_type and use_all_type
6310         constructs.
6311         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6312         Ada2012 Use_All_Type clause.
6313         (Use_Class_Wide_Operations): new procedure.
6314
6315 2011-08-02  Robert Dewar  <dewar@adacore.com>
6316
6317         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6318         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6319         expression to expression function.
6320
6321 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6322
6323         * sem_ch4.adb: transform simple Ada2012 membership into equality only
6324         if types are compatible.
6325
6326 2011-08-02  Yannick Moy  <moy@adacore.com>
6327
6328         * sem_res.adb (Matching_Static_Array_Bounds): new function which
6329         returns True if its argument array types have same dimension and same
6330         static bounds at each index.
6331         (Resolve_Actuals): issue an error in formal mode on actuals passed as
6332         OUT or IN OUT paramaters which are not view conversions in SPARK.
6333         (Resolve_Arithmetic_Op): issue an error in formal mode on
6334         multiplication or division with operands of fixed point types which are
6335         not qualified or explicitly converted.
6336         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6337         Boolean or array type (except String) operands.
6338         (Resolve_Equality_Op): issue an error in formal mode on equality
6339         operators for array types other than String with non-matching static
6340         bounds.
6341         (Resolve_Logical_Op): issue an error in formal mode on logical operators
6342         for array types with non-matching static bounds. Factorize the code in
6343         Matching_Static_Array_Bounds.
6344         (Resolve_Qualified_Expression): issue an error in formal mode on
6345         qualified expressions for array types with non-matching static bounds.
6346         (Resolve_Type_Conversion): issue an error in formal mode on type
6347         conversion for array types with non-matching static bounds
6348
6349 2011-08-02  Robert Dewar  <dewar@adacore.com>
6350
6351         * par-ch10.adb: Minor code reorganization (use Nkind_In).
6352
6353 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6354
6355         * par-ch9.adb: save location of entry for proper error message.
6356
6357 2011-08-02  Javier Miranda  <miranda@adacore.com>
6358
6359         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6360         (Use_Full_View) which permits this routine to climb through the
6361         ancestors using the full-view of private parents.
6362         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6363         Use_Full_View to true in calls to Is_Ancestor.
6364         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6365         true in call to Is_Ancestor.
6366         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6367         Use_Full_View to true in call to Is_Ancestor.
6368         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6369         call to Is_Ancestor.
6370         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6371         Use_Full_View to true in calls to Is_Ancestor.
6372         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6373         Make_Select_Specific_Data_Table, Register_Primitive,
6374         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6375         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6376         to true in call to Is_Ancestor.
6377         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6378         Use_Full_View to true in calls to Is_Ancestor.
6379         * exp_cg.adb
6380         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6381         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6382
6383 2011-08-02  Robert Dewar  <dewar@adacore.com>
6384
6385         * gnat_rm.texi: Minor reformatting.
6386         * sem_prag.adb: Minor reformatting.
6387
6388 2011-08-02  Tristan Gingold  <gingold@adacore.com>
6389
6390         * vms_data.ads: Add VMS qualifier for -gnateP.
6391
6392 2011-08-02  Robert Dewar  <dewar@adacore.com>
6393
6394         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6395         * par-ch7.adb (P_Package): Proper placement of aspects for package
6396         decl/instantiation.
6397         * par-endh.adb (Check_End): Ad Is_Sloc parameter
6398         (End_Statements): Add Is_Sloc parameterr
6399         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6400         (Check_End): Ad Is_Sloc parameter
6401         (End_Statements): Add Is_Sloc parameterr
6402
6403 2011-08-02  Vincent Celier  <celier@adacore.com>
6404
6405         * ug_words: Add VMS qualifier equivalent to -gnateP:
6406         /SYMBOL_PREPROCESSING.
6407
6408 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6409
6410         * gnat-style.texi: For hexadecimal numeric literals the typical
6411         grouping of digits is 4 to represent 2 bytes.
6412         A procedure spec which is split into several lines is indented two
6413         characters.
6414
6415 2011-08-02  Yannick Moy  <moy@adacore.com>
6416
6417         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6418         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6419         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6420         properly qualified
6421         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6422         choice in array aggregate
6423         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6424         mark as ancestor
6425         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6426         positional and named aggregate for record, or others in record
6427         aggregate, or multiple choice in record aggregate
6428         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6429         array operands to logical operations AND, OR and XOR do not have the
6430         same static lower and higher bounds
6431         * sem_ch5.adb, sinfo.ads: Correct typos in comments
6432
6433 2011-08-01  Robert Dewar  <dewar@adacore.com>
6434
6435         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6436         Replaces Last_Source_Node_In_Sequence.
6437         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6438         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6439         parens and blank in string (this was inconsistently implemented).
6440         * errout.ads
6441         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6442         blank in string (this was inconsistently implemented).
6443         * gnat1drv.adb
6444         (Set_Global_Switches): Set formal mode switches appropriately
6445         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6446         * par-prag.adb
6447         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6448         call Set_Error_Msg_Lang to set "spark" as language name.
6449         * par.adb: Remove unnecessary call to set formal language for errout
6450         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6451         appropriately and call Set_Error_Msg_Lang to set "spark" as language
6452         name.
6453         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6454         calls to it, moved after resolution so that types are known
6455         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6456         result of concatenation is not of type String
6457         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6458         concatenation is not properly restricted
6459         * gnat_rm.texi: Add doc on pragma Spark_95.
6460         * gcc-interface/Makefile.in: Remove obsolete target pairs for
6461         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6462         * gcc-interface/Make-lang.in: Update dependencies.
6463
6464 2011-08-01  Javier Miranda  <miranda@adacore.com>
6465
6466         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6467         condition that detects if the overridden operation must replace an
6468         existing entity.
6469
6470 2011-08-01  Javier Miranda  <miranda@adacore.com>
6471
6472         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6473         code declarations inserted by Insert_Actions in each alternative of the
6474         N_Case_Expression node.
6475
6476 2011-08-01  Robert Dewar  <dewar@adacore.com>
6477
6478         * sem_ch6.adb: Minor code reorganization.
6479         * sem_util.adb: Minor reformatting.
6480
6481 2011-08-01  Pascal Obry  <obry@adacore.com>
6482
6483         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6484         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6485
6486 2011-08-01  Yannick Moy  <moy@adacore.com>
6487
6488         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6489         literal or operator symbol which is prefixed
6490         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6491         mode on access attributes.
6492         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6493         that concatenation operands are properly restricted in formal mode
6494         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6495         Analyze_Concatenation_Operand. Issue an error in formal mode if the
6496         result of the concatenation has a type different from String.
6497         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6498         Analyze_Quantified_Expression, Analyze_Slice,
6499         Analyze_Null): issue an error in formal mode on unsupported constructs
6500         * sem_ch5.adb
6501         (Analyze_Block_Statement): only issue error on source block statement
6502         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6503         function which returns the last node in a list of nodes for which
6504         Comes_From_Source returns True, if any
6505         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6506         Last_Source_Node_In_Sequence
6507         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6508         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6509         mode on unsupported constructs
6510         * sem_ch9.adb Do not return after issuing error in formal mode, as the
6511         rest of the actions may be needed later on since the error is marked as
6512         not serious.
6513         * sinfo.ads: Typos in comments.
6514
6515 2011-08-01  Pascal Obry  <obry@adacore.com>
6516
6517         * projects.texi: Minor editing.
6518
6519 2011-08-01  Yannick Moy  <moy@adacore.com>
6520
6521         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6522         insertion character ~~
6523         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6524         (Set_Error_Msg_Lang): new procedure which fixes the language for use
6525         with insertion character ~~
6526         (Set_Msg_Text): treat insertion character ~~
6527         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6528         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6529         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6530         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6531         errors related to the formal language restriction not serious
6532         (insertion character |).
6533         * par.adb (Par): set formal language for error messages if needed
6534         * sem_ch6.adb (Check_Missing_Return): take into account possible
6535         generated statements at the end of the function
6536         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6537         enumeration value to define a new pragma SPARK_95
6538         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6539         SPARK_Version): new type and variables to store the SPARK version
6540         (none by default).
6541         (SPARK_Mode): return True when SPARK_Version is set
6542         * par-prag.adb: Correct indentation
6543         (Prag): take Pragma_SPARK_95 into account
6544         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6545         into account.
6546
6547 2011-08-01  Robert Dewar  <dewar@adacore.com>
6548
6549         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6550         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6551         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6552
6553 2011-08-01  Pascal Obry  <obry@adacore.com>
6554
6555         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6556         Target_Name to Get_Path call.
6557         (Parse_Single_Project): Likewise.
6558         (Post_Parse_Context_Clause): Likewise.
6559         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6560         Call Initialise_Project_Path with the proper Target_Name.
6561         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6562         search path.
6563         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6564         with the proper Target_Name.
6565         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6566         Part.Parse routine.
6567         (Parse_Project_And_Apply_Config): Likewise.
6568         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6569         This is fine as this part of the code is supporting only native
6570         compilation.
6571         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6572         is fine as this part of the code is supporting only native compilation.
6573
6574 2011-08-01  Yannick Moy  <moy@adacore.com>
6575
6576         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6577         of homonym, unless the homonym is one of the cases allowed in SPARK
6578         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6579         package declaration occurring after a body.
6580
6581 2011-08-01  Robert Dewar  <dewar@adacore.com>
6582
6583         * checks.adb, exp_ch4.adb: Minor reformatting.
6584
6585 2011-08-01  Javier Miranda  <miranda@adacore.com>
6586
6587         * einfo.ads (Access_Disp_Table): Fix documentation.
6588         (Dispatch_Table_Wrappers): Fix documentation.
6589
6590 2011-08-01  Pascal Obry  <obry@adacore.com>
6591
6592         * prj-env.adb, prj-env.ads: Minor reformatting.
6593
6594 2011-08-01  Yannick Moy  <moy@adacore.com>
6595
6596         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6597         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6598         procedures out of these packages.
6599         * errout.ads, errout.adb
6600         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6601         procedures in of this package
6602         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6603         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6604         on misplaced later vs initial declarations, like in Ada 83
6605         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6606         formal mode on attribute of private type whose full type declaration
6607         is not visible
6608         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6609         package declaration inside a package specification
6610         (Analyze_Full_Type_Declaration): issue error in formal mode on
6611         controlled type or discriminant type
6612         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6613         user-defined operator means that it should come from the source
6614         (New_Overloaded_Entity): issue error in formal mode on overloaded
6615         entity.
6616         * sem_ch6.ads, sem_ch13.ads: typos in comments.
6617
6618 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6619
6620         * atree.adb: Minor reformatting.
6621         * checks.adb: Minor reformatting.
6622
6623 2011-08-01  Vincent Celier  <celier@adacore.com>
6624
6625         * s-parame-vms-ia64.ads: Fix typo in comment
6626         Minor reformatting
6627         * s-parame-vms-restrict.ads: Removed, unused.
6628
6629 2011-08-01  Javier Miranda  <miranda@adacore.com>
6630
6631         * exp_ch3.adb
6632         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6633         * sem_ch3.adb
6634         (Constrain_Index): Remove side effects in the evaluation of the bounds.
6635         * sem_ch3.ads, sem_ch3.adb
6636         (Is_Constant_Bound): New extended version of the subprogram that was
6637         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6638         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6639         * sem_aux.ads (Constant_Value): Fix typo in comment.
6640         * checks.adb (Generate_Index_Checks): New implementation which, for
6641         array objects with constant bounds, generates the runtime check
6642         referencing the bounds of the array type. For other cases this routine
6643         provides its previous behavior obtaining such values from the array
6644         object.
6645         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6646         parent type.
6647         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6648         we cannot have semantic interpretations of the new node.
6649
6650 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6651
6652         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6653         expressions.
6654
6655 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6656
6657         * sem_ch8.adb: Minor code editing.
6658         * s-vxwext.adb: Remove trailing space.
6659         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6660         consistency with other files.
6661
6662 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6663
6664         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6665
6666 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6667
6668         * par-ch10.adb: reject parameterized expressions as compilation unit.
6669         * sem_ch4.adb: handle properly conditional expression with overloaded
6670         then_clause and no else_clause.
6671
6672 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6673
6674         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6675         like done by System.Aux_DEC.
6676         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6677
6678 2011-08-01  Yannick Moy  <moy@adacore.com>
6679
6680         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6681         missing label at end of declaration (subprogram or package)
6682         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6683         of positional and named parameter association
6684         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6685         Error_Msg_SP which adds a prefix to the error message giving the name
6686         of the formal language analyzed
6687         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6688         access result type in subprogram, unconstrained array as result type,.
6689         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6690         procedure
6691         * sem_ch8.adb: Code clean up.
6692
6693 2011-08-01  Javier Miranda  <miranda@adacore.com>
6694
6695         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6696         * einfo.ads (Access_Disp_Table): Fix documentation.
6697         (Dispatch_Table_Wrappers): Fix documentation.
6698         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6699         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6700         to enforce the documentation of this attribute.
6701         (Set_Is_Interface): Cleanup the assertion.
6702         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6703         the Underlying_Type entity before reading attribute Access_Disp_Table.
6704         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6705         Locate the Underlying_Type before reading attribute Access_Disp_Table.
6706         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6707         the Underlying_Type entity before reading attribute Access_Disp_Table.
6708         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6709         Locate the Underlying_Type entity before reading attribute
6710         Access_Disp_Table.
6711
6712 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6713
6714         * s-poosiz.ads: Additional overriding indicators.
6715
6716 2011-08-01  Yannick Moy  <moy@adacore.com>
6717
6718         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6719         formal mode.
6720         (Analyze_Iteration_Scheme): issue error in formal mode when loop
6721         parameter specification does not include a subtype mark.
6722         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6723         formal mode on abstract subprogram.
6724         (Analyze_Subprogram_Specification): issue error in formal mode on
6725         user-defined operator.
6726         (Process_Formals): issue error in formal mode on access parameter and
6727         default expression.
6728         * sem_ch9.adb (Analyze_Abort_Statement,
6729         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6730         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6731         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6732         Analyze_Requeue, Analyze_Selective_Accept,
6733         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6734         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6735         issue error in formal mode on user-defined raise statement.
6736
6737 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6738
6739         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6740         declaration being hidden when overriding an implicit inherited
6741         subprogram.
6742         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6743         (-gnats), do not complain about a source file that contains only a
6744         pragma No_Body.
6745
6746 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6747
6748         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6749         variable if already set.
6750
6751 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6752
6753         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6754         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6755         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6756         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6757         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6758         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6759         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6760         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6761         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6762         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6763         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6764         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6765         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6766         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6767         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6768         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6769         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6770         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6771         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6772         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6773         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6774         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6775         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6776         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6777         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6778         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6779         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6780         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6781         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6782         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6783         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6784         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6785         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6786         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6787         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6788         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6789         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6790         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6791         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6792         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6793         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6794         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6795         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6796         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6797         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6798         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6799         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6800         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6801         s-osinte-mingw.ads: Update to GPLv3 run-time license.
6802         Use GNAT instead of GNARL.
6803
6804 2011-08-01  Bob Duff  <duff@adacore.com>
6805
6806         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6807         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6808         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6809         reformatting.
6810
6811 2011-08-01  Yannick Moy  <moy@adacore.com>
6812
6813         * debug.adb (d.D) reverve flag for the SPARK mode
6814         (d.E) reverve flag for SPARK generation mode
6815         (d.F) reverve flag for Why generation mode
6816         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6817         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
6818         functions which return True when the corresponding modes are set
6819         (Formal_Language): return "spark" or "alfa" when in formal verification
6820         mode.
6821         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6822         Error_Msg to prefix the error message with a tag giving the formal
6823         language
6824         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6825         message with a tag giving the formal language
6826         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6827         block statement
6828         (Analyze_Case_Statement): issue error in formal mode on case statement
6829         with a single "others" case alternative
6830         (Analyze_Exit_Statement): issue errors in formal mode on exit
6831         statements which do not respect SPARK restrictions
6832         (Analyze_Goto_Statement): issue error in formal mode on goto statement
6833         (Check_Unreachable_Code): always issue an error (not a warning) in
6834         formal mode on unreachable code (concerns both code after an infinite
6835         loop and after an unconditional jump, both not allowed in SPARK)
6836         * sem_ch6.adb (Analyze_Return_Statement): add call to
6837         Set_Return_Present for a procedure containing a return statement
6838         (already done for functions in Analyze_Function_Return)
6839         (Analyze_Function_Return): issue error in formal mode on extended
6840         return or if return is not last statement in function
6841         (Check_Missing_Return): issue error in formal mode if function does
6842         not end with return or if procedure contains a return
6843         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6844         function to detect if there is an inner scope of its parameter S which
6845         is a loop.
6846
6847 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6848
6849         * sem_ch6.ads: Minor reformatting.
6850
6851 2011-08-01  Javier Miranda  <miranda@adacore.com>
6852
6853         * sem_util.adb (Abstract_Interface_List): Complete condition when
6854         processing private type declarations to avoid reading unavailable
6855         attribute.
6856         (Is_Synchronized_Tagged_Type): Complete condition when processing
6857         private extension declaration nodes to avoid reading unavailable
6858         attribute.
6859
6860 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6861
6862         * sem_ch3.adb: Minor reformatting.
6863
6864 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6865
6866         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6867         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6868         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6869         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6870         for VMS, instead parametrize the common implementation with
6871         System.Parameters declarations.
6872
6873 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
6874
6875         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6876
6877 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6878
6879         * seh_init.c: Fix SEH handler installation on win64.
6880
6881 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6882
6883         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6884         double analysis of an anonymous access to subprogram, because it can
6885         lead to improper sharing of profiles and a back-end crash.
6886
6887 2011-08-01  Robert Dewar  <dewar@adacore.com>
6888
6889         * make.adb, sem_ch4.adb: Minor reformatting.
6890         * gcc-interface/Make-lang.in: Update dependencies.
6891         * sem_util.adb, exp_ch5.adb: Minor reformatting.
6892
6893 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6894
6895         * gnat_rm.texi: Fix definition of Long_Integer.
6896
6897 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6898
6899         * exp_aggr.adb: check limit size of static aggregate unconditionally,
6900         to prevent storage exhaustion.
6901         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6902         finalized is a function body, insert the cleanup code before the final
6903         return statement, to prevent spurious warnings.
6904         * s-pooglo.ads: add overriding indicator.
6905
6906 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6907
6908         * sem_ch4.adb (Operator_Check): improve error message when both a
6909         with_clause and a use_clause are needed to make operator usage legal.
6910         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6911         determine whether a compilation unit is visible within an other,
6912         either through a with_clause in the current unit, or a with_clause in
6913         its library unit or one one of its parents.
6914
6915 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6916
6917         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6918         over an arbitrary expression of an array or container type.
6919         * lib-xref.adb: clarify comment.
6920
6921 2011-08-01  Bob Duff  <duff@adacore.com>
6922
6923         * einfo.ads: Minor reformatting.
6924         * debug.adb: Minor comment improvement.
6925
6926 2011-08-01  Javier Miranda  <miranda@adacore.com>
6927
6928         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6929         consider hidden subprograms as valid candidates.
6930
6931 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6932
6933         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6934
6935 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
6936
6937         * gnat_ugn.texi: Fix typo.
6938
6939 2011-08-01  Robert Dewar  <dewar@adacore.com>
6940
6941         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6942         lib-xref.adb: Minor reformatting
6943
6944 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
6945
6946         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6947         when to generate a call to Move_Final_List.
6948         (Has_Controlled_Parts): Remove this function.
6949
6950 2011-08-01  Geert Bosch  <bosch@adacore.com>
6951
6952         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6953         "," in choice list.
6954
6955 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6956
6957         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6958         explicit raise of a predefined exception as Comes_From_Source if the
6959         original N_Raise_Statement comes from source.
6960
6961 2011-08-01  Robert Dewar  <dewar@adacore.com>
6962
6963         * sinfo.ads: Add comment.
6964         * sem_ch6.adb: Minor reformatting.
6965
6966 2011-08-01  Robert Dewar  <dewar@adacore.com>
6967
6968         * freeze.adb (Freeze_Entity): Refine check for bad component size
6969         clause to avoid rejecting confirming clause when atomic/aliased present.
6970
6971 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6972
6973         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6974         better determine whether an entity reference is a write.
6975         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6976         subcomponent.
6977         * lib-xref.adb (Output_References): Do no suppress a read reference at
6978         the same location as an immediately preceeding modify-reference, to
6979         handle properly in-out actuals.
6980
6981 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6982
6983         * env.c (__gnat_setenv) [VMS]: Refine previous change.
6984
6985 2011-08-01  Quentin Ochem  <ochem@adacore.com>
6986
6987         * i-cstrin.adb (New_String): Changed implementation, now uses only the
6988         heap to compute the result.
6989
6990 2011-08-01  Robert Dewar  <dewar@adacore.com>
6991
6992         * atree.ads: Minor reformatting.
6993
6994 2011-08-01  Emmanuel Briot  <briot@adacore.com>
6995
6996         * g-expect.adb (Get_Command_Output): Fix memory leak.
6997
6998 2011-08-01  Geert Bosch  <bosch@adacore.com>
6999
7000         * cstand.adb (P_Float_Type): New procedure to print the definition of
7001         predefined fpt types.
7002         (P_Mixed_Name): New procedure to print a name using mixed case
7003         (Print_Standard): Use P_Float_Type for printing floating point types
7004         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7005         precision IEEE float.
7006
7007 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7008
7009         * sem_ch3.adb: Minor reformatting.
7010
7011 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7012
7013         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7014         the completion of a generic function, insert the new body rather than
7015         rewriting the original.
7016
7017 2011-08-01  Yannick Moy  <moy@adacore.com>
7018
7019         * sinfo.ads, errout.ads: Typos in comments.
7020
7021 2011-08-01  Robert Dewar  <dewar@adacore.com>
7022
7023         * par-endh.adb: Minor reformatting.
7024
7025 2011-08-01  Robert Dewar  <dewar@adacore.com>
7026
7027         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7028         (Pre_Post_Aspects): New subtype.
7029         * par-ch12.adb (P_Generic): New syntax for aspects in packages
7030         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7031         * par-ch7.adb (P_Package): Remove Decl parameter
7032         (P_Package): Handle new syntax for aspects (before IS)
7033         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7034         new aspect syntax
7035         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7036         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7037         (P_Package): Remove Decl parameter
7038         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7039         aspects
7040         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7041         specs
7042         * sem_util.ads, sem_util.adb (Static_Boolean): New function
7043         * sinfo.ads: Document new syntax for aspects in packages etc.
7044         * sprint.adb: Handle new syntax of aspects before IS in package
7045
7046 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7047
7048         * atree.ads: Minor reformatting.
7049         * sem_prag.adb: Minor reformatting.
7050
7051 2011-08-01  Robert Dewar  <dewar@adacore.com>
7052
7053         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7054         case expr alternative.
7055
7056 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7057
7058         * sem_ch12.adb: Fix typo.
7059
7060 2011-08-01  Geert Bosch  <bosch@adacore.com>
7061
7062         * sem_prag.adb (Check_No_Link_Name): New procedure.
7063         (Process_Import_Or_Interface): Use Check_No_Link_Name.
7064         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7065         instead of Standard_Long_Long_Float_Size global. Preparation for
7066         eventual removal of per type constants.
7067         * exp_util.ads (Get_Stream_Size): New function returning the stream
7068         size value of subtype E.
7069         * exp_util.adb (Get_Stream_Size): Implement new function.
7070         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7071         function.
7072         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7073         * einfo.adb:
7074         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7075
7076 2011-08-01  Geert Bosch  <bosch@adacore.com>
7077
7078         * cstand.adb: Fix comments.
7079         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7080         count of arguments.
7081
7082 2011-08-01  Robert Dewar  <dewar@adacore.com>
7083
7084         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7085
7086 2011-08-01  Geert Bosch  <bosch@adacore.com>
7087
7088         * atree.ads: Fix comment.
7089
7090 2011-08-01  Robert Dewar  <dewar@adacore.com>
7091
7092         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7093         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7094         * par.adb: Add with for Namet.Sp.
7095         * par-tchk.adb: Minor reformatting.
7096
7097 2011-08-01  Vincent Celier  <celier@adacore.com>
7098
7099         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7100         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7101         of the init procedure of a SAL.
7102         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7103         New procedure.
7104
7105 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7106
7107         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7108         reformatting.
7109
7110 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7111
7112         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7113
7114 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7115
7116         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7117         conformant with its spec (return True only for types that have
7118         an overriding Initialize primitive operation that prevents them from
7119         having preelaborable initialization).
7120         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7121         initialization for controlled types in Ada 2005 or later mode.
7122
7123 2011-08-01  Robert Dewar  <dewar@adacore.com>
7124
7125         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7126         Postcondition.
7127         (Same_Aspect): New function.
7128         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7129         Type_Invariant, Precondition, Postcondition.
7130         * snames.ads-tmpl: Add Name_Type_Invariant.
7131
7132 2011-08-01  Robert Dewar  <dewar@adacore.com>
7133
7134         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7135         here.
7136         (Freeze_All_Ent): Fix error in handling inherited aspects.
7137         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7138         already analyzed, but don't skip entire processing of a declaration,
7139         that's wrong in some cases of declarations being rewritten.
7140         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7141         Don't delay for integer, string literals
7142         Treat predicates in usual manner for delay, remove special case code,
7143         not needed.
7144         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7145         (Build_Predicate_Function): Update saved expression in aspect
7146         (Build_Invariant_Procedure): Update saved expression in aspect
7147         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7148         of replacement of discriminant references if the reference is simple.
7149
7150 2011-08-01  Robert Dewar  <dewar@adacore.com>
7151
7152         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7153         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7154         Static_Predicate and Dynamic_Predicate.
7155         (Build_Predicate_Function): Add processing for Static_Predicate
7156         and Dynamic_Predicate.
7157         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7158         (From_Static_Predicate): New flag
7159         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7160
7161 2011-08-01  Robert Dewar  <dewar@adacore.com>
7162
7163         * usage.adb: Documentation cleanup for Ada version modes in usage.
7164         * expander.adb: Minor reformatting.
7165
7166 2011-08-01  Robert Dewar  <dewar@adacore.com>
7167
7168         * atree.ads: Minor comment fix.
7169         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7170         a-witeio.ads, sem_prag.adb: Minor reformatting.
7171
7172 2011-08-01  Doug Rupp  <rupp@adacore.com>
7173
7174         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7175         pointers. Use descrip.h header file for convenience. Add some
7176         comments.
7177
7178 2011-08-01  Robert Dewar  <dewar@adacore.com>
7179
7180         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7181         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7182         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7183         New procedure.
7184         (Check_Aspect_At_End_Of_Declarations): New procedure
7185         (Analye_Aspect_Specification): Minor changes for above procedures
7186         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7187         specification node as well.
7188
7189 2011-08-01  Pascal Obry  <obry@adacore.com>
7190
7191         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7192         Windows files. Use GetFilesAttributes() in this case to check for file
7193         existence instead of returning with an error code.
7194
7195 2011-08-01  Vincent Celier  <celier@adacore.com>
7196
7197         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7198         High is above Source length.
7199
7200 2011-08-01  Robert Dewar  <dewar@adacore.com>
7201
7202         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7203
7204 2011-08-01  Robert Dewar  <dewar@adacore.com>
7205
7206         * aspects.ads (Boolean_Aspects): New subtype.
7207         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7208         for derived types in cases where the parent type and derived type have
7209         aspects.
7210         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7211         with aspects when parent type also has aspects.
7212         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7213         boolean expression at this point).
7214         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7215         accordance with final decision on the Ada 2012 feature.
7216         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7217
7218 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7219
7220         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7221
7222 2011-08-01  Pascal Obry  <obry@adacore.com>
7223
7224         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7225         Fix Replace_Slice when High is above current string size.
7226         (Replace_Slice): Fix DL computation when High is above current
7227         string length.
7228
7229 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7230
7231         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7232
7233 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7234
7235         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7236         of node.
7237
7238 2011-08-01  Pascal Obry  <obry@adacore.com>
7239
7240         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7241         reformatting.
7242
7243 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7244
7245         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7246         access to protected subprograms in generic bodies.
7247         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7248         protected type, indicate that the convention of the subprogram is
7249         Convention_Protected, because it may be used in subsequent declarations
7250         within the protected declaration.
7251
7252 2011-08-01  Vincent Celier  <celier@adacore.com>
7253
7254         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7255         and "final" procedures when the name of the library is "ada", to avoid
7256         duplicate symbols "adainit" and "adafinal" in executables.
7257
7258 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7259
7260         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7261         quantified expression that appears within a postcondition and uses the
7262         Ada2012 'Result attribute.
7263
7264 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7265
7266         * init.c (__gnat_error_handler): Cast reason to int.
7267         (__gnat_install_handler): Explain sa_sigaction use.
7268
7269 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7270
7271         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7272         subprogram has copy-in copy-out parameters, try to promote the mode of
7273         the return type if it is passed in registers.
7274
7275 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7276
7277         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7278         left operand as addressable.
7279
7280 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7281
7282         * gcc-interface/gigi.h (build_function_stub): Remove.
7283         (build_return_expr): Likewise.
7284         (convert_vms_descriptor): Declare.
7285         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7286         (build_function_stub): Move to...
7287         * gcc-interface/utils2.c (build_return_expr): Move to...
7288         * gcc-interface/trans.c (build_function_stub): ...here.
7289         (build_return_expr): ...here.
7290         (Subprogram_Body_to_gnu): Add local variable for language_function.
7291         Disconnect the parameter attributes cache, if any, once done with it.
7292         Call end_subprog_body only after setting the end_locus.
7293         Build the stub associated with the function, if any, at the very end.
7294         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7295         variables and streamline control flow.
7296
7297 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
7298
7299         PR ada/49819
7300         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7301         g-trasym-dwarf.adb.
7302
7303 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7304
7305         PR bootstrap/49794
7306         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7307         Assign to act.sa_sigaction.
7308         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7309         current->return_address to char * before arithmetic.
7310
7311 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7312
7313         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7314         Correct argument types.
7315         Extract code from reason.
7316         (__gnat_install_handler): Assign to act.sa_sigaction.
7317
7318 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
7319
7320         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7321         (GNAT1_OBJS): ...here.
7322
7323 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
7324
7325         PR ada/48711
7326         * g-socthi-mingw.adb (Fill): Fix formatting.
7327
7328         * gcc-interface/gigi.h: Move around comment.
7329
7330 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7331
7332         PR ada/46350
7333         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7334
7335 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
7336
7337         PR ada/48711
7338         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7339
7340 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
7341
7342         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7343         range comparison if Pmode is SImode.
7344
7345 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
7346             Eric Botcazou  <ebotcazou@adacore.com>
7347
7348         * adadecode.c: Wrap up in extern "C" block.
7349         * adadecode.h: Likewise.
7350         * adaint.c: Likewise.  Remove 'const' keyword.
7351         * adaint.h: Likewise.
7352         * argv.c: Likewise.
7353         * atree.h: Likewise.
7354         * cio.c: Likewise.
7355         * cstreams.c: Likewise.
7356         * env.c: Likewise.
7357         * exit.c: Likewise.
7358         * fe.h: Likewise.
7359         * final.c: Likewise.
7360         * init.c: Likewise.
7361         * initialize.c: Likewise.
7362         * link.c: Likewise.
7363         * namet.h: Likewise.
7364         * nlists.h: Likewise.
7365         * raise.c: Likewise.
7366         * raise.h: Likewise.
7367         * repinfo.h: Likewise.
7368         * seh_init.c: Likewise.
7369         * targext.c: Likewise.
7370         * tracebak.c: Likewise.
7371         * uintp.h: Likewise.
7372         * urealp.h: Likewise.
7373         * xeinfo.adb: Wrap up generated C code in extern "C" block.
7374         * xsinfo.adb: Likewise.
7375         * xsnamest.adb: Likewise.
7376         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7377         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7378         * gcc-interface/misc.c: Likewise.
7379         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7380         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
7381         ada/targext.o here...
7382         (GNAT_ADA_OBJS): ...and not here.
7383         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7384         (GNATBIND_OBJS): Reorder.
7385
7386 2011-07-07  Richard Henderson  <rth@redhat.com>
7387
7388         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7389         dwarf2out_frame_init.
7390
7391 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
7392
7393         * gcc-interface/misc.c (gnat_init): Tweak previous change.
7394
7395 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7396
7397         PR target/39150
7398         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7399
7400 2011-07-06  Richard Guenther  <rguenther@suse.de>
7401
7402         * gcc-interface/misc.c (gnat_init): Merge calls to
7403         build_common_tree_nodes and build_common_tree_nodes_2.
7404         Re-initialize boolean_false_node.
7405
7406 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7407             Olivier Hainque  <hainque@adacore.com>
7408             Nicolas Setton  <setton@adacore.com>
7409
7410         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7411         the type according to the ARTIFICIAL_P parameter.
7412         (create_type_decl): Likewise.
7413         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7414
7415 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
7416
7417         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7418         (gnatbind): Likewise.
7419
7420 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7421
7422         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7423
7424 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7425
7426         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7427         local variable throughout.  Remove useless call to Base_Type.
7428         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7429         Take it also into account for the volatileness of the field.  Set the
7430         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
7431
7432 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7433
7434         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7435         on a dereference built for a by-ref object if it has an address clause.
7436
7437 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7438
7439         * einfo.ads (Address_Taken): Document use for the second argument of
7440         Asm_Input and Asm_Output attributes.
7441         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7442         argument is an entity name, then set Address_Taken on it.
7443         <Attribute_Asm_Output>: Likewise.
7444         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7445         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7446         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7447         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7448
7449 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
7450
7451         PR middle-end/46500
7452         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7453
7454 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
7455
7456         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7457         (ada/utils.o): Update dependencies.
7458         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7459         ../../../libcpp/libcpp.a.
7460         * gcc-interface/utils.c: Include common/common-target.h.
7461         (process_attributes): Use targetm_common.have_named_sections.
7462
7463 2011-06-07  Richard Guenther  <rguenther@suse.de>
7464
7465         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7466         set_sizetype.
7467
7468 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7469
7470         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7471         TREE_THIS_NOTRAP flag.
7472
7473 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7474
7475         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7476         Fix thinko.
7477
7478 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7479
7480         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7481         constants whose full view has discriminants specially.
7482
7483 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7484
7485         * gcc-interface/utils.c: Include diagnostic.h.
7486         (gnat_write_global_declarations): Output debug information for all
7487         global type declarations before finalizing the compilation unit.
7488         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7489
7490 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
7491
7492         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7493
7494 2011-05-25  Kai Tietz  <ktietz@redhat.com>
7495
7496         * adaint.c (__gnat_to_canonical_file_list_next): Use array
7497         initialization instead of const/none-const pointer assignment.
7498
7499 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
7500
7501         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7502         $(EXTRA_GNAT1_OBJS).
7503         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7504         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7505         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7506         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7507         libcommon-target.a instead of prefix.o.
7508
7509 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
7510
7511         PR ada/49097
7512         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7513
7514 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
7515
7516         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7517         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7518         instead of version.o.
7519
7520 2011-05-18  Kai Tietz <ktietz@redhat.com>
7521
7522         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7523         boolean_false_node instead of integer_zero_node.
7524         (convert_with_check): Likewise.
7525         * gcc-interface/decl.c (choices_to_gnu): Likewise.
7526
7527 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
7528
7529         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7530         type of the parameter is an unconstrained array, convert the actual to
7531         the type of the formal in the In Out and Out cases as well.
7532
7533 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7534
7535         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7536         call build_function_type_array or build_varargs_function_type_array
7537         instead.
7538         (create_subprog_type): Don't call build_function_type; call
7539         build_function_type_vec instead.
7540
7541 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7542
7543         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7544         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7545         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7546
7547 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
7548
7549         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7550
7551         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7552         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7553
7554 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7555
7556         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7557
7558 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7559
7560         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7561         instead of accessing TYPE_ARG_TYPES directly.
7562         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7563
7564 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7565
7566         PR ada/48844
7567         * gcc-interface/gigi.h (get_variant_part): Declare.
7568         * gcc-interface/decl.c (get_variant_part): Make global.
7569         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7570         types have the same constant size, are record types and T1 has a
7571         variant part while T2 doesn't.
7572
7573 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7574
7575         * gcc-interface/utils.c (begin_subprog_body): Do not call
7576         get_pending_sizes.
7577         (end_subprog_body): Likewise.
7578
7579 2011-05-04  Richard Guenther  <rguenther@suse.de>
7580
7581         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7582         int_const_binop.
7583         (pos_to_constructor): Likewise.
7584
7585 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
7586             Eric Botcazou  <ebotcazou@adacore.com>
7587
7588         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7589         of build_function_type.  Adjust calls to...
7590         (build_raise_check): ...this.  Do not take a void_tree parameter.
7591         Call build_function_type_list instead of build_function_type.
7592         Fix head comment and swap couple of conditional blocks.
7593
7594 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
7595
7596         * gnatvsn.ads (Library_Version): Bump to 4.7.
7597         (Current_Year): Bump to 2011.
7598
7599 2011-04-29  Michael Matz  <matz@suse.de>
7600
7601         * gcc-interface/misc.c (gnat_handle_option): Set
7602         warn_maybe_uninitialized.
7603
7604 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
7605
7606         * gnat_ugn.texi (Complexity Metrics Control): Update link to
7607         the Watson/McCabe paper.
7608
7609 2011-04-23  Jim Meyering  <meyering@redhat.com>
7610
7611         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7612
7613 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7614
7615         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7616         onto the new type.
7617
7618 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7619
7620         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7621         parameter.
7622         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
7623         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7624         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7625         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7626         <all>: Do not set flags on the reused DECL node coming from an alias.
7627         Set DECL_IGNORED_P on the DECL node built for subprograms if they
7628         don't need debug info here...
7629         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7630         (gigi): Adjust calls to create_subprog_decl.
7631         (build_raise_check): Likewise.
7632         (establish_gnat_vms_condition_handler): Likewise.
7633         (Compilation_Unit_to_gnu): Likewise.
7634         (gnat_to_gnu): Likewise.
7635
7636 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
7637
7638         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7639         (NO_REORDER_ADAFLAGS): New variable.
7640         (EXTRA_GNATTOOLS): Always define.
7641         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7642         Clean up and adjust list of files compiled with special options.
7643         * gcc-interface/Make-lang.in: Likewise.
7644         (ada/decl.o): Cosmetical change.
7645         (ada/misc.o): Remove dependency on $(PLUGIN_H).
7646
7647 2011-04-20  Jim Meyering  <meyering@redhat.com>
7648
7649         * initialize.c (__gnat_initialize): Remove useless if-before-free.
7650
7651 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7652
7653         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7654         $(CFLAGS) on the link line.
7655
7656 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7657
7658         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7659         padded type built for the return type if it is unconstrained.
7660
7661 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
7662
7663         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7664
7665 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
7666
7667         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7668         before calling TREE_CHAIN.
7669         * gcc-interface/misc.c (gnat_init_ts): New function.
7670         (LANG_HOOKS_INIT_TS): Define.
7671
7672 2011-04-12  Martin Jambor  <mjambor@suse.cz>
7673
7674         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7675         instead of cgraph_node.
7676
7677 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7678
7679         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7680         alignment on fields of the RETURN type built for the Copy-In Copy-Out
7681         mechanism.
7682
7683 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7684
7685         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7686         of aggregate types that contain a placeholder.
7687
7688 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
7689
7690         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7691         TYPE_ARG_TYPES.
7692         (handle_type_generic_attribute): Likewise.
7693
7694 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
7695
7696         PR ada/47163
7697         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7698
7699 2011-04-04  Kai Tietz  <ktietz@redhat.com>
7700
7701         PR ada/47163
7702         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7703         to flag value.
7704
7705 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7706
7707         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7708         type case, do not strip a padding type around the array type.
7709
7710 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7711
7712         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7713         types.
7714
7715 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7716
7717         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7718         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7719         code for -feliminate-unused-debug-types.
7720         (gnat_post_options): Likewise.
7721
7722 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7723
7724         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7725         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7726         distinct copy.
7727
7728 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7729
7730         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7731         DECL_ARTIFICIAL flag on enumeration types.
7732
7733 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7734
7735         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7736         fat pointer types artificial unconditionally.
7737         <E_Array_Subtype>: Attach the base array type as a parallel type if it
7738         isn't artificial.
7739
7740 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7741
7742         * gcc-interface/gigi.h (get_dummy_type): Declare.
7743         (build_dummy_unc_pointer_types): Likewise.
7744         (finish_fat_pointer_type): Likewise.
7745         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7746         fat pointer type has been built, complete it in place.
7747         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7748         and thin pointers.  Remove useless variable.
7749         (finish_fat_pointer_type): Make global and move to...
7750         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7751         (get_dummy_type): New function.
7752         (build_dummy_unc_pointer_types): Likewise.
7753         (gnat_pushdecl): Propage the name to the anonymous variants only.
7754         (update_pointer_to): Only adjust the pointer types in the unconstrained
7755         array case.
7756
7757 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7758
7759         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7760         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7761         if this is a Taft amendment type and the full declaration is available.
7762         * gcc-interface/trans.c (process_type): Likewise.
7763         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7764         (process_freeze_entity): Likewise.
7765         * gcc-interface/utils.c (dummy_global): New static variable.
7766         (gnat_write_global_declarations): If there are types declared as used
7767         at the global level, insert them in the global hash table.
7768
7769 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7770
7771         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7772         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7773         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7774         copy.
7775         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
7776         flag of the type accordingly.
7777         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7778
7779 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7780
7781         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7782         finalizing types when updating the pointers to the designated type.
7783         <all>: Finalize the deferred types even if we didn't defer processing
7784         of incomplete types in this invocation.
7785
7786 2011-04-01  Olivier Hainque  <hainque@adacore.com>
7787             Nicolas Setton  <setton@adacore.com>
7788             Eric Botcazou  <ebotcazou@adacore.com>
7789
7790         * gcc-interface/misc.c (gnat_descriptive_type): New function.
7791         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7792
7793 2011-03-28  Kai Tietz  <ktietz@redhat.com>
7794
7795         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7796         Windows targets.
7797         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7798         * system-mingw.ads (System): Change ZCX_By_Default default to True.
7799
7800         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7801
7802 2011-03-28  Tristan Gingold  <gingold@adacore.com>
7803
7804         PR ada/44431
7805         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7806         Use ada output of gnatbind.
7807         (ada/b_gnatb.adb): Ditto.
7808         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7809         (ada.mostlyclean, ada.stage1)
7810         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7811         (ada.stagefeedback): Adjust.
7812         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7813         Use ada output of gnatbind.
7814         (b_gnatm.adb): Ditto.
7815         (b_gnatl.o, b_gnatm.o): New rules.
7816
7817 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7818
7819         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7820         for the padded type built to support a specified size or alignment.
7821
7822 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7823
7824         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7825         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7826         unconditionally to the end of the unit when the designated type is
7827         limited_with'ed.
7828         <all>: Rename local variable.  Attempt to un-defer types only and do it
7829         for limited_with'ed types as well.
7830         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
7831         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7832         consistently and remove redundant call to finalize_from_with_types.
7833
7834 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
7835
7836         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7837         subprograms without a previous spec declared in the same unit.
7838         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7839         subprograms at the end of the unit instead of at the beginning.
7840         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7841         isn't public for the special handling of non-inline functions nested
7842         inside inline external functions.
7843
7844 2011-03-25  Jeff Law  <law@redhat.com>
7845
7846         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7847
7848 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
7849
7850         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7851         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7852         to compute Set_Size_Depends_On_Discriminant.
7853         (Layout_Type): Call it on array types in back-end layout mode.
7854         * sem_util.adb (Requires_Transient_Scope): Return true for array
7855         types only if the size depends on the value of discriminants.
7856         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7857         type if the RHS is a call to a function that returns an unconstrained
7858         type with default discriminant.
7859
7860 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
7861
7862         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7863         non-conversion to the nominal result type at the end.
7864
7865 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7866
7867         * gcc-interface/trans.c (create_temporary): New function taken from...
7868         (create_init_temporary): ...here.  Call it.
7869         (call_to_gnu): Create the temporary for the return value early, if any.
7870         Create it for a function with copy-in/copy-out parameters if there is
7871         no target; in other cases of copy-in/copy-out, use another temporary.
7872         Push the new binding level lazily.  Add and rename local variables.
7873
7874 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7875
7876         * gcc-interface/decl.c (validate_size): Improve comments and tweak
7877         error message.
7878         (set_rm_size): Likewise.
7879
7880 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
7881
7882         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7883         for the padded type built in order to support a specified alignment.
7884         Fix incorrect formatting.
7885
7886 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7887
7888         PR bootstrap/48216
7889         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7890
7891 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7892
7893         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7894         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7895         to the end of the list.  Adjust recursive call.  Rename local variable.
7896         If REORDER is true, reorder components of the record type.
7897         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7898         components_to_record and adjust the parameter list.
7899
7900 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
7901
7902         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7903         disabled, use the variable for bounds of loop iteration scheme.
7904
7905 2011-03-21  Kai Tietz  <ktietz@redhat.com>
7906
7907         PR target/12171
7908         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7909
7910 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
7911
7912         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7913         out whether the expression is read-only.  Short-circuit placeholder
7914         case and rename a couple of local variables.
7915
7916 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
7917
7918         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7919         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7920         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7921         (convert): Deal with conversions from a smaller form type specially.
7922
7923 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
7924
7925         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7926         its argument, except for the special -I- switch.
7927
7928 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
7929
7930         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7931         "Ada Issues".
7932
7933 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
7934
7935         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7936
7937 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
7938
7939         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7940         GNAT_FORMAL.
7941         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7942         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
7943         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
7944         Do not generate the check directly, instead instantiate the template
7945         check present in the descriptor.
7946         (make_descriptor_field): Move around.
7947         (build_vms_descriptor32): Build a template check in the POINTER field.
7948         (build_vms_descriptor): Remove useless suffixes.
7949         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7950
7951 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
7952
7953         PR bootstrap/47467
7954         * targext.c: Include target files if IN_RTS is defined.
7955
7956 2011-01-26  Richard Guenther  <rguenther@suse.de>
7957
7958         PR bootstrap/47467
7959         * targext.c: Include config.h.
7960         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7961         dependency.
7962
7963 2011-01-04  Pascal Obry  <obry@adacore.com>
7964             Eric Botcazou  <ebotcazou@adacore.com>
7965
7966         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7967
7968 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7969
7970         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7971         end-of-case on the end label and its associated gotos, if any.
7972
7973 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7974
7975         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7976         expressions of the parameter cache within the statement group of
7977         the CICO mechanism.
7978
7979 2011-01-04  Olivier Hainque  <hainque@adacore.com>
7980             Eric Botcazou  <ebotcazou@adacore.com>
7981
7982         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7983         (set_end_locus_from_node): New function.
7984         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7985         make and the function end_locus.
7986         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7987         for the elaboration subprogram.
7988         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7989         set the end_locus of the expression as well.
7990
7991 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
7992
7993         PR ada/47131
7994         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7995         variables that are referenced in exception handlers volatile.
7996
7997
7998 \f
7999 Copyright (C) 2011 Free Software Foundation, Inc.
8000
8001 Copying and distribution of this file, with or without modification,
8002 are permitted in any medium without royalty provided the copyright
8003 notice and this notice are preserved.
8004
8005         * gnat_rm.texi: Ramification of pragma Eliminate documentation
8006          - fix bugs in the description of Source_Trace;
8007          - get rid of UNIT_NAME;
8008
8009 2011-08-02  Javier Miranda  <miranda@adacore.com>
8010
8011         * exp_ch9.adb
8012         (Build_Dispatching_Requeue): Adding support for VM targets
8013         since we cannot directly reference the Tag entity.
8014         * exp_sel.adb (Build_K): Adding support for VM targets.
8015         (Build_S_Assignment): Adding support for VM targets.
8016         * exp_disp.adb
8017         (Default_Prim_Op_Position): In VM targets do not restrict availability
8018         of predefined interface primitives to compiling in Ada 2005 mode.
8019         (Is_Predefined_Interface_Primitive): In VM targets this service is not
8020         restricted to compiling in Ada 2005 mode.
8021         (Make_VM_TSD): Generate code that declares and initializes the OSD
8022         record. Needed to support dispatching calls through synchronized
8023         interfaces.
8024         * exp_ch3.adb
8025         (Make_Predefined_Primitive_Specs): Enable generation of predefined
8026         primitives associated with synchronized interfaces.
8027         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8028         primitives associated with synchronized interfaces.
8029
8030 2011-08-02  Yannick Moy  <moy@adacore.com>
8031
8032         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8033         statements hidden in SPARK if preceded by the HIDE directive
8034         (Parse_Exception_Handlers): mark each exception handler in a sequence of
8035         exception handlers as hidden in SPARK if preceded by the HIDE directive
8036         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8037         if starting with the HIDE directive
8038         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8039         starting with the HIDE directive; mark the declarations in a private
8040         part as hidden in SPARK if the private part starts with the HIDE
8041         directive
8042         * restrict.adb, restrict.ads
8043         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8044         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8045         argument node belongs to a part which is hidden in SPARK
8046         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8047         parts in SPARK; protect the possibly costly call to
8048         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8049         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8050         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8051         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8052         Tok_SPARK_Hide.
8053         (Scan): recognize special comment starting with '#' and followed by
8054         SPARK keyword "hide" as a HIDE directive.
8055
8056 2011-08-02  Yannick Moy  <moy@adacore.com>
8057
8058         * types.ads, erroutc.ads: Minor reformatting.
8059
8060 2011-08-02  Vincent Celier  <celier@adacore.com>
8061
8062         * link.c: Add response file support for cross platforms.
8063
8064 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8065
8066         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8067         in an association, set parent field of copy before partial analysis.
8068         * sem_res.adb (Resolve_Slice): create reference to itype only when
8069         expansion is enabled.
8070
8071 2011-08-02  Yannick Moy  <moy@adacore.com>
8072
8073         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8074         for new flag denoting which subprogram bodies are in ALFA
8075         * restrict.adb, sem_ch7.adb: Update comment
8076         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8077         sem_ch9.adb, sem_res.adb: Add calls to
8078         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8079         * sem_ch6.adb (Analyze_Function_Return): add calls to
8080         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8081         middle of the body, and extended return.
8082         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8083         False when missing return.
8084         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8085         to True for subprograms whose spec is in ALFA. Remove later on the flag
8086         on the entity used for a subprogram body when there exists a separate
8087         declaration.
8088         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8089         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8090         False, otherwise do nothing.
8091
8092 2011-08-02  Robert Dewar  <dewar@adacore.com>
8093
8094         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8095
8096 2011-08-02  Yannick Moy  <moy@adacore.com>
8097
8098         * sem_ch4.ads: minor formatting.
8099
8100 2011-08-02  Yannick Moy  <moy@adacore.com>
8101
8102         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8103         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8104         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8105         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8106         opt.ads: cleanup of SPARK mode
8107
8108 2011-08-02  Yannick Moy  <moy@adacore.com>
8109
8110         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8111         types.
8112         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8113         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8114         * sem_ch3.adb
8115         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8116         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8117         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8118         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8119         types.
8120         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8121         non-static range.
8122         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8123         functions whose return type is not in ALFA.
8124         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8125         specifications.
8126         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8127         parameter's type is not in ALFA.
8128         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8129         types are in ALFA.
8130
8131 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8132
8133         * sem_ch6 (Analyze_Expression_Function): treat the function as
8134         Inline_Always, and introduce a subprogram declaration for it when it is
8135         not a completion.
8136         * inline.adb (Add_Inlined_Body): recognize bodies that come from
8137         expression functions, so that the back-end can determine whether they
8138         can in fact be inlined.
8139         * sem_util.adb (Is_Expression_Function): predicate to determine whether
8140         a function body comes from an expression function.
8141
8142 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8143
8144         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8145         null exclusions to test Can_Never_Be_Null on the anonymous access types
8146         of the formals rather than testing the formals themselves. Exclude this
8147         check in cases where the Old_Formal is marked as a controlling formal,
8148         to avoid issuing spurious errors for bodies completing dispatching
8149         operations (due to the flag not getting set on controlling access
8150         formals in body specs).
8151         (Find_Corresponding_Spec): When checking full and subtype conformance of
8152         subprogram bodies in instances, pass Designated and E in that order, for
8153         consistency with the expected order of the formals (New_Id followed by
8154         Old_Id).
8155
8156 2011-08-02  Robert Dewar  <dewar@adacore.com>
8157
8158         * sem_ch8.adb: Minor reformatting.
8159
8160 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8161
8162         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8163         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8164         primitive operations of class-wide actuals.
8165
8166 2011-08-02  Javier Miranda  <miranda@adacore.com>
8167
8168         * exp_atag.ads, exp_atag.adb
8169         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8170         since its value is implicitly passed in argument Typ.
8171         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8172         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8173         Build_Common_Dispatching_Select_Statements.
8174
8175 2011-08-02  Robert Dewar  <dewar@adacore.com>
8176
8177         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8178         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8179         Minor reformatting.
8180
8181 2011-08-02  Robert Dewar  <dewar@adacore.com>
8182
8183         * sem_res.adb: Minor reformatting.
8184         * sem_prag.adb: Minor reformatting.
8185
8186 2011-08-02  Javier Miranda  <miranda@adacore.com>
8187
8188         * exp_atag.adb, exp_atags.ads
8189         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8190         by the tagged type Entity. Required to use this routine in the VM
8191         targets since we do not have available the Tag entity in the VM
8192         platforms.
8193         * exp_ch6.adb
8194         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8195         Ada.Tags has not been previously loaded.
8196         * exp_ch7.adb
8197         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8198         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8199         * sem_aux.adb
8200         (Enclosing_Dynamic_Scope): Add missing support to handle the full
8201         view of enclosing scopes. Required to handle enclosing scopes that
8202         are synchronized types whose full view is a task type.
8203         * exp_disp.adb
8204         (Build_VM_TSDs): Minor code improvement to avoid generating and
8205         analyzing lists with empty nodes.
8206         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8207         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8208         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8209         (Make_Disp_Timed_Select_Body): Add support for VM targets.
8210         (Make_Select_Specific_Data_Table): Add support for VM targets.
8211         (Make_VM_TSD): Generate code to initialize the SSD structure of
8212         the TSD.
8213
8214 2011-08-02  Yannick Moy  <moy@adacore.com>
8215
8216         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8217         cross-references section in ALI.
8218         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8219         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8220         Sub).
8221         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8222         subprogram or package entity of a node
8223         (Is_Local_Reference_Type): new function returns True for references
8224         selected in local cross-references.
8225         (Lt): function extracted from Lt in Output_References
8226         (Write_Entity_Name): function extracted from Output_References
8227         (Generate_Definition): generate reference with type 'D' for definition
8228         of objects (object declaration and parameter specification), with
8229         appropriate locations and units, for use in local cross-references.
8230         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8231         references of type 'I' for initialization in object definition.
8232         (Output_References): move part of function Lt and procedure
8233         Write_Entity_Name outside of the body. Ignore references of types 'D'
8234         and 'I' introduced for local cross-references.
8235         (Output_Local_References): new procedure to output the local
8236         cross-references sections.
8237         (Lref_Entity_Status): new array defining whether an entity is a local
8238         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8239         with 'I' type when initialization expression is present.
8240         * get_scos.adb, get_scos.ads: Correct comments and typos
8241
8242 2011-08-02  Javier Miranda  <miranda@adacore.com>
8243
8244         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8245         the JVM target.
8246         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8247         the JVM target.
8248         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8249         TSD support.
8250
8251 2011-08-02  Vincent Celier  <celier@adacore.com>
8252
8253         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8254         (No_Space_Img): New function
8255         (Find_Excluded_Sources): When reading from a file, record the file name
8256         and the line number for each excluded source.
8257         (Mark_Excluded_Sources): When reporting an error, if the excluded
8258         sources were read from a file, include file name and line number in
8259         the error message.
8260
8261 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8262
8263         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8264
8265 2011-08-02  Robert Dewar  <dewar@adacore.com>
8266
8267         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8268
8269 2011-08-02  Javier Miranda  <miranda@adacore.com>
8270
8271         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8272         generation of TSDs to the DOTNET compiler.
8273         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8274         generation of TSDs to the DOTNET compiler.
8275
8276 2011-08-02  Javier Miranda  <miranda@adacore.com>
8277
8278         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8279         record of all the tagged types declared inside library level package
8280         declarations, library level package bodies or library level subprograms.
8281         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8282         associated with a given tagged type.
8283         (Build_VM_TSDs): New subprogram.
8284         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8285         compilation units that are subprograms.
8286         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8287         compilation units that are package bodies.
8288         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8289         units that are a package declaration or a package instantiation.
8290         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8291         reorganization to improve the error generated by the frontend when the
8292         function Ada.Tags.Secondary_Tag is not available.
8293         * rtsfind.ads (RE_Register_TSD): New runtime entity.
8294         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8295
8296 2011-08-02  Javier Miranda  <miranda@adacore.com>
8297
8298         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8299
8300 2011-08-02  Robert Dewar  <dewar@adacore.com>
8301
8302         * s-imenne.ads: Minor reformatting.
8303
8304 2011-08-02  Robert Dewar  <dewar@adacore.com>
8305
8306         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8307         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8308         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8309
8310 2011-08-02  Robert Dewar  <dewar@adacore.com>
8311
8312         * einfo.ads (Materialize_Entity): Document this is only for renamings
8313         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8314         required debug information in the case where we transform the object
8315         declaration into a renaming declaration.
8316         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8317         object
8318         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8319         Materialize_Entity.
8320
8321 2011-08-02  Robert Dewar  <dewar@adacore.com>
8322
8323         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8324         Suppress_Init_Procs.
8325         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8326         Suppress_Initialization/Initialization_Suppressed.
8327         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8328         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8329         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8330         * sem_prag.adb: New processing for pragma Suppress_Initialization.
8331
8332 2011-08-02  Robert Dewar  <dewar@adacore.com>
8333
8334         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8335         Minor reformatting.
8336
8337 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8338
8339         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8340         only have inheritable classwide pre/postconditions.
8341
8342 2011-08-02  Javier Miranda  <miranda@adacore.com>
8343
8344         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8345         * rtsfind.ads (RE_Check_TSD): New runtime entity.
8346         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8347         checks if the external tag of a type is the same as the external tag
8348         of some other declaration.
8349
8350 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8351
8352         * s-taskin.ads: Minor reformatting.
8353
8354 2011-08-02  Emmanuel Briot  <briot@adacore.com>
8355
8356         * g-comlin.adb (Display_Help): swap the order in which it prints the
8357         short help and the general usage.
8358
8359 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8360
8361         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8362         the aspect declarations and attach them to the generic copy for
8363         subsequent analysis.
8364         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8365         declarations of the generic tree to the new subprogram declarations.
8366         * sem_attr.adb (Check_Precondition_Postcondition): recognize
8367         conditions that apply to a subprogram instance.
8368
8369 2011-08-02  Robert Dewar  <dewar@adacore.com>
8370
8371         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8372
8373 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8374
8375         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8376         private type with a tagged full view is not derived in the immediate
8377         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8378
8379 2011-08-02  Robert Dewar  <dewar@adacore.com>
8380
8381         * exp_ch4.adb: Minor reformatting.
8382
8383 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8384
8385         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
8386         Ada2012 iterator, the loop will be rewritten during expansion into a
8387         while loop with a cursor and an element declaration. Do not analyze the
8388         body in this case, because if the container is for indefinite types the
8389         actual subtype of the elements will only be determined when the cursor
8390         declaration is analyzed.
8391
8392 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8393
8394         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8395         size/alignment related attributes in CodePeer_Mode.
8396
8397 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8398
8399         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8400         Prepend_Element, since this can result in the operation getting the
8401         wrong slot in the full type's dispatch table if the full type has
8402         inherited operations. The incomplete type's operation will get added
8403         to the proper position in the full type's primitives
8404         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8405         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8406         dispatching operations, since there are cases where nonprimitive
8407         subprograms can get added to the list of incomplete dependents (such
8408         as subprograms in nested packages).
8409         * sem_ch6.adb (Process_Formals): First, remove test for being in a
8410         private part when determining whether to add a primitive with a
8411         parameter of a tagged incomplete type to the Private_Dependents list.
8412         Such primitives can also occur in the visible part, and should not have
8413         been excluded from being private dependents.
8414         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8415         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8416         list of a Taft-amendment incomplete type is a primitive before issuing
8417         an error that the full type must appear in the same unit. There are
8418         cases where nonprimitives can be in the list (such as subprograms in
8419         nested packages).
8420         * sem_disp.adb (Derives_From): Use correct condition for checking that
8421         a formal's type is derived from the type of the corresponding formal in
8422         the parent subprogram (the condition was completely wrong). Add
8423         checking that was missing for controlling result types being derived
8424         from the result type of the parent operation.
8425
8426 2011-08-02  Yannick Moy  <moy@adacore.com>
8427
8428         * errout.adb (First_Node): minor renaming
8429         * restrict.adb (Check_Formal_Restriction): put restriction warning on
8430         first node.
8431
8432 2011-08-02  Yannick Moy  <moy@adacore.com>
8433
8434         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8435         before accessing operands.
8436         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8437         decide whether an initialization expression respects SPARK rules, as
8438         the plain node is the expanded one. This allows for more valid warnings
8439         to be issued.
8440         * gnat_rm.texi: Minor update.
8441
8442 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8443
8444         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8445         previous change.
8446
8447 2011-08-02  Robert Dewar  <dewar@adacore.com>
8448
8449         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8450
8451 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8452
8453         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8454         loop statements and the element renaming declaration with a block when
8455         the element type is controlled.
8456
8457 2011-08-02  Yannick Moy  <moy@adacore.com>
8458
8459         * sinfo.ads: Minor formatting.
8460
8461 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8462
8463         * sem_aggr.adb (Add_Association): if the association has a box and no
8464         expression, use the Sloc of the aggregate itself for the new
8465         association.
8466         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8467         the Original_Node.
8468
8469 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8470
8471         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8472         When a container is provided via a function call, generate a renaming
8473         of the function result. This avoids the creation of a transient scope
8474         and the premature finalization of the container.
8475         * exp_ch7.adb (Is_Container_Cursor): Removed.
8476         (Wrap_Transient_Declaration): Remove the supression of the finalization
8477         of the list controller when the declaration denotes a container cursor,
8478         it is not needed.
8479
8480 2011-08-02  Yannick Moy  <moy@adacore.com>
8481
8482         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8483         node is from source, instead of the original node being from source.
8484         * sem_aggr.adb
8485         (Resolve_Array_Aggregate): refine the check for a static expression, to
8486         recognize also static ranges
8487         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8488         Array_Type_Declaration): postpone the test for the type being a subtype
8489         mark after the type has been resolved, so that component-selection and
8490         expanded-name are discriminated.
8491         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8492         to distinguish the case of an iteration scheme, so that an error is
8493         issed on a non-static range in SPARK except in an iteration scheme.
8494         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8495         In_Iter_Schm = True.
8496         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8497         user-defined operators so that they are allowed in renaming
8498         * sem_ch8.adb
8499         (Find_Selected_Component): refine the check for prefixing of operators
8500         so that they are allowed in renaming. Move the checks for restrictions
8501         on selector name after analysis discriminated between
8502         component-selection and expanded-name.
8503         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8504         concatenation argument of string type if it is static.
8505         * sem_util.adb, sem_util.ads
8506         (Check_Later_Vs_Basic_Declarations): add a new function
8507         Is_Later_Declarative_Item to decice which declarations are allowed as
8508         later items, in the two different modes Ada 83 and SPARK. In the SPARK
8509         mode, add that renamings are considered as later items.
8510         (Enclosing_Package): new function to return the enclosing package
8511         (Enter_Name): correct the rule for homonyms in SPARK
8512         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8513         from source (result of expansion) to avoid issuing wrong warnings.
8514
8515 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8516
8517         * errout.adb: On anything but an expression First_Node returns its
8518         argument.
8519
8520 2011-08-02  Pascal Obry  <obry@adacore.com>
8521
8522         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8523
8524 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8525
8526         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8527         Set the associated loop as the related expression of internally
8528         generated cursors.
8529         * exp_ch7.adb (Is_Container_Cursor): New routine.
8530         (Wrap_Transient_Declaration): Supress the finalization of the list
8531         controller when the declaration denotes a container cursor.
8532
8533 2011-08-02  Yannick Moy  <moy@adacore.com>
8534
8535         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8536         command line now.
8537         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8538         expression is a simple expression. This check cannot be performed in
8539         the semantics, so just drop it.
8540         (P_Index_Or_Discriminant_Constraint): move check that the index or
8541         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8542         semantics. Other cases were previously checked in the semantics.
8543         * par-ch4.adb (P_Name): move checks that a selector name is not
8544         character literal or an operator symbol to Find_Selected_Component in
8545         the semantics
8546         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8547         declarations are not placed after later declarations in a separate
8548         procedure in Sem_Util (possibly not the best choice?), to be used both
8549         during parsing, for Ada 83 mode, and during semantic analysis, for
8550         SPARK mode.
8551         * par-endh.adb (Check_End): move check that end label is not missing
8552         to Process_End_Label in the semantics
8553         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8554         the special case for SPARK restriction
8555         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8556         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8557         parameter Force to issue the error message even on internal node (used
8558         for generated end label). Call Check_Restriction to check when an error
8559         must be issued. In SPARK mode, issue an error message even if the
8560         restriction is not set.
8561         (Check_Restriction): new procedure with an additional out parameter to
8562         inform the caller that a message has been issued
8563         * sem_aggr.adb: Minor modification of message
8564         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8565         instead of issuing an error message directly
8566         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8567         declarations are not placed after later declarations, by calling
8568         Check_Later_Vs_Basic_Declarations
8569         (Analyze_Subtype_Declaration): move here the check that an index or
8570         discriminant constraint must be a subtype mark. Change the check that
8571         a subtype of String must start at one so that it works on subtype marks.
8572         * sem_ch4.adb (Analyze_Call): move here the check that a named
8573         association cannot follow a positional one in a call
8574         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8575         instead of issuing an error message directly
8576         * sem_ch8.adb (Find_Selected_Component): move here the check that a
8577         selector name is not a character literal or an operator symbol. Move
8578         here the check that the prefix of an expanded name cannot be a
8579         subprogram or a loop statement.
8580         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8581         procedure called from parsing and semantics to check that basic
8582         declarations are not placed after later declarations
8583         (Process_End_Label): move here the check that end label is not missing
8584
8585 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8586
8587         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8588         representation clause in codepeer mode, since it confuses CodePeer and
8589         does not bring useful info.
8590
8591 2011-08-02  Ed Falis  <falis@adacore.com>
8592
8593         * init.c: initialize fp hw on MILS.
8594
8595 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8596
8597         * errout.adb (First_Node): for bodies, return the node itself (small
8598         optimization). For other nodes, do not check source_unit if the node
8599         comes from Standard.
8600
8601 2011-08-02  Robert Dewar  <dewar@adacore.com>
8602
8603         * exp_ch3.adb: Minor comment additions.
8604         * sem_ch13.adb: Minor reformatting.
8605
8606 2011-08-02  Pascal Obry  <obry@adacore.com>
8607
8608         * make.adb, makeutl.adb: Removes some superfluous directory separator.
8609
8610 2011-08-02  Robert Dewar  <dewar@adacore.com>
8611
8612         * sem_attr.adb: Minor reformatting.
8613
8614 2011-08-02  Robert Dewar  <dewar@adacore.com>
8615
8616         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8617         (Has_Default_Component_Value): Removed
8618         * einfo.ads Comment updates
8619         (Has_Default_Aspect): Replaces Has_Default_Value
8620         (Has_Default_Component_Value): Removed
8621         * exp_ch13.adb
8622         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8623         * exp_ch3.adb
8624         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8625         (Get_Simple_Init_Val): Handle Default_Value aspect
8626         (Needs_Simple_Initialization): Handle Default_Value aspect
8627         * exp_ch3.ads: Needs_Simple_Initialization
8628         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8629         * par-prag.adb (Pragma_Default[_Component]Value) Removed
8630         * sem_ch13.adb
8631         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8632         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8633         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8634
8635 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8636
8637         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8638         package containing iteration primitives.
8639         exp_ch5.adb (Expand_Iterator_Loop): ditto.
8640
8641 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8642
8643         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8644         "of", pre-analyze expression in case it is a function call with
8645         finalization actions that must be placed ahead of the loop.
8646         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8647         on an Ada2012 iterator, insert them ahead of the rewritten loop.
8648
8649 2011-08-02  Geert Bosch  <bosch@adacore.com>
8650
8651         * cstand.adb (Create_Float_Types): Only consider C's long double for
8652         Long_Long_Float, in addition to double.
8653
8654 2011-08-02  Robert Dewar  <dewar@adacore.com>
8655
8656         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8657         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8658         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8659         Minor reformatting.
8660
8661 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8662
8663         * sem_attr.adb: handle properly 'Result when it is a prefix of an
8664         indexed component.
8665
8666 2011-08-02  Javier Miranda  <miranda@adacore.com>
8667
8668         * einfo.ads, einfo.adb
8669         (Original_Access_Type): Move this attribute to Node26 since there was
8670         an undocumented use of Node21 in E_Access_Subprogram_Type entities
8671         which causes conflicts and breaks the generation of the .NET compiler.
8672         (Interface_Name): Add missing documentation on JGNAT only uses of
8673         this attribute.
8674
8675 2011-08-02  Geert Bosch  <bosch@adacore.com>
8676
8677         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8678         (Find_Back_End_Float_Type): Likewise
8679         (Create_Back_End_Float_Types): Likewise
8680         (Create_Float_Types): Likewise
8681         (Register_Float_Type): Likewise
8682         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8683         Nlist and split out type selection in new local Find_Base_Type function.
8684         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8685         Nlist
8686         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8687
8688 2011-08-02  Robert Dewar  <dewar@adacore.com>
8689
8690         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8691         alpha order).
8692         * opt.ads: Minor comment change.
8693         * sem_ch12.adb: Minor code reorganization.
8694
8695 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
8696
8697         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8698         subtype's list of rep items to the list on the full subtype in the case
8699         where the lists are the same.
8700
8701 2011-08-02  Geert Bosch  <bosch@adacore.com>
8702
8703         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8704         using the one from System.Strings, which also deallocates all strings.
8705
8706 2011-08-02  Geert Bosch  <bosch@adacore.com>
8707
8708         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8709         function.
8710         * gcc-interface/Make-lang.in: Update dependencies.
8711
8712 2011-08-02  Olivier Hainque  <hainque@adacore.com>
8713
8714         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8715         end_locus.
8716
8717 2011-08-02  Javier Miranda  <miranda@adacore.com>
8718
8719         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8720         associated with anonymous access to subprograms.
8721
8722 2011-08-02  Geert Bosch  <bosch@adacore.com>
8723
8724         * opt.ads
8725         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8726         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8727         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8728         (Add_Symbol_Definition): Move to switch-c.adb
8729         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8730         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8731         (Add_Symbol_Definition): Move to switch-c.adb.
8732         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8733         * sem_warn.adb
8734         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8735         Move to warnsw.adb.
8736         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8737         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8738         Move to warnsw.adb.
8739         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8740         (Add_Symbol_Definition): Moved from Prepcomp.
8741         * switch-c.ads: Update copyright notice. Use String_List instead of
8742         Argument_List, removing dependency on System.OS_Lib.
8743
8744 2011-08-02  Yannick Moy  <moy@adacore.com>
8745
8746         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8747         mode on initialization expression which does not respect SPARK
8748         restrictions.
8749         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8750         if the tree referenced by its argument represents an initialization
8751         expression in SPARK, suitable for initializing an object in an object
8752         declaration.
8753
8754 2011-08-02  Javier Miranda  <miranda@adacore.com>
8755
8756         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8757         internally generated access to subprogram with its associated protected
8758         subprogram type.
8759         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8760
8761 2011-08-02  Geert Bosch  <bosch@adacore.com>
8762
8763         * cstand.adb (Register_Float_Type): Print information about type to
8764         register, if the Debug_Flag_Dot_B is set.
8765         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8766         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8767         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8768         with a requested precision of more than Max_Digits digits and no more
8769         than Max_Base_Digits digits, if a range specification is present and the
8770         Predefined_Float_Types list has a suitable type to derive from.
8771         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8772         case of type completion with pragma Import
8773         * sem_prag.adb
8774         (Process_Import_Predefined_Type): Processing to complete a type
8775         with pragma Import. Currently supports floating point types only.
8776         (Set_Convention_From_Pragma): Do nothing without underlying type.
8777         (Process_Convention): Guard against absence of underlying type,
8778         which may happen when importing incomplete types.
8779         (Process_Import_Or_Interface): Handle case of importing predefined
8780         types. Tweak error message.
8781
8782 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8783
8784         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8785         functions to previous change.  Reorganize code slightly.
8786
8787 2011-08-02  Geert Bosch  <bosch@adacore.com>
8788
8789         * back_end.ads (Register_Type_Proc): New call back procedure type for
8790         allowing the back end to provide information about available types.
8791         (Register_Back_End_Types): New procedure to register back end types.
8792         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8793         available types.
8794         * cstand.adb (Back_End_Float_Types): New list for floating point types
8795         supported by the back end.
8796         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8797         (Copy_Float_Type): New procedure to make new copies of predefined types.
8798         (Register_Float_Type): New call back procedure to populate the BEFT list
8799         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8800         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8801         (Create_Float_Types): New procedure to create entities for floating
8802         point types predefined in Standard, and put these and any remaining
8803         BEFTs on the Predefined_Float_Types list.
8804         * stand.ads (Predefined_Float_Types): New list for predefined floating
8805         point types that do not have declarations in package Standard.
8806
8807 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8808
8809         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
8810         entity node for the unit containing the parameter.
8811         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8812         (Add_Inlined_Subprogram): Likewise.
8813         * gcc-interface/Make-lang.in: Update dependencies.
8814
8815 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8816
8817         * s-stusta.adb (Print): Make sure Pos is always initialized to a
8818         suitable value.
8819
8820 2011-08-02  Geert Bosch  <bosch@adacore.com>
8821
8822         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8823
8824 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8825
8826         * sem_type.adb (Covers): Move trivial case to the top and reuse the
8827         computed value of Base_Type.
8828
8829 2011-08-02  Yannick Moy  <moy@adacore.com>
8830
8831         * restrict.adb (Check_Restriction): issue an error for any use of
8832         class-wide, even if the No_Dispatch restriction is not set.
8833         * sem_aggr.adb: Correct typos in comments and messages in formal mode
8834         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8835         when completing a private extension, the type named in the private part
8836         is not the same as that named in the visible part.
8837         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8838         of an inherited primitive operations of a tagged type or type extension
8839         that returns the tagged type.
8840         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8841         function which returns True for an implicit operation inherited by the
8842         derived type declaration for the argument type.
8843         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8844         order.
8845
8846 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8847
8848         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8849         Process_Bounds, to perform analysis with expansion of a range or an
8850         expression that is the iteration scheme for a loop.
8851         (Analyze_Iterator_Specification): If domain of iteration is given by a
8852         function call with a controlled result, as is the case if call returns
8853         a predefined container, ensure that finalization actions are properly
8854         generated.
8855         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8856
8857 2011-08-02  Javier Miranda  <miranda@adacore.com>
8858
8859         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8860         * gcc-interface/Make-lang.in: Update dependencies.
8861
8862 2011-08-02  Javier Miranda  <miranda@adacore.com>
8863
8864         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8865         determine if the analysis is performed using N or Original_Node (N).
8866         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8867         functionality of routine Is_Variable avoids code duplication.
8868         * checks.adb (Determine_Range): Handle temporaries generated by
8869         Remove_Side_Effects.
8870
8871 2011-08-02  Javier Miranda  <miranda@adacore.com>
8872
8873         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8874         expansion of the condition. Required since the previous analysis was
8875         done with expansion disabled (see Resolve_Quantified_Expression) and
8876         hence checks were not inserted and record comparisons have not been
8877         expanded.
8878
8879 2011-08-02  Ed Falis  <falis@adacore.com>
8880
8881         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8882         Update header.
8883
8884 2011-08-02  Bob Duff  <duff@adacore.com>
8885
8886         * opt.ads: Minor comment fix.
8887
8888 2011-08-02  Bob Duff  <duff@adacore.com>
8889
8890         * sem_ch12.adb (Analyze_Package_Instantiation,
8891         Analyze_Subprogram_Instantiation): Turn off style checking while
8892         analyzing an instance. Whatever style checks that apply to the generic
8893         unit should apply, so it makes no sense to apply them in an instance.
8894         This was causing trouble when compiling an instance of a runtime
8895         unit that violates the -gnatyO switch.
8896         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8897         one of the two case statements, causing spurious errors.
8898
8899 2011-08-02  Robert Dewar  <dewar@adacore.com>
8900
8901         * uname.adb: Minor reformatting.
8902         * gnatcmd.adb: Minor reformatting.
8903         * exp_attr.adb: Minor reformatting.
8904
8905 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8906
8907         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8908         No_Dispatching_Calls, do not look for the Assign primitive, because
8909         predefined primitives are not created in this case.
8910
8911 2011-08-02  Bob Duff  <duff@adacore.com>
8912
8913         * stylesw.ads: Minor comment fixes.
8914
8915 2011-08-02  Robert Dewar  <dewar@adacore.com>
8916
8917         * freeze.adb (Add_To_Result): New procedure.
8918
8919 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8920
8921         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8922         time, if the specific run-time routines for handling streams of strings
8923         are not available, use the default mechanism.
8924
8925 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8926
8927         * s-regpat.ads: Fix typo.
8928
8929 2011-08-02  Vincent Celier  <celier@adacore.com>
8930
8931         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8932         not null, call it to create the in memory config project file without
8933         parsing an existing default config project file.
8934
8935 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8936
8937         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8938
8939 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8940
8941         * sem_elim.adb: an abstract subprogram does not need an eliminate
8942         pragma for its descendant to be eliminable.
8943
8944 2011-08-02  Ed Falis  <falis@adacore.com>
8945
8946         * init.c: revert to handling before previous checkin for VxWorks
8947         * s-intman-vxworks.adb: delete unnecessary declarations related to
8948         using Ada interrupt facilities for handling signals.
8949         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8950         * s-intman-vxworks.ads: Import __gnat_install_handler as
8951         Initialize_Interrupts.
8952         * s-taprop-vxworks.adb: Delete Signal_Mask.
8953         (Abort_Handler): change construction of mask to unblock exception
8954         signals.
8955
8956 2011-08-02  Jerome Guitton  <guitton@adacore.com>
8957
8958         * a-except-2005.adb (Raise_From_Signal_Handler): Call
8959         Debug_Raise_Exception before propagation starts.
8960
8961 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8962
8963         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8964         to Restriction_Check_Required.
8965         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8966         * sem_res.adb (Resolve_Call): Likewise.
8967         * sem_attr.adb (Check_Stream_Attribute): Likewise.
8968
8969 2011-08-02  Bob Duff  <duff@adacore.com>
8970
8971         * stylesw.ads: Update comment.
8972         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8973         * errout.ads: Remove obsolete comment.
8974
8975 2011-08-02  Javier Miranda  <miranda@adacore.com>
8976
8977         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8978         (Set_Is_Safe_To_Reevaluate): new procedure.
8979         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8980         assignment is allowed on safe-to-reevaluate variables.
8981         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8982         temporary created to remove side effects in expressions that use
8983         the secondary stack as safe-to-reevaluate.
8984         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8985         variables that are not true constants.
8986
8987 2011-08-02  Robert Dewar  <dewar@adacore.com>
8988
8989         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8990         sem_res.adb, sem_ch6.adb: Minor reformatting.
8991
8992 2011-08-02  Jerome Guitton  <guitton@adacore.com>
8993
8994         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8995
8996 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8997
8998         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8999         not set Overridden_Operation if subprogram is an initialization
9000         procedure.
9001
9002 2011-08-02  Yannick Moy  <moy@adacore.com>
9003
9004         * par-ch6.adb: Correct obsolete name in comments
9005         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9006         which takes two message arguments (existing function takes one), with
9007         second message used for continuation.
9008         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9009         block statements that originate from a source block statement, not
9010         generated block statements
9011         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9012         symmetry with procedure case
9013         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9014         function to issue an error in formal mode if a package specification
9015         contains more than one tagged type or type extension.
9016         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9017         parameters matching formals of tagged types are objects (or ancestor
9018         type conversions of objects), not general expressions. Issue an error
9019         on view conversions that are not involving ancestor conversion of an
9020         extended type.
9021         (Resolve_Type_Conversion): in formal mode, issue an error on the
9022         operand of an ancestor type conversion which is not an object
9023         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9024         procedure so that it works also for actuals of function calls
9025         (Is_Actual_Tagged_Parameter): new function which determines if its
9026         argument is an actual parameter of a formal of tagged type in a
9027         subprogram call
9028         (Is_SPARK_Object_Reference): new function which determines if the tree
9029         referenced by its argument represents an object in SPARK
9030
9031 2011-08-02  Robert Dewar  <dewar@adacore.com>
9032
9033         * sem_ch3.adb: Minor reformatting
9034         Minor comment addition
9035         Minor error msg text change
9036
9037 2011-08-02  Javier Miranda  <miranda@adacore.com>
9038
9039         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9040         function. Used to be more precise when we generate a variable plus one
9041         assignment to remove side effects in the evaluation of the Bound
9042         expressions.
9043         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9044         of the bound expression to force its re-analysis and thus expand the
9045         associated transient scope (if required). Code cleanup replacing the
9046         previous code that declared the constant entity by an invocation to
9047         routine Force_Evaluation which centralizes this work in the frontend.
9048
9049 2011-08-02  Robert Dewar  <dewar@adacore.com>
9050
9051         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9052         (Base_Type): Now uses improved Is_Base_Type function
9053         * einfo.ads (Base_Type): Inline this function
9054
9055 2011-08-02  Robert Dewar  <dewar@adacore.com>
9056
9057         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9058         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9059
9060 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9061
9062         * gcc-interface/Make-lang.in: Update dependencies.
9063         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9064         targets.
9065
9066 2011-08-02  Yannick Moy  <moy@adacore.com>
9067
9068         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9069         non-simple expression used in delta constraint
9070         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9071         index constraint which is not a subtype mark
9072         * par.adb: With and use Restrict
9073         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9074         mode on component type which is not a subtype mark and default
9075         expression on component
9076         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9077         of string which does not have a lower index bound equal to 1
9078         (Array_Type_Declaration): issue an error in formal mode on index or
9079         component type which is not a subtype mark, and on aliased keyword on
9080         component
9081         (Derived_Type_Declaration): issue an error in formal mode on interface,
9082         limited or abstract type
9083         (Record_Type_Declaration): issue an error in formal mode on interface
9084         (Record_Type_Definition): issue an error in formal mode on tagged types
9085         and type extensions not declared in the specification of a library unit
9086         package; on null non-tagged record; on variant part
9087
9088 2011-08-02  Vincent Celier  <celier@adacore.com>
9089
9090         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9091         not declared for qualified library project when Library_Name is not
9092         declared, but Library_Dir is.
9093
9094 2011-08-02  Robert Dewar  <dewar@adacore.com>
9095
9096         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9097         pragmas (affects aspects [Component_]Default_Value
9098         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9099         component type for the resolution
9100
9101 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9102
9103         * einfo.adb (Base_Type): Tune implementation for speed.
9104
9105 2011-08-02  Robert Dewar  <dewar@adacore.com>
9106
9107         * freeze.adb: Minor reformatting.
9108
9109 2011-08-02  Thomas Quinot  <quinot@adacore.com>
9110
9111         * scos.ads: Update comments.
9112
9113 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9114
9115         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9116         base type, because the parent may be a subtype of a private type whose
9117         convention is established in a private part.
9118
9119 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
9120
9121         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9122         statement in a block when the expansion of the return expression has
9123         created a finalization chain.
9124         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9125         with the parent node.
9126         Add N_Extended_Return_Statement to handle the case where a transient
9127         object declaration appears in the Return_Object_Declarations list of
9128         an extended return statement.
9129
9130 2011-08-02  Matthew Gingell  <gingell@adacore.com>
9131
9132         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9133         unused parameter 'name'.
9134
9135 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9136
9137         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9138         inherited operation, check whether its alias, which is the source
9139         operastion that it renames, has been marked eliminated.
9140
9141 2011-08-02  Javier Miranda  <miranda@adacore.com>
9142
9143         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9144         in-mode parameter whose type is an access type since it can be used to
9145         modify its designated object. Enforce code that handles as safe an
9146         access type that is not access-to-constant but it is the result of a
9147         previous removal of side-effects.
9148         (Remove_Side_Effects): Minor code reorganization of cases which require
9149         no action. Done to incorporate documentation on new cases uncovered
9150         working in this ticket: no action needed if this routine was invoked
9151         too early and the nodes are not yet decorated.
9152         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9153         to routine Remove_Side_Effects by calls to Force_Evaluation since they
9154         were issued with actuals that are implicitly provided by
9155         Force_Evaluation.
9156
9157 2011-08-02  Robert Dewar  <dewar@adacore.com>
9158
9159         * sem_ch3.adb, sem_res.adb: Minor reformatting.
9160
9161 2011-08-02  Yannick Moy  <moy@adacore.com>
9162
9163         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9164         to issue an error in formal mode on attribute not supported in this mode
9165         (Analyze_Attribute): issue errors on standard attributes not supported
9166         in formal mode.
9167         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9168         comment, and issue error in formal mode on modulus which is not a power
9169         of 2.
9170         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9171         range.
9172         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9173         subtype mark.
9174         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9175         operator on modular type (except 'not').
9176
9177 2011-08-02  Robert Dewar  <dewar@adacore.com>
9178
9179         * gnat_rm.texi: Minor reformatting.
9180
9181 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
9182
9183         * s-osinte-linux.ads: Minor comment update and reformatting.
9184         * i-cexten.ads: Make this unit pure, as for its parent.
9185         Will allow its usage in more contexts if needed.
9186
9187 2011-08-02  Robert Dewar  <dewar@adacore.com>
9188
9189         * s-utf_32.ads: Minor comment fix.
9190
9191 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9192
9193         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9194         operation of a tagged synchronized type, handle the case where the
9195         controlling argument is overloaded.
9196
9197 2011-08-02  Yannick Moy  <moy@adacore.com>
9198
9199         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9200         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9201         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9202         SPARK mode and formal verification mode on processing SPARK restriction
9203         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9204         requiring consistency checking.
9205
9206 2011-08-02  Robert Dewar  <dewar@adacore.com>
9207
9208         * sem_res.adb: Minor reformatting.
9209
9210 2011-08-02  Robert Dewar  <dewar@adacore.com>
9211
9212         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9213         a-cforse.ads: Remove unneeded with of Ada.Containers
9214         Remove commented out pragma Inline's
9215         Move specifications of new subprograms to the actual specs
9216
9217 2011-08-02  Yannick Moy  <moy@adacore.com>
9218
9219         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9220         a-cforse.ads: Update comments.
9221
9222 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9223
9224         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9225
9226 2011-08-02  Robert Dewar  <dewar@adacore.com>
9227
9228         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9229         a-cforse.ads, a-cofove.ads: Minor reformatting.
9230
9231 2011-08-02  Claire Dross  <dross@adacore.com>
9232
9233         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9234         a-cofove.ads: Add comments.
9235
9236 2011-08-02  Yannick Moy  <moy@adacore.com>
9237
9238         * gnat_rm.texi: Document formal containers.
9239
9240 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9241
9242         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9243         are empty sections.
9244
9245 2011-08-02  Robert Dewar  <dewar@adacore.com>
9246
9247         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9248         reformatting.
9249
9250 2011-08-02  Robert Dewar  <dewar@adacore.com>
9251
9252         * aspects.adb: New aspects Default_Value and Default_Component_Value
9253         New format of Aspect_Names table checks for omitted entries
9254         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9255         handling of boolean aspects for derived types.
9256         New aspects Default_Value and Default_Component_Value
9257         New format of Aspect_Names table checks for omitted entries
9258         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9259         (Has_Default_Value): New flag
9260         (Has_Default_Component_Value): New flag
9261         (Has_Default_Value): New flag
9262         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9263         table.
9264         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9265         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9266         Default_Value and Default_Component_Value
9267         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9268         New aspects Default_Value and Default_Component_Value
9269         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9270         * sprint.adb: Print N_Aspect_Specification node when called from gdb
9271
9272 2011-08-02  Vincent Celier  <celier@adacore.com>
9273
9274         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9275         inherit library kind.
9276
9277 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9278
9279         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9280         Minor reformatting.
9281
9282 2011-08-02  Robert Dewar  <dewar@adacore.com>
9283
9284         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9285
9286 2011-08-02  Yannick Moy  <moy@adacore.com>
9287
9288         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9289
9290 2011-08-02  Robert Dewar  <dewar@adacore.com>
9291
9292         * impunit.adb: Add comment.
9293
9294 2011-08-02  Yannick Moy  <moy@adacore.com>
9295
9296         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9297         qualification of aggregates in formal mode
9298         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9299         another aggregate
9300         (Resolve_Aggregate): complete the test that an aggregate is adequately
9301         qualified in formal mode
9302
9303 2011-08-02  Pascal Obry  <obry@adacore.com>
9304
9305         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9306         * mlib-prj.adb: Supress warning when compiling binder generated file.
9307         (Build_Library): Supress all warnings when compiling the binder
9308         generated file.
9309
9310 2011-08-02  Yannick Moy  <moy@adacore.com>
9311
9312         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9313         from here...
9314         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9315         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9316         Add with/use clauses to make Check_Formal_Restriction visible
9317
9318 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9319
9320         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9321         in-parameters when type of the generic formal is private in the generic
9322         spec and non-private in the body.
9323
9324 2011-08-02  Claire Dross  <dross@adacore.com>
9325
9326         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9327         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9328         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9329         * impunit.adb, Makefile.rtl: Take new files into account.
9330
9331 2011-08-02  Robert Dewar  <dewar@adacore.com>
9332
9333         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9334         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9335
9336 2011-08-02  Yannick Moy  <moy@adacore.com>
9337
9338         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9339         formal mode
9340         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9341         matching static array bounds, taking into account the special case of
9342         string literals
9343         * sem_ch3.adb: Typo in comment.
9344
9345 2011-08-02  Yannick Moy  <moy@adacore.com>
9346
9347         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9348         which issues an error in formal mode if its argument node is originally
9349         from source
9350         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9351         has a discriminant specification so that it does not include the case
9352         of derived types
9353         (Derived_Type_Declaration): move here the test that a derived type has a
9354         discriminant specification
9355         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9356         first element of a component association before accessing its choices
9357         (presence of component association is not enough)
9358         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9359         declaration is a library item before accessing the next element in a
9360         list, as library items are not member of lists
9361         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9362         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9363         Check_Formal_Restriction whenever possible.
9364
9365 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9366
9367         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9368         reference when needed.
9369
9370 2011-08-02  Bob Duff  <duff@adacore.com>
9371
9372         * gnat_ugn.texi: Fix typo.
9373
9374 2011-08-02  Vincent Celier  <celier@adacore.com>
9375
9376         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9377         archive file name. Do not use the full path name of archives for Open
9378         VMS.
9379
9380 2011-08-02  Robert Dewar  <dewar@adacore.com>
9381
9382         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9383         Analyze_Aspect_Specifications
9384         * sem_ch13.adb
9385         (Analyze_Aspect_Specifications): New handling for boolean aspects
9386         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9387         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9388         sequence for Analyze_Aspect_Specifications
9389         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9390         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9391
9392 2011-08-02  Robert Dewar  <dewar@adacore.com>
9393
9394         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9395         aspects, since these no longer exist.
9396
9397 2011-08-02  Robert Dewar  <dewar@adacore.com>
9398
9399         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9400         semicolon, do not try to see if there are aspects following it.
9401         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9402         aspect spec.
9403
9404 2011-08-02  Robert Dewar  <dewar@adacore.com>
9405
9406         * sem_ch8.adb, aspects.ads: Minor reformatting.
9407
9408 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
9409
9410         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9411         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9412         extracted from...
9413         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
9414
9415 2011-08-02  Yannick Moy  <moy@adacore.com>
9416
9417         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9418         mode on subprogram declaration outside of package specification, unless
9419         it is followed by a pragma Import
9420         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9421         Access_Type_Declaration): issue error in formal mode on access type
9422         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9423         incomplete type
9424         (Analyze_Object_Declaration): issue error in formal mode on object
9425         declaration which does not respect SPARK restrictions
9426         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9427         declaration which does not respect SPARK restrictions
9428         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9429         error in formal mode on digits or delta constraint
9430         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9431         decimal fixed point type
9432         (Derived_Type_Declaration): issue error in formal mode on derived type
9433         other than type extensions of tagged record types
9434         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9435         with check on access definition
9436         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9437         mode on protected definition.
9438         (Analyze_Task_Definition): issue error in formal mode on task definition
9439
9440 2011-08-02  Robert Dewar  <dewar@adacore.com>
9441
9442         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9443
9444 2011-08-02  Javier Miranda  <miranda@adacore.com>
9445
9446         * sem_ch6.adb (Can_Override_Operator): New function.
9447         (Verify_Overriding_Indicator): Add missing code to check overriding
9448         indicator in operators. Fixes regression.
9449         (Check_Overriding_Indicator): Minor reformating after replacing the
9450         code that evaluates if the subprogram can override an operator by
9451         invocations to the above new function.
9452         * einfo.adb
9453         (Write_Field26_Name): Add missing code to ensure that, following
9454         the documentation in einfo.ads, this field is not shown as attribute
9455         "Static_Initialization" on non-dispatching functions.
9456
9457 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9458
9459         * sem_res.adb (Resolve_Call): A call to
9460         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9461         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9462         i.e., when the second parameter is of type Time_Span.
9463
9464 2011-08-02  Vincent Celier  <celier@adacore.com>
9465
9466         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9467         with an archive instead of -L<library dir> -l<library name>.
9468
9469 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9470
9471         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9472         mark the base types In_Use in addition to making the operations
9473         use_visible.
9474
9475 2011-08-02  Ed Falis  <falis@adacore.com>
9476
9477         * init.c: add and setup __gnat_signal_mask for the exception signals
9478         * s-inmaop-vxworks.adb: new file.
9479         * s-intman-vxworks.adb: remove unnecessary initializations and
9480         simplify remaining
9481         * s-intman-vxworks.ads: remove unnecessary variable
9482         * s-taprop-vxworks.adb: simplify signal initialization
9483
9484 2011-08-02  Robert Dewar  <dewar@adacore.com>
9485
9486         * sem_ch8.adb: Minor code reorganization, comment updates.
9487
9488 2011-08-02  Robert Dewar  <dewar@adacore.com>
9489
9490         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9491         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9492         here from Sem_Res.
9493         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9494         (Matching_Static_Array_Bounds): Moved here from Sem_Res
9495
9496 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9497
9498         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9499         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9500         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9501         use_type_clauses, to handle more efficiently use_type and use_all_type
9502         constructs.
9503         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9504         Ada2012 Use_All_Type clause.
9505         (Use_Class_Wide_Operations): new procedure.
9506
9507 2011-08-02  Robert Dewar  <dewar@adacore.com>
9508
9509         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9510         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9511         expression to expression function.
9512
9513 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9514
9515         * sem_ch4.adb: transform simple Ada2012 membership into equality only
9516         if types are compatible.
9517
9518 2011-08-02  Yannick Moy  <moy@adacore.com>
9519
9520         * sem_res.adb (Matching_Static_Array_Bounds): new function which
9521         returns True if its argument array types have same dimension and same
9522         static bounds at each index.
9523         (Resolve_Actuals): issue an error in formal mode on actuals passed as
9524         OUT or IN OUT paramaters which are not view conversions in SPARK.
9525         (Resolve_Arithmetic_Op): issue an error in formal mode on
9526         multiplication or division with operands of fixed point types which are
9527         not qualified or explicitly converted.
9528         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9529         Boolean or array type (except String) operands.
9530         (Resolve_Equality_Op): issue an error in formal mode on equality
9531         operators for array types other than String with non-matching static
9532         bounds.
9533         (Resolve_Logical_Op): issue an error in formal mode on logical operators
9534         for array types with non-matching static bounds. Factorize the code in
9535         Matching_Static_Array_Bounds.
9536         (Resolve_Qualified_Expression): issue an error in formal mode on
9537         qualified expressions for array types with non-matching static bounds.
9538         (Resolve_Type_Conversion): issue an error in formal mode on type
9539         conversion for array types with non-matching static bounds
9540
9541 2011-08-02  Robert Dewar  <dewar@adacore.com>
9542
9543         * par-ch10.adb: Minor code reorganization (use Nkind_In).
9544
9545 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9546
9547         * par-ch9.adb: save location of entry for proper error message.
9548
9549 2011-08-02  Javier Miranda  <miranda@adacore.com>
9550
9551         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9552         (Use_Full_View) which permits this routine to climb through the
9553         ancestors using the full-view of private parents.
9554         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9555         Use_Full_View to true in calls to Is_Ancestor.
9556         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9557         true in call to Is_Ancestor.
9558         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9559         Use_Full_View to true in call to Is_Ancestor.
9560         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9561         call to Is_Ancestor.
9562         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9563         Use_Full_View to true in calls to Is_Ancestor.
9564         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9565         Make_Select_Specific_Data_Table, Register_Primitive,
9566         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9567         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9568         to true in call to Is_Ancestor.
9569         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9570         Use_Full_View to true in calls to Is_Ancestor.
9571         * exp_cg.adb
9572         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9573         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9574
9575 2011-08-02  Robert Dewar  <dewar@adacore.com>
9576
9577         * gnat_rm.texi: Minor reformatting.
9578         * sem_prag.adb: Minor reformatting.
9579
9580 2011-08-02  Tristan Gingold  <gingold@adacore.com>
9581
9582         * vms_data.ads: Add VMS qualifier for -gnateP.
9583
9584 2011-08-02  Robert Dewar  <dewar@adacore.com>
9585
9586         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9587         * par-ch7.adb (P_Package): Proper placement of aspects for package
9588         decl/instantiation.
9589         * par-endh.adb (Check_End): Ad Is_Sloc parameter
9590         (End_Statements): Add Is_Sloc parameterr
9591         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9592         (Check_End): Ad Is_Sloc parameter
9593         (End_Statements): Add Is_Sloc parameterr
9594
9595 2011-08-02  Vincent Celier  <celier@adacore.com>
9596
9597         * ug_words: Add VMS qualifier equivalent to -gnateP:
9598         /SYMBOL_PREPROCESSING.
9599
9600 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
9601
9602         * gnat-style.texi: For hexadecimal numeric literals the typical
9603         grouping of digits is 4 to represent 2 bytes.
9604         A procedure spec which is split into several lines is indented two
9605         characters.
9606
9607 2011-08-02  Yannick Moy  <moy@adacore.com>
9608
9609         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9610         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9611         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9612         properly qualified
9613         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9614         choice in array aggregate
9615         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9616         mark as ancestor
9617         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9618         positional and named aggregate for record, or others in record
9619         aggregate, or multiple choice in record aggregate
9620         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9621         array operands to logical operations AND, OR and XOR do not have the
9622         same static lower and higher bounds
9623         * sem_ch5.adb, sinfo.ads: Correct typos in comments
9624
9625 2011-08-01  Robert Dewar  <dewar@adacore.com>
9626
9627         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9628         Replaces Last_Source_Node_In_Sequence.
9629         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9630         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9631         parens and blank in string (this was inconsistently implemented).
9632         * errout.ads
9633         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9634         blank in string (this was inconsistently implemented).
9635         * gnat1drv.adb
9636         (Set_Global_Switches): Set formal mode switches appropriately
9637         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9638         * par-prag.adb
9639         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9640         call Set_Error_Msg_Lang to set "spark" as language name.
9641         * par.adb: Remove unnecessary call to set formal language for errout
9642         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9643         appropriately and call Set_Error_Msg_Lang to set "spark" as language
9644         name.
9645         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9646         calls to it, moved after resolution so that types are known
9647         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9648         result of concatenation is not of type String
9649         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9650         concatenation is not properly restricted
9651         * gnat_rm.texi: Add doc on pragma Spark_95.
9652         * gcc-interface/Makefile.in: Remove obsolete target pairs for
9653         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9654         * gcc-interface/Make-lang.in: Update dependencies.
9655
9656 2011-08-01  Javier Miranda  <miranda@adacore.com>
9657
9658         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9659         condition that detects if the overridden operation must replace an
9660         existing entity.
9661
9662 2011-08-01  Javier Miranda  <miranda@adacore.com>
9663
9664         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9665         code declarations inserted by Insert_Actions in each alternative of the
9666         N_Case_Expression node.
9667
9668 2011-08-01  Robert Dewar  <dewar@adacore.com>
9669
9670         * sem_ch6.adb: Minor code reorganization.
9671         * sem_util.adb: Minor reformatting.
9672
9673 2011-08-01  Pascal Obry  <obry@adacore.com>
9674
9675         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9676         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9677
9678 2011-08-01  Yannick Moy  <moy@adacore.com>
9679
9680         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9681         literal or operator symbol which is prefixed
9682         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9683         mode on access attributes.
9684         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9685         that concatenation operands are properly restricted in formal mode
9686         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9687         Analyze_Concatenation_Operand. Issue an error in formal mode if the
9688         result of the concatenation has a type different from String.
9689         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9690         Analyze_Quantified_Expression, Analyze_Slice,
9691         Analyze_Null): issue an error in formal mode on unsupported constructs
9692         * sem_ch5.adb
9693         (Analyze_Block_Statement): only issue error on source block statement
9694         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9695         function which returns the last node in a list of nodes for which
9696         Comes_From_Source returns True, if any
9697         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9698         Last_Source_Node_In_Sequence
9699         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9700         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9701         mode on unsupported constructs
9702         * sem_ch9.adb Do not return after issuing error in formal mode, as the
9703         rest of the actions may be needed later on since the error is marked as
9704         not serious.
9705         * sinfo.ads: Typos in comments.
9706
9707 2011-08-01  Pascal Obry  <obry@adacore.com>
9708
9709         * projects.texi: Minor editing.
9710
9711 2011-08-01  Yannick Moy  <moy@adacore.com>
9712
9713         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9714         insertion character ~~
9715         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9716         (Set_Error_Msg_Lang): new procedure which fixes the language for use
9717         with insertion character ~~
9718         (Set_Msg_Text): treat insertion character ~~
9719         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9720         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9721         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9722         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9723         errors related to the formal language restriction not serious
9724         (insertion character |).
9725         * par.adb (Par): set formal language for error messages if needed
9726         * sem_ch6.adb (Check_Missing_Return): take into account possible
9727         generated statements at the end of the function
9728         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9729         enumeration value to define a new pragma SPARK_95
9730         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9731         SPARK_Version): new type and variables to store the SPARK version
9732         (none by default).
9733         (SPARK_Mode): return True when SPARK_Version is set
9734         * par-prag.adb: Correct indentation
9735         (Prag): take Pragma_SPARK_95 into account
9736         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9737         into account.
9738
9739 2011-08-01  Robert Dewar  <dewar@adacore.com>
9740
9741         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9742         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9743         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9744
9745 2011-08-01  Pascal Obry  <obry@adacore.com>
9746
9747         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9748         Target_Name to Get_Path call.
9749         (Parse_Single_Project): Likewise.
9750         (Post_Parse_Context_Clause): Likewise.
9751         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9752         Call Initialise_Project_Path with the proper Target_Name.
9753         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9754         search path.
9755         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9756         with the proper Target_Name.
9757         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9758         Part.Parse routine.
9759         (Parse_Project_And_Apply_Config): Likewise.
9760         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9761         This is fine as this part of the code is supporting only native
9762         compilation.
9763         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9764         is fine as this part of the code is supporting only native compilation.
9765
9766 2011-08-01  Yannick Moy  <moy@adacore.com>
9767
9768         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9769         of homonym, unless the homonym is one of the cases allowed in SPARK
9770         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9771         package declaration occurring after a body.
9772
9773 2011-08-01  Robert Dewar  <dewar@adacore.com>
9774
9775         * checks.adb, exp_ch4.adb: Minor reformatting.
9776
9777 2011-08-01  Javier Miranda  <miranda@adacore.com>
9778
9779         * einfo.ads (Access_Disp_Table): Fix documentation.
9780         (Dispatch_Table_Wrappers): Fix documentation.
9781
9782 2011-08-01  Pascal Obry  <obry@adacore.com>
9783
9784         * prj-env.adb, prj-env.ads: Minor reformatting.
9785
9786 2011-08-01  Yannick Moy  <moy@adacore.com>
9787
9788         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9789         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9790         procedures out of these packages.
9791         * errout.ads, errout.adb
9792         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9793         procedures in of this package
9794         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9795         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9796         on misplaced later vs initial declarations, like in Ada 83
9797         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9798         formal mode on attribute of private type whose full type declaration
9799         is not visible
9800         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9801         package declaration inside a package specification
9802         (Analyze_Full_Type_Declaration): issue error in formal mode on
9803         controlled type or discriminant type
9804         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9805         user-defined operator means that it should come from the source
9806         (New_Overloaded_Entity): issue error in formal mode on overloaded
9807         entity.
9808         * sem_ch6.ads, sem_ch13.ads: typos in comments.
9809
9810 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9811
9812         * atree.adb: Minor reformatting.
9813         * checks.adb: Minor reformatting.
9814
9815 2011-08-01  Vincent Celier  <celier@adacore.com>
9816
9817         * s-parame-vms-ia64.ads: Fix typo in comment
9818         Minor reformatting
9819         * s-parame-vms-restrict.ads: Removed, unused.
9820
9821 2011-08-01  Javier Miranda  <miranda@adacore.com>
9822
9823         * exp_ch3.adb
9824         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9825         * sem_ch3.adb
9826         (Constrain_Index): Remove side effects in the evaluation of the bounds.
9827         * sem_ch3.ads, sem_ch3.adb
9828         (Is_Constant_Bound): New extended version of the subprogram that was
9829         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9830         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9831         * sem_aux.ads (Constant_Value): Fix typo in comment.
9832         * checks.adb (Generate_Index_Checks): New implementation which, for
9833         array objects with constant bounds, generates the runtime check
9834         referencing the bounds of the array type. For other cases this routine
9835         provides its previous behavior obtaining such values from the array
9836         object.
9837         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9838         parent type.
9839         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9840         we cannot have semantic interpretations of the new node.
9841
9842 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9843
9844         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9845         expressions.
9846
9847 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9848
9849         * sem_ch8.adb: Minor code editing.
9850         * s-vxwext.adb: Remove trailing space.
9851         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9852         consistency with other files.
9853
9854 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9855
9856         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9857
9858 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9859
9860         * par-ch10.adb: reject parameterized expressions as compilation unit.
9861         * sem_ch4.adb: handle properly conditional expression with overloaded
9862         then_clause and no else_clause.
9863
9864 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9865
9866         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9867         like done by System.Aux_DEC.
9868         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9869
9870 2011-08-01  Yannick Moy  <moy@adacore.com>
9871
9872         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9873         missing label at end of declaration (subprogram or package)
9874         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9875         of positional and named parameter association
9876         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9877         Error_Msg_SP which adds a prefix to the error message giving the name
9878         of the formal language analyzed
9879         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9880         access result type in subprogram, unconstrained array as result type,.
9881         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9882         procedure
9883         * sem_ch8.adb: Code clean up.
9884
9885 2011-08-01  Javier Miranda  <miranda@adacore.com>
9886
9887         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9888         * einfo.ads (Access_Disp_Table): Fix documentation.
9889         (Dispatch_Table_Wrappers): Fix documentation.
9890         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9891         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9892         to enforce the documentation of this attribute.
9893         (Set_Is_Interface): Cleanup the assertion.
9894         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9895         the Underlying_Type entity before reading attribute Access_Disp_Table.
9896         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9897         Locate the Underlying_Type before reading attribute Access_Disp_Table.
9898         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9899         the Underlying_Type entity before reading attribute Access_Disp_Table.
9900         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9901         Locate the Underlying_Type entity before reading attribute
9902         Access_Disp_Table.
9903
9904 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9905
9906         * s-poosiz.ads: Additional overriding indicators.
9907
9908 2011-08-01  Yannick Moy  <moy@adacore.com>
9909
9910         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9911         formal mode.
9912         (Analyze_Iteration_Scheme): issue error in formal mode when loop
9913         parameter specification does not include a subtype mark.
9914         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9915         formal mode on abstract subprogram.
9916         (Analyze_Subprogram_Specification): issue error in formal mode on
9917         user-defined operator.
9918         (Process_Formals): issue error in formal mode on access parameter and
9919         default expression.
9920         * sem_ch9.adb (Analyze_Abort_Statement,
9921         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9922         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9923         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9924         Analyze_Requeue, Analyze_Selective_Accept,
9925         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9926         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9927         issue error in formal mode on user-defined raise statement.
9928
9929 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9930
9931         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9932         declaration being hidden when overriding an implicit inherited
9933         subprogram.
9934         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9935         (-gnats), do not complain about a source file that contains only a
9936         pragma No_Body.
9937
9938 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9939
9940         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9941         variable if already set.
9942
9943 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9944
9945         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9946         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9947         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9948         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9949         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9950         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9951         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9952         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9953         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9954         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9955         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9956         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9957         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9958         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9959         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9960         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9961         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9962         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9963         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9964         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9965         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9966         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9967         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9968         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9969         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9970         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9971         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9972         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9973         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9974         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9975         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9976         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9977         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9978         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9979         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9980         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9981         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9982         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9983         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9984         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9985         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9986         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9987         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9988         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9989         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9990         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9991         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9992         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9993         s-osinte-mingw.ads: Update to GPLv3 run-time license.
9994         Use GNAT instead of GNARL.
9995
9996 2011-08-01  Bob Duff  <duff@adacore.com>
9997
9998         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9999         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10000         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10001         reformatting.
10002
10003 2011-08-01  Yannick Moy  <moy@adacore.com>
10004
10005         * debug.adb (d.D) reverve flag for the SPARK mode
10006         (d.E) reverve flag for SPARK generation mode
10007         (d.F) reverve flag for Why generation mode
10008         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10009         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
10010         functions which return True when the corresponding modes are set
10011         (Formal_Language): return "spark" or "alfa" when in formal verification
10012         mode.
10013         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10014         Error_Msg to prefix the error message with a tag giving the formal
10015         language
10016         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10017         message with a tag giving the formal language
10018         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10019         block statement
10020         (Analyze_Case_Statement): issue error in formal mode on case statement
10021         with a single "others" case alternative
10022         (Analyze_Exit_Statement): issue errors in formal mode on exit
10023         statements which do not respect SPARK restrictions
10024         (Analyze_Goto_Statement): issue error in formal mode on goto statement
10025         (Check_Unreachable_Code): always issue an error (not a warning) in
10026         formal mode on unreachable code (concerns both code after an infinite
10027         loop and after an unconditional jump, both not allowed in SPARK)
10028         * sem_ch6.adb (Analyze_Return_Statement): add call to
10029         Set_Return_Present for a procedure containing a return statement
10030         (already done for functions in Analyze_Function_Return)
10031         (Analyze_Function_Return): issue error in formal mode on extended
10032         return or if return is not last statement in function
10033         (Check_Missing_Return): issue error in formal mode if function does
10034         not end with return or if procedure contains a return
10035         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10036         function to detect if there is an inner scope of its parameter S which
10037         is a loop.
10038
10039 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10040
10041         * sem_ch6.ads: Minor reformatting.
10042
10043 2011-08-01  Javier Miranda  <miranda@adacore.com>
10044
10045         * sem_util.adb (Abstract_Interface_List): Complete condition when
10046         processing private type declarations to avoid reading unavailable
10047         attribute.
10048         (Is_Synchronized_Tagged_Type): Complete condition when processing
10049         private extension declaration nodes to avoid reading unavailable
10050         attribute.
10051
10052 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10053
10054         * sem_ch3.adb: Minor reformatting.
10055
10056 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10057
10058         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10059         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10060         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10061         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10062         for VMS, instead parametrize the common implementation with
10063         System.Parameters declarations.
10064
10065 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
10066
10067         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10068
10069 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10070
10071         * seh_init.c: Fix SEH handler installation on win64.
10072
10073 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10074
10075         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10076         double analysis of an anonymous access to subprogram, because it can
10077         lead to improper sharing of profiles and a back-end crash.
10078
10079 2011-08-01  Robert Dewar  <dewar@adacore.com>
10080
10081         * make.adb, sem_ch4.adb: Minor reformatting.
10082         * gcc-interface/Make-lang.in: Update dependencies.
10083         * sem_util.adb, exp_ch5.adb: Minor reformatting.
10084
10085 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10086
10087         * gnat_rm.texi: Fix definition of Long_Integer.
10088
10089 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10090
10091         * exp_aggr.adb: check limit size of static aggregate unconditionally,
10092         to prevent storage exhaustion.
10093         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10094         finalized is a function body, insert the cleanup code before the final
10095         return statement, to prevent spurious warnings.
10096         * s-pooglo.ads: add overriding indicator.
10097
10098 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10099
10100         * sem_ch4.adb (Operator_Check): improve error message when both a
10101         with_clause and a use_clause are needed to make operator usage legal.
10102         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10103         determine whether a compilation unit is visible within an other,
10104         either through a with_clause in the current unit, or a with_clause in
10105         its library unit or one one of its parents.
10106
10107 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10108
10109         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10110         over an arbitrary expression of an array or container type.
10111         * lib-xref.adb: clarify comment.
10112
10113 2011-08-01  Bob Duff  <duff@adacore.com>
10114
10115         * einfo.ads: Minor reformatting.
10116         * debug.adb: Minor comment improvement.
10117
10118 2011-08-01  Javier Miranda  <miranda@adacore.com>
10119
10120         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10121         consider hidden subprograms as valid candidates.
10122
10123 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
10124
10125         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10126
10127 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
10128
10129         * gnat_ugn.texi: Fix typo.
10130
10131 2011-08-01  Robert Dewar  <dewar@adacore.com>
10132
10133         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10134         lib-xref.adb: Minor reformatting
10135
10136 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10137
10138         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10139         when to generate a call to Move_Final_List.
10140         (Has_Controlled_Parts): Remove this function.
10141
10142 2011-08-01  Geert Bosch  <bosch@adacore.com>
10143
10144         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10145         "," in choice list.
10146
10147 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10148
10149         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10150         explicit raise of a predefined exception as Comes_From_Source if the
10151         original N_Raise_Statement comes from source.
10152
10153 2011-08-01  Robert Dewar  <dewar@adacore.com>
10154
10155         * sinfo.ads: Add comment.
10156         * sem_ch6.adb: Minor reformatting.
10157
10158 2011-08-01  Robert Dewar  <dewar@adacore.com>
10159
10160         * freeze.adb (Freeze_Entity): Refine check for bad component size
10161         clause to avoid rejecting confirming clause when atomic/aliased present.
10162
10163 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10164
10165         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10166         better determine whether an entity reference is a write.
10167         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10168         subcomponent.
10169         * lib-xref.adb (Output_References): Do no suppress a read reference at
10170         the same location as an immediately preceeding modify-reference, to
10171         handle properly in-out actuals.
10172
10173 2011-08-01  Tristan Gingold  <gingold@adacore.com>
10174
10175         * env.c (__gnat_setenv) [VMS]: Refine previous change.
10176
10177 2011-08-01  Quentin Ochem  <ochem@adacore.com>
10178
10179         * i-cstrin.adb (New_String): Changed implementation, now uses only the
10180         heap to compute the result.
10181
10182 2011-08-01  Robert Dewar  <dewar@adacore.com>
10183
10184         * atree.ads: Minor reformatting.
10185
10186 2011-08-01  Emmanuel Briot  <briot@adacore.com>
10187
10188         * g-expect.adb (Get_Command_Output): Fix memory leak.
10189
10190 2011-08-01  Geert Bosch  <bosch@adacore.com>
10191
10192         * cstand.adb (P_Float_Type): New procedure to print the definition of
10193         predefined fpt types.
10194         (P_Mixed_Name): New procedure to print a name using mixed case
10195         (Print_Standard): Use P_Float_Type for printing floating point types
10196         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10197         precision IEEE float.
10198
10199 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10200
10201         * sem_ch3.adb: Minor reformatting.
10202
10203 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10204
10205         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10206         the completion of a generic function, insert the new body rather than
10207         rewriting the original.
10208
10209 2011-08-01  Yannick Moy  <moy@adacore.com>
10210
10211         * sinfo.ads, errout.ads: Typos in comments.
10212
10213 2011-08-01  Robert Dewar  <dewar@adacore.com>
10214
10215         * par-endh.adb: Minor reformatting.
10216
10217 2011-08-01  Robert Dewar  <dewar@adacore.com>
10218
10219         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10220         (Pre_Post_Aspects): New subtype.
10221         * par-ch12.adb (P_Generic): New syntax for aspects in packages
10222         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10223         * par-ch7.adb (P_Package): Remove Decl parameter
10224         (P_Package): Handle new syntax for aspects (before IS)
10225         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10226         new aspect syntax
10227         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10228         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10229         (P_Package): Remove Decl parameter
10230         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10231         aspects
10232         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10233         specs
10234         * sem_util.ads, sem_util.adb (Static_Boolean): New function
10235         * sinfo.ads: Document new syntax for aspects in packages etc.
10236         * sprint.adb: Handle new syntax of aspects before IS in package
10237
10238 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10239
10240         * atree.ads: Minor reformatting.
10241         * sem_prag.adb: Minor reformatting.
10242
10243 2011-08-01  Robert Dewar  <dewar@adacore.com>
10244
10245         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10246         case expr alternative.
10247
10248 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10249
10250         * sem_ch12.adb: Fix typo.
10251
10252 2011-08-01  Geert Bosch  <bosch@adacore.com>
10253
10254         * sem_prag.adb (Check_No_Link_Name): New procedure.
10255         (Process_Import_Or_Interface): Use Check_No_Link_Name.
10256         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10257         instead of Standard_Long_Long_Float_Size global. Preparation for
10258         eventual removal of per type constants.
10259         * exp_util.ads (Get_Stream_Size): New function returning the stream
10260         size value of subtype E.
10261         * exp_util.adb (Get_Stream_Size): Implement new function.
10262         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10263         function.
10264         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10265         * einfo.adb:
10266         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10267
10268 2011-08-01  Geert Bosch  <bosch@adacore.com>
10269
10270         * cstand.adb: Fix comments.
10271         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10272         count of arguments.
10273
10274 2011-08-01  Robert Dewar  <dewar@adacore.com>
10275
10276         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10277
10278 2011-08-01  Geert Bosch  <bosch@adacore.com>
10279
10280         * atree.ads: Fix comment.
10281
10282 2011-08-01  Robert Dewar  <dewar@adacore.com>
10283
10284         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10285         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10286         * par.adb: Add with for Namet.Sp.
10287         * par-tchk.adb: Minor reformatting.
10288
10289 2011-08-01  Vincent Celier  <celier@adacore.com>
10290
10291         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10292         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10293         of the init procedure of a SAL.
10294         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10295         New procedure.
10296
10297 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10298
10299         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10300         reformatting.
10301
10302 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10303
10304         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10305
10306 2011-08-01  Thomas Quinot  <quinot@adacore.com>
10307
10308         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10309         conformant with its spec (return True only for types that have
10310         an overriding Initialize primitive operation that prevents them from
10311         having preelaborable initialization).
10312         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10313         initialization for controlled types in Ada 2005 or later mode.
10314
10315 2011-08-01  Robert Dewar  <dewar@adacore.com>
10316
10317         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10318         Postcondition.
10319         (Same_Aspect): New function.
10320         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10321         Type_Invariant, Precondition, Postcondition.
10322         * snames.ads-tmpl: Add Name_Type_Invariant.
10323
10324 2011-08-01  Robert Dewar  <dewar@adacore.com>
10325
10326         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10327         here.
10328         (Freeze_All_Ent): Fix error in handling inherited aspects.
10329         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10330         already analyzed, but don't skip entire processing of a declaration,
10331         that's wrong in some cases of declarations being rewritten.
10332         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10333         Don't delay for integer, string literals
10334         Treat predicates in usual manner for delay, remove special case code,
10335         not needed.
10336         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10337         (Build_Predicate_Function): Update saved expression in aspect
10338         (Build_Invariant_Procedure): Update saved expression in aspect
10339         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10340         of replacement of discriminant references if the reference is simple.
10341
10342 2011-08-01  Robert Dewar  <dewar@adacore.com>
10343
10344         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10345         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10346         Static_Predicate and Dynamic_Predicate.
10347         (Build_Predicate_Function): Add processing for Static_Predicate
10348         and Dynamic_Predicate.
10349         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10350         (From_Static_Predicate): New flag
10351         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10352
10353 2011-08-01  Robert Dewar  <dewar@adacore.com>
10354
10355         * usage.adb: Documentation cleanup for Ada version modes in usage.
10356         * expander.adb: Minor reformatting.
10357
10358 2011-08-01  Robert Dewar  <dewar@adacore.com>
10359
10360         * atree.ads: Minor comment fix.
10361         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10362         a-witeio.ads, sem_prag.adb: Minor reformatting.
10363
10364 2011-08-01  Doug Rupp  <rupp@adacore.com>
10365
10366         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10367         pointers. Use descrip.h header file for convenience. Add some
10368         comments.
10369
10370 2011-08-01  Robert Dewar  <dewar@adacore.com>
10371
10372         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10373         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10374         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10375         New procedure.
10376         (Check_Aspect_At_End_Of_Declarations): New procedure
10377         (Analye_Aspect_Specification): Minor changes for above procedures
10378         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10379         specification node as well.
10380
10381 2011-08-01  Pascal Obry  <obry@adacore.com>
10382
10383         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10384         Windows files. Use GetFilesAttributes() in this case to check for file
10385         existence instead of returning with an error code.
10386
10387 2011-08-01  Vincent Celier  <celier@adacore.com>
10388
10389         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10390         High is above Source length.
10391
10392 2011-08-01  Robert Dewar  <dewar@adacore.com>
10393
10394         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10395
10396 2011-08-01  Robert Dewar  <dewar@adacore.com>
10397
10398         * aspects.ads (Boolean_Aspects): New subtype.
10399         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10400         for derived types in cases where the parent type and derived type have
10401         aspects.
10402         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10403         with aspects when parent type also has aspects.
10404         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10405         boolean expression at this point).
10406         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10407         accordance with final decision on the Ada 2012 feature.
10408         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10409
10410 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10411
10412         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10413
10414 2011-08-01  Pascal Obry  <obry@adacore.com>
10415
10416         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10417         Fix Replace_Slice when High is above current string size.
10418         (Replace_Slice): Fix DL computation when High is above current
10419         string length.
10420
10421 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
10422
10423         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10424
10425 2011-08-01  Matthew Heaney  <heaney@adacore.com>
10426
10427         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10428         of node.
10429
10430 2011-08-01  Pascal Obry  <obry@adacore.com>
10431
10432         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10433         reformatting.
10434
10435 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10436
10437         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10438         access to protected subprograms in generic bodies.
10439         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10440         protected type, indicate that the convention of the subprogram is
10441         Convention_Protected, because it may be used in subsequent declarations
10442         within the protected declaration.
10443
10444 2011-08-01  Vincent Celier  <celier@adacore.com>
10445
10446         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10447         and "final" procedures when the name of the library is "ada", to avoid
10448         duplicate symbols "adainit" and "adafinal" in executables.
10449
10450 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
10451
10452         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10453         quantified expression that appears within a postcondition and uses the
10454         Ada2012 'Result attribute.
10455
10456 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10457
10458         * init.c (__gnat_error_handler): Cast reason to int.
10459         (__gnat_install_handler): Explain sa_sigaction use.
10460
10461 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10462
10463         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10464         subprogram has copy-in copy-out parameters, try to promote the mode of
10465         the return type if it is passed in registers.
10466
10467 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10468
10469         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10470         left operand as addressable.
10471
10472 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
10473
10474         * gcc-interface/gigi.h (build_function_stub): Remove.
10475         (build_return_expr): Likewise.
10476         (convert_vms_descriptor): Declare.
10477         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10478         (build_function_stub): Move to...
10479         * gcc-interface/utils2.c (build_return_expr): Move to...
10480         * gcc-interface/trans.c (build_function_stub): ...here.
10481         (build_return_expr): ...here.
10482         (Subprogram_Body_to_gnu): Add local variable for language_function.
10483         Disconnect the parameter attributes cache, if any, once done with it.
10484         Call end_subprog_body only after setting the end_locus.
10485         Build the stub associated with the function, if any, at the very end.
10486         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10487         variables and streamline control flow.
10488
10489 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
10490
10491         PR ada/49819
10492         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10493         g-trasym-dwarf.adb.
10494
10495 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10496
10497         PR bootstrap/49794
10498         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10499         Assign to act.sa_sigaction.
10500         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10501         current->return_address to char * before arithmetic.
10502
10503 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10504
10505         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10506         Correct argument types.
10507         Extract code from reason.
10508         (__gnat_install_handler): Assign to act.sa_sigaction.
10509
10510 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
10511
10512         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10513         (GNAT1_OBJS): ...here.
10514
10515 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
10516
10517         PR ada/48711
10518         * g-socthi-mingw.adb (Fill): Fix formatting.
10519
10520         * gcc-interface/gigi.h: Move around comment.
10521
10522 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
10523
10524         PR ada/46350
10525         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10526
10527 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
10528
10529         PR ada/48711
10530         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10531
10532 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
10533
10534         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10535         range comparison if Pmode is SImode.
10536
10537 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
10538             Eric Botcazou  <ebotcazou@adacore.com>
10539
10540         * adadecode.c: Wrap up in extern "C" block.
10541         * adadecode.h: Likewise.
10542         * adaint.c: Likewise.  Remove 'const' keyword.
10543         * adaint.h: Likewise.
10544         * argv.c: Likewise.
10545         * atree.h: Likewise.
10546         * cio.c: Likewise.
10547         * cstreams.c: Likewise.
10548         * env.c: Likewise.
10549         * exit.c: Likewise.
10550         * fe.h: Likewise.
10551         * final.c: Likewise.
10552         * init.c: Likewise.
10553         * initialize.c: Likewise.
10554         * link.c: Likewise.
10555         * namet.h: Likewise.
10556         * nlists.h: Likewise.
10557         * raise.c: Likewise.
10558         * raise.h: Likewise.
10559         * repinfo.h: Likewise.
10560         * seh_init.c: Likewise.
10561         * targext.c: Likewise.
10562         * tracebak.c: Likewise.
10563         * uintp.h: Likewise.
10564         * urealp.h: Likewise.
10565         * xeinfo.adb: Wrap up generated C code in extern "C" block.
10566         * xsinfo.adb: Likewise.
10567         * xsnamest.adb: Likewise.
10568         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10569         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10570         * gcc-interface/misc.c: Likewise.
10571         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10572         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
10573         ada/targext.o here...
10574         (GNAT_ADA_OBJS): ...and not here.
10575         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10576         (GNATBIND_OBJS): Reorder.
10577
10578 2011-07-07  Richard Henderson  <rth@redhat.com>
10579
10580         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10581         dwarf2out_frame_init.
10582
10583 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
10584
10585         * gcc-interface/misc.c (gnat_init): Tweak previous change.
10586
10587 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10588
10589         PR target/39150
10590         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10591
10592 2011-07-06  Richard Guenther  <rguenther@suse.de>
10593
10594         * gcc-interface/misc.c (gnat_init): Merge calls to
10595         build_common_tree_nodes and build_common_tree_nodes_2.
10596         Re-initialize boolean_false_node.
10597
10598 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
10599             Olivier Hainque  <hainque@adacore.com>
10600             Nicolas Setton  <setton@adacore.com>
10601
10602         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10603         the type according to the ARTIFICIAL_P parameter.
10604         (create_type_decl): Likewise.
10605         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10606
10607 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
10608
10609         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10610         (gnatbind): Likewise.
10611
10612 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10613
10614         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10615
10616 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10617
10618         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10619         local variable throughout.  Remove useless call to Base_Type.
10620         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10621         Take it also into account for the volatileness of the field.  Set the
10622         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
10623
10624 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10625
10626         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10627         on a dereference built for a by-ref object if it has an address clause.
10628
10629 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10630
10631         * einfo.ads (Address_Taken): Document use for the second argument of
10632         Asm_Input and Asm_Output attributes.
10633         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10634         argument is an entity name, then set Address_Taken on it.
10635         <Attribute_Asm_Output>: Likewise.
10636         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10637         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10638         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10639         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10640
10641 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
10642
10643         PR middle-end/46500
10644         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10645
10646 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
10647
10648         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10649         (ada/utils.o): Update dependencies.
10650         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10651         ../../../libcpp/libcpp.a.
10652         * gcc-interface/utils.c: Include common/common-target.h.
10653         (process_attributes): Use targetm_common.have_named_sections.
10654
10655 2011-06-07  Richard Guenther  <rguenther@suse.de>
10656
10657         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10658         set_sizetype.
10659
10660 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10661
10662         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10663         TREE_THIS_NOTRAP flag.
10664
10665 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10666
10667         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10668         Fix thinko.
10669
10670 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10671
10672         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10673         constants whose full view has discriminants specially.
10674
10675 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10676
10677         * gcc-interface/utils.c: Include diagnostic.h.
10678         (gnat_write_global_declarations): Output debug information for all
10679         global type declarations before finalizing the compilation unit.
10680         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10681
10682 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
10683
10684         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10685
10686 2011-05-25  Kai Tietz  <ktietz@redhat.com>
10687
10688         * adaint.c (__gnat_to_canonical_file_list_next): Use array
10689         initialization instead of const/none-const pointer assignment.
10690
10691 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
10692
10693         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10694         $(EXTRA_GNAT1_OBJS).
10695         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10696         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10697         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10698         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10699         libcommon-target.a instead of prefix.o.
10700
10701 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
10702
10703         PR ada/49097
10704         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10705
10706 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
10707
10708         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10709         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10710         instead of version.o.
10711
10712 2011-05-18  Kai Tietz <ktietz@redhat.com>
10713
10714         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10715         boolean_false_node instead of integer_zero_node.
10716         (convert_with_check): Likewise.
10717         * gcc-interface/decl.c (choices_to_gnu): Likewise.
10718
10719 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
10720
10721         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10722         type of the parameter is an unconstrained array, convert the actual to
10723         the type of the formal in the In Out and Out cases as well.
10724
10725 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10726
10727         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10728         call build_function_type_array or build_varargs_function_type_array
10729         instead.
10730         (create_subprog_type): Don't call build_function_type; call
10731         build_function_type_vec instead.
10732
10733 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
10734
10735         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10736         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10737         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10738
10739 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
10740
10741         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10742
10743         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10744         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10745
10746 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
10747
10748         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10749
10750 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
10751
10752         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10753         instead of accessing TYPE_ARG_TYPES directly.
10754         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10755
10756 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
10757
10758         PR ada/48844
10759         * gcc-interface/gigi.h (get_variant_part): Declare.
10760         * gcc-interface/decl.c (get_variant_part): Make global.
10761         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10762         types have the same constant size, are record types and T1 has a
10763         variant part while T2 doesn't.
10764
10765 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
10766
10767         * gcc-interface/utils.c (begin_subprog_body): Do not call
10768         get_pending_sizes.
10769         (end_subprog_body): Likewise.
10770
10771 2011-05-04  Richard Guenther  <rguenther@suse.de>
10772
10773         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10774         int_const_binop.
10775         (pos_to_constructor): Likewise.
10776
10777 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
10778             Eric Botcazou  <ebotcazou@adacore.com>
10779
10780         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10781         of build_function_type.  Adjust calls to...
10782         (build_raise_check): ...this.  Do not take a void_tree parameter.
10783         Call build_function_type_list instead of build_function_type.
10784         Fix head comment and swap couple of conditional blocks.
10785
10786 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
10787
10788         * gnatvsn.ads (Library_Version): Bump to 4.7.
10789         (Current_Year): Bump to 2011.
10790
10791 2011-04-29  Michael Matz  <matz@suse.de>
10792
10793         * gcc-interface/misc.c (gnat_handle_option): Set
10794         warn_maybe_uninitialized.
10795
10796 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
10797
10798         * gnat_ugn.texi (Complexity Metrics Control): Update link to
10799         the Watson/McCabe paper.
10800
10801 2011-04-23  Jim Meyering  <meyering@redhat.com>
10802
10803         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10804
10805 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10806
10807         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10808         onto the new type.
10809
10810 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
10811
10812         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10813         parameter.
10814         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
10815         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10816         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10817         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10818         <all>: Do not set flags on the reused DECL node coming from an alias.
10819         Set DECL_IGNORED_P on the DECL node built for subprograms if they
10820         don't need debug info here...
10821         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10822         (gigi): Adjust calls to create_subprog_decl.
10823         (build_raise_check): Likewise.
10824         (establish_gnat_vms_condition_handler): Likewise.
10825         (Compilation_Unit_to_gnu): Likewise.
10826         (gnat_to_gnu): Likewise.
10827
10828 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
10829
10830         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10831         (NO_REORDER_ADAFLAGS): New variable.
10832         (EXTRA_GNATTOOLS): Always define.
10833         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10834         Clean up and adjust list of files compiled with special options.
10835         * gcc-interface/Make-lang.in: Likewise.
10836         (ada/decl.o): Cosmetical change.
10837         (ada/misc.o): Remove dependency on $(PLUGIN_H).
10838
10839 2011-04-20  Jim Meyering  <meyering@redhat.com>
10840
10841         * initialize.c (__gnat_initialize): Remove useless if-before-free.
10842
10843 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
10844
10845         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10846         $(CFLAGS) on the link line.
10847
10848 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
10849
10850         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10851         padded type built for the return type if it is unconstrained.
10852
10853 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
10854
10855         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10856
10857 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
10858
10859         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10860         before calling TREE_CHAIN.
10861         * gcc-interface/misc.c (gnat_init_ts): New function.
10862         (LANG_HOOKS_INIT_TS): Define.
10863
10864 2011-04-12  Martin Jambor  <mjambor@suse.cz>
10865
10866         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10867         instead of cgraph_node.
10868
10869 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10870
10871         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10872         alignment on fields of the RETURN type built for the Copy-In Copy-Out
10873         mechanism.
10874
10875 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
10876
10877         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10878         of aggregate types that contain a placeholder.
10879
10880 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
10881
10882         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10883         TYPE_ARG_TYPES.
10884         (handle_type_generic_attribute): Likewise.
10885
10886 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
10887
10888         PR ada/47163
10889         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10890
10891 2011-04-04  Kai Tietz  <ktietz@redhat.com>
10892
10893         PR ada/47163
10894         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10895         to flag value.
10896
10897 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10898
10899         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10900         type case, do not strip a padding type around the array type.
10901
10902 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10903
10904         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10905         types.
10906
10907 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10908
10909         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10910         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10911         code for -feliminate-unused-debug-types.
10912         (gnat_post_options): Likewise.
10913
10914 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10915
10916         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10917         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10918         distinct copy.
10919
10920 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10921
10922         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10923         DECL_ARTIFICIAL flag on enumeration types.
10924
10925 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10926
10927         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10928         fat pointer types artificial unconditionally.
10929         <E_Array_Subtype>: Attach the base array type as a parallel type if it
10930         isn't artificial.
10931
10932 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10933
10934         * gcc-interface/gigi.h (get_dummy_type): Declare.
10935         (build_dummy_unc_pointer_types): Likewise.
10936         (finish_fat_pointer_type): Likewise.
10937         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10938         fat pointer type has been built, complete it in place.
10939         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10940         and thin pointers.  Remove useless variable.
10941         (finish_fat_pointer_type): Make global and move to...
10942         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10943         (get_dummy_type): New function.
10944         (build_dummy_unc_pointer_types): Likewise.
10945         (gnat_pushdecl): Propage the name to the anonymous variants only.
10946         (update_pointer_to): Only adjust the pointer types in the unconstrained
10947         array case.
10948
10949 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10950
10951         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10952         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10953         if this is a Taft amendment type and the full declaration is available.
10954         * gcc-interface/trans.c (process_type): Likewise.
10955         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10956         (process_freeze_entity): Likewise.
10957         * gcc-interface/utils.c (dummy_global): New static variable.
10958         (gnat_write_global_declarations): If there are types declared as used
10959         at the global level, insert them in the global hash table.
10960
10961 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10962
10963         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10964         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10965         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10966         copy.
10967         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
10968         flag of the type accordingly.
10969         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10970
10971 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
10972
10973         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10974         finalizing types when updating the pointers to the designated type.
10975         <all>: Finalize the deferred types even if we didn't defer processing
10976         of incomplete types in this invocation.
10977
10978 2011-04-01  Olivier Hainque  <hainque@adacore.com>
10979             Nicolas Setton  <setton@adacore.com>
10980             Eric Botcazou  <ebotcazou@adacore.com>
10981
10982         * gcc-interface/misc.c (gnat_descriptive_type): New function.
10983         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10984
10985 2011-03-28  Kai Tietz  <ktietz@redhat.com>
10986
10987         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10988         Windows targets.
10989         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10990         * system-mingw.ads (System): Change ZCX_By_Default default to True.
10991
10992         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10993
10994 2011-03-28  Tristan Gingold  <gingold@adacore.com>
10995
10996         PR ada/44431
10997         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10998         Use ada output of gnatbind.
10999         (ada/b_gnatb.adb): Ditto.
11000         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11001         (ada.mostlyclean, ada.stage1)
11002         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11003         (ada.stagefeedback): Adjust.
11004         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11005         Use ada output of gnatbind.
11006         (b_gnatm.adb): Ditto.
11007         (b_gnatl.o, b_gnatm.o): New rules.
11008
11009 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11010
11011         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11012         for the padded type built to support a specified size or alignment.
11013
11014 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11015
11016         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11017         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11018         unconditionally to the end of the unit when the designated type is
11019         limited_with'ed.
11020         <all>: Rename local variable.  Attempt to un-defer types only and do it
11021         for limited_with'ed types as well.
11022         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
11023         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11024         consistently and remove redundant call to finalize_from_with_types.
11025
11026 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
11027
11028         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11029         subprograms without a previous spec declared in the same unit.
11030         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11031         subprograms at the end of the unit instead of at the beginning.
11032         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11033         isn't public for the special handling of non-inline functions nested
11034         inside inline external functions.
11035
11036 2011-03-25  Jeff Law  <law@redhat.com>
11037
11038         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11039
11040 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11041
11042         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11043         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11044         to compute Set_Size_Depends_On_Discriminant.
11045         (Layout_Type): Call it on array types in back-end layout mode.
11046         * sem_util.adb (Requires_Transient_Scope): Return true for array
11047         types only if the size depends on the value of discriminants.
11048         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11049         type if the RHS is a call to a function that returns an unconstrained
11050         type with default discriminant.
11051
11052 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
11053
11054         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11055         non-conversion to the nominal result type at the end.
11056
11057 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11058
11059         * gcc-interface/trans.c (create_temporary): New function taken from...
11060         (create_init_temporary): ...here.  Call it.
11061         (call_to_gnu): Create the temporary for the return value early, if any.
11062         Create it for a function with copy-in/copy-out parameters if there is
11063         no target; in other cases of copy-in/copy-out, use another temporary.
11064         Push the new binding level lazily.  Add and rename local variables.
11065
11066 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11067
11068         * gcc-interface/decl.c (validate_size): Improve comments and tweak
11069         error message.
11070         (set_rm_size): Likewise.
11071
11072 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
11073
11074         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11075         for the padded type built in order to support a specified alignment.
11076         Fix incorrect formatting.
11077
11078 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11079
11080         PR bootstrap/48216
11081         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11082
11083 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11084
11085         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11086         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11087         to the end of the list.  Adjust recursive call.  Rename local variable.
11088         If REORDER is true, reorder components of the record type.
11089         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11090         components_to_record and adjust the parameter list.
11091
11092 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
11093
11094         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11095         disabled, use the variable for bounds of loop iteration scheme.
11096
11097 2011-03-21  Kai Tietz  <ktietz@redhat.com>
11098
11099         PR target/12171
11100         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11101
11102 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11103
11104         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11105         out whether the expression is read-only.  Short-circuit placeholder
11106         case and rename a couple of local variables.
11107
11108 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
11109
11110         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11111         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11112         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11113         (convert): Deal with conversions from a smaller form type specially.
11114
11115 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
11116
11117         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11118         its argument, except for the special -I- switch.
11119
11120 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
11121
11122         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11123         "Ada Issues".
11124
11125 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
11126
11127         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11128
11129 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
11130
11131         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11132         GNAT_FORMAL.
11133         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11134         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
11135         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
11136         Do not generate the check directly, instead instantiate the template
11137         check present in the descriptor.
11138         (make_descriptor_field): Move around.
11139         (build_vms_descriptor32): Build a template check in the POINTER field.
11140         (build_vms_descriptor): Remove useless suffixes.
11141         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11142
11143 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
11144
11145         PR bootstrap/47467
11146         * targext.c: Include target files if IN_RTS is defined.
11147
11148 2011-01-26  Richard Guenther  <rguenther@suse.de>
11149
11150         PR bootstrap/47467
11151         * targext.c: Include config.h.
11152         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11153         dependency.
11154
11155 2011-01-04  Pascal Obry  <obry@adacore.com>
11156             Eric Botcazou  <ebotcazou@adacore.com>
11157
11158         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11159
11160 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11161
11162         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11163         end-of-case on the end label and its associated gotos, if any.
11164
11165 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11166
11167         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11168         expressions of the parameter cache within the statement group of
11169         the CICO mechanism.
11170
11171 2011-01-04  Olivier Hainque  <hainque@adacore.com>
11172             Eric Botcazou  <ebotcazou@adacore.com>
11173
11174         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11175         (set_end_locus_from_node): New function.
11176         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11177         make and the function end_locus.
11178         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11179         for the elaboration subprogram.
11180         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11181         set the end_locus of the expression as well.
11182
11183 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
11184
11185         PR ada/47131
11186         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11187         variables that are referenced in exception handlers volatile.
11188
11189
11190 \f
11191 Copyright (C) 2011 Free Software Foundation, Inc.
11192
11193 Copying and distribution of this file, with or without modification,
11194 are permitted in any medium without royalty provided the copyright
11195 notice and this notice are preserved.