OSDN Git Service

09f342334e11a8cbf4a42e3d92abfb93c1681137
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-08-04  Yannick Moy  <moy@adacore.com>
2
3         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4         entities whose body contains an Annotate pragma which forces formal
5         proof on this body.
6         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
8         Mark_Non_ALFA_Subprogram to pass in a message and node.
9         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
10         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
11         surrounding subprogram.
12         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
13         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
14         as not in ALFA is annotated with Formal_Proof being On, then an error
15         is issued based on the additional parameters for message and node.
16         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
17         * gcc-interface/Make-lang.in: Update dependencies.
18
19 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
20
21         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
22         Finalize_Address when CodePeer is enabled.
23
24 2011-08-04  Pascal Obry  <obry@adacore.com>
25
26         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
27         the latter returns a pointer to a static buffer which is deallocated
28         at the end of the routine.
29
30 2011-08-04  Yannick Moy  <moy@adacore.com>
31
32         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
33         after index creation; mark unconstrained base array type generated as
34         being in/not in ALFA as well
35         (Make_Index): mark subtype created as in/not in ALFA
36         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
37         over a loop as in/not in ALFA, depending on its type and form of loop
38         iteration.
39
40 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
41
42         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
43         directly to False on .NET and JVM.
44
45 2011-08-04  Yannick Moy  <moy@adacore.com>
46
47         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
48         constraint that subtype must come from source code to be in ALFA, so
49         that anonymous subtypes can be in ALFA too.
50
51 2011-08-04  Yannick Moy  <moy@adacore.com>
52
53         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
54         reference for ALFA mode.
55         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
56         procedure public so as to use it from formal verification back-end.
57
58 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
59
60         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
61         invalid checks of the Parameter, making Remove_Switch not working
62         correctly.
63
64 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
65
66         * targparm.ads: Update header: no run-time exception is needed on this
67         file.
68
69 2011-08-04  Vincent Celier  <celier@adacore.com>
70
71         * a-fihema.adb: Use System.IO instead of GNAT.IO
72
73 2011-08-04  Thomas Quinot  <quinot@adacore.com>
74
75         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
76         are forbidden in Compiler_Unit mode.
77
78 2011-08-04  Robert Dewar  <dewar@adacore.com>
79
80         * sem_util.adb: Minor reformatting.
81
82 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
83
84         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
85         library-level finalizers.
86         (Gen_Finalize_Library_C): Update the import string for library-level
87         finalizers.
88         (Gen_Finalize_Library_Defs_C): Update the definition name of a
89         library-level finalizer.
90         * exp_ch7.adb: Remove with and use clauses for Stringt.
91         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
92         Spec_Decl. Add local variable Body_Id. The names of library-level
93         finalizers are now manually fully qualified and are no longer external.
94         A single name is now capable of servicing .NET, JVM and non-VM targets.
95         Pragma Export is no longer required to provide visibility for the name.
96         (Create_Finalizer_String): Removed.
97         (New_Finalizer_Name): New routine which mimics New_..._Name.
98
99 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
100
101         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
102         elaboration counter to Standard_Short_Integer.
103         * sem_util.adb (Build_Elaboration_Entity): Likewise.
104         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
105         (Gen_Elab_Externals_C): Likewise.
106
107 2011-08-04  Ed Falis  <falis@adacore.com>
108
109         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
110         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
111         system-vxworks-mips.ads, system-vxworks-x86.ads
112         (Always_Compatible_Rep): set to False for all VxWorks targets.
113
114 2011-08-04  Robert Dewar  <dewar@adacore.com>
115
116         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
117         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
118         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
119         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
120         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
121         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
122         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
123         Minor reformatting and code reorganization.
124
125 2011-08-04  Emmanuel Briot  <briot@adacore.com>
126
127         * projects.texi: Added doc for aggregate projects.
128
129 2011-08-04  Emmanuel Briot  <briot@adacore.com>
130
131         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
132         Add support for overriding the Project_Path in aggregate projects.
133
134 2011-08-04  Robert Dewar  <dewar@adacore.com>
135
136         * a-cofove.ads: Minor reformatting.
137
138 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
139
140         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
141         on the generated code.
142         (Build_Finalize_Statements): Update the comment on the generated code.
143         (Build_Initialize_Statements): Update the comment on the generated code.
144         (Build_Object_Declarations): Add local variable Result. The object
145         declarations are now built in sequence.
146         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
147         RE_Unit_Table.
148
149 2011-08-04  Robert Dewar  <dewar@adacore.com>
150
151         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
152
153 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
154
155         * einfo.ads (Elaboration_Entity): Document new definition and use.
156         (Elaboration_Entity_Required): Adjust to above change.
157         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
158         * exp_ch12.adb: And with and use for Snames.
159         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
160         * exp_util.adb (Set_Elaboration_Flag): Likewise.
161         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
162         <Check_Unit_Name>: Deal with N_Expanded_Name.
163         <Attribute_Elaborated>: Extend to all unit names.
164         * sem_elab.adb: And with and use for Uintp.
165         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
166         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
167         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
168         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
169         from Gen_Adainit_Ada.
170         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
171         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
172         case, do not call System.Standard_Library.Adafinal; instead call
173         finalize_library if needed.
174         (Gen_Adafinal_C): Likewise.
175         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
176         non-main program case.
177         (Gen_Adainit_C): Generate a couple of external declarations here.
178         In the main program case, set SSL.Finalize_Library_Objects.
179         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
180         (Gen_Elab_Calls_C): Likewise.
181         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
182         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
183         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
184         objects here.
185         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
186         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
187         Gen_Adafinal_Ada.
188         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
189         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
190         of external declarations.  Call Gen_Finalize_Library_C.
191
192 2011-08-04  Emmanuel Briot  <briot@adacore.com>
193
194         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
195         Compute_Compilation_Phases): new subprogram.
196         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
197         The number of mains as well as the various compilation phases that
198         need to be run are now project tree specific, since various
199         aggregated trees might have different requirements. In particular,
200         they do not all require bind or link phases.
201
202 2011-08-04  Emmanuel Briot  <briot@adacore.com>
203
204         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
205         (Project_Tree_Appdata): New type.
206         It is now possible to associate application-specific data to a project
207         tree. In particular, this is used in the gprbuild builder to avoid a
208         number of global tables and htables, especially now that there can be
209         several project trees loaded at once because of aggregate projects.
210         (Debug_Name): new procedure.
211         * projects.texi: Clarify syntax of "**" for Source_Dirs
212
213 2011-08-03  Emmanuel Briot  <briot@adacore.com>
214
215         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
216         the "roots" for a main.
217         (Fill_From_Project): add support for aggregate projects. Main units
218         in aggregated projects are now automatically added in the list of
219         files to build (although this fails later on in gprbuild, because
220         these files are not using the root proejct tree, so this needs
221         further cleanup)
222         * gcc-interface/Make-lang.in: Update dependencies.
223
224 2011-08-03  Yannick Moy  <moy@adacore.com>
225
226         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
227         conditional expression in ALFA.
228         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
229         expressions as not in ALFA.
230
231 2011-08-03  Robert Dewar  <dewar@adacore.com>
232
233         * a-cofove.adb: Minor reformatting.
234
235 2011-08-03  Emmanuel Briot  <briot@adacore.com>
236
237         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
238         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
239         gprbuild sources.
240         These packages are more logically placed in the Queue package, since
241         they manipulate the queue. It is also likely that they can be adapted
242         for gnatmake, thus sharing more code.
243         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
244         that we could move the above.
245
246 2011-08-03  Emmanuel Briot  <briot@adacore.com>
247
248         * errutil.adb (Finalize): clean up the list of error messages on exit.
249         Calling this subprogram multiple times will no longer show duplicate
250         error messages on stderr.
251
252 2011-08-03  Emmanuel Briot  <briot@adacore.com>
253
254         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
255         Getopt_Switches when we have already define a command line
256         configuration.
257
258 2011-08-03  Yannick Moy  <moy@adacore.com>
259
260         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
261         in ALFA. Instead, they are considered as assertions to prove.
262         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
263         nodes as not in ALFA. Instead, include conditional expressions in ALFA
264         if they have no ELSE part, or if they occur in pre- and postconditions,
265         where the Condition cannot have side-effects in ALFA
266         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
267         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
268         Instead, include type conversion between scalar types in ALFA.
269         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
270         if-and-only-if its type is in ALFA.
271
272 2011-08-03  Thomas Quinot  <quinot@adacore.com>
273
274         * scos.adb, get_scos.adb, put_scos.adb
275         New code letter for decisions: G (entry guard)
276         * par_sco.adb
277         (Traverse_Subprogram_Body): Rename to...
278         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
279         (Traverse_Protected_Body): New subprogram
280         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
281         protected bodies and entry bodies.
282
283 2011-08-03  Yannick Moy  <moy@adacore.com>
284
285         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
286         entities with get/set subprograms, which is set on procedure entities
287         generated by the compiler for a postcondition.
288         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
289         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
290         entity for a declaration
291         (Get_Unique_Entity_For_Decl): new function returning an entity which
292         represents a declaration, so that matching spec and body have the same
293         entity.
294
295 2011-08-03  Robert Dewar  <dewar@adacore.com>
296
297         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
298         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
299
300 2011-08-03  Yannick Moy  <moy@adacore.com>
301
302         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
303         library-level because retriction No_Implicit_Dynamic_Code in the
304         front-end prevents its definition as a local subprogram
305         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
306         for reuse in other contexts
307         (Traverse_Declarations_Or_Statements,
308         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
309         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
310         procedures take a callback parameter to be called on all declarations
311         * lib-xref.ads
312         (Traverse_All_Compilation_Units): new generic function to traverse a
313         compilation unit and call a callback parameter on all declarations
314
315 2011-08-03  Javier Miranda  <miranda@adacore.com>
316
317         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
318         in Java since they are always enclosed in a namespace that
319         differentiates them, and overloaded entities are supported by the VM.
320
321 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
322
323         * checks.adb (Determine_Range): If a computed bound of an operation is
324         outside the range of the base type of the expression, and overflow
325         checks are enabled, the result is unknown and cannot be used for any
326         subsequent constant folding.
327         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
328         unknown, so is the result of the comparison.
329
330 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
331
332         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
333         From_Abort. When finalization was triggered by an abort, propagate
334         Standard'Abort_Signal rather than Program_Error.
335         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
336         From_Abort.
337         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
338         From_Abort. When finalization was triggered by an abort, propagate
339         Standard'Abort_Signal rather than Program_Error.
340         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
341         From_Abort.
342         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
343         Abort_Id. Update the calls to Build_Object_Declarations and
344         Build_Raise_Statement to include Abort_Id.
345         (Build_Adjust_Statements): New local variable Abort_Id. Update the
346         calls to Build_Object_Declarations and Build_Raise_Statement to include
347         Abort_Id.
348         (Build_Finalize_Statements): New local variable Abort_Id. Update the
349         calls to Build_Object_Declarations and Build_Raise_Statement to include
350         Abort_Id.
351         (Build_Components): Create an entity for Abort_Id when exceptions are
352         allowed on the target.
353         (Build_Finalizer): New local variable Abort_Id.
354         (Build_Initialize_Statements): New local variable Abort_Id. Update the
355         calls to Build_Object_Declarations and Build_Raise_Statement to include
356         Abort_Id.
357         (Build_Object_Declarations): Add new formal Abort_Id. Create the
358         declaration of flag Abort_Id to preserve the original abort status
359         before finalization code is executed.
360         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
361         runtime routine Raise_From_Controlled_Operation.
362         (Create_Finalizer): Update the call to Build_Raise_Statement to include
363         Abort_Id. Update the call to Build_Object_Declarations to include
364         Abort_Id. Update the layout of the finalizer body.
365         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
366         (Process_Transient_Objects): New local variable Abort_Id. Remove the
367         clunky code to create all flags and objects related to
368         exception propagation and replace it with a call to
369         Build_Object_Declarations. Update the call to Build_Raise_Statement to
370         include Abort_Id.
371         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
372         Add new formal Abort_Id and associated comment on its use.
373         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
374         on its use.
375         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
376         Remove the clunky code to create all flags and objects related to
377         exception propagation and replace it with a call to
378         Build_Object_Declarations. Update the call to Build_Raise_Statement.
379
380 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
381
382         * s-tassta.adb: Fix minor typos.
383
384 2011-08-03  Robert Dewar  <dewar@adacore.com>
385
386         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
387         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
388
389 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
390
391         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
392         to packages. This ensures that the finalizer body will not end up
393         inside the freeze node.
394         (Process_Declarations): Add code to detect whether a freeze node has a
395         nested finalization collection.
396
397 2011-08-03  Pascal Obry  <obry@adacore.com>
398
399         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
400         (Current_Session): Return a not null access to Session_Type.
401         (Default_Session): Likewise.
402
403 2011-08-03  Robert Dewar  <dewar@adacore.com>
404
405         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
406         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
407
408 2011-08-03  Pascal Obry  <obry@adacore.com>
409
410         * g-awk.ads: Minor comment fix.
411
412 2011-08-03  Sergey Rybin  <rybin@adacore.com>
413
414         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
415         the tree structure related to discriminant constraints.
416         Original_Discriminant cannot be used any more for computing the
417         defining name for the reference to a discriminant.
418
419 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
420
421         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
422         function is not visibly tagged, this is not a dispatching call and
423         therfore is not Tag_Indeterminate, even if the function is marked as
424         dispatching on result.
425
426 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
427
428         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
429         (Expand_N_Free_Statement): Add a guard to protect against run-times
430         which do not support controlled types.
431         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
432         against run-times which do not support controlled types.
433         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
434         against run-times which do not support controlled types.
435         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
436         against run-times which do not support controlled types.
437         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
438         protect against run-times which do not support controlled types.
439
440 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
441
442         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
443         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
444
445 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
446
447         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
448         modified in the source, to prevent spurious warnings when compiling
449         with -gnatg.
450
451 2011-08-03  Thomas Quinot  <quinot@adacore.com>
452
453         * a-except-2005.adb: Minor reformatting.
454
455 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
456
457         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
458         is a renaming declaration in the private part of a package, do not emit
459         a warning that the with_clause could be moved because the renaming may
460         be used in the body or in a child unit.
461
462 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
463
464         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
465         Propagate the Comes_From_Source attribute from the original return
466         object to the renaming.
467
468 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
469
470         * exp_ch7.adb (Build_Raise_Statement): Do not call
471         Raise_From_Controlled_Operation when this routine is not present in
472         the run-time library.
473         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
474         libraries (Ravenscar), tasks are non-terminating, and protected objects
475         and tasks can only appear at library level, so we do not want
476         finalization of protected objects nor tasks.
477         * exp_intr.adb: Minor clarification in comment.
478         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
479         Gen_Output_File_C): Remove references to finalization of library-level
480         objects when using restricted run-time libraries.
481
482 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
483
484         * sem_ch3.adb (Build_Discriminant_Constraints): Set
485         Original_Discriminant only if the parent type is a generic formal.
486
487 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
488
489         * exp_ch13.adb: Add with and use clause for Targparm;
490         (Expand_N_Free_Statement): Prevent the generation of a custom
491         Deallocate on .NET/JVM targets since this requires pools and address
492         arithmetic.
493         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
494         .NET/JVM targets, attach the newly allocated object to the access
495         type's finalization collection. Do not generate a call to
496         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
497         exist in the runtime.
498         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
499         create a custom Allocate for object that do not require initialization.
500         Attach a newly allocated object to the access type's finalization
501         collection on .NET/JVM.
502         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
503         assignment of controlled types on .NET/JVM. The two hidden pointers
504         Prev and Next and stored and later restored after the assignment takes
505         place.
506         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
507         kludge for .NET/JVM to recognize a particular piece of code coming from
508         Heap_Management and change the call to Finalize into Deep_Finalize.
509         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
510         finalization collections on .NET/JVM only for types derived from
511         Controlled. Separate the association of storage pools with a collection
512         and only allow it on non-.NET/JVM targets.
513         (Make_Attach_Call): New routine.
514         (Make_Detach_Call): New routine.
515         (Process_Object_Declarations): Suppress the generation of
516         build-in-place return object clean up code on .NET/JVM since it uses
517         pools.
518         * exp_ch7.ads (Make_Attach_Call): New routine.
519         (Make_Detach_Call): New routine.
520         * exp_intr.adb Add with and use clause for Targparm.
521         (Expand_Unc_Deallocation): Detach a controlled object from a collection
522         on .NET/JVM targets.
523         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
524         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
525         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
526         names used in finalization.
527
528 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
529
530         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
531         (Attach, Detach): Lock the current task when chaining an object onto a
532         collection.
533
534 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
535
536         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
537         Rewritten to create the message strings when the exception is not
538         raised by an abort during finalization.
539         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
540         Raise_From_Controlled_Operation and update its associated comment.
541         * a-fihema.ads, a-fihema.adb: New GNAT unit.
542         Ada.Finalization.Heap_Management provides key functionality
543         associated with controlled objects on the heap, their creation,
544         finalization and reclamation. Type Finalization_Collection is
545         effectively a wrapper which sits ontop of a storage pool and performs
546         all necessary bookkeeping for all the objects it contains. Each
547         access-to-controlled or access-to-class-wide type receives a collection
548         as part of its expansion. The compiler generates buffer code and
549         invokes Allocate / Deallocate to create and destroy allocated
550         controlled objects.
551         * a-finali.adb ("="): Removed.
552         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
553         fields Prev and Next.
554         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
555         A library unit with at least one controlled object on the library level
556         has a special finalizer which is invoked by the binder. To signal this,
557         ali files carry field PF.
558         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
559         associated comment on field usage.
560         * a-tags.adb (Get_RC_Offset): Removed.
561         (Needs_Finalization): New routine.
562         * a-tags.ads: Update the structure of the GNAT dispatch tables.
563         Dispatch tables now carry field Needs_Finalization which provides
564         runtime indication whether a type is controlled or has controlled
565         components or both. Remove field RC_Offset.
566         (Get_RC_Offset): Removed along with its associated pragma Export.
567         Since tagged types with controlled components no longer carry hidden
568         field _controller, the special mechanism to retrieve its location is no
569         longer needed.
570         (Needs_Finalization): New routine.
571         * atree.ads, atree.adb (Elist24): New routine.
572         (Set_Elist24): New routine.
573         * atree.h: Add a define clause for Elist24.
574         * bindgen.adb New library-level variable Lib_Final_Built.
575         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
576         presence of a VM target, the routine generates calls to the proper
577         library finalization routine.
578         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
579         targets. Set the correct library finalization routine depending on
580         whether the library has controlled objects or this is a VM compilation.
581         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
582         to library-level finalizers of compiled units in reverse order of
583         elaboration. It also produces exception management code and reraises a
584         potential exception after all units have been finalized.
585         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
586         library-level finalizers of compiled units in reverse order of
587         elaboration.
588         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
589         definitions of all library-level finalizers available to the compilation
590         (Gen_Main_Ada): Directly call Adafinal which now contails all target
591         dependent code.
592         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
593         System.Standard_Library.Adafinal directly. If the library needs
594         finalization actions, create the sequence of finalization calls.
595         (Gen_Output_File_Ada): Alphabetize local variables and constants.
596         Generate a with clause for System.Soft_Links when compiling for a VM.
597         Remove the code which imports System.Standard_Library.Adafinal as
598         Do_Finalize. Generate the library finalization routine.
599         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
600         If the library needs finalization actions, create all the definitions
601         of library- level finalizers.
602         (Has_Finalizer): New routine. Determines whether at least one compiled
603         unit has a library-level finalizer.
604         Add type Qualification_Mode.
605         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
606         * einfo.adb: New usage of field 15 as Return_Flag.
607         Remove Finalization_Chain_Entity from the usages of field 19.
608         Remove Associated_Final_Chain from the usages of field 23.
609         New usage of field 23 as Associated_Collection.
610         New usage of field 24 as Finalizer.
611         New usage of flag 252 as Is_Processed_Transient.
612         (Associated_Final_Chain): Removed.
613         (Associated_Collection): New routine.
614         (Finalization_Chain_Entity): Removed.
615         (Finalizer): New routine.
616         (Is_Finalizer): New routine.
617         (Is_Processed_Transient): New routine.
618         (Return_Flag): New routine.
619         (Set_Associated_Final_Chain): Removed.
620         (Set_Associated_Collection): New routine.
621         (Set_Finalization_Chain_Entity): Removed.
622         (Set_Finalizer): New routine.
623         (Set_Is_Processed_Transient): New routine.
624         (Set_Return_Flag): New routine.
625         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
626         displayed flags.
627         (Write_Field8_Name): Alphabetize the output.
628         (Write_Field11_Name): Alphabetize the output.
629         (Write_Field12_Name): Alphabetize the output.
630         (Write_Field13_Name): Alphabetize the output.
631         (Write_Field14_Name): Alphabetize the output.
632         (Write_Field15_Name): Alphabetize the output.
633         (Write_Field16_Name): Alphabetize the output.
634         (Write_Field17_Name): Alphabetize the output.
635         (Write_Field18_Name): Alphabetize the output.
636         (Write_Field19_Name): Alphabetize the output. Remove the output of
637         Finalization_Chain_Entity.
638         (Write_Field20_Name): Alphabetize the output.
639         (Write_Field21_Name): Alphabetize the output.
640         (Write_Field22_Name): Alphabetize the output.
641         (Write_Field23_Name): Alphabetize the output. Remove the output of
642         Associated_Final_Chain. Add output for Associated_Collection.
643         (Write_Field24_Name): Alphabetize the output.
644         (Write_Field25_Name): Add output for Finalizer.
645         (Write_Field26_Name): Alphabetize the output.
646         (Write_Field27_Name): Alphabetize the output.
647         (Write_Field28_Name): Alphabetize the output.
648         * einfo.ads: Add new field description for Associated_Collection and
649         its uses in nodes.
650         Remove Associated_Final_Chain and its uses in nodes.
651         Remove Finalization_Chain_Entity and its uses in nodes.
652         Add new field description for Finalizer and its uses in nodes.
653         Add new synthesized attribute Is_Finalizer.
654         Add new flag description for Is_Processed_Transient and its uses in
655         nodes.
656         Add new field description for Return_Flag and its uses in nodes.
657         (Associated_Final_Chain): Removed along with its pragma Inline.
658         (Associated_Collection): New routine and pragma Inline.
659         (Finalization_Chain_Entity): Removed along with its pragma Inline.
660         (Finalizer): New routine and pragma Inline.
661         (Is_Finalizer): New routine and pragma Inline.
662         (Is_Processed_Transient): New routine and pragma Inline.
663         (Return_Flag): New routine and pragma Inline.
664         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
665         (Set_Associated_Collection): New routine and pragma Inline.
666         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
667         (Set_Finalizer): New routine and pragma Inline.
668         (Set_Is_Processed_Transient): New routine and pragma Inline.
669         (Set_Return_Flag): New routine and pragma Inline.
670         * exp_aggr.adb: Alphabetize subprograms.
671         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
672         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
673         associated comments. Remove local variables External_Final_List and
674         Attach.
675         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
676         Ancestor. Remove the retrieval of finalization lists. Update the call to
677         Make_Adjust_Call.
678         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
679         lists. Update the call to Late_Expansion.
680         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
681         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
682         (Gen_Assign): Remove the retrieval of the finalization list used to
683         build the assignment. Update the calls to Make_Init_Call and
684         Make_Adjust_Call.
685         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
686         Remove the mechanism to determine attachment levels and finalization
687         list retrieval. Remove the processing for coextensions.
688         (Init_Controller): Removed. Controllers no longer exist.
689         (Late_Expansion): Remove formals Flist and Obj along with their
690         associated comments. Update the calls to Build_Record_Aggr_Code and
691         Build_Array_Aggr_Code.
692         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
693         (Expand_N_Freeze_Entity): Add special processing for finalizers which
694         appear in entry bodies, protected subprograms and task bodies.
695         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
696         * exp_ch3.adb (Add_Final_Chain): Removed.
697         (Build_Array_Init_Proc): Alphabetize local variables.
698         (Build_Assignment): Alphabetize local variables. Update the call to
699         Maked_Adjust_Call.
700         (Build_Class_Wide_Master): Rename local variables to better reflect
701         their role.
702         (Build_Discriminant_Assignments): Code reformatting.
703         (Build_Init_Call_Thru): Code reformatting.
704         (Build_Init_Procedure): Code reformatting. Generate a special version
705         of Deep_Finalize which is capable of finalizing all initialized
706         components and ignore the rest.
707         (Build_Init_Statements): Rename local variables to better reflect their
708         role.
709         Reimplement the mechanism to include the creation and update of an index
710         variable called a "counter". It is used as a bookmark for tracing
711         initialized and non-initialized components.
712         (Build_Initialization_Call): Remove local variable Controller_Typ.
713         Alphabetize all local variables. Remove the initialization of the
714         record controller and update the call to Make_Init_Call.
715         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
716         New local variable Counter.
717         (Constrain_Array): Alphabetize.
718         (Expand_Freeze_Array_Type): Create a collection instead of a
719         finalization list.
720         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
721         Finalize_Address which is used in conjunction with allocated controlled
722         objects.
723         (Expand_N_Object_Declaration): Remove the creation of a finalization
724         list for anonymous access types. Update the calls to Make_Init_Call and
725         Make_Adjust_Call.
726         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
727         retrieval of finalization lists. Remove the expansion of the record
728         controller. Create TSS primitive Finalize_Address used in conjunction
729         with controlled objects on the heap. Create finalization collections
730         for access-to-controlled record components.
731         (Expand_Record_Controller): Removed.
732         (Freeze_Type): Remove the freezing of record controllers. Freezing of
733         class-wide types now requires additional processing. Create
734         finalization collections for access-to-controlled types.
735         (Increment_Counter): New routine.
736         (Make_Counter): New routine.
737         (Make_Eq_If): Remove the mention of Name_uController.
738         (Make_Predefined_Primitive_Specs): There is no longer need to skip
739         types coming from System.Finalization_Root.
740         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
741         (Predefined_Primitive_Bodies): There is no longer need to skip types
742         coming from System.Finalization_Root.
743         (Stream_Operation_OK): Do not generate stream routines for
744         type Ada.Finalization.Heap_Management.Finalization_Collection.
745         * exp_ch3.ads: Alphabetize subprograms.
746         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
747         Add with and use clause for Lib.
748         (Complete_Coextension_Finalization): Removed.
749         (Complete_Controlled_Allocation): New routine. Create a finalization
750         collection for anonymous access-to-controlled types. Create a custom
751         Allocate which interfaces with the back end and the machinery in
752         Heap_Management.
753         (Expand_Allocator_Expression): Add necessary calls to
754         Complete_Controlled_Allocation. Remove the retrieval of finalization
755         lists. Update the calls to Make_Adjust_Call. Generate a call to
756         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
757         the associated collection.
758         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
759         Code clean up. Remove the retrieval of finalization lists and
760         attachment levels.
761         Update the call to Make_Init_Call. Generate a call to
762         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
763         the associated collection.
764         (Get_Allocator_Final_List): Removed. Finalization lists are not
765         available.
766         (Suitable_Element): Remove the mention of Name_uController.
767         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
768         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
769         the left hand side, carry out the assignment and adjust the left hand
770         side.
771         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
772         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
773         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
774         BIP_Collection and BIPcollection.
775         (Build_Heap_Allocator): New routine used to allocate the return object
776         of a build-in-place function onto a collection.
777         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
778         (Expand_Call): Do not replace direct calls to Deep routines with their
779         aliases.
780         (Expand_N_Extended_Return_Statement): Give all variables shorter names
781         and update their occurrences. Add a special return flag to monitor the
782         [ab]normal execution of the function. The flag is set right before the
783         return statement.
784         Rewrite the mechanism used to allocate a build-in-place return object
785         on the heap or on a storage pool.
786         (Is_Direct_Deep_Call): New routine.
787         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
788         build-in-place function call instead of a final list. Build a call to
789         Set_Finalize_Address_Ptr to decorate the associated collection.
790         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
791         order to name the build-in-place function call's result for later
792         finalization. Add a collection to a build-in-place function call
793         instead of a final list.
794         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
795         build-in-place function call instead of a final list. Remove the code
796         which moves one final list and transforms it into the actual in a
797         nested build-in-place call.
798         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
799         build-in-place function call instead of a final list.
800         (Move_Final_List): Removed.
801         (Needs_BIP_Collection): New routine.
802         (Needs_BIP_Final_List): Removed.
803         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
804         enumeration type BIP_Formal_Kind.
805         Update the related comment.
806         (Needs_BIP_Collection): New routine.
807         (Needs_BIP_Final_List): Removed.
808         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
809         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
810         majority of subprograms in this unit. Add Name_Finalize_Address to
811         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
812         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
813         statements for an array type.
814         (Build_Adjust_Statements): Create the adjust statements for a record
815         type.
816         (Build_Cleanup_Statements): New routine. A procedure which given any
817         construct containing asynchronous calls, references to _master, or is a
818         task body, a task allocation or a protected body produces the necessary
819         runtime calls to clean up these constructs.
820         (Build_Exception_Handler): New routine.
821         (Build_Final_List): Removed.
822         (Build_Finalization_Collection): New routine. A core procedure which
823         creates a collection to service heap allocated controlled objects
824         associated with an access-to-controlled type.
825         (Build_Finalize_Statements): Create the finalization statements for a
826         record types.
827         (Build_Finalizer): New routine. A core procedure which given any
828         construct with declarations and/or statements detects all objects which
829         need any type of clean up (controlled objects, protected objects) and
830         generates all necessary code to clean up the said objects in the proper
831         order.
832         (Build_Finalizer_Call): New routine.
833         (Build_Initialize_Statements): Create the initialization statements for
834         an array type. The generated routine contains code to finalize partially
835         initialized arrays.
836         (Build_Object_Declarations): New routine.
837         (Build_Raise_Statement): New routine.
838         (Clean_Simple_Protected_Objects): Removed.
839         (Controller_Component): Removed.
840         (Enclosing_Function): New routine.
841         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
842         either declarations or statements or both.
843         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
844         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
845         package.
846         (Find_Final_List): Removed.
847         (Global_Flist_Ref): Removed.
848         (In_Finalization_Root): Removed.
849         (Insert_Actions_In_Scope_Around): Determine the range of the transient
850         scope in terms of tree nodes. Process all transient variables within
851         that range.
852         (Make_Adjust_Call): Rewritten. There is no longer an attach call
853         generated after the adjust.
854         (Make_Attach_Call): Removed.
855         (Make_Call): New routine.
856         (Make_Clean): Removed.
857         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
858         build routines.
859         (Make_Deep_Proc): Rewritten to generate the new profile signature used
860         in Deep routines.
861         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
862         build routines.
863         (Make_Final_Call): Modified to simply create a call to either
864         Deep_Finalize or Finalize.
865         (Make_Finalize_Address_Body): New routine.
866         (Make_Finalize_Address_Stmts): New routine. A function which produces
867         TSS primitive Finalize_Address used in conjunction with heap allocated
868         controlled objects.
869         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
870         (Make_Init_Call): Rewritten. There is no longer an attach call
871         generated after initialization.
872         (Make_Local_Deep_Finalize): New routine.
873         (Make_Set_Finalize_Address_Ptr_Call): New routine.
874         (Make_Transient_Block): Remove the finalization list retrieval and
875         manipulation.
876         (Needs_Finalization): Moved to Exp_Util.
877         (Parent_Field_Type): New routine.
878         (Preprocess_Components): New routine.
879         (Process_Transient_Objects): New routine.
880         (Wrap_HSS_In_Block): New routine.
881         (Wrap_Transient_Declaration): Remove finalization list management and
882         controller insertion.
883         (Wrap_Transient_Expression): Code reformatting.
884         (Wrap_Transient_Statement): Code reformatting.
885         * exp_ch7.ads (Build_Final_List): Removed.
886         (Build_Finalization_Collection): New routine.
887         (Build_Raise_Statement): New routine.
888         (Controller_Component): Removed.
889         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
890         (Find_Final_List): Removed.
891         (In_Finalization_Root): Removed.
892         (Is_Simple_Protected_Type): Update related comment.
893         (Make_Adjust_Call): New parameter profile and associated comments.
894         (Make_Attach_Call): Removed.
895         (Make_Final_Call): New parameter profile and associated comments.
896         (Make_Finalize_Address_Body): New routine.
897         (Make_Init_Call): New parameter profile and associated comments.
898         (Make_Local_Deep_Finalize): New routine.
899         (Make_Set_Finalize_Address_Ptr_Call): New routine.
900         (Needs_Finalization): Moved to Exp_Util.
901         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
902         (Expand_N_Protected_Body): Remove the handling of finalization lists.
903         (Find_Protection_Type): Moved to Exp_Util.
904         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
905         (Make_DT): Update sequence of dispatch table initialization. Remove the
906         initialization of field RC_Offset. Add initialization of field Needs_
907         Finalization.
908         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
909         Reimplement how an object is first finalized, then deallocated.
910         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
911         Code reformatting.
912         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
913         Register TSS_Finalize_Address with type TSS_Names.
914         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
915         procedure provides the interface between an allocation / deallocation
916         and the support machinery in Ada.Finalization.Heap_Management.
917         (Find_Init_Call): Code reformatting.
918         (Find_Init_Call_In_List): Code reformatting.
919         (Find_Protection_Type): Moved from Exp_Ch9.
920         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
921         (Has_Controlled_Coextensions): Removed.
922         (Has_Controlled_Objects): New routine.
923         (In_Library_Level_Package_Body): New routine.
924         (Insert_Action_After): New routine.
925         (Is_Finalizable_Transient): New routine. This predicate determines
926         whether an object declaration is one of the many variants of controlled
927         transients.
928         (Is_Null_Access_BIP_Func_Call): New routine.
929         (Is_Non_BIP_Func_Call): New routine.
930         (Is_Related_To_Func_Return): New routine.
931         (Needs_Finalization): Moved from Exp_Ch7.
932         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
933         (Find_Protection_Type): Moved from Exp_Ch9.
934         (Has_Controlled_Coextensions): Removed.
935         (Has_Controlled_Objects): New routine.
936         (In_Library_Level_Package_Body): New routine.
937         (Insert_Action_After): New routine.
938         (Is_Finalizable_Transient): New routine.
939         (Is_Null_Access_BIP_Func_Call): New routine.
940         (Is_Non_BIP_Func_Call): New routine.
941         (Is_Related_To_Func_Return): New routine.
942         (Needs_Finalization): Moved from Exp_ch7.
943         * expander.adb (Expand): Add a case for N_Free_Statement.
944         * freeze.adb (Freeze_All): Replace the generation of a finalization
945         list with a collection for access-to-controlled types.
946         (Freeze_Entity): Code reformatting.
947         (Freeze_Record_Type): Remove the freezing of a record controller
948         component.
949         (Freeze_Subprogram): Code reformatting.
950         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
951         finalization list.
952         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
953         has a library-level finalizer.
954         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
955         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
956         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
957         files. Add a-fihema to the list of object files.
958         * par-ch4.adb:
959         Alphabetize the associations in type Is_Parameterless_Attribute.
960         * rtsfind.ads: Ada.Finalization_List.Controller and
961         System.Finalization_Implementation are no longer a GNAT unit.
962         Update the range of type Ada_Finalization_Child. Remove the following
963         recoverable entities:
964         
965            RE_Attach_To_Final_List
966            RE_Deep_Tag_Attach
967            RE_Finalize_List
968            RE_Finalize_One
969            RE_Finalizable_Ptr_Ptr
970            RE_Global_Final_List
971            RE_Limited_Record_Controller
972            RE_List_Controller
973            RE_Move_Final_List
974            RE_Record_Controller
975            RE_Simple_List_Controller
976         
977         Add the following recoverable entities:
978         
979            RE_Add_Offset_To_Address
980            RE_Allocate
981            RE_Base_Pool
982            RE_Deallocate
983            RE_Exception_Identity
984            RE_Finalization_Collection
985            RE_Finalization_Collection_Ptr
986            RE_Needs_Finalization
987            RE_Save_Library_Occurrence
988            RE_Set_Finalize_Address_Ptr
989            RE_Set_Storage_Pool_Ptr
990            RE_Storage_Count
991         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
992         Name_uController.
993         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
994         (First_Stored_Discriminant): Remove the mention of Name_uController.
995         * sem_aux.ads: Comment reformatting.
996         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
997         to redecorate an already existing class-wide type.
998         (Decorate_Tagged_Type): New parameter profile and associated comment.
999         Create a "shadow class-wide type" for a shadow entity.
1000         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
1001         of the final chain along with the associated comment.
1002         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
1003         Full_Desig and set it to the full view of the designated type.
1004         Initialize the finalization collection to empty.
1005         (Build_Derived_Record_Type): Alphabetize local variables. Code
1006         reformatting.
1007         (Collect_Fixed_Components): Remove the mention of Name_uController.
1008         (Create_Constrained_Components): Remove the mention of Name_uController.
1009         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
1010         class-wide type of a shadow entity.
1011         (Process_Full_View): Update the machinery which marks type
1012         Limited_Controlled's entity as limited.
1013         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
1014         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
1015         list, instead make a collection build-in-place formal.
1016         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
1017         a designated type in order to establish a match between the renaming
1018         and the renamed entity.
1019         (Find_Selected_Component): Add guard to prevent spurious exceptions
1020         from being raised on .NET/JVM.
1021         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
1022         to the list of primitive that need special processing. Update arrays
1023         C_Names and D_Names.
1024         (Replace_Types): Handle class-wide types.
1025         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
1026         different parameter profile, look at the first formal.
1027         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
1028         use clauses for Exp_Util.
1029         * sem_res.adb: Remove with and use clauses for Elists.
1030         (Propagate_Coextensions): Removed.
1031         (Resolve_Allocator): Do not propagate the list of coextensions from one
1032         allocator to another.
1033         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
1034         Deaccessed_T to Desig_Typ.
1035         (Enter_Name): Remove the mention of Name_uController.
1036         (Gather_Components): Remove the mention of Name_uController.
1037         (Incomplete_Or_Private_View): New routine.
1038         (Is_Coextension_Root): Removed.
1039         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
1040         * sem_util.ads (Incomplete_Or_Private_View): New routine.
1041         (Is_Coextension_Root): Removed.
1042         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
1043         Controlled types are now derived from a null tagged record. Remove
1044         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
1045         * sinfo.adb (Coextensions): Removed.
1046         (Set_Coextensions): Removed.
1047         * sinfo.ads: Remove Coextensions from the explanation of node fields
1048         and its uses in nodes.
1049         Update the field usage of N_Allocator.
1050         (Coextensions): Removed along with its pragma Inline.
1051         (Set_Coextensions): Removed along with its pragma Inline.
1052         * snames.ads-tmpl: Remove names
1053         
1054           Name_uClean
1055           Name_uController
1056           Name_uFinal_List
1057           Name_uLocal_Final_List
1058           Name_Finalization_Root
1059           Name_Next
1060           Name_Prev
1061         
1062         Add names
1063         
1064           Name_uFinalizer
1065           Name_Finalize_Address
1066         * s-pooglo.adb (Allocate): Add overriding indicator.
1067         (Deallocate): Add overriding indicator.
1068         (Storage_Size): Add overriding indicator.
1069         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
1070         than Finalize_Global_List.
1071         (Null_Finalize_Global_List): Removed.
1072         (Save_Library_Occurrence): New routine.
1073         * s-soflin.ads: Remove variable Finalize_Global_List along with its
1074         initialization. Add variable Finalize_Library_Objects along with its
1075         pragma Export. Add variables Library_Exception and
1076         Library_Exception_Set along with their pragma Export.
1077         (Null_Finalize_Global_List): Removed.
1078         (Save_Library_Occurrence): New routine.
1079         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
1080         rather than Finalize_Global_List.
1081         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
1082         of the constructed node.
1083
1084 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1085
1086         * link.c: Include "auto-host.h" before system headers.
1087
1088 2011-08-03  Vincent Celier  <celier@adacore.com>
1089
1090         * make.adb (Gnatmake): Add to table Library_Projs only library projects
1091         that are not extended. Do not check if a library project that is
1092         extended should be regenerated. Do not add to table Library_Paths the
1093         libraries that are in extended projects. Link only with libraries that
1094         are in libray projects that are not extended.
1095         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
1096         for a library project that is extended.
1097
1098 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
1099
1100         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
1101         conforming subprogram renamings that appear to be completions if they
1102         are not fully conformant.
1103         Such renamings are homographs but not completions.
1104         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
1105         names in a subprogram renaming that appears in an instance.
1106
1107 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1108
1109         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
1110         not immutably limited, build actual subtype from expression to provide
1111         proper bounds to caller.
1112
1113 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
1114
1115         * sem_ch8.adb: Minor comment correction.
1116
1117 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1118
1119         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
1120         returning a limited array, use an extended return statement.
1121
1122 2011-08-03  Vincent Celier  <celier@adacore.com>
1123
1124         * make.adb (Initialize): If --subdirs= is used, but no project file is
1125         specified, attempt to create the specify subdir if it does not already
1126         exist and use it as the object directory as if -D had been specified.
1127
1128 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
1129
1130         * s-tpopsp-vms.adb: New file.
1131         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
1132         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
1133
1134 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1135
1136         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
1137         package.
1138
1139 2011-08-03  Yannick Moy  <moy@adacore.com>
1140
1141         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
1142         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
1143         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
1144         detect that an array has static bounds.
1145
1146 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1147
1148         * exp_dist.adb: Minor reformatting.
1149
1150 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
1151
1152         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
1153         (ATCB_Key): Removed, not always used.
1154
1155 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1156
1157         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
1158         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
1159         most remaining global variables.
1160
1161 2011-08-03  Robert Dewar  <dewar@adacore.com>
1162
1163         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
1164         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
1165         reformatting.
1166
1167 2011-08-03  Javier Miranda  <miranda@adacore.com>
1168
1169         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
1170         that must be passed by copy in VM targets.
1171
1172 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1173
1174         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
1175         duplicates a similar htable now in the project tree.
1176
1177 2011-08-03  Claire Dross  <dross@adacore.com>
1178
1179         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
1180         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
1181         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
1182         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
1183         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
1184         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
1185         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
1186         update.
1187
1188 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
1189
1190         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
1191         (ATCB_Key): Removed, not always used.
1192         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
1193         s-taprop-posix.adb.
1194         * s-tpopsp-tls.adb: New file.
1195         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
1196         x86/x64/ia64/powerpc/sparc Linux.
1197
1198 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
1199
1200         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
1201         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
1202
1203 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1204
1205         * rtsfind.ads, exp_dist.adb, exp_dist.ads
1206         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
1207         Fix type selection for mapping integer types to PolyORB types.
1208
1209 2011-08-03  Bob Duff  <duff@adacore.com>
1210
1211         * sem_ch7.adb: Minor comment clarification.
1212
1213 2011-08-03  Bob Duff  <duff@adacore.com>
1214
1215         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
1216         an error analyzing a choice, skip further processing. Further
1217         processing could cause a crash or cascade errors.
1218
1219 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1220
1221         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
1222         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
1223         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
1224         prj-env.ads (Shared_Project_Tree_Data): new type
1225         An aggregate project and its aggregated trees need to share the common
1226         data structures used for lists of strings, packages,... This makes the
1227         code simpler since otherwise we have to pass the root tree (also used
1228         for the configuration file data) in addition to the current project
1229         tree. This also avoids ambiguities as to which tree should be used.
1230         And finally this saves a bit of memory.
1231         (For_Every_Project_Imported): new parameter Tree.
1232         Since aggregated projects are using a different tree, we need to let
1233         the caller know which tree to use to manipulate the returned project.
1234
1235 2011-08-03  Robert Dewar  <dewar@adacore.com>
1236
1237         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
1238         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
1239         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
1240         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
1241
1242 2011-08-03  Javier Miranda  <miranda@adacore.com>
1243
1244         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
1245         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
1246
1247 2011-08-03  Bob Duff  <duff@adacore.com>
1248
1249         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
1250         the Base_Type.
1251
1252 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
1253
1254         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
1255         g-sehash.ads: Fix typo. Update header.
1256
1257 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1258
1259         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
1260         expansion.
1261
1262 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
1263
1264         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
1265         prefixes of private types along with records, since the selector may be
1266         a discriminant.
1267         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
1268         private types along with records, since the selector may be a
1269         discriminant.
1270
1271 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1272
1273         * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
1274
1275 2011-08-03  Javier Miranda  <miranda@adacore.com>
1276
1277         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
1278         Tagged_Type_Expansion.
1279
1280 2011-08-03  Yannick Moy  <moy@adacore.com>
1281
1282         * sem_res.adb
1283         (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
1284         concatenation is the name of a constant
1285
1286 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1287
1288         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
1289         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
1290         (Process_Declarative_Items): new parameter Child_Env.
1291
1292 2011-08-03  Yannick Moy  <moy@adacore.com>
1293
1294         * alfa.ads Update format of ALFA section in ALI file in order to add a
1295         mapping from bodies to specs when both are present
1296         (ALFA_Scope_Record): add components for spec file/scope
1297         * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
1298         * lib-xref-alfa.adb
1299         (Collect_ALFA): after all scopes have been collected, fill in the spec
1300          information when relevant
1301         * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
1302         present.
1303
1304 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
1305
1306         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
1307         code unit to decide whether to add internally generated subprograms.
1308         
1309 2011-08-03  Javier Miranda  <miranda@adacore.com>
1310
1311         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
1312         * exp_ch9.adb
1313         (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
1314         in VM targets.
1315
1316 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1317
1318         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
1319         code with Makeutl.Get_Switches.
1320         * prj-tree.adb: Update comment.
1321
1322 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1323
1324         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
1325         subprogram with a limited formal that does not support external
1326         streaming.
1327
1328 2011-08-03  Yannick Moy  <moy@adacore.com>
1329
1330         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
1331         continuation line
1332         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
1333         not from current unit in two phases, because it is not possible to
1334         change the table while iterating over its content.
1335         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
1336
1337 2011-08-03  Sergey Rybin  <rybin@adacore.com>
1338
1339         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
1340         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
1341
1342 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1343
1344         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
1345         and the component type is composite, this is ambiguous for predefined
1346         concatenation, but if the node is not overloaded and the entity is a use
1347         -defined function its profile can be used to resolve that aggregate.
1348
1349 2011-08-03  Robert Dewar  <dewar@adacore.com>
1350
1351         * exp_ch4.adb: Minor code cleanup.
1352
1353 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1354
1355         * exp_dist.adb: Do not generate distribution stubs if serious errors
1356         have been diagnosed.
1357
1358 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1359
1360         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
1361         the first formal of a primitive operation, go to the base type to
1362         handle properly an access to a derived type with constrained
1363         discriminants.
1364         * sem_type.adb (Disambiguate): an immediately visible operator hides a
1365         user-defined function that is only use-visible.
1366
1367 2011-08-03  Robert Dewar  <dewar@adacore.com>
1368
1369         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
1370         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
1371         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
1372         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
1373         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
1374         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
1375         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
1376         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
1377
1378 2011-08-03  Robert Dewar  <dewar@adacore.com>
1379
1380         * repinfo.adb (List_Mechanism): Add handling of
1381         Convention_Ada_Pass_By_XXX.
1382         * sem_mech.adb (Set_Mechanism): Ditto.
1383         * sem_prag.adb (Process_Convention): Add entries for
1384         Convention_Ada_Pass_By_XXX.
1385         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
1386
1387 2011-08-03  Pascal Obry  <obry@adacore.com>
1388
1389         * makeutl.adb: Minor reformatting.
1390
1391 2011-08-03  Vincent Celier  <celier@adacore.com>
1392
1393         * fname-uf.adb
1394         (Get_File_Name) If the file cannot be found when there are no config
1395         pragmas file and May_Fail is True, return No_File instead of the file
1396         name, to be consistent.
1397
1398 2011-08-03  Pascal Obry  <obry@adacore.com>
1399
1400         * adaint.c (__gnat_is_executable_file_attr): Avoid access
1401         to null pointer.
1402
1403 2011-08-03  Javier Miranda  <miranda@adacore.com>
1404
1405         * sem_ch13.adb
1406         (Same_Representation): In VM targets the representation of arrays with
1407         aliased components differs from arrays with non-aliased components.
1408
1409 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1410
1411         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
1412         not systematically lower case attribute indexes that contain no "."
1413         Fix definition of several Naming attributes, which take
1414         a unit name as index and therefore should be case insensitive.
1415         Minor refactoring (reduce length of variable names).
1416
1417 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1418
1419         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
1420
1421 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1422
1423         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
1424         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
1425         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
1426         prj-tree.ads (Prj.Tree.Environment): new type.
1427
1428 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1429
1430         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
1431         prj-tree.adb, prj-tree.ads (Environment): new type.
1432
1433 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1434
1435         * prj-tree.ads: Remove unused variable.
1436
1437 2011-08-03  Yannick Moy  <moy@adacore.com>
1438
1439         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
1440         issuing messages related to SPARK restriction violation.
1441
1442 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1443
1444         * sem_ch6.adb: guard against error nodes in return statements.
1445
1446 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
1447
1448         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
1449         a warning can only appear on a configuration file, so emit warning
1450         without further checks.
1451
1452 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
1453
1454         * s-interr.ads: add overriding keyword.
1455
1456 2011-08-03  Geert Bosch  <bosch@adacore.com>
1457
1458         * exp_attr.adb: Fix minor typo.
1459
1460 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1461
1462         * par-ch4.adb: improve error recovery.
1463
1464 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1465
1466         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
1467         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
1468         to Errout_Handling.
1469
1470 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1471
1472         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
1473         "external" as an attribute name in aggregate projects.
1474
1475 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
1476
1477         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
1478         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
1479         from 0, so we need to adjust.
1480
1481 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1482
1483         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
1484         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
1485
1486 2011-08-03  Yannick Moy  <moy@adacore.com>
1487
1488         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
1489         restriction on overloaded entity if the entity is not an operator.
1490
1491 2011-08-03  Yannick Moy  <moy@adacore.com>
1492
1493         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
1494         restrict.ads: Rename remaining Check_Formal_Restriction* into
1495         Check_SPARK_Restriction*.
1496
1497 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1498
1499         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
1500         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
1501         qualifier.
1502         (Project_Empty): removed
1503         (Empty_Project): new parameter Qualifier
1504         This is used to have fields specific to aggregate projects, cleaner
1505         New field to store the list of aggregated projects.
1506         (Check_Aggregate_Project): removed
1507         (Process_Aggregated_Projects, Free): new subprograms.
1508
1509 2011-08-03  Olivier Hainque  <hainque@adacore.com>
1510
1511         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
1512
1513 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1514
1515         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
1516         explicit dereference of an unconstrained type, create a constrained
1517         subtype for it, as is done for function calls that return an
1518         unconstrained type.
1519
1520 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1521
1522         * g-pehage.adb (Finalize): Avoid possible double-free.
1523
1524 2011-08-03  Steve Baird  <baird@adacore.com>
1525
1526         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
1527         Elab_Spec/Body attrs in CodePeer_Mode.
1528
1529 2011-08-03  Javier Miranda  <miranda@adacore.com>
1530
1531         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
1532         low bound is not known at compile time but they have no others choice.
1533         Done because in this case the bounds can be obtained directly from the
1534         aggregate.
1535
1536 2011-08-03  Ed Falis  <falis@adacore.com>
1537
1538         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
1539         on VxWorks SMP. Remove unusable constant ANY_CPU.
1540
1541 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1542
1543         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
1544         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
1545         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
1546         Prj.Env.Initialize_Empty): new subprograms
1547         (Get_Env, Find_Project): remove parameter Target_Name.
1548
1549 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
1550
1551         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
1552         as a condition for the delayed call to Derived_Subprograms done for the
1553         case of the rewriting of a derived type that constrains the
1554         discriminants of its parent type.
1555         Avoids redundant subprogram derivations for private subtype derivations.
1556
1557 2011-08-03  Javier Miranda  <miranda@adacore.com>
1558
1559         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
1560         Build_Record_Aggr_Code.
1561         (Build_Record_Aggr_Code): Add missing support to initialize hidden
1562         discriminants in extension aggregates.
1563
1564 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1565
1566         * prj-pp.adb (Print): also output project qualifiers, since in
1567         particular "aggregate" is mandatory in an aggregate project.
1568
1569 2011-08-03  Emmanuel Briot  <briot@adacore.com>
1570
1571         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
1572         (Debug_Output): new function.
1573
1574 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
1575
1576         * gnat_ugn.texi: Document -Wstack-usage.
1577         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
1578
1579 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1580
1581         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
1582         have keyword LIMITED.
1583
1584 2011-08-03  Yannick Moy  <moy@adacore.com>
1585
1586         * alfa.adb, alfa.ads, alfa_test.adb: New files.
1587         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
1588         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
1589         section (does not happen in compiler, only if code directly calls
1590         Scan_ALI).
1591         * get_alfa.adb, get_alfa.ads: New files.
1592         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
1593         needed.
1594         * lib-xref-alfa.adb: New file.
1595         * lib-xref.adb, lib-xref.ads
1596         (Xref_Entry): redefine information needed in cross-references for ALFA.
1597         Push ALFA treatments in separated local package.
1598         (Enclosing_Subpragram_Or_Package): treat specially subprogram
1599         identifiers. Return entity of package body instead of spec. Return
1600         Empty for a scope with no location.
1601         (Generate_Reference): adapt to new components for ALFA information.
1602         Remove the need for D references on definitions.
1603         (Is_Local_Reference): moved to ALFA local package
1604         (Output_References): extract subfunction as Extract_Source_Name
1605         (Output_Local_References): remove procedure, replaced by filtering of
1606         cross-references in package ALFA and printing in Put_ALFA.
1607         (Write_Entity_Name): remove procedure
1608         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
1609         print exact name of entity as it appears in source file
1610         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
1611         * put_alfa.adb, put_alfa.ads: New files.
1612         * xref_lib.adb (Search_Xref): protect read of cross-references against
1613         reading other sections of the ALI file, in gnatxref
1614         (Search): protect read of cross-references against reading other
1615         sections of the ALI file, in gnatfind.
1616         * gcc-interface/Make-lang.in: Update dependencies.
1617
1618 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1619
1620         * sem_ch3.adb: Minor reformatting.
1621
1622 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
1623
1624         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
1625         raising an exception.
1626
1627 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1628
1629         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
1630         type, always use 1 as the lower bound or string, even if lower bound of
1631         context is not static, to handle properly null strings in a non-static
1632         context.
1633
1634 2011-08-03  Bob Duff  <duff@adacore.com>
1635
1636         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
1637         always legal on the right-hand side of an assignment statement; there
1638         is always an applicable index constraint in this case. Therefore, the
1639         check for Pkind = N_Assignment_Statement is now unconditional -- it
1640         doesn't depend on whether Is_Constrained (Typ).
1641
1642 2011-08-03  Robert Dewar  <dewar@adacore.com>
1643
1644         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
1645
1646 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1647
1648         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
1649         for an itype created within a generic unit.
1650
1651 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
1652
1653         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
1654         suppresses all inlining.
1655
1656 2011-08-03  Robert Dewar  <dewar@adacore.com>
1657
1658         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
1659         exp_aggr.adb: Minor reformatting.
1660
1661 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1662
1663         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
1664         tagged assignment when discriminant checks are suppressed. This is
1665         useless and extremely costly in terms of static stack usage.
1666
1667 2011-08-03  Bob Duff  <duff@adacore.com>
1668
1669         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
1670         of generics, because this leads to the wrong entity in the wrong scope,
1671         causing (e.g.) pragma Export_Procedure to get an error if the entity is
1672         an instance.
1673         (Process_Interface_Name): Follow Alias for instances of generics, to
1674         correct for the above change.
1675
1676 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1677
1678         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
1679         is an integer literal it is always safe to replace the reference. In
1680         addition, if the reference appears in the generated code for an object
1681         declaration it is necessary to copy because otherwise the reference
1682         might be to the uninitilized value of the discriminant of the object
1683         itself.
1684
1685 2011-08-03  Pascal Obry  <obry@adacore.com>
1686
1687         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
1688         ACL used, in this case we want to check for ending .exe, not .exe
1689         anywhere in the path.
1690
1691 2011-08-03  Sergey Rybin  <rybin@adacore.com>
1692
1693         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
1694         the tree structure (semantic decoration of references to record
1695         discriminants).
1696
1697 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
1698
1699         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
1700         choices of a named array aggregate, bail out when any choices are
1701         marked as Errors_Posted.
1702
1703 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1704
1705         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
1706         in which entity is frozen, to handle properly loop variables in
1707         iterators.
1708
1709 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1710
1711         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
1712         subtype is not static, compute the upper bound using attributes, to
1713         handle properly index types that are not integer types.
1714
1715 2011-08-03  Bob Duff  <duff@adacore.com>
1716
1717         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
1718         Update copyright notice.
1719
1720 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1721
1722         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
1723         Original_Discriminant if within an instance.
1724         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
1725
1726 2011-08-03  Thomas Quinot  <quinot@adacore.com>
1727
1728         * einfo.ads: Minor reformatting.
1729
1730 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1731
1732         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
1733         composite type with an unfrozen subcomponent, in the profile of a
1734         primitive operation.
1735
1736 2011-08-03  Robert Dewar  <dewar@adacore.com>
1737
1738         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
1739
1740 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1741
1742         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
1743         unconstrained type with discriminants is initialized with an aggregate,
1744         use the constrained subtype of the aggregate as the type of the object,
1745         because it is immutable, and this allows the back-end to generate no
1746         code for the object declaration.
1747
1748 2011-08-03  Robert Dewar  <dewar@adacore.com>
1749
1750         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
1751         comparison operand is variable, and turns out to be zero or negative.
1752
1753 2011-08-03  Javier Miranda  <miranda@adacore.com>
1754
1755         * exp_intr.adb
1756         (Expand_Dispatching_Constructor_Call): Disable expansion of
1757         code required for native targets. Done to avoid generating
1758         references to unavailable runtime entities in VM targets.
1759         * exp_ch3.adb
1760         (Expand_N_Object_Declaration): Add missing support to handle
1761         the explicit initialization of class-wide interface objects.
1762         Fix documentation.
1763
1764 2011-08-03  Matthew Heaney  <heaney@adacore.com>
1765
1766         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
1767
1768 2011-08-03  Matthew Heaney  <heaney@adacore.com>
1769
1770         * a-cbdlli.adb (Splice): move source items from first to last
1771
1772 2011-08-03  Yannick Moy  <moy@adacore.com>
1773
1774         * sem_util.ads: comment added.
1775
1776 2011-08-03  Javier Miranda  <miranda@adacore.com>
1777
1778         * exp_aggr.adb
1779         (Expand_Record_Aggregate): In VM targets disable the expansion into
1780         assignments of aggregates whose type is not known at compile time.
1781
1782 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
1783
1784         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
1785         protected entries and task entries, to build the proper renaming
1786         declaration for entry formals, used in debugging.
1787         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
1788         parameters in the same way.
1789
1790 2011-08-02  Robert Dewar  <dewar@adacore.com>
1791
1792         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
1793         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
1794         code reorganization.
1795
1796 2011-08-02  Robert Dewar  <dewar@adacore.com>
1797
1798         * debug.adb: Debug flag d.P to suppress length comparison optimization
1799         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
1800         comparison of Length by comparing First/Last instead.
1801
1802 2011-08-02  Matthew Heaney  <heaney@adacore.com>
1803
1804         * a-cobove.ads: Code clean up.
1805
1806 2011-08-02  Vincent Celier  <celier@adacore.com>
1807
1808         * adaint.c (file_names_case_sensitive_cache): New static int.
1809         (__gnat_get_file_names_case_sensitive): Cache the return value in
1810         file_names_case_sensitive_cache at the first invocation, to avoid
1811         multiple calls to getenv.
1812
1813 2011-08-02  Bob Duff  <duff@adacore.com>
1814
1815         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
1816
1817 2011-08-02  Yannick Moy  <moy@adacore.com>
1818
1819         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
1820         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
1821         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
1822         indicate that we are in a precondition or postcondition. This is used in
1823         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
1824         decide whether to flag the spec or body of the current subprogram as
1825         not in ALFA.
1826
1827 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
1828
1829         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
1830         list.
1831         * a-extiin.ads: New file.
1832
1833 2011-08-02  Bob Duff  <duff@adacore.com>
1834
1835         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
1836         now raises Name_Error instead of Use_Error in certain cases. The other
1837         parts of this AI were already implemented properly.
1838
1839 2011-08-02  Vincent Celier  <celier@adacore.com>
1840
1841         * link.c: Only import "auto-host.h" when building the gnattools.
1842
1843 2011-08-02  Yannick Moy  <moy@adacore.com>
1844
1845         * sem_util.adb: Inter-unit inlining does not work for a subprogram
1846         which calls a local subprogram, so extract subprogram
1847         from Mark_Non_ALFA_Subprogram_Body.
1848
1849 2011-08-02  Javier Miranda  <miranda@adacore.com>
1850
1851         * exp_ch9.adb
1852         (Extract_Dispatching_Call): If the type of the dispatching object is an
1853         access type then return an explicit dereference in the Object out-mode
1854         parameter.
1855
1856 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
1857
1858         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
1859         compatibility checks for all indexes of an array subtype, not just the
1860         first. Reset Has_Dynamic_Range_Check on the subtype before each
1861         potential check to ensure that Insert_Range_Checks will not elide any
1862         of the dynamic checks.
1863
1864 2011-08-02  Yannick Moy  <moy@adacore.com>
1865
1866         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
1867         SPARK restriction at parsing time.
1868         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
1869         directive only if the SPARK restriction is set for this unit.
1870
1871 2011-08-02  Yannick Moy  <moy@adacore.com>
1872
1873         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
1874         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
1875         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
1876         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
1877         Mark_Non_ALFA_Subprogram_Body.
1878         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
1879         inlined.
1880
1881 2011-08-02  Yannick Moy  <moy@adacore.com>
1882
1883         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
1884         might be costly.
1885
1886 2011-08-02  Robert Dewar  <dewar@adacore.com>
1887
1888         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
1889         exp_ch3.adb: Minor reformatting.
1890
1891 2011-08-02  Emmanuel Briot  <briot@adacore.com>
1892
1893         * adaint.c (__gnat_locate_exec_on_path): only returns executable
1894         files, not any regular file.
1895         (__gnat_locate_file_with_predicate): new subprogram.
1896
1897 2011-08-02  Yannick Moy  <moy@adacore.com>
1898
1899         * sinfo.adb, sinfo.ads: Restrict the use of flags
1900         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
1901         nodes, plus N_Subtype_Declaration for the 2nd one.
1902
1903 2011-08-02  Sergey Rybin  <rybin@adacore.com>
1904
1905         * gnat_rm.texi: Ramification of pragma Eliminate documentation
1906          - fix bugs in the description of Source_Trace;
1907          - get rid of UNIT_NAME;
1908
1909 2011-08-02  Javier Miranda  <miranda@adacore.com>
1910
1911         * exp_ch9.adb
1912         (Build_Dispatching_Requeue): Adding support for VM targets
1913         since we cannot directly reference the Tag entity.
1914         * exp_sel.adb (Build_K): Adding support for VM targets.
1915         (Build_S_Assignment): Adding support for VM targets.
1916         * exp_disp.adb
1917         (Default_Prim_Op_Position): In VM targets do not restrict availability
1918         of predefined interface primitives to compiling in Ada 2005 mode.
1919         (Is_Predefined_Interface_Primitive): In VM targets this service is not
1920         restricted to compiling in Ada 2005 mode.
1921         (Make_VM_TSD): Generate code that declares and initializes the OSD
1922         record. Needed to support dispatching calls through synchronized
1923         interfaces.
1924         * exp_ch3.adb
1925         (Make_Predefined_Primitive_Specs): Enable generation of predefined
1926         primitives associated with synchronized interfaces.
1927         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
1928         primitives associated with synchronized interfaces.
1929
1930 2011-08-02  Yannick Moy  <moy@adacore.com>
1931
1932         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
1933         statements hidden in SPARK if preceded by the HIDE directive
1934         (Parse_Exception_Handlers): mark each exception handler in a sequence of
1935         exception handlers as hidden in SPARK if preceded by the HIDE directive
1936         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
1937         if starting with the HIDE directive
1938         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
1939         starting with the HIDE directive; mark the declarations in a private
1940         part as hidden in SPARK if the private part starts with the HIDE
1941         directive
1942         * restrict.adb, restrict.ads
1943         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
1944         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
1945         argument node belongs to a part which is hidden in SPARK
1946         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
1947         parts in SPARK; protect the possibly costly call to
1948         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
1949         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
1950         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
1951         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
1952         Tok_SPARK_Hide.
1953         (Scan): recognize special comment starting with '#' and followed by
1954         SPARK keyword "hide" as a HIDE directive.
1955
1956 2011-08-02  Yannick Moy  <moy@adacore.com>
1957
1958         * types.ads, erroutc.ads: Minor reformatting.
1959
1960 2011-08-02  Vincent Celier  <celier@adacore.com>
1961
1962         * link.c: Add response file support for cross platforms.
1963
1964 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
1965
1966         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
1967         in an association, set parent field of copy before partial analysis.
1968         * sem_res.adb (Resolve_Slice): create reference to itype only when
1969         expansion is enabled.
1970
1971 2011-08-02  Yannick Moy  <moy@adacore.com>
1972
1973         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
1974         for new flag denoting which subprogram bodies are in ALFA
1975         * restrict.adb, sem_ch7.adb: Update comment
1976         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1977         sem_ch9.adb, sem_res.adb: Add calls to
1978         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
1979         * sem_ch6.adb (Analyze_Function_Return): add calls to
1980         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
1981         middle of the body, and extended return.
1982         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
1983         False when missing return.
1984         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
1985         to True for subprograms whose spec is in ALFA. Remove later on the flag
1986         on the entity used for a subprogram body when there exists a separate
1987         declaration.
1988         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
1989         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
1990         False, otherwise do nothing.
1991
1992 2011-08-02  Robert Dewar  <dewar@adacore.com>
1993
1994         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
1995
1996 2011-08-02  Yannick Moy  <moy@adacore.com>
1997
1998         * sem_ch4.ads: minor formatting.
1999
2000 2011-08-02  Yannick Moy  <moy@adacore.com>
2001
2002         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
2003         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
2004         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
2005         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
2006         opt.ads: cleanup of SPARK mode
2007
2008 2011-08-02  Yannick Moy  <moy@adacore.com>
2009
2010         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
2011         types.
2012         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
2013         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
2014         * sem_ch3.adb
2015         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
2016         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
2017         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
2018         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
2019         types.
2020         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
2021         non-static range.
2022         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
2023         functions whose return type is not in ALFA.
2024         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
2025         specifications.
2026         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
2027         parameter's type is not in ALFA.
2028         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
2029         types are in ALFA.
2030
2031 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2032
2033         * sem_ch6 (Analyze_Expression_Function): treat the function as
2034         Inline_Always, and introduce a subprogram declaration for it when it is
2035         not a completion.
2036         * inline.adb (Add_Inlined_Body): recognize bodies that come from
2037         expression functions, so that the back-end can determine whether they
2038         can in fact be inlined.
2039         * sem_util.adb (Is_Expression_Function): predicate to determine whether
2040         a function body comes from an expression function.
2041
2042 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
2043
2044         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
2045         null exclusions to test Can_Never_Be_Null on the anonymous access types
2046         of the formals rather than testing the formals themselves. Exclude this
2047         check in cases where the Old_Formal is marked as a controlling formal,
2048         to avoid issuing spurious errors for bodies completing dispatching
2049         operations (due to the flag not getting set on controlling access
2050         formals in body specs).
2051         (Find_Corresponding_Spec): When checking full and subtype conformance of
2052         subprogram bodies in instances, pass Designated and E in that order, for
2053         consistency with the expected order of the formals (New_Id followed by
2054         Old_Id).
2055
2056 2011-08-02  Robert Dewar  <dewar@adacore.com>
2057
2058         * sem_ch8.adb: Minor reformatting.
2059
2060 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2061
2062         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
2063         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
2064         primitive operations of class-wide actuals.
2065
2066 2011-08-02  Javier Miranda  <miranda@adacore.com>
2067
2068         * exp_atag.ads, exp_atag.adb
2069         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
2070         since its value is implicitly passed in argument Typ.
2071         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
2072         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
2073         Build_Common_Dispatching_Select_Statements.
2074
2075 2011-08-02  Robert Dewar  <dewar@adacore.com>
2076
2077         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
2078         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
2079         Minor reformatting.
2080
2081 2011-08-02  Robert Dewar  <dewar@adacore.com>
2082
2083         * sem_res.adb: Minor reformatting.
2084         * sem_prag.adb: Minor reformatting.
2085
2086 2011-08-02  Javier Miranda  <miranda@adacore.com>
2087
2088         * exp_atag.adb, exp_atags.ads
2089         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
2090         by the tagged type Entity. Required to use this routine in the VM
2091         targets since we do not have available the Tag entity in the VM
2092         platforms.
2093         * exp_ch6.adb
2094         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
2095         Ada.Tags has not been previously loaded.
2096         * exp_ch7.adb
2097         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
2098         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
2099         * sem_aux.adb
2100         (Enclosing_Dynamic_Scope): Add missing support to handle the full
2101         view of enclosing scopes. Required to handle enclosing scopes that
2102         are synchronized types whose full view is a task type.
2103         * exp_disp.adb
2104         (Build_VM_TSDs): Minor code improvement to avoid generating and
2105         analyzing lists with empty nodes.
2106         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
2107         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
2108         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
2109         (Make_Disp_Timed_Select_Body): Add support for VM targets.
2110         (Make_Select_Specific_Data_Table): Add support for VM targets.
2111         (Make_VM_TSD): Generate code to initialize the SSD structure of
2112         the TSD.
2113
2114 2011-08-02  Yannick Moy  <moy@adacore.com>
2115
2116         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
2117         cross-references section in ALI.
2118         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
2119         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
2120         Sub).
2121         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
2122         subprogram or package entity of a node
2123         (Is_Local_Reference_Type): new function returns True for references
2124         selected in local cross-references.
2125         (Lt): function extracted from Lt in Output_References
2126         (Write_Entity_Name): function extracted from Output_References
2127         (Generate_Definition): generate reference with type 'D' for definition
2128         of objects (object declaration and parameter specification), with
2129         appropriate locations and units, for use in local cross-references.
2130         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
2131         references of type 'I' for initialization in object definition.
2132         (Output_References): move part of function Lt and procedure
2133         Write_Entity_Name outside of the body. Ignore references of types 'D'
2134         and 'I' introduced for local cross-references.
2135         (Output_Local_References): new procedure to output the local
2136         cross-references sections.
2137         (Lref_Entity_Status): new array defining whether an entity is a local
2138         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
2139         with 'I' type when initialization expression is present.
2140         * get_scos.adb, get_scos.ads: Correct comments and typos
2141
2142 2011-08-02  Javier Miranda  <miranda@adacore.com>
2143
2144         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
2145         the JVM target.
2146         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
2147         the JVM target.
2148         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
2149         TSD support.
2150
2151 2011-08-02  Vincent Celier  <celier@adacore.com>
2152
2153         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
2154         (No_Space_Img): New function
2155         (Find_Excluded_Sources): When reading from a file, record the file name
2156         and the line number for each excluded source.
2157         (Mark_Excluded_Sources): When reporting an error, if the excluded
2158         sources were read from a file, include file name and line number in
2159         the error message.
2160
2161 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2162
2163         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
2164
2165 2011-08-02  Robert Dewar  <dewar@adacore.com>
2166
2167         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
2168
2169 2011-08-02  Javier Miranda  <miranda@adacore.com>
2170
2171         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
2172         generation of TSDs to the DOTNET compiler.
2173         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
2174         generation of TSDs to the DOTNET compiler.
2175
2176 2011-08-02  Javier Miranda  <miranda@adacore.com>
2177
2178         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
2179         record of all the tagged types declared inside library level package
2180         declarations, library level package bodies or library level subprograms.
2181         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
2182         associated with a given tagged type.
2183         (Build_VM_TSDs): New subprogram.
2184         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
2185         compilation units that are subprograms.
2186         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
2187         compilation units that are package bodies.
2188         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
2189         units that are a package declaration or a package instantiation.
2190         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
2191         reorganization to improve the error generated by the frontend when the
2192         function Ada.Tags.Secondary_Tag is not available.
2193         * rtsfind.ads (RE_Register_TSD): New runtime entity.
2194         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
2195
2196 2011-08-02  Javier Miranda  <miranda@adacore.com>
2197
2198         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
2199
2200 2011-08-02  Robert Dewar  <dewar@adacore.com>
2201
2202         * s-imenne.ads: Minor reformatting.
2203
2204 2011-08-02  Robert Dewar  <dewar@adacore.com>
2205
2206         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
2207         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
2208         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
2209
2210 2011-08-02  Robert Dewar  <dewar@adacore.com>
2211
2212         * einfo.ads (Materialize_Entity): Document this is only for renamings
2213         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
2214         required debug information in the case where we transform the object
2215         declaration into a renaming declaration.
2216         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
2217         object
2218         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
2219         Materialize_Entity.
2220
2221 2011-08-02  Robert Dewar  <dewar@adacore.com>
2222
2223         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
2224         Suppress_Init_Procs.
2225         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
2226         Suppress_Initialization/Initialization_Suppressed.
2227         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
2228         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
2229         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
2230         * sem_prag.adb: New processing for pragma Suppress_Initialization.
2231
2232 2011-08-02  Robert Dewar  <dewar@adacore.com>
2233
2234         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
2235         Minor reformatting.
2236
2237 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2238
2239         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
2240         only have inheritable classwide pre/postconditions.
2241
2242 2011-08-02  Javier Miranda  <miranda@adacore.com>
2243
2244         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
2245         * rtsfind.ads (RE_Check_TSD): New runtime entity.
2246         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
2247         checks if the external tag of a type is the same as the external tag
2248         of some other declaration.
2249
2250 2011-08-02  Thomas Quinot  <quinot@adacore.com>
2251
2252         * s-taskin.ads: Minor reformatting.
2253
2254 2011-08-02  Emmanuel Briot  <briot@adacore.com>
2255
2256         * g-comlin.adb (Display_Help): swap the order in which it prints the
2257         short help and the general usage.
2258
2259 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2260
2261         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
2262         the aspect declarations and attach them to the generic copy for
2263         subsequent analysis.
2264         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
2265         declarations of the generic tree to the new subprogram declarations.
2266         * sem_attr.adb (Check_Precondition_Postcondition): recognize
2267         conditions that apply to a subprogram instance.
2268
2269 2011-08-02  Robert Dewar  <dewar@adacore.com>
2270
2271         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
2272
2273 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2274
2275         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
2276         private type with a tagged full view is not derived in the immediate
2277         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
2278
2279 2011-08-02  Robert Dewar  <dewar@adacore.com>
2280
2281         * exp_ch4.adb: Minor reformatting.
2282
2283 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2284
2285         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
2286         Ada2012 iterator, the loop will be rewritten during expansion into a
2287         while loop with a cursor and an element declaration. Do not analyze the
2288         body in this case, because if the container is for indefinite types the
2289         actual subtype of the elements will only be determined when the cursor
2290         declaration is analyzed.
2291
2292 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
2293
2294         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
2295         size/alignment related attributes in CodePeer_Mode.
2296
2297 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
2298
2299         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
2300         Prepend_Element, since this can result in the operation getting the
2301         wrong slot in the full type's dispatch table if the full type has
2302         inherited operations. The incomplete type's operation will get added
2303         to the proper position in the full type's primitives
2304         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
2305         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
2306         dispatching operations, since there are cases where nonprimitive
2307         subprograms can get added to the list of incomplete dependents (such
2308         as subprograms in nested packages).
2309         * sem_ch6.adb (Process_Formals): First, remove test for being in a
2310         private part when determining whether to add a primitive with a
2311         parameter of a tagged incomplete type to the Private_Dependents list.
2312         Such primitives can also occur in the visible part, and should not have
2313         been excluded from being private dependents.
2314         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
2315         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
2316         list of a Taft-amendment incomplete type is a primitive before issuing
2317         an error that the full type must appear in the same unit. There are
2318         cases where nonprimitives can be in the list (such as subprograms in
2319         nested packages).
2320         * sem_disp.adb (Derives_From): Use correct condition for checking that
2321         a formal's type is derived from the type of the corresponding formal in
2322         the parent subprogram (the condition was completely wrong). Add
2323         checking that was missing for controlling result types being derived
2324         from the result type of the parent operation.
2325
2326 2011-08-02  Yannick Moy  <moy@adacore.com>
2327
2328         * errout.adb (First_Node): minor renaming
2329         * restrict.adb (Check_Formal_Restriction): put restriction warning on
2330         first node.
2331
2332 2011-08-02  Yannick Moy  <moy@adacore.com>
2333
2334         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
2335         before accessing operands.
2336         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
2337         decide whether an initialization expression respects SPARK rules, as
2338         the plain node is the expanded one. This allows for more valid warnings
2339         to be issued.
2340         * gnat_rm.texi: Minor update.
2341
2342 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
2343
2344         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
2345         previous change.
2346
2347 2011-08-02  Robert Dewar  <dewar@adacore.com>
2348
2349         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
2350
2351 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
2352
2353         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
2354         loop statements and the element renaming declaration with a block when
2355         the element type is controlled.
2356
2357 2011-08-02  Yannick Moy  <moy@adacore.com>
2358
2359         * sinfo.ads: Minor formatting.
2360
2361 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2362
2363         * sem_aggr.adb (Add_Association): if the association has a box and no
2364         expression, use the Sloc of the aggregate itself for the new
2365         association.
2366         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
2367         the Original_Node.
2368
2369 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
2370
2371         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
2372         When a container is provided via a function call, generate a renaming
2373         of the function result. This avoids the creation of a transient scope
2374         and the premature finalization of the container.
2375         * exp_ch7.adb (Is_Container_Cursor): Removed.
2376         (Wrap_Transient_Declaration): Remove the supression of the finalization
2377         of the list controller when the declaration denotes a container cursor,
2378         it is not needed.
2379
2380 2011-08-02  Yannick Moy  <moy@adacore.com>
2381
2382         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
2383         node is from source, instead of the original node being from source.
2384         * sem_aggr.adb
2385         (Resolve_Array_Aggregate): refine the check for a static expression, to
2386         recognize also static ranges
2387         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
2388         Array_Type_Declaration): postpone the test for the type being a subtype
2389         mark after the type has been resolved, so that component-selection and
2390         expanded-name are discriminated.
2391         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
2392         to distinguish the case of an iteration scheme, so that an error is
2393         issed on a non-static range in SPARK except in an iteration scheme.
2394         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
2395         In_Iter_Schm = True.
2396         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
2397         user-defined operators so that they are allowed in renaming
2398         * sem_ch8.adb
2399         (Find_Selected_Component): refine the check for prefixing of operators
2400         so that they are allowed in renaming. Move the checks for restrictions
2401         on selector name after analysis discriminated between
2402         component-selection and expanded-name.
2403         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
2404         concatenation argument of string type if it is static.
2405         * sem_util.adb, sem_util.ads
2406         (Check_Later_Vs_Basic_Declarations): add a new function
2407         Is_Later_Declarative_Item to decice which declarations are allowed as
2408         later items, in the two different modes Ada 83 and SPARK. In the SPARK
2409         mode, add that renamings are considered as later items.
2410         (Enclosing_Package): new function to return the enclosing package
2411         (Enter_Name): correct the rule for homonyms in SPARK
2412         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
2413         from source (result of expansion) to avoid issuing wrong warnings.
2414
2415 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2416
2417         * errout.adb: On anything but an expression First_Node returns its
2418         argument.
2419
2420 2011-08-02  Pascal Obry  <obry@adacore.com>
2421
2422         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
2423
2424 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
2425
2426         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
2427         Set the associated loop as the related expression of internally
2428         generated cursors.
2429         * exp_ch7.adb (Is_Container_Cursor): New routine.
2430         (Wrap_Transient_Declaration): Supress the finalization of the list
2431         controller when the declaration denotes a container cursor.
2432
2433 2011-08-02  Yannick Moy  <moy@adacore.com>
2434
2435         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
2436         command line now.
2437         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
2438         expression is a simple expression. This check cannot be performed in
2439         the semantics, so just drop it.
2440         (P_Index_Or_Discriminant_Constraint): move check that the index or
2441         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
2442         semantics. Other cases were previously checked in the semantics.
2443         * par-ch4.adb (P_Name): move checks that a selector name is not
2444         character literal or an operator symbol to Find_Selected_Component in
2445         the semantics
2446         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
2447         declarations are not placed after later declarations in a separate
2448         procedure in Sem_Util (possibly not the best choice?), to be used both
2449         during parsing, for Ada 83 mode, and during semantic analysis, for
2450         SPARK mode.
2451         * par-endh.adb (Check_End): move check that end label is not missing
2452         to Process_End_Label in the semantics
2453         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
2454         the special case for SPARK restriction
2455         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
2456         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
2457         parameter Force to issue the error message even on internal node (used
2458         for generated end label). Call Check_Restriction to check when an error
2459         must be issued. In SPARK mode, issue an error message even if the
2460         restriction is not set.
2461         (Check_Restriction): new procedure with an additional out parameter to
2462         inform the caller that a message has been issued
2463         * sem_aggr.adb: Minor modification of message
2464         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
2465         instead of issuing an error message directly
2466         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
2467         declarations are not placed after later declarations, by calling
2468         Check_Later_Vs_Basic_Declarations
2469         (Analyze_Subtype_Declaration): move here the check that an index or
2470         discriminant constraint must be a subtype mark. Change the check that
2471         a subtype of String must start at one so that it works on subtype marks.
2472         * sem_ch4.adb (Analyze_Call): move here the check that a named
2473         association cannot follow a positional one in a call
2474         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
2475         instead of issuing an error message directly
2476         * sem_ch8.adb (Find_Selected_Component): move here the check that a
2477         selector name is not a character literal or an operator symbol. Move
2478         here the check that the prefix of an expanded name cannot be a
2479         subprogram or a loop statement.
2480         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
2481         procedure called from parsing and semantics to check that basic
2482         declarations are not placed after later declarations
2483         (Process_End_Label): move here the check that end label is not missing
2484
2485 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
2486
2487         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
2488         representation clause in codepeer mode, since it confuses CodePeer and
2489         does not bring useful info.
2490
2491 2011-08-02  Ed Falis  <falis@adacore.com>
2492
2493         * init.c: initialize fp hw on MILS.
2494
2495 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2496
2497         * errout.adb (First_Node): for bodies, return the node itself (small
2498         optimization). For other nodes, do not check source_unit if the node
2499         comes from Standard.
2500
2501 2011-08-02  Robert Dewar  <dewar@adacore.com>
2502
2503         * exp_ch3.adb: Minor comment additions.
2504         * sem_ch13.adb: Minor reformatting.
2505
2506 2011-08-02  Pascal Obry  <obry@adacore.com>
2507
2508         * make.adb, makeutl.adb: Removes some superfluous directory separator.
2509
2510 2011-08-02  Robert Dewar  <dewar@adacore.com>
2511
2512         * sem_attr.adb: Minor reformatting.
2513
2514 2011-08-02  Robert Dewar  <dewar@adacore.com>
2515
2516         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
2517         (Has_Default_Component_Value): Removed
2518         * einfo.ads Comment updates
2519         (Has_Default_Aspect): Replaces Has_Default_Value
2520         (Has_Default_Component_Value): Removed
2521         * exp_ch13.adb
2522         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
2523         * exp_ch3.adb
2524         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
2525         (Get_Simple_Init_Val): Handle Default_Value aspect
2526         (Needs_Simple_Initialization): Handle Default_Value aspect
2527         * exp_ch3.ads: Needs_Simple_Initialization
2528         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
2529         * par-prag.adb (Pragma_Default[_Component]Value) Removed
2530         * sem_ch13.adb
2531         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
2532         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
2533         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
2534
2535 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2536
2537         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
2538         package containing iteration primitives.
2539         exp_ch5.adb (Expand_Iterator_Loop): ditto.
2540
2541 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2542
2543         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
2544         "of", pre-analyze expression in case it is a function call with
2545         finalization actions that must be placed ahead of the loop.
2546         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
2547         on an Ada2012 iterator, insert them ahead of the rewritten loop.
2548
2549 2011-08-02  Geert Bosch  <bosch@adacore.com>
2550
2551         * cstand.adb (Create_Float_Types): Only consider C's long double for
2552         Long_Long_Float, in addition to double.
2553
2554 2011-08-02  Robert Dewar  <dewar@adacore.com>
2555
2556         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
2557         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
2558         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
2559         Minor reformatting.
2560
2561 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2562
2563         * sem_attr.adb: handle properly 'Result when it is a prefix of an
2564         indexed component.
2565
2566 2011-08-02  Javier Miranda  <miranda@adacore.com>
2567
2568         * einfo.ads, einfo.adb
2569         (Original_Access_Type): Move this attribute to Node26 since there was
2570         an undocumented use of Node21 in E_Access_Subprogram_Type entities
2571         which causes conflicts and breaks the generation of the .NET compiler.
2572         (Interface_Name): Add missing documentation on JGNAT only uses of
2573         this attribute.
2574
2575 2011-08-02  Geert Bosch  <bosch@adacore.com>
2576
2577         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
2578         (Find_Back_End_Float_Type): Likewise
2579         (Create_Back_End_Float_Types): Likewise
2580         (Create_Float_Types): Likewise
2581         (Register_Float_Type): Likewise
2582         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
2583         Nlist and split out type selection in new local Find_Base_Type function.
2584         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
2585         Nlist
2586         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
2587
2588 2011-08-02  Robert Dewar  <dewar@adacore.com>
2589
2590         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
2591         alpha order).
2592         * opt.ads: Minor comment change.
2593         * sem_ch12.adb: Minor code reorganization.
2594
2595 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
2596
2597         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
2598         subtype's list of rep items to the list on the full subtype in the case
2599         where the lists are the same.
2600
2601 2011-08-02  Geert Bosch  <bosch@adacore.com>
2602
2603         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
2604         using the one from System.Strings, which also deallocates all strings.
2605
2606 2011-08-02  Geert Bosch  <bosch@adacore.com>
2607
2608         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
2609         function.
2610         * gcc-interface/Make-lang.in: Update dependencies.
2611
2612 2011-08-02  Olivier Hainque  <hainque@adacore.com>
2613
2614         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
2615         end_locus.
2616
2617 2011-08-02  Javier Miranda  <miranda@adacore.com>
2618
2619         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
2620         associated with anonymous access to subprograms.
2621
2622 2011-08-02  Geert Bosch  <bosch@adacore.com>
2623
2624         * opt.ads
2625         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
2626         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
2627         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
2628         (Add_Symbol_Definition): Move to switch-c.adb
2629         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
2630         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
2631         (Add_Symbol_Definition): Move to switch-c.adb.
2632         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
2633         * sem_warn.adb
2634         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
2635         Move to warnsw.adb.
2636         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
2637         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
2638         Move to warnsw.adb.
2639         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
2640         (Add_Symbol_Definition): Moved from Prepcomp.
2641         * switch-c.ads: Update copyright notice. Use String_List instead of
2642         Argument_List, removing dependency on System.OS_Lib.
2643
2644 2011-08-02  Yannick Moy  <moy@adacore.com>
2645
2646         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
2647         mode on initialization expression which does not respect SPARK
2648         restrictions.
2649         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
2650         if the tree referenced by its argument represents an initialization
2651         expression in SPARK, suitable for initializing an object in an object
2652         declaration.
2653
2654 2011-08-02  Javier Miranda  <miranda@adacore.com>
2655
2656         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
2657         internally generated access to subprogram with its associated protected
2658         subprogram type.
2659         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
2660
2661 2011-08-02  Geert Bosch  <bosch@adacore.com>
2662
2663         * cstand.adb (Register_Float_Type): Print information about type to
2664         register, if the Debug_Flag_Dot_B is set.
2665         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
2666         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
2667         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
2668         with a requested precision of more than Max_Digits digits and no more
2669         than Max_Base_Digits digits, if a range specification is present and the
2670         Predefined_Float_Types list has a suitable type to derive from.
2671         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
2672         case of type completion with pragma Import
2673         * sem_prag.adb
2674         (Process_Import_Predefined_Type): Processing to complete a type
2675         with pragma Import. Currently supports floating point types only.
2676         (Set_Convention_From_Pragma): Do nothing without underlying type.
2677         (Process_Convention): Guard against absence of underlying type,
2678         which may happen when importing incomplete types.
2679         (Process_Import_Or_Interface): Handle case of importing predefined
2680         types. Tweak error message.
2681
2682 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
2683
2684         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
2685         functions to previous change.  Reorganize code slightly.
2686
2687 2011-08-02  Geert Bosch  <bosch@adacore.com>
2688
2689         * back_end.ads (Register_Type_Proc): New call back procedure type for
2690         allowing the back end to provide information about available types.
2691         (Register_Back_End_Types): New procedure to register back end types.
2692         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
2693         available types.
2694         * cstand.adb (Back_End_Float_Types): New list for floating point types
2695         supported by the back end.
2696         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
2697         (Copy_Float_Type): New procedure to make new copies of predefined types.
2698         (Register_Float_Type): New call back procedure to populate the BEFT list
2699         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
2700         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
2701         (Create_Float_Types): New procedure to create entities for floating
2702         point types predefined in Standard, and put these and any remaining
2703         BEFTs on the Predefined_Float_Types list.
2704         * stand.ads (Predefined_Float_Types): New list for predefined floating
2705         point types that do not have declarations in package Standard.
2706
2707 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
2708
2709         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
2710         entity node for the unit containing the parameter.
2711         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
2712         (Add_Inlined_Subprogram): Likewise.
2713         * gcc-interface/Make-lang.in: Update dependencies.
2714
2715 2011-08-02  Thomas Quinot  <quinot@adacore.com>
2716
2717         * s-stusta.adb (Print): Make sure Pos is always initialized to a
2718         suitable value.
2719
2720 2011-08-02  Geert Bosch  <bosch@adacore.com>
2721
2722         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
2723
2724 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
2725
2726         * sem_type.adb (Covers): Move trivial case to the top and reuse the
2727         computed value of Base_Type.
2728
2729 2011-08-02  Yannick Moy  <moy@adacore.com>
2730
2731         * restrict.adb (Check_Restriction): issue an error for any use of
2732         class-wide, even if the No_Dispatch restriction is not set.
2733         * sem_aggr.adb: Correct typos in comments and messages in formal mode
2734         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
2735         when completing a private extension, the type named in the private part
2736         is not the same as that named in the visible part.
2737         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
2738         of an inherited primitive operations of a tagged type or type extension
2739         that returns the tagged type.
2740         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
2741         function which returns True for an implicit operation inherited by the
2742         derived type declaration for the argument type.
2743         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
2744         order.
2745
2746 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2747
2748         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
2749         Process_Bounds, to perform analysis with expansion of a range or an
2750         expression that is the iteration scheme for a loop.
2751         (Analyze_Iterator_Specification): If domain of iteration is given by a
2752         function call with a controlled result, as is the case if call returns
2753         a predefined container, ensure that finalization actions are properly
2754         generated.
2755         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
2756
2757 2011-08-02  Javier Miranda  <miranda@adacore.com>
2758
2759         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
2760         * gcc-interface/Make-lang.in: Update dependencies.
2761
2762 2011-08-02  Javier Miranda  <miranda@adacore.com>
2763
2764         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
2765         determine if the analysis is performed using N or Original_Node (N).
2766         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
2767         functionality of routine Is_Variable avoids code duplication.
2768         * checks.adb (Determine_Range): Handle temporaries generated by
2769         Remove_Side_Effects.
2770
2771 2011-08-02  Javier Miranda  <miranda@adacore.com>
2772
2773         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
2774         expansion of the condition. Required since the previous analysis was
2775         done with expansion disabled (see Resolve_Quantified_Expression) and
2776         hence checks were not inserted and record comparisons have not been
2777         expanded.
2778
2779 2011-08-02  Ed Falis  <falis@adacore.com>
2780
2781         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
2782         Update header.
2783
2784 2011-08-02  Bob Duff  <duff@adacore.com>
2785
2786         * opt.ads: Minor comment fix.
2787
2788 2011-08-02  Bob Duff  <duff@adacore.com>
2789
2790         * sem_ch12.adb (Analyze_Package_Instantiation,
2791         Analyze_Subprogram_Instantiation): Turn off style checking while
2792         analyzing an instance. Whatever style checks that apply to the generic
2793         unit should apply, so it makes no sense to apply them in an instance.
2794         This was causing trouble when compiling an instance of a runtime
2795         unit that violates the -gnatyO switch.
2796         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
2797         one of the two case statements, causing spurious errors.
2798
2799 2011-08-02  Robert Dewar  <dewar@adacore.com>
2800
2801         * uname.adb: Minor reformatting.
2802         * gnatcmd.adb: Minor reformatting.
2803         * exp_attr.adb: Minor reformatting.
2804
2805 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2806
2807         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
2808         No_Dispatching_Calls, do not look for the Assign primitive, because
2809         predefined primitives are not created in this case.
2810
2811 2011-08-02  Bob Duff  <duff@adacore.com>
2812
2813         * stylesw.ads: Minor comment fixes.
2814
2815 2011-08-02  Robert Dewar  <dewar@adacore.com>
2816
2817         * freeze.adb (Add_To_Result): New procedure.
2818
2819 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
2820
2821         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
2822         time, if the specific run-time routines for handling streams of strings
2823         are not available, use the default mechanism.
2824
2825 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
2826
2827         * s-regpat.ads: Fix typo.
2828
2829 2011-08-02  Vincent Celier  <celier@adacore.com>
2830
2831         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
2832         not null, call it to create the in memory config project file without
2833         parsing an existing default config project file.
2834
2835 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
2836
2837         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
2838
2839 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2840
2841         * sem_elim.adb: an abstract subprogram does not need an eliminate
2842         pragma for its descendant to be eliminable.
2843
2844 2011-08-02  Ed Falis  <falis@adacore.com>
2845
2846         * init.c: revert to handling before previous checkin for VxWorks
2847         * s-intman-vxworks.adb: delete unnecessary declarations related to
2848         using Ada interrupt facilities for handling signals.
2849         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
2850         * s-intman-vxworks.ads: Import __gnat_install_handler as
2851         Initialize_Interrupts.
2852         * s-taprop-vxworks.adb: Delete Signal_Mask.
2853         (Abort_Handler): change construction of mask to unblock exception
2854         signals.
2855
2856 2011-08-02  Jerome Guitton  <guitton@adacore.com>
2857
2858         * a-except-2005.adb (Raise_From_Signal_Handler): Call
2859         Debug_Raise_Exception before propagation starts.
2860
2861 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
2862
2863         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
2864         to Restriction_Check_Required.
2865         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
2866         * sem_res.adb (Resolve_Call): Likewise.
2867         * sem_attr.adb (Check_Stream_Attribute): Likewise.
2868
2869 2011-08-02  Bob Duff  <duff@adacore.com>
2870
2871         * stylesw.ads: Update comment.
2872         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
2873         * errout.ads: Remove obsolete comment.
2874
2875 2011-08-02  Javier Miranda  <miranda@adacore.com>
2876
2877         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
2878         (Set_Is_Safe_To_Reevaluate): new procedure.
2879         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
2880         assignment is allowed on safe-to-reevaluate variables.
2881         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
2882         temporary created to remove side effects in expressions that use
2883         the secondary stack as safe-to-reevaluate.
2884         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
2885         variables that are not true constants.
2886
2887 2011-08-02  Robert Dewar  <dewar@adacore.com>
2888
2889         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
2890         sem_res.adb, sem_ch6.adb: Minor reformatting.
2891
2892 2011-08-02  Jerome Guitton  <guitton@adacore.com>
2893
2894         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
2895
2896 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
2897
2898         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
2899         not set Overridden_Operation if subprogram is an initialization
2900         procedure.
2901
2902 2011-08-02  Yannick Moy  <moy@adacore.com>
2903
2904         * par-ch6.adb: Correct obsolete name in comments
2905         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
2906         which takes two message arguments (existing function takes one), with
2907         second message used for continuation.
2908         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
2909         block statements that originate from a source block statement, not
2910         generated block statements
2911         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
2912         symmetry with procedure case
2913         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
2914         function to issue an error in formal mode if a package specification
2915         contains more than one tagged type or type extension.
2916         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
2917         parameters matching formals of tagged types are objects (or ancestor
2918         type conversions of objects), not general expressions. Issue an error
2919         on view conversions that are not involving ancestor conversion of an
2920         extended type.
2921         (Resolve_Type_Conversion): in formal mode, issue an error on the
2922         operand of an ancestor type conversion which is not an object
2923         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
2924         procedure so that it works also for actuals of function calls
2925         (Is_Actual_Tagged_Parameter): new function which determines if its
2926         argument is an actual parameter of a formal of tagged type in a
2927         subprogram call
2928         (Is_SPARK_Object_Reference): new function which determines if the tree
2929         referenced by its argument represents an object in SPARK
2930
2931 2011-08-02  Robert Dewar  <dewar@adacore.com>
2932
2933         * sem_ch3.adb: Minor reformatting
2934         Minor comment addition
2935         Minor error msg text change
2936
2937 2011-08-02  Javier Miranda  <miranda@adacore.com>
2938
2939         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
2940         function. Used to be more precise when we generate a variable plus one
2941         assignment to remove side effects in the evaluation of the Bound
2942         expressions.
2943         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
2944         of the bound expression to force its re-analysis and thus expand the
2945         associated transient scope (if required). Code cleanup replacing the
2946         previous code that declared the constant entity by an invocation to
2947         routine Force_Evaluation which centralizes this work in the frontend.
2948
2949 2011-08-02  Robert Dewar  <dewar@adacore.com>
2950
2951         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
2952         (Base_Type): Now uses improved Is_Base_Type function
2953         * einfo.ads (Base_Type): Inline this function
2954
2955 2011-08-02  Robert Dewar  <dewar@adacore.com>
2956
2957         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
2958         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
2959
2960 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
2961
2962         * gcc-interface/Make-lang.in: Update dependencies.
2963         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
2964         targets.
2965
2966 2011-08-02  Yannick Moy  <moy@adacore.com>
2967
2968         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
2969         non-simple expression used in delta constraint
2970         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
2971         index constraint which is not a subtype mark
2972         * par.adb: With and use Restrict
2973         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
2974         mode on component type which is not a subtype mark and default
2975         expression on component
2976         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
2977         of string which does not have a lower index bound equal to 1
2978         (Array_Type_Declaration): issue an error in formal mode on index or
2979         component type which is not a subtype mark, and on aliased keyword on
2980         component
2981         (Derived_Type_Declaration): issue an error in formal mode on interface,
2982         limited or abstract type
2983         (Record_Type_Declaration): issue an error in formal mode on interface
2984         (Record_Type_Definition): issue an error in formal mode on tagged types
2985         and type extensions not declared in the specification of a library unit
2986         package; on null non-tagged record; on variant part
2987
2988 2011-08-02  Vincent Celier  <celier@adacore.com>
2989
2990         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
2991         not declared for qualified library project when Library_Name is not
2992         declared, but Library_Dir is.
2993
2994 2011-08-02  Robert Dewar  <dewar@adacore.com>
2995
2996         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
2997         pragmas (affects aspects [Component_]Default_Value
2998         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
2999         component type for the resolution
3000
3001 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
3002
3003         * einfo.adb (Base_Type): Tune implementation for speed.
3004
3005 2011-08-02  Robert Dewar  <dewar@adacore.com>
3006
3007         * freeze.adb: Minor reformatting.
3008
3009 2011-08-02  Thomas Quinot  <quinot@adacore.com>
3010
3011         * scos.ads: Update comments.
3012
3013 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3014
3015         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
3016         base type, because the parent may be a subtype of a private type whose
3017         convention is established in a private part.
3018
3019 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
3020
3021         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
3022         statement in a block when the expansion of the return expression has
3023         created a finalization chain.
3024         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
3025         with the parent node.
3026         Add N_Extended_Return_Statement to handle the case where a transient
3027         object declaration appears in the Return_Object_Declarations list of
3028         an extended return statement.
3029
3030 2011-08-02  Matthew Gingell  <gingell@adacore.com>
3031
3032         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
3033         unused parameter 'name'.
3034
3035 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3036
3037         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
3038         inherited operation, check whether its alias, which is the source
3039         operastion that it renames, has been marked eliminated.
3040
3041 2011-08-02  Javier Miranda  <miranda@adacore.com>
3042
3043         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
3044         in-mode parameter whose type is an access type since it can be used to
3045         modify its designated object. Enforce code that handles as safe an
3046         access type that is not access-to-constant but it is the result of a
3047         previous removal of side-effects.
3048         (Remove_Side_Effects): Minor code reorganization of cases which require
3049         no action. Done to incorporate documentation on new cases uncovered
3050         working in this ticket: no action needed if this routine was invoked
3051         too early and the nodes are not yet decorated.
3052         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
3053         to routine Remove_Side_Effects by calls to Force_Evaluation since they
3054         were issued with actuals that are implicitly provided by
3055         Force_Evaluation.
3056
3057 2011-08-02  Robert Dewar  <dewar@adacore.com>
3058
3059         * sem_ch3.adb, sem_res.adb: Minor reformatting.
3060
3061 2011-08-02  Yannick Moy  <moy@adacore.com>
3062
3063         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
3064         to issue an error in formal mode on attribute not supported in this mode
3065         (Analyze_Attribute): issue errors on standard attributes not supported
3066         in formal mode.
3067         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
3068         comment, and issue error in formal mode on modulus which is not a power
3069         of 2.
3070         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
3071         range.
3072         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
3073         subtype mark.
3074         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
3075         operator on modular type (except 'not').
3076
3077 2011-08-02  Robert Dewar  <dewar@adacore.com>
3078
3079         * gnat_rm.texi: Minor reformatting.
3080
3081 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
3082
3083         * s-osinte-linux.ads: Minor comment update and reformatting.
3084         * i-cexten.ads: Make this unit pure, as for its parent.
3085         Will allow its usage in more contexts if needed.
3086
3087 2011-08-02  Robert Dewar  <dewar@adacore.com>
3088
3089         * s-utf_32.ads: Minor comment fix.
3090
3091 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3092
3093         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
3094         operation of a tagged synchronized type, handle the case where the
3095         controlling argument is overloaded.
3096
3097 2011-08-02  Yannick Moy  <moy@adacore.com>
3098
3099         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
3100         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
3101         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
3102         SPARK mode and formal verification mode on processing SPARK restriction
3103         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
3104         requiring consistency checking.
3105
3106 2011-08-02  Robert Dewar  <dewar@adacore.com>
3107
3108         * sem_res.adb: Minor reformatting.
3109
3110 2011-08-02  Robert Dewar  <dewar@adacore.com>
3111
3112         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3113         a-cforse.ads: Remove unneeded with of Ada.Containers
3114         Remove commented out pragma Inline's
3115         Move specifications of new subprograms to the actual specs
3116
3117 2011-08-02  Yannick Moy  <moy@adacore.com>
3118
3119         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3120         a-cforse.ads: Update comments.
3121
3122 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3123
3124         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
3125
3126 2011-08-02  Robert Dewar  <dewar@adacore.com>
3127
3128         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
3129         a-cforse.ads, a-cofove.ads: Minor reformatting.
3130
3131 2011-08-02  Claire Dross  <dross@adacore.com>
3132
3133         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
3134         a-cofove.ads: Add comments.
3135
3136 2011-08-02  Yannick Moy  <moy@adacore.com>
3137
3138         * gnat_rm.texi: Document formal containers.
3139
3140 2011-08-02  Emmanuel Briot  <briot@adacore.com>
3141
3142         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
3143         are empty sections.
3144
3145 2011-08-02  Robert Dewar  <dewar@adacore.com>
3146
3147         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
3148         reformatting.
3149
3150 2011-08-02  Robert Dewar  <dewar@adacore.com>
3151
3152         * aspects.adb: New aspects Default_Value and Default_Component_Value
3153         New format of Aspect_Names table checks for omitted entries
3154         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
3155         handling of boolean aspects for derived types.
3156         New aspects Default_Value and Default_Component_Value
3157         New format of Aspect_Names table checks for omitted entries
3158         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
3159         (Has_Default_Value): New flag
3160         (Has_Default_Component_Value): New flag
3161         (Has_Default_Value): New flag
3162         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
3163         table.
3164         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
3165         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
3166         Default_Value and Default_Component_Value
3167         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
3168         New aspects Default_Value and Default_Component_Value
3169         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
3170         * sprint.adb: Print N_Aspect_Specification node when called from gdb
3171
3172 2011-08-02  Vincent Celier  <celier@adacore.com>
3173
3174         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
3175         inherit library kind.
3176
3177 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3178
3179         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
3180         Minor reformatting.
3181
3182 2011-08-02  Robert Dewar  <dewar@adacore.com>
3183
3184         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
3185
3186 2011-08-02  Yannick Moy  <moy@adacore.com>
3187
3188         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
3189
3190 2011-08-02  Robert Dewar  <dewar@adacore.com>
3191
3192         * impunit.adb: Add comment.
3193
3194 2011-08-02  Yannick Moy  <moy@adacore.com>
3195
3196         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
3197         qualification of aggregates in formal mode
3198         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
3199         another aggregate
3200         (Resolve_Aggregate): complete the test that an aggregate is adequately
3201         qualified in formal mode
3202
3203 2011-08-02  Pascal Obry  <obry@adacore.com>
3204
3205         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
3206         * mlib-prj.adb: Supress warning when compiling binder generated file.
3207         (Build_Library): Supress all warnings when compiling the binder
3208         generated file.
3209
3210 2011-08-02  Yannick Moy  <moy@adacore.com>
3211
3212         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
3213         from here...
3214         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
3215         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
3216         Add with/use clauses to make Check_Formal_Restriction visible
3217
3218 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3219
3220         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
3221         in-parameters when type of the generic formal is private in the generic
3222         spec and non-private in the body.
3223
3224 2011-08-02  Claire Dross  <dross@adacore.com>
3225
3226         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
3227         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
3228         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
3229         * impunit.adb, Makefile.rtl: Take new files into account.
3230
3231 2011-08-02  Robert Dewar  <dewar@adacore.com>
3232
3233         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
3234         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3235
3236 2011-08-02  Yannick Moy  <moy@adacore.com>
3237
3238         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
3239         formal mode
3240         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
3241         matching static array bounds, taking into account the special case of
3242         string literals
3243         * sem_ch3.adb: Typo in comment.
3244
3245 2011-08-02  Yannick Moy  <moy@adacore.com>
3246
3247         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
3248         which issues an error in formal mode if its argument node is originally
3249         from source
3250         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
3251         has a discriminant specification so that it does not include the case
3252         of derived types
3253         (Derived_Type_Declaration): move here the test that a derived type has a
3254         discriminant specification
3255         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
3256         first element of a component association before accessing its choices
3257         (presence of component association is not enough)
3258         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
3259         declaration is a library item before accessing the next element in a
3260         list, as library items are not member of lists
3261         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3262         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
3263         Check_Formal_Restriction whenever possible.
3264
3265 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3266
3267         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
3268         reference when needed.
3269
3270 2011-08-02  Bob Duff  <duff@adacore.com>
3271
3272         * gnat_ugn.texi: Fix typo.
3273
3274 2011-08-02  Vincent Celier  <celier@adacore.com>
3275
3276         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
3277         archive file name. Do not use the full path name of archives for Open
3278         VMS.
3279
3280 2011-08-02  Robert Dewar  <dewar@adacore.com>
3281
3282         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
3283         Analyze_Aspect_Specifications
3284         * sem_ch13.adb
3285         (Analyze_Aspect_Specifications): New handling for boolean aspects
3286         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
3287         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
3288         sequence for Analyze_Aspect_Specifications
3289         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
3290         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
3291
3292 2011-08-02  Robert Dewar  <dewar@adacore.com>
3293
3294         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
3295         aspects, since these no longer exist.
3296
3297 2011-08-02  Robert Dewar  <dewar@adacore.com>
3298
3299         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
3300         semicolon, do not try to see if there are aspects following it.
3301         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
3302         aspect spec.
3303
3304 2011-08-02  Robert Dewar  <dewar@adacore.com>
3305
3306         * sem_ch8.adb, aspects.ads: Minor reformatting.
3307
3308 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
3309
3310         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
3311         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
3312         extracted from...
3313         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
3314
3315 2011-08-02  Yannick Moy  <moy@adacore.com>
3316
3317         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
3318         mode on subprogram declaration outside of package specification, unless
3319         it is followed by a pragma Import
3320         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
3321         Access_Type_Declaration): issue error in formal mode on access type
3322         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
3323         incomplete type
3324         (Analyze_Object_Declaration): issue error in formal mode on object
3325         declaration which does not respect SPARK restrictions
3326         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
3327         declaration which does not respect SPARK restrictions
3328         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
3329         error in formal mode on digits or delta constraint
3330         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
3331         decimal fixed point type
3332         (Derived_Type_Declaration): issue error in formal mode on derived type
3333         other than type extensions of tagged record types
3334         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
3335         with check on access definition
3336         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
3337         mode on protected definition.
3338         (Analyze_Task_Definition): issue error in formal mode on task definition
3339
3340 2011-08-02  Robert Dewar  <dewar@adacore.com>
3341
3342         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
3343
3344 2011-08-02  Javier Miranda  <miranda@adacore.com>
3345
3346         * sem_ch6.adb (Can_Override_Operator): New function.
3347         (Verify_Overriding_Indicator): Add missing code to check overriding
3348         indicator in operators. Fixes regression.
3349         (Check_Overriding_Indicator): Minor reformating after replacing the
3350         code that evaluates if the subprogram can override an operator by
3351         invocations to the above new function.
3352         * einfo.adb
3353         (Write_Field26_Name): Add missing code to ensure that, following
3354         the documentation in einfo.ads, this field is not shown as attribute
3355         "Static_Initialization" on non-dispatching functions.
3356
3357 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
3358
3359         * sem_res.adb (Resolve_Call): A call to
3360         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
3361         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
3362         i.e., when the second parameter is of type Time_Span.
3363
3364 2011-08-02  Vincent Celier  <celier@adacore.com>
3365
3366         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
3367         with an archive instead of -L<library dir> -l<library name>.
3368
3369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3370
3371         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
3372         mark the base types In_Use in addition to making the operations
3373         use_visible.
3374
3375 2011-08-02  Ed Falis  <falis@adacore.com>
3376
3377         * init.c: add and setup __gnat_signal_mask for the exception signals
3378         * s-inmaop-vxworks.adb: new file.
3379         * s-intman-vxworks.adb: remove unnecessary initializations and
3380         simplify remaining
3381         * s-intman-vxworks.ads: remove unnecessary variable
3382         * s-taprop-vxworks.adb: simplify signal initialization
3383
3384 2011-08-02  Robert Dewar  <dewar@adacore.com>
3385
3386         * sem_ch8.adb: Minor code reorganization, comment updates.
3387
3388 2011-08-02  Robert Dewar  <dewar@adacore.com>
3389
3390         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
3391         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
3392         here from Sem_Res.
3393         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
3394         (Matching_Static_Array_Bounds): Moved here from Sem_Res
3395
3396 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3397
3398         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
3399         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
3400         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
3401         use_type_clauses, to handle more efficiently use_type and use_all_type
3402         constructs.
3403         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
3404         Ada2012 Use_All_Type clause.
3405         (Use_Class_Wide_Operations): new procedure.
3406
3407 2011-08-02  Robert Dewar  <dewar@adacore.com>
3408
3409         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
3410         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
3411         expression to expression function.
3412
3413 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3414
3415         * sem_ch4.adb: transform simple Ada2012 membership into equality only
3416         if types are compatible.
3417
3418 2011-08-02  Yannick Moy  <moy@adacore.com>
3419
3420         * sem_res.adb (Matching_Static_Array_Bounds): new function which
3421         returns True if its argument array types have same dimension and same
3422         static bounds at each index.
3423         (Resolve_Actuals): issue an error in formal mode on actuals passed as
3424         OUT or IN OUT paramaters which are not view conversions in SPARK.
3425         (Resolve_Arithmetic_Op): issue an error in formal mode on
3426         multiplication or division with operands of fixed point types which are
3427         not qualified or explicitly converted.
3428         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
3429         Boolean or array type (except String) operands.
3430         (Resolve_Equality_Op): issue an error in formal mode on equality
3431         operators for array types other than String with non-matching static
3432         bounds.
3433         (Resolve_Logical_Op): issue an error in formal mode on logical operators
3434         for array types with non-matching static bounds. Factorize the code in
3435         Matching_Static_Array_Bounds.
3436         (Resolve_Qualified_Expression): issue an error in formal mode on
3437         qualified expressions for array types with non-matching static bounds.
3438         (Resolve_Type_Conversion): issue an error in formal mode on type
3439         conversion for array types with non-matching static bounds
3440
3441 2011-08-02  Robert Dewar  <dewar@adacore.com>
3442
3443         * par-ch10.adb: Minor code reorganization (use Nkind_In).
3444
3445 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
3446
3447         * par-ch9.adb: save location of entry for proper error message.
3448
3449 2011-08-02  Javier Miranda  <miranda@adacore.com>
3450
3451         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
3452         (Use_Full_View) which permits this routine to climb through the
3453         ancestors using the full-view of private parents.
3454         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
3455         Use_Full_View to true in calls to Is_Ancestor.
3456         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
3457         true in call to Is_Ancestor.
3458         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
3459         Use_Full_View to true in call to Is_Ancestor.
3460         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
3461         call to Is_Ancestor.
3462         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
3463         Use_Full_View to true in calls to Is_Ancestor.
3464         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
3465         Make_Select_Specific_Data_Table, Register_Primitive,
3466         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
3467         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
3468         to true in call to Is_Ancestor.
3469         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
3470         Use_Full_View to true in calls to Is_Ancestor.
3471         * exp_cg.adb
3472         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
3473         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
3474
3475 2011-08-02  Robert Dewar  <dewar@adacore.com>
3476
3477         * gnat_rm.texi: Minor reformatting.
3478         * sem_prag.adb: Minor reformatting.
3479
3480 2011-08-02  Tristan Gingold  <gingold@adacore.com>
3481
3482         * vms_data.ads: Add VMS qualifier for -gnateP.
3483
3484 2011-08-02  Robert Dewar  <dewar@adacore.com>
3485
3486         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
3487         * par-ch7.adb (P_Package): Proper placement of aspects for package
3488         decl/instantiation.
3489         * par-endh.adb (Check_End): Ad Is_Sloc parameter
3490         (End_Statements): Add Is_Sloc parameterr
3491         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
3492         (Check_End): Ad Is_Sloc parameter
3493         (End_Statements): Add Is_Sloc parameterr
3494
3495 2011-08-02  Vincent Celier  <celier@adacore.com>
3496
3497         * ug_words: Add VMS qualifier equivalent to -gnateP:
3498         /SYMBOL_PREPROCESSING.
3499
3500 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
3501
3502         * gnat-style.texi: For hexadecimal numeric literals the typical
3503         grouping of digits is 4 to represent 2 bytes.
3504         A procedure spec which is split into several lines is indented two
3505         characters.
3506
3507 2011-08-02  Yannick Moy  <moy@adacore.com>
3508
3509         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
3510         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
3511         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
3512         properly qualified
3513         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
3514         choice in array aggregate
3515         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
3516         mark as ancestor
3517         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
3518         positional and named aggregate for record, or others in record
3519         aggregate, or multiple choice in record aggregate
3520         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
3521         array operands to logical operations AND, OR and XOR do not have the
3522         same static lower and higher bounds
3523         * sem_ch5.adb, sinfo.ads: Correct typos in comments
3524
3525 2011-08-01  Robert Dewar  <dewar@adacore.com>
3526
3527         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
3528         Replaces Last_Source_Node_In_Sequence.
3529         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
3530         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
3531         parens and blank in string (this was inconsistently implemented).
3532         * errout.ads
3533         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
3534         blank in string (this was inconsistently implemented).
3535         * gnat1drv.adb
3536         (Set_Global_Switches): Set formal mode switches appropriately
3537         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
3538         * par-prag.adb
3539         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
3540         call Set_Error_Msg_Lang to set "spark" as language name.
3541         * par.adb: Remove unnecessary call to set formal language for errout
3542         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
3543         appropriately and call Set_Error_Msg_Lang to set "spark" as language
3544         name.
3545         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
3546         calls to it, moved after resolution so that types are known
3547         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
3548         result of concatenation is not of type String
3549         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
3550         concatenation is not properly restricted
3551         * gnat_rm.texi: Add doc on pragma Spark_95.
3552         * gcc-interface/Makefile.in: Remove obsolete target pairs for
3553         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
3554         * gcc-interface/Make-lang.in: Update dependencies.
3555
3556 2011-08-01  Javier Miranda  <miranda@adacore.com>
3557
3558         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
3559         condition that detects if the overridden operation must replace an
3560         existing entity.
3561
3562 2011-08-01  Javier Miranda  <miranda@adacore.com>
3563
3564         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
3565         code declarations inserted by Insert_Actions in each alternative of the
3566         N_Case_Expression node.
3567
3568 2011-08-01  Robert Dewar  <dewar@adacore.com>
3569
3570         * sem_ch6.adb: Minor code reorganization.
3571         * sem_util.adb: Minor reformatting.
3572
3573 2011-08-01  Pascal Obry  <obry@adacore.com>
3574
3575         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
3576         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
3577
3578 2011-08-01  Yannick Moy  <moy@adacore.com>
3579
3580         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
3581         literal or operator symbol which is prefixed
3582         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
3583         mode on access attributes.
3584         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
3585         that concatenation operands are properly restricted in formal mode
3586         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
3587         Analyze_Concatenation_Operand. Issue an error in formal mode if the
3588         result of the concatenation has a type different from String.
3589         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
3590         Analyze_Quantified_Expression, Analyze_Slice,
3591         Analyze_Null): issue an error in formal mode on unsupported constructs
3592         * sem_ch5.adb
3593         (Analyze_Block_Statement): only issue error on source block statement
3594         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
3595         function which returns the last node in a list of nodes for which
3596         Comes_From_Source returns True, if any
3597         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
3598         Last_Source_Node_In_Sequence
3599         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
3600         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
3601         mode on unsupported constructs
3602         * sem_ch9.adb Do not return after issuing error in formal mode, as the
3603         rest of the actions may be needed later on since the error is marked as
3604         not serious.
3605         * sinfo.ads: Typos in comments.
3606
3607 2011-08-01  Pascal Obry  <obry@adacore.com>
3608
3609         * projects.texi: Minor editing.
3610
3611 2011-08-01  Yannick Moy  <moy@adacore.com>
3612
3613         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
3614         insertion character ~~
3615         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
3616         (Set_Error_Msg_Lang): new procedure which fixes the language for use
3617         with insertion character ~~
3618         (Set_Msg_Text): treat insertion character ~~
3619         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
3620         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
3621         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
3622         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
3623         errors related to the formal language restriction not serious
3624         (insertion character |).
3625         * par.adb (Par): set formal language for error messages if needed
3626         * sem_ch6.adb (Check_Missing_Return): take into account possible
3627         generated statements at the end of the function
3628         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
3629         enumeration value to define a new pragma SPARK_95
3630         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
3631         SPARK_Version): new type and variables to store the SPARK version
3632         (none by default).
3633         (SPARK_Mode): return True when SPARK_Version is set
3634         * par-prag.adb: Correct indentation
3635         (Prag): take Pragma_SPARK_95 into account
3636         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
3637         into account.
3638
3639 2011-08-01  Robert Dewar  <dewar@adacore.com>
3640
3641         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
3642         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
3643         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
3644
3645 2011-08-01  Pascal Obry  <obry@adacore.com>
3646
3647         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
3648         Target_Name to Get_Path call.
3649         (Parse_Single_Project): Likewise.
3650         (Post_Parse_Context_Clause): Likewise.
3651         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
3652         Call Initialise_Project_Path with the proper Target_Name.
3653         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
3654         search path.
3655         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
3656         with the proper Target_Name.
3657         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
3658         Part.Parse routine.
3659         (Parse_Project_And_Apply_Config): Likewise.
3660         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
3661         This is fine as this part of the code is supporting only native
3662         compilation.
3663         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
3664         is fine as this part of the code is supporting only native compilation.
3665
3666 2011-08-01  Yannick Moy  <moy@adacore.com>
3667
3668         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
3669         of homonym, unless the homonym is one of the cases allowed in SPARK
3670         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
3671         package declaration occurring after a body.
3672
3673 2011-08-01  Robert Dewar  <dewar@adacore.com>
3674
3675         * checks.adb, exp_ch4.adb: Minor reformatting.
3676
3677 2011-08-01  Javier Miranda  <miranda@adacore.com>
3678
3679         * einfo.ads (Access_Disp_Table): Fix documentation.
3680         (Dispatch_Table_Wrappers): Fix documentation.
3681
3682 2011-08-01  Pascal Obry  <obry@adacore.com>
3683
3684         * prj-env.adb, prj-env.ads: Minor reformatting.
3685
3686 2011-08-01  Yannick Moy  <moy@adacore.com>
3687
3688         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
3689         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
3690         procedures out of these packages.
3691         * errout.ads, errout.adb 
3692         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
3693         procedures in of this package
3694         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
3695         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
3696         on misplaced later vs initial declarations, like in Ada 83
3697         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
3698         formal mode on attribute of private type whose full type declaration
3699         is not visible
3700         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
3701         package declaration inside a package specification
3702         (Analyze_Full_Type_Declaration): issue error in formal mode on
3703         controlled type or discriminant type
3704         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
3705         user-defined operator means that it should come from the source
3706         (New_Overloaded_Entity): issue error in formal mode on overloaded
3707         entity.
3708         * sem_ch6.ads, sem_ch13.ads: typos in comments.
3709
3710 2011-08-01  Thomas Quinot  <quinot@adacore.com>
3711
3712         * atree.adb: Minor reformatting.
3713         * checks.adb: Minor reformatting.
3714
3715 2011-08-01  Vincent Celier  <celier@adacore.com>
3716
3717         * s-parame-vms-ia64.ads: Fix typo in comment
3718         Minor reformatting
3719         * s-parame-vms-restrict.ads: Removed, unused.
3720
3721 2011-08-01  Javier Miranda  <miranda@adacore.com>
3722
3723         * exp_ch3.adb
3724         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
3725         * sem_ch3.adb
3726         (Constrain_Index): Remove side effects in the evaluation of the bounds.
3727         * sem_ch3.ads, sem_ch3.adb
3728         (Is_Constant_Bound): New extended version of the subprogram that was
3729         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
3730         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
3731         * sem_aux.ads (Constant_Value): Fix typo in comment.
3732         * checks.adb (Generate_Index_Checks): New implementation which, for
3733         array objects with constant bounds, generates the runtime check
3734         referencing the bounds of the array type. For other cases this routine
3735         provides its previous behavior obtaining such values from the array
3736         object.
3737         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
3738         parent type.
3739         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
3740         we cannot have semantic interpretations of the new node.
3741
3742 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
3743
3744         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
3745         expressions.
3746
3747 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
3748
3749         * sem_ch8.adb: Minor code editing.
3750         * s-vxwext.adb: Remove trailing space.
3751         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
3752         consistency with other files.
3753
3754 2011-08-01  Thomas Quinot  <quinot@adacore.com>
3755
3756         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
3757
3758 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
3759
3760         * par-ch10.adb: reject parameterized expressions as compilation unit.
3761         * sem_ch4.adb: handle properly conditional expression with overloaded
3762         then_clause and no else_clause.
3763
3764 2011-08-01  Tristan Gingold  <gingold@adacore.com>
3765
3766         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
3767         like done by System.Aux_DEC.
3768         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
3769
3770 2011-08-01  Yannick Moy  <moy@adacore.com>
3771
3772         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
3773         missing label at end of declaration (subprogram or package)
3774         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
3775         of positional and named parameter association
3776         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
3777         Error_Msg_SP which adds a prefix to the error message giving the name
3778         of the formal language analyzed
3779         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
3780         access result type in subprogram, unconstrained array as result type,.
3781         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
3782         procedure
3783         * sem_ch8.adb: Code clean up.
3784
3785 2011-08-01  Javier Miranda  <miranda@adacore.com>
3786
3787         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
3788         * einfo.ads (Access_Disp_Table): Fix documentation.
3789         (Dispatch_Table_Wrappers): Fix documentation.
3790         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
3791         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
3792         to enforce the documentation of this attribute.
3793         (Set_Is_Interface): Cleanup the assertion.
3794         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
3795         the Underlying_Type entity before reading attribute Access_Disp_Table.
3796         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
3797         Locate the Underlying_Type before reading attribute Access_Disp_Table.
3798         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
3799         the Underlying_Type entity before reading attribute Access_Disp_Table.
3800         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
3801         Locate the Underlying_Type entity before reading attribute
3802         Access_Disp_Table.
3803
3804 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
3805
3806         * s-poosiz.ads: Additional overriding indicators.
3807
3808 2011-08-01  Yannick Moy  <moy@adacore.com>
3809
3810         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
3811         formal mode.
3812         (Analyze_Iteration_Scheme): issue error in formal mode when loop
3813         parameter specification does not include a subtype mark.
3814         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
3815         formal mode on abstract subprogram.
3816         (Analyze_Subprogram_Specification): issue error in formal mode on
3817         user-defined operator.
3818         (Process_Formals): issue error in formal mode on access parameter and
3819         default expression.
3820         * sem_ch9.adb (Analyze_Abort_Statement,
3821         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
3822         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
3823         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
3824         Analyze_Requeue, Analyze_Selective_Accept,
3825         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
3826         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
3827         issue error in formal mode on user-defined raise statement.
3828
3829 2011-08-01  Thomas Quinot  <quinot@adacore.com>
3830
3831         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
3832         declaration being hidden when overriding an implicit inherited
3833         subprogram.
3834         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
3835         (-gnats), do not complain about a source file that contains only a
3836         pragma No_Body.
3837
3838 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
3839
3840         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
3841         variable if already set.
3842
3843 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
3844
3845         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
3846         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
3847         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
3848         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
3849         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
3850         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
3851         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
3852         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
3853         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
3854         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
3855         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
3856         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
3857         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
3858         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
3859         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
3860         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
3861         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
3862         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
3863         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
3864         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
3865         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
3866         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
3867         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
3868         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
3869         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
3870         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
3871         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
3872         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
3873         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
3874         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
3875         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
3876         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
3877         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
3878         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
3879         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
3880         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
3881         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
3882         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
3883         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
3884         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
3885         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
3886         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
3887         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
3888         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
3889         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
3890         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
3891         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
3892         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
3893         s-osinte-mingw.ads: Update to GPLv3 run-time license.
3894         Use GNAT instead of GNARL.
3895
3896 2011-08-01  Bob Duff  <duff@adacore.com>
3897
3898         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
3899         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
3900         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
3901         reformatting.
3902
3903 2011-08-01  Yannick Moy  <moy@adacore.com>
3904
3905         * debug.adb (d.D) reverve flag for the SPARK mode
3906         (d.E) reverve flag for SPARK generation mode
3907         (d.F) reverve flag for Why generation mode
3908         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode, 
3909         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
3910         functions which return True when the corresponding modes are set
3911         (Formal_Language): return "spark" or "alfa" when in formal verification
3912         mode.
3913         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
3914         Error_Msg to prefix the error message with a tag giving the formal
3915         language
3916         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
3917         message with a tag giving the formal language
3918         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
3919         block statement
3920         (Analyze_Case_Statement): issue error in formal mode on case statement
3921         with a single "others" case alternative
3922         (Analyze_Exit_Statement): issue errors in formal mode on exit
3923         statements which do not respect SPARK restrictions
3924         (Analyze_Goto_Statement): issue error in formal mode on goto statement
3925         (Check_Unreachable_Code): always issue an error (not a warning) in
3926         formal mode on unreachable code (concerns both code after an infinite
3927         loop and after an unconditional jump, both not allowed in SPARK)
3928         * sem_ch6.adb (Analyze_Return_Statement): add call to
3929         Set_Return_Present for a procedure containing a return statement
3930         (already done for functions in Analyze_Function_Return)
3931         (Analyze_Function_Return): issue error in formal mode on extended
3932         return or if return is not last statement in function
3933         (Check_Missing_Return): issue error in formal mode if function does
3934         not end with return or if procedure contains a return
3935         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
3936         function to detect if there is an inner scope of its parameter S which
3937         is a loop.
3938
3939 2011-08-01  Thomas Quinot  <quinot@adacore.com>
3940
3941         * sem_ch6.ads: Minor reformatting.
3942
3943 2011-08-01  Javier Miranda  <miranda@adacore.com>
3944
3945         * sem_util.adb (Abstract_Interface_List): Complete condition when
3946         processing private type declarations to avoid reading unavailable
3947         attribute.
3948         (Is_Synchronized_Tagged_Type): Complete condition when processing
3949         private extension declaration nodes to avoid reading unavailable
3950         attribute.
3951
3952 2011-08-01  Thomas Quinot  <quinot@adacore.com>
3953
3954         * sem_ch3.adb: Minor reformatting.
3955
3956 2011-08-01  Thomas Quinot  <quinot@adacore.com>
3957
3958         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
3959         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
3960         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
3961         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
3962         for VMS, instead parametrize the common implementation with
3963         System.Parameters declarations.
3964
3965 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3966
3967         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
3968
3969 2011-08-01  Tristan Gingold  <gingold@adacore.com>
3970
3971         * seh_init.c: Fix SEH handler installation on win64.
3972
3973 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
3974
3975         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
3976         double analysis of an anonymous access to subprogram, because it can
3977         lead to improper sharing of profiles and a back-end crash.
3978
3979 2011-08-01  Robert Dewar  <dewar@adacore.com>
3980
3981         * make.adb, sem_ch4.adb: Minor reformatting.
3982         * gcc-interface/Make-lang.in: Update dependencies.
3983         * sem_util.adb, exp_ch5.adb: Minor reformatting.
3984
3985 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
3986
3987         * gnat_rm.texi: Fix definition of Long_Integer.
3988
3989 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
3990
3991         * exp_aggr.adb: check limit size of static aggregate unconditionally,
3992         to prevent storage exhaustion.
3993         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
3994         finalized is a function body, insert the cleanup code before the final
3995         return statement, to prevent spurious warnings.
3996         * s-pooglo.ads: add overriding indicator.
3997
3998 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
3999
4000         * sem_ch4.adb (Operator_Check): improve error message when both a
4001         with_clause and a use_clause are needed to make operator usage legal.
4002         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
4003         determine whether a compilation unit is visible within an other,
4004         either through a with_clause in the current unit, or a with_clause in
4005         its library unit or one one of its parents.
4006
4007 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
4008
4009         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
4010         over an arbitrary expression of an array or container type.
4011         * lib-xref.adb: clarify comment.
4012
4013 2011-08-01  Bob Duff  <duff@adacore.com>
4014
4015         * einfo.ads: Minor reformatting.
4016         * debug.adb: Minor comment improvement.
4017
4018 2011-08-01  Javier Miranda  <miranda@adacore.com>
4019
4020         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
4021         consider hidden subprograms as valid candidates.
4022
4023 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
4024
4025         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
4026
4027 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
4028
4029         * gnat_ugn.texi: Fix typo.
4030
4031 2011-08-01  Robert Dewar  <dewar@adacore.com>
4032
4033         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
4034         lib-xref.adb: Minor reformatting
4035
4036 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
4037
4038         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
4039         when to generate a call to Move_Final_List.
4040         (Has_Controlled_Parts): Remove this function.
4041
4042 2011-08-01  Geert Bosch  <bosch@adacore.com>
4043
4044         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
4045         "," in choice list.
4046
4047 2011-08-01  Thomas Quinot  <quinot@adacore.com>
4048
4049         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
4050         explicit raise of a predefined exception as Comes_From_Source if the
4051         original N_Raise_Statement comes from source.
4052
4053 2011-08-01  Robert Dewar  <dewar@adacore.com>
4054
4055         * sinfo.ads: Add comment.
4056         * sem_ch6.adb: Minor reformatting.
4057
4058 2011-08-01  Robert Dewar  <dewar@adacore.com>
4059
4060         * freeze.adb (Freeze_Entity): Refine check for bad component size
4061         clause to avoid rejecting confirming clause when atomic/aliased present.
4062
4063 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
4064
4065         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
4066         better determine whether an entity reference is a write.
4067         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
4068         subcomponent.
4069         * lib-xref.adb (Output_References): Do no suppress a read reference at
4070         the same location as an immediately preceeding modify-reference, to
4071         handle properly in-out actuals.
4072
4073 2011-08-01  Tristan Gingold  <gingold@adacore.com>
4074
4075         * env.c (__gnat_setenv) [VMS]: Refine previous change.
4076
4077 2011-08-01  Quentin Ochem  <ochem@adacore.com>
4078
4079         * i-cstrin.adb (New_String): Changed implementation, now uses only the
4080         heap to compute the result.
4081
4082 2011-08-01  Robert Dewar  <dewar@adacore.com>
4083
4084         * atree.ads: Minor reformatting.
4085
4086 2011-08-01  Emmanuel Briot  <briot@adacore.com>
4087
4088         * g-expect.adb (Get_Command_Output): Fix memory leak.
4089
4090 2011-08-01  Geert Bosch  <bosch@adacore.com>
4091
4092         * cstand.adb (P_Float_Type): New procedure to print the definition of
4093         predefined fpt types.
4094         (P_Mixed_Name): New procedure to print a name using mixed case
4095         (Print_Standard): Use P_Float_Type for printing floating point types
4096         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
4097         precision IEEE float.
4098
4099 2011-08-01  Thomas Quinot  <quinot@adacore.com>
4100
4101         * sem_ch3.adb: Minor reformatting.
4102
4103 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
4104
4105         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
4106         the completion of a generic function, insert the new body rather than
4107         rewriting the original.
4108
4109 2011-08-01  Yannick Moy  <moy@adacore.com>
4110
4111         * sinfo.ads, errout.ads: Typos in comments.
4112
4113 2011-08-01  Robert Dewar  <dewar@adacore.com>
4114
4115         * par-endh.adb: Minor reformatting.
4116
4117 2011-08-01  Robert Dewar  <dewar@adacore.com>
4118
4119         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
4120         (Pre_Post_Aspects): New subtype.
4121         * par-ch12.adb (P_Generic): New syntax for aspects in packages
4122         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
4123         * par-ch7.adb (P_Package): Remove Decl parameter
4124         (P_Package): Handle new syntax for aspects (before IS)
4125         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
4126         new aspect syntax
4127         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
4128         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
4129         (P_Package): Remove Decl parameter
4130         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
4131         aspects
4132         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
4133         specs
4134         * sem_util.ads, sem_util.adb (Static_Boolean): New function
4135         * sinfo.ads: Document new syntax for aspects in packages etc.
4136         * sprint.adb: Handle new syntax of aspects before IS in package
4137
4138 2011-08-01  Thomas Quinot  <quinot@adacore.com>
4139
4140         * atree.ads: Minor reformatting.
4141         * sem_prag.adb: Minor reformatting.
4142
4143 2011-08-01  Robert Dewar  <dewar@adacore.com>
4144
4145         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
4146         case expr alternative.
4147
4148 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
4149
4150         * sem_ch12.adb: Fix typo.
4151
4152 2011-08-01  Geert Bosch  <bosch@adacore.com>
4153
4154         * sem_prag.adb (Check_No_Link_Name): New procedure.
4155         (Process_Import_Or_Interface): Use Check_No_Link_Name.
4156         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
4157         instead of Standard_Long_Long_Float_Size global. Preparation for
4158         eventual removal of per type constants.
4159         * exp_util.ads (Get_Stream_Size): New function returning the stream
4160         size value of subtype E.
4161         * exp_util.adb (Get_Stream_Size): Implement new function.
4162         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
4163         function.
4164         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
4165         * einfo.adb:
4166         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
4167
4168 2011-08-01  Geert Bosch  <bosch@adacore.com>
4169
4170         * cstand.adb: Fix comments.
4171         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
4172         count of arguments.
4173
4174 2011-08-01  Robert Dewar  <dewar@adacore.com>
4175
4176         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
4177
4178 2011-08-01  Geert Bosch  <bosch@adacore.com>
4179
4180         * atree.ads: Fix comment.
4181
4182 2011-08-01  Robert Dewar  <dewar@adacore.com>
4183
4184         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
4185         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
4186         * par.adb: Add with for Namet.Sp.
4187         * par-tchk.adb: Minor reformatting.
4188
4189 2011-08-01  Vincent Celier  <celier@adacore.com>
4190
4191         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
4192         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
4193         of the init procedure of a SAL.
4194         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
4195         New procedure.
4196
4197 2011-08-01  Thomas Quinot  <quinot@adacore.com>
4198
4199         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
4200         reformatting.
4201
4202 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4203
4204         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
4205
4206 2011-08-01  Thomas Quinot  <quinot@adacore.com>
4207
4208         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
4209         conformant with its spec (return True only for types that have
4210         an overriding Initialize primitive operation that prevents them from
4211         having preelaborable initialization).
4212         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
4213         initialization for controlled types in Ada 2005 or later mode.
4214
4215 2011-08-01  Robert Dewar  <dewar@adacore.com>
4216
4217         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
4218         Postcondition.
4219         (Same_Aspect): New function.
4220         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
4221         Type_Invariant, Precondition, Postcondition.
4222         * snames.ads-tmpl: Add Name_Type_Invariant.
4223
4224 2011-08-01  Robert Dewar  <dewar@adacore.com>
4225
4226         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
4227         here.
4228         (Freeze_All_Ent): Fix error in handling inherited aspects.
4229         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
4230         already analyzed, but don't skip entire processing of a declaration,
4231         that's wrong in some cases of declarations being rewritten.
4232         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
4233         Don't delay for integer, string literals
4234         Treat predicates in usual manner for delay, remove special case code,
4235         not needed.
4236         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
4237         (Build_Predicate_Function): Update saved expression in aspect
4238         (Build_Invariant_Procedure): Update saved expression in aspect
4239         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
4240         of replacement of discriminant references if the reference is simple.
4241
4242 2011-08-01  Robert Dewar  <dewar@adacore.com>
4243
4244         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
4245         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
4246         Static_Predicate and Dynamic_Predicate.
4247         (Build_Predicate_Function): Add processing for Static_Predicate
4248         and Dynamic_Predicate.
4249         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
4250         (From_Static_Predicate): New flag
4251         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
4252
4253 2011-08-01  Robert Dewar  <dewar@adacore.com>
4254
4255         * usage.adb: Documentation cleanup for Ada version modes in usage.
4256         * expander.adb: Minor reformatting.
4257
4258 2011-08-01  Robert Dewar  <dewar@adacore.com>
4259
4260         * atree.ads: Minor comment fix.
4261         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
4262         a-witeio.ads, sem_prag.adb: Minor reformatting.
4263
4264 2011-08-01  Doug Rupp  <rupp@adacore.com>
4265
4266         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
4267         pointers. Use descrip.h header file for convenience. Add some
4268         comments.
4269
4270 2011-08-01  Robert Dewar  <dewar@adacore.com>
4271
4272         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
4273         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
4274         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
4275         New procedure.
4276         (Check_Aspect_At_End_Of_Declarations): New procedure
4277         (Analye_Aspect_Specification): Minor changes for above procedures
4278         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
4279         specification node as well.
4280
4281 2011-08-01  Pascal Obry  <obry@adacore.com>
4282
4283         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
4284         Windows files. Use GetFilesAttributes() in this case to check for file
4285         existence instead of returning with an error code.
4286
4287 2011-08-01  Vincent Celier  <celier@adacore.com>
4288
4289         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
4290         High is above Source length.
4291
4292 2011-08-01  Robert Dewar  <dewar@adacore.com>
4293
4294         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
4295
4296 2011-08-01  Robert Dewar  <dewar@adacore.com>
4297
4298         * aspects.ads (Boolean_Aspects): New subtype.
4299         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
4300         for derived types in cases where the parent type and derived type have
4301         aspects.
4302         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
4303         with aspects when parent type also has aspects.
4304         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
4305         boolean expression at this point).
4306         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
4307         accordance with final decision on the Ada 2012 feature.
4308         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
4309
4310 2011-08-01  Matthew Heaney  <heaney@adacore.com>
4311
4312         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
4313
4314 2011-08-01  Pascal Obry  <obry@adacore.com>
4315
4316         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
4317         Fix Replace_Slice when High is above current string size.
4318         (Replace_Slice): Fix DL computation when High is above current
4319         string length.
4320
4321 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
4322
4323         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
4324
4325 2011-08-01  Matthew Heaney  <heaney@adacore.com>
4326
4327         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
4328         of node.
4329
4330 2011-08-01  Pascal Obry  <obry@adacore.com>
4331
4332         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
4333         reformatting.
4334
4335 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
4336
4337         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
4338         access to protected subprograms in generic bodies.
4339         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
4340         protected type, indicate that the convention of the subprogram is
4341         Convention_Protected, because it may be used in subsequent declarations
4342         within the protected declaration.
4343
4344 2011-08-01  Vincent Celier  <celier@adacore.com>
4345
4346         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
4347         and "final" procedures when the name of the library is "ada", to avoid
4348         duplicate symbols "adainit" and "adafinal" in executables.
4349
4350 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
4351
4352         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
4353         quantified expression that appears within a postcondition and uses the
4354         Ada2012 'Result attribute.
4355
4356 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4357
4358         * init.c (__gnat_error_handler): Cast reason to int.
4359         (__gnat_install_handler): Explain sa_sigaction use.
4360
4361 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
4362
4363         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
4364         subprogram has copy-in copy-out parameters, try to promote the mode of
4365         the return type if it is passed in registers.
4366
4367 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
4368
4369         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
4370         left operand as addressable.
4371
4372 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
4373
4374         * gcc-interface/gigi.h (build_function_stub): Remove.
4375         (build_return_expr): Likewise.
4376         (convert_vms_descriptor): Declare.
4377         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
4378         (build_function_stub): Move to...
4379         * gcc-interface/utils2.c (build_return_expr): Move to...
4380         * gcc-interface/trans.c (build_function_stub): ...here.
4381         (build_return_expr): ...here.
4382         (Subprogram_Body_to_gnu): Add local variable for language_function.
4383         Disconnect the parameter attributes cache, if any, once done with it.
4384         Call end_subprog_body only after setting the end_locus.
4385         Build the stub associated with the function, if any, at the very end.
4386         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
4387         variables and streamline control flow.
4388
4389 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
4390
4391         PR ada/49819
4392         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
4393         g-trasym-dwarf.adb.
4394
4395 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4396
4397         PR bootstrap/49794
4398         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
4399         Assign to act.sa_sigaction.
4400         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
4401         current->return_address to char * before arithmetic.
4402
4403 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4404
4405         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
4406         Correct argument types.
4407         Extract code from reason.
4408         (__gnat_install_handler): Assign to act.sa_sigaction.
4409
4410 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
4411
4412         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
4413         (GNAT1_OBJS): ...here.
4414
4415 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
4416
4417         PR ada/48711
4418         * g-socthi-mingw.adb (Fill): Fix formatting.
4419
4420         * gcc-interface/gigi.h: Move around comment.
4421
4422 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4423
4424         PR ada/46350
4425         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
4426
4427 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
4428
4429         PR ada/48711
4430         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
4431
4432 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
4433
4434         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
4435         range comparison if Pmode is SImode.
4436
4437 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
4438             Eric Botcazou  <ebotcazou@adacore.com>
4439
4440         * adadecode.c: Wrap up in extern "C" block.
4441         * adadecode.h: Likewise.
4442         * adaint.c: Likewise.  Remove 'const' keyword.
4443         * adaint.h: Likewise.
4444         * argv.c: Likewise.
4445         * atree.h: Likewise.
4446         * cio.c: Likewise.
4447         * cstreams.c: Likewise.
4448         * env.c: Likewise.
4449         * exit.c: Likewise.
4450         * fe.h: Likewise.
4451         * final.c: Likewise.
4452         * init.c: Likewise.
4453         * initialize.c: Likewise.
4454         * link.c: Likewise.
4455         * namet.h: Likewise.
4456         * nlists.h: Likewise.
4457         * raise.c: Likewise.
4458         * raise.h: Likewise.
4459         * repinfo.h: Likewise.
4460         * seh_init.c: Likewise.
4461         * targext.c: Likewise.
4462         * tracebak.c: Likewise.
4463         * uintp.h: Likewise.
4464         * urealp.h: Likewise.
4465         * xeinfo.adb: Wrap up generated C code in extern "C" block.
4466         * xsinfo.adb: Likewise.
4467         * xsnamest.adb: Likewise.
4468         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
4469         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
4470         * gcc-interface/misc.c: Likewise.
4471         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
4472         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
4473         ada/targext.o here...
4474         (GNAT_ADA_OBJS): ...and not here.
4475         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
4476         (GNATBIND_OBJS): Reorder.
4477
4478 2011-07-07  Richard Henderson  <rth@redhat.com>
4479
4480         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
4481         dwarf2out_frame_init.
4482
4483 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
4484
4485         * gcc-interface/misc.c (gnat_init): Tweak previous change.
4486
4487 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4488
4489         PR target/39150
4490         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
4491
4492 2011-07-06  Richard Guenther  <rguenther@suse.de>
4493
4494         * gcc-interface/misc.c (gnat_init): Merge calls to
4495         build_common_tree_nodes and build_common_tree_nodes_2.
4496         Re-initialize boolean_false_node.
4497
4498 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4499             Olivier Hainque  <hainque@adacore.com>
4500             Nicolas Setton  <setton@adacore.com>
4501
4502         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
4503         the type according to the ARTIFICIAL_P parameter.
4504         (create_type_decl): Likewise.
4505         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
4506
4507 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
4508
4509         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
4510         (gnatbind): Likewise.
4511
4512 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4513
4514         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
4515
4516 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
4517
4518         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
4519         local variable throughout.  Remove useless call to Base_Type.
4520         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
4521         Take it also into account for the volatileness of the field.  Set the
4522         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
4523
4524 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
4525
4526         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
4527         on a dereference built for a by-ref object if it has an address clause.
4528
4529 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
4530
4531         * einfo.ads (Address_Taken): Document use for the second argument of
4532         Asm_Input and Asm_Output attributes.
4533         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
4534         argument is an entity name, then set Address_Taken on it.
4535         <Attribute_Asm_Output>: Likewise.
4536         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
4537         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
4538         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
4539         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
4540
4541 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
4542
4543         PR middle-end/46500
4544         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
4545
4546 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
4547
4548         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
4549         (ada/utils.o): Update dependencies.
4550         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
4551         ../../../libcpp/libcpp.a.
4552         * gcc-interface/utils.c: Include common/common-target.h.
4553         (process_attributes): Use targetm_common.have_named_sections.
4554
4555 2011-06-07  Richard Guenther  <rguenther@suse.de>
4556
4557         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
4558         set_sizetype.
4559
4560 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
4561
4562         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
4563         TREE_THIS_NOTRAP flag.
4564
4565 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
4566
4567         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
4568         Fix thinko.
4569
4570 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
4571
4572         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
4573         constants whose full view has discriminants specially.
4574
4575 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
4576
4577         * gcc-interface/utils.c: Include diagnostic.h.
4578         (gnat_write_global_declarations): Output debug information for all
4579         global type declarations before finalizing the compilation unit.
4580         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
4581
4582 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
4583
4584         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
4585
4586 2011-05-25  Kai Tietz  <ktietz@redhat.com>
4587
4588         * adaint.c (__gnat_to_canonical_file_list_next): Use array
4589         initialization instead of const/none-const pointer assignment.
4590
4591 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
4592
4593         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
4594         $(EXTRA_GNAT1_OBJS).
4595         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
4596         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
4597         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
4598         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
4599         libcommon-target.a instead of prefix.o.
4600
4601 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
4602
4603         PR ada/49097
4604         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
4605
4606 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
4607
4608         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
4609         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
4610         instead of version.o.
4611
4612 2011-05-18  Kai Tietz <ktietz@redhat.com>
4613
4614         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
4615         boolean_false_node instead of integer_zero_node.
4616         (convert_with_check): Likewise.
4617         * gcc-interface/decl.c (choices_to_gnu): Likewise.
4618
4619 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
4620
4621         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
4622         type of the parameter is an unconstrained array, convert the actual to
4623         the type of the formal in the In Out and Out cases as well.
4624
4625 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
4626
4627         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
4628         call build_function_type_array or build_varargs_function_type_array
4629         instead.
4630         (create_subprog_type): Don't call build_function_type; call
4631         build_function_type_vec instead.
4632
4633 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
4634
4635         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
4636         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
4637         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
4638
4639 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
4640
4641         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
4642
4643         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
4644         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
4645
4646 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
4647
4648         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
4649
4650 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
4651
4652         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
4653         instead of accessing TYPE_ARG_TYPES directly.
4654         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
4655
4656 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
4657
4658         PR ada/48844
4659         * gcc-interface/gigi.h (get_variant_part): Declare.
4660         * gcc-interface/decl.c (get_variant_part): Make global.
4661         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
4662         types have the same constant size, are record types and T1 has a
4663         variant part while T2 doesn't.
4664
4665 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
4666
4667         * gcc-interface/utils.c (begin_subprog_body): Do not call
4668         get_pending_sizes.
4669         (end_subprog_body): Likewise.
4670
4671 2011-05-04  Richard Guenther  <rguenther@suse.de>
4672
4673         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
4674         int_const_binop.
4675         (pos_to_constructor): Likewise.
4676
4677 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
4678             Eric Botcazou  <ebotcazou@adacore.com>
4679
4680         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
4681         of build_function_type.  Adjust calls to...
4682         (build_raise_check): ...this.  Do not take a void_tree parameter.
4683         Call build_function_type_list instead of build_function_type.
4684         Fix head comment and swap couple of conditional blocks.
4685
4686 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
4687
4688         * gnatvsn.ads (Library_Version): Bump to 4.7.
4689         (Current_Year): Bump to 2011.
4690
4691 2011-04-29  Michael Matz  <matz@suse.de>
4692
4693         * gcc-interface/misc.c (gnat_handle_option): Set
4694         warn_maybe_uninitialized.
4695
4696 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
4697
4698         * gnat_ugn.texi (Complexity Metrics Control): Update link to
4699         the Watson/McCabe paper.
4700
4701 2011-04-23  Jim Meyering  <meyering@redhat.com>
4702
4703         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
4704
4705 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
4706
4707         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
4708         onto the new type.
4709
4710 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
4711
4712         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
4713         parameter.
4714         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
4715         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
4716         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
4717         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
4718         <all>: Do not set flags on the reused DECL node coming from an alias.
4719         Set DECL_IGNORED_P on the DECL node built for subprograms if they
4720         don't need debug info here...
4721         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
4722         (gigi): Adjust calls to create_subprog_decl.
4723         (build_raise_check): Likewise.
4724         (establish_gnat_vms_condition_handler): Likewise.
4725         (Compilation_Unit_to_gnu): Likewise.
4726         (gnat_to_gnu): Likewise.
4727
4728 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
4729
4730         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
4731         (NO_REORDER_ADAFLAGS): New variable.
4732         (EXTRA_GNATTOOLS): Always define.
4733         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
4734         Clean up and adjust list of files compiled with special options.
4735         * gcc-interface/Make-lang.in: Likewise.
4736         (ada/decl.o): Cosmetical change.
4737         (ada/misc.o): Remove dependency on $(PLUGIN_H).
4738
4739 2011-04-20  Jim Meyering  <meyering@redhat.com>
4740
4741         * initialize.c (__gnat_initialize): Remove useless if-before-free.
4742
4743 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
4744
4745         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
4746         $(CFLAGS) on the link line.
4747
4748 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
4749
4750         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
4751         padded type built for the return type if it is unconstrained.
4752
4753 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
4754
4755         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
4756
4757 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
4758
4759         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
4760         before calling TREE_CHAIN.
4761         * gcc-interface/misc.c (gnat_init_ts): New function.
4762         (LANG_HOOKS_INIT_TS): Define.
4763
4764 2011-04-12  Martin Jambor  <mjambor@suse.cz>
4765
4766         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
4767         instead of cgraph_node.
4768
4769 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
4770
4771         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
4772         alignment on fields of the RETURN type built for the Copy-In Copy-Out
4773         mechanism.
4774
4775 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
4776
4777         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
4778         of aggregate types that contain a placeholder.
4779
4780 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
4781
4782         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
4783         TYPE_ARG_TYPES.
4784         (handle_type_generic_attribute): Likewise.
4785
4786 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
4787
4788         PR ada/47163
4789         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
4790
4791 2011-04-04  Kai Tietz  <ktietz@redhat.com>
4792
4793         PR ada/47163
4794         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
4795         to flag value.
4796
4797 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4798
4799         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
4800         type case, do not strip a padding type around the array type.
4801
4802 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4803
4804         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
4805         types.
4806
4807 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4808
4809         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
4810         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
4811         code for -feliminate-unused-debug-types.
4812         (gnat_post_options): Likewise.
4813
4814 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4815
4816         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
4817         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
4818         distinct copy.
4819
4820 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4821
4822         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
4823         DECL_ARTIFICIAL flag on enumeration types.
4824
4825 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4826
4827         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
4828         fat pointer types artificial unconditionally.
4829         <E_Array_Subtype>: Attach the base array type as a parallel type if it
4830         isn't artificial.
4831
4832 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4833
4834         * gcc-interface/gigi.h (get_dummy_type): Declare.
4835         (build_dummy_unc_pointer_types): Likewise.
4836         (finish_fat_pointer_type): Likewise.
4837         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
4838         fat pointer type has been built, complete it in place.
4839         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
4840         and thin pointers.  Remove useless variable.
4841         (finish_fat_pointer_type): Make global and move to...
4842         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
4843         (get_dummy_type): New function.
4844         (build_dummy_unc_pointer_types): Likewise.
4845         (gnat_pushdecl): Propage the name to the anonymous variants only.
4846         (update_pointer_to): Only adjust the pointer types in the unconstrained
4847         array case.
4848
4849 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4850
4851         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
4852         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
4853         if this is a Taft amendment type and the full declaration is available.
4854         * gcc-interface/trans.c (process_type): Likewise.
4855         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
4856         (process_freeze_entity): Likewise.
4857         * gcc-interface/utils.c (dummy_global): New static variable.
4858         (gnat_write_global_declarations): If there are types declared as used
4859         at the global level, insert them in the global hash table.
4860
4861 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4862
4863         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
4864         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
4865         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
4866         copy.
4867         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
4868         flag of the type accordingly.
4869         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
4870
4871 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
4872
4873         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
4874         finalizing types when updating the pointers to the designated type.
4875         <all>: Finalize the deferred types even if we didn't defer processing
4876         of incomplete types in this invocation.
4877
4878 2011-04-01  Olivier Hainque  <hainque@adacore.com>
4879             Nicolas Setton  <setton@adacore.com>
4880             Eric Botcazou  <ebotcazou@adacore.com>
4881
4882         * gcc-interface/misc.c (gnat_descriptive_type): New function.
4883         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
4884
4885 2011-03-28  Kai Tietz  <ktietz@redhat.com>
4886
4887         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
4888         Windows targets.
4889         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
4890         * system-mingw.ads (System): Change ZCX_By_Default default to True.
4891
4892         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
4893
4894 2011-03-28  Tristan Gingold  <gingold@adacore.com>
4895
4896         PR ada/44431
4897         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
4898         Use ada output of gnatbind.
4899         (ada/b_gnatb.adb): Ditto.
4900         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
4901         (ada.mostlyclean, ada.stage1)
4902         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
4903         (ada.stagefeedback): Adjust.
4904         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
4905         Use ada output of gnatbind.
4906         (b_gnatm.adb): Ditto.
4907         (b_gnatl.o, b_gnatm.o): New rules.
4908
4909 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
4910
4911         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
4912         for the padded type built to support a specified size or alignment.
4913
4914 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
4915
4916         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
4917         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
4918         unconditionally to the end of the unit when the designated type is
4919         limited_with'ed.
4920         <all>: Rename local variable.  Attempt to un-defer types only and do it
4921         for limited_with'ed types as well.
4922         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
4923         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
4924         consistently and remove redundant call to finalize_from_with_types.
4925
4926 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
4927
4928         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
4929         subprograms without a previous spec declared in the same unit.
4930         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
4931         subprograms at the end of the unit instead of at the beginning.
4932         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
4933         isn't public for the special handling of non-inline functions nested
4934         inside inline external functions.
4935
4936 2011-03-25  Jeff Law  <law@redhat.com>
4937
4938         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
4939
4940 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
4941
4942         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
4943         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
4944         to compute Set_Size_Depends_On_Discriminant.
4945         (Layout_Type): Call it on array types in back-end layout mode.
4946         * sem_util.adb (Requires_Transient_Scope): Return true for array
4947         types only if the size depends on the value of discriminants.
4948         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
4949         type if the RHS is a call to a function that returns an unconstrained
4950         type with default discriminant.
4951
4952 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
4953
4954         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
4955         non-conversion to the nominal result type at the end.
4956
4957 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
4958
4959         * gcc-interface/trans.c (create_temporary): New function taken from...
4960         (create_init_temporary): ...here.  Call it.
4961         (call_to_gnu): Create the temporary for the return value early, if any.
4962         Create it for a function with copy-in/copy-out parameters if there is
4963         no target; in other cases of copy-in/copy-out, use another temporary.
4964         Push the new binding level lazily.  Add and rename local variables.
4965
4966 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
4967
4968         * gcc-interface/decl.c (validate_size): Improve comments and tweak
4969         error message.
4970         (set_rm_size): Likewise.
4971
4972 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
4973
4974         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
4975         for the padded type built in order to support a specified alignment.
4976         Fix incorrect formatting.
4977
4978 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
4979
4980         PR bootstrap/48216
4981         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
4982
4983 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
4984
4985         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
4986         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
4987         to the end of the list.  Adjust recursive call.  Rename local variable.
4988         If REORDER is true, reorder components of the record type.
4989         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
4990         components_to_record and adjust the parameter list.
4991
4992 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
4993
4994         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
4995         disabled, use the variable for bounds of loop iteration scheme.
4996
4997 2011-03-21  Kai Tietz  <ktietz@redhat.com>
4998
4999         PR target/12171
5000         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
5001
5002 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
5003
5004         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
5005         out whether the expression is read-only.  Short-circuit placeholder
5006         case and rename a couple of local variables.
5007
5008 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
5009
5010         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
5011         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
5012         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
5013         (convert): Deal with conversions from a smaller form type specially.
5014
5015 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
5016
5017         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
5018         its argument, except for the special -I- switch.
5019
5020 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
5021
5022         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
5023         "Ada Issues".
5024
5025 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
5026
5027         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
5028
5029 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
5030
5031         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
5032         GNAT_FORMAL.
5033         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
5034         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
5035         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
5036         Do not generate the check directly, instead instantiate the template
5037         check present in the descriptor.
5038         (make_descriptor_field): Move around.
5039         (build_vms_descriptor32): Build a template check in the POINTER field.
5040         (build_vms_descriptor): Remove useless suffixes.
5041         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
5042
5043 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
5044
5045         PR bootstrap/47467
5046         * targext.c: Include target files if IN_RTS is defined.
5047
5048 2011-01-26  Richard Guenther  <rguenther@suse.de>
5049
5050         PR bootstrap/47467
5051         * targext.c: Include config.h.
5052         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
5053         dependency.
5054
5055 2011-01-04  Pascal Obry  <obry@adacore.com>
5056             Eric Botcazou  <ebotcazou@adacore.com>
5057
5058         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
5059
5060 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
5061
5062         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
5063         end-of-case on the end label and its associated gotos, if any.
5064
5065 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
5066
5067         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
5068         expressions of the parameter cache within the statement group of
5069         the CICO mechanism.
5070
5071 2011-01-04  Olivier Hainque  <hainque@adacore.com>
5072             Eric Botcazou  <ebotcazou@adacore.com>
5073
5074         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
5075         (set_end_locus_from_node): New function.
5076         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
5077         make and the function end_locus.
5078         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
5079         for the elaboration subprogram.
5080         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
5081         set the end_locus of the expression as well.
5082
5083 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
5084
5085         PR ada/47131
5086         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
5087         variables that are referenced in exception handlers volatile.
5088
5089
5090 \f
5091 Copyright (C) 2011 Free Software Foundation, Inc.
5092
5093 Copying and distribution of this file, with or without modification,
5094 are permitted in any medium without royalty provided the copyright
5095 notice and this notice are preserved.
5096
5097         * gnat_rm.texi: Ramification of pragma Eliminate documentation
5098          - fix bugs in the description of Source_Trace;
5099          - get rid of UNIT_NAME;
5100
5101 2011-08-02  Javier Miranda  <miranda@adacore.com>
5102
5103         * exp_ch9.adb
5104         (Build_Dispatching_Requeue): Adding support for VM targets
5105         since we cannot directly reference the Tag entity.
5106         * exp_sel.adb (Build_K): Adding support for VM targets.
5107         (Build_S_Assignment): Adding support for VM targets.
5108         * exp_disp.adb
5109         (Default_Prim_Op_Position): In VM targets do not restrict availability
5110         of predefined interface primitives to compiling in Ada 2005 mode.
5111         (Is_Predefined_Interface_Primitive): In VM targets this service is not
5112         restricted to compiling in Ada 2005 mode.
5113         (Make_VM_TSD): Generate code that declares and initializes the OSD
5114         record. Needed to support dispatching calls through synchronized
5115         interfaces.
5116         * exp_ch3.adb
5117         (Make_Predefined_Primitive_Specs): Enable generation of predefined
5118         primitives associated with synchronized interfaces.
5119         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
5120         primitives associated with synchronized interfaces.
5121
5122 2011-08-02  Yannick Moy  <moy@adacore.com>
5123
5124         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
5125         statements hidden in SPARK if preceded by the HIDE directive
5126         (Parse_Exception_Handlers): mark each exception handler in a sequence of
5127         exception handlers as hidden in SPARK if preceded by the HIDE directive
5128         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
5129         if starting with the HIDE directive
5130         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
5131         starting with the HIDE directive; mark the declarations in a private
5132         part as hidden in SPARK if the private part starts with the HIDE
5133         directive
5134         * restrict.adb, restrict.ads
5135         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
5136         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
5137         argument node belongs to a part which is hidden in SPARK
5138         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
5139         parts in SPARK; protect the possibly costly call to
5140         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
5141         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
5142         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
5143         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
5144         Tok_SPARK_Hide.
5145         (Scan): recognize special comment starting with '#' and followed by
5146         SPARK keyword "hide" as a HIDE directive.
5147
5148 2011-08-02  Yannick Moy  <moy@adacore.com>
5149
5150         * types.ads, erroutc.ads: Minor reformatting.
5151
5152 2011-08-02  Vincent Celier  <celier@adacore.com>
5153
5154         * link.c: Add response file support for cross platforms.
5155
5156 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5157
5158         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
5159         in an association, set parent field of copy before partial analysis.
5160         * sem_res.adb (Resolve_Slice): create reference to itype only when
5161         expansion is enabled.
5162
5163 2011-08-02  Yannick Moy  <moy@adacore.com>
5164
5165         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
5166         for new flag denoting which subprogram bodies are in ALFA
5167         * restrict.adb, sem_ch7.adb: Update comment
5168         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5169         sem_ch9.adb, sem_res.adb: Add calls to
5170         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5171         * sem_ch6.adb (Analyze_Function_Return): add calls to
5172         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5173         middle of the body, and extended return.
5174         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5175         False when missing return.
5176         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5177         to True for subprograms whose spec is in ALFA. Remove later on the flag
5178         on the entity used for a subprogram body when there exists a separate
5179         declaration.
5180         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5181         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5182         False, otherwise do nothing.
5183
5184 2011-08-02  Robert Dewar  <dewar@adacore.com>
5185
5186         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5187
5188 2011-08-02  Yannick Moy  <moy@adacore.com>
5189
5190         * sem_ch4.ads: minor formatting.
5191
5192 2011-08-02  Yannick Moy  <moy@adacore.com>
5193
5194         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5195         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5196         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5197         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5198         opt.ads: cleanup of SPARK mode
5199
5200 2011-08-02  Yannick Moy  <moy@adacore.com>
5201
5202         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5203         types.
5204         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5205         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5206         * sem_ch3.adb
5207         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5208         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5209         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5210         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5211         types.
5212         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5213         non-static range.
5214         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5215         functions whose return type is not in ALFA.
5216         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5217         specifications.
5218         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5219         parameter's type is not in ALFA.
5220         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5221         types are in ALFA.
5222
5223 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5224
5225         * sem_ch6 (Analyze_Expression_Function): treat the function as
5226         Inline_Always, and introduce a subprogram declaration for it when it is
5227         not a completion.
5228         * inline.adb (Add_Inlined_Body): recognize bodies that come from
5229         expression functions, so that the back-end can determine whether they
5230         can in fact be inlined.
5231         * sem_util.adb (Is_Expression_Function): predicate to determine whether
5232         a function body comes from an expression function.
5233
5234 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5235
5236         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5237         null exclusions to test Can_Never_Be_Null on the anonymous access types
5238         of the formals rather than testing the formals themselves. Exclude this
5239         check in cases where the Old_Formal is marked as a controlling formal,
5240         to avoid issuing spurious errors for bodies completing dispatching
5241         operations (due to the flag not getting set on controlling access
5242         formals in body specs).
5243         (Find_Corresponding_Spec): When checking full and subtype conformance of
5244         subprogram bodies in instances, pass Designated and E in that order, for
5245         consistency with the expected order of the formals (New_Id followed by
5246         Old_Id).
5247
5248 2011-08-02  Robert Dewar  <dewar@adacore.com>
5249
5250         * sem_ch8.adb: Minor reformatting.
5251
5252 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5253
5254         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5255         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5256         primitive operations of class-wide actuals.
5257
5258 2011-08-02  Javier Miranda  <miranda@adacore.com>
5259
5260         * exp_atag.ads, exp_atag.adb
5261         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5262         since its value is implicitly passed in argument Typ.
5263         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5264         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5265         Build_Common_Dispatching_Select_Statements.
5266
5267 2011-08-02  Robert Dewar  <dewar@adacore.com>
5268
5269         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5270         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5271         Minor reformatting.
5272
5273 2011-08-02  Robert Dewar  <dewar@adacore.com>
5274
5275         * sem_res.adb: Minor reformatting.
5276         * sem_prag.adb: Minor reformatting.
5277
5278 2011-08-02  Javier Miranda  <miranda@adacore.com>
5279
5280         * exp_atag.adb, exp_atags.ads
5281         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5282         by the tagged type Entity. Required to use this routine in the VM
5283         targets since we do not have available the Tag entity in the VM
5284         platforms.
5285         * exp_ch6.adb
5286         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5287         Ada.Tags has not been previously loaded.
5288         * exp_ch7.adb
5289         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5290         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5291         * sem_aux.adb
5292         (Enclosing_Dynamic_Scope): Add missing support to handle the full
5293         view of enclosing scopes. Required to handle enclosing scopes that
5294         are synchronized types whose full view is a task type.
5295         * exp_disp.adb
5296         (Build_VM_TSDs): Minor code improvement to avoid generating and
5297         analyzing lists with empty nodes.
5298         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5299         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5300         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5301         (Make_Disp_Timed_Select_Body): Add support for VM targets.
5302         (Make_Select_Specific_Data_Table): Add support for VM targets.
5303         (Make_VM_TSD): Generate code to initialize the SSD structure of
5304         the TSD.
5305
5306 2011-08-02  Yannick Moy  <moy@adacore.com>
5307
5308         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5309         cross-references section in ALI.
5310         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5311         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5312         Sub).
5313         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5314         subprogram or package entity of a node
5315         (Is_Local_Reference_Type): new function returns True for references
5316         selected in local cross-references.
5317         (Lt): function extracted from Lt in Output_References
5318         (Write_Entity_Name): function extracted from Output_References
5319         (Generate_Definition): generate reference with type 'D' for definition
5320         of objects (object declaration and parameter specification), with
5321         appropriate locations and units, for use in local cross-references.
5322         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5323         references of type 'I' for initialization in object definition.
5324         (Output_References): move part of function Lt and procedure
5325         Write_Entity_Name outside of the body. Ignore references of types 'D'
5326         and 'I' introduced for local cross-references.
5327         (Output_Local_References): new procedure to output the local
5328         cross-references sections.
5329         (Lref_Entity_Status): new array defining whether an entity is a local
5330         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5331         with 'I' type when initialization expression is present.
5332         * get_scos.adb, get_scos.ads: Correct comments and typos
5333
5334 2011-08-02  Javier Miranda  <miranda@adacore.com>
5335
5336         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5337         the JVM target.
5338         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5339         the JVM target.
5340         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5341         TSD support.
5342
5343 2011-08-02  Vincent Celier  <celier@adacore.com>
5344
5345         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5346         (No_Space_Img): New function
5347         (Find_Excluded_Sources): When reading from a file, record the file name
5348         and the line number for each excluded source.
5349         (Mark_Excluded_Sources): When reporting an error, if the excluded
5350         sources were read from a file, include file name and line number in
5351         the error message.
5352
5353 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5354
5355         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5356
5357 2011-08-02  Robert Dewar  <dewar@adacore.com>
5358
5359         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5360
5361 2011-08-02  Javier Miranda  <miranda@adacore.com>
5362
5363         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5364         generation of TSDs to the DOTNET compiler.
5365         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5366         generation of TSDs to the DOTNET compiler.
5367
5368 2011-08-02  Javier Miranda  <miranda@adacore.com>
5369
5370         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5371         record of all the tagged types declared inside library level package
5372         declarations, library level package bodies or library level subprograms.
5373         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5374         associated with a given tagged type.
5375         (Build_VM_TSDs): New subprogram.
5376         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5377         compilation units that are subprograms.
5378         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5379         compilation units that are package bodies.
5380         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5381         units that are a package declaration or a package instantiation.
5382         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5383         reorganization to improve the error generated by the frontend when the
5384         function Ada.Tags.Secondary_Tag is not available.
5385         * rtsfind.ads (RE_Register_TSD): New runtime entity.
5386         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5387
5388 2011-08-02  Javier Miranda  <miranda@adacore.com>
5389
5390         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5391
5392 2011-08-02  Robert Dewar  <dewar@adacore.com>
5393
5394         * s-imenne.ads: Minor reformatting.
5395
5396 2011-08-02  Robert Dewar  <dewar@adacore.com>
5397
5398         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5399         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5400         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5401
5402 2011-08-02  Robert Dewar  <dewar@adacore.com>
5403
5404         * einfo.ads (Materialize_Entity): Document this is only for renamings
5405         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5406         required debug information in the case where we transform the object
5407         declaration into a renaming declaration.
5408         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5409         object
5410         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5411         Materialize_Entity.
5412
5413 2011-08-02  Robert Dewar  <dewar@adacore.com>
5414
5415         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5416         Suppress_Init_Procs.
5417         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5418         Suppress_Initialization/Initialization_Suppressed.
5419         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5420         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5421         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5422         * sem_prag.adb: New processing for pragma Suppress_Initialization.
5423
5424 2011-08-02  Robert Dewar  <dewar@adacore.com>
5425
5426         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5427         Minor reformatting.
5428
5429 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5430
5431         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5432         only have inheritable classwide pre/postconditions.
5433
5434 2011-08-02  Javier Miranda  <miranda@adacore.com>
5435
5436         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5437         * rtsfind.ads (RE_Check_TSD): New runtime entity.
5438         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5439         checks if the external tag of a type is the same as the external tag
5440         of some other declaration.
5441
5442 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5443
5444         * s-taskin.ads: Minor reformatting.
5445
5446 2011-08-02  Emmanuel Briot  <briot@adacore.com>
5447
5448         * g-comlin.adb (Display_Help): swap the order in which it prints the
5449         short help and the general usage.
5450
5451 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5452
5453         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5454         the aspect declarations and attach them to the generic copy for
5455         subsequent analysis.
5456         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5457         declarations of the generic tree to the new subprogram declarations.
5458         * sem_attr.adb (Check_Precondition_Postcondition): recognize
5459         conditions that apply to a subprogram instance.
5460
5461 2011-08-02  Robert Dewar  <dewar@adacore.com>
5462
5463         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5464
5465 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5466
5467         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5468         private type with a tagged full view is not derived in the immediate
5469         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5470
5471 2011-08-02  Robert Dewar  <dewar@adacore.com>
5472
5473         * exp_ch4.adb: Minor reformatting.
5474
5475 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5476
5477         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
5478         Ada2012 iterator, the loop will be rewritten during expansion into a
5479         while loop with a cursor and an element declaration. Do not analyze the
5480         body in this case, because if the container is for indefinite types the
5481         actual subtype of the elements will only be determined when the cursor
5482         declaration is analyzed.
5483
5484 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5485
5486         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5487         size/alignment related attributes in CodePeer_Mode.
5488
5489 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5490
5491         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5492         Prepend_Element, since this can result in the operation getting the
5493         wrong slot in the full type's dispatch table if the full type has
5494         inherited operations. The incomplete type's operation will get added
5495         to the proper position in the full type's primitives
5496         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5497         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5498         dispatching operations, since there are cases where nonprimitive
5499         subprograms can get added to the list of incomplete dependents (such
5500         as subprograms in nested packages).
5501         * sem_ch6.adb (Process_Formals): First, remove test for being in a
5502         private part when determining whether to add a primitive with a
5503         parameter of a tagged incomplete type to the Private_Dependents list.
5504         Such primitives can also occur in the visible part, and should not have
5505         been excluded from being private dependents.
5506         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5507         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5508         list of a Taft-amendment incomplete type is a primitive before issuing
5509         an error that the full type must appear in the same unit. There are
5510         cases where nonprimitives can be in the list (such as subprograms in
5511         nested packages).
5512         * sem_disp.adb (Derives_From): Use correct condition for checking that
5513         a formal's type is derived from the type of the corresponding formal in
5514         the parent subprogram (the condition was completely wrong). Add
5515         checking that was missing for controlling result types being derived
5516         from the result type of the parent operation.
5517
5518 2011-08-02  Yannick Moy  <moy@adacore.com>
5519
5520         * errout.adb (First_Node): minor renaming
5521         * restrict.adb (Check_Formal_Restriction): put restriction warning on
5522         first node.
5523
5524 2011-08-02  Yannick Moy  <moy@adacore.com>
5525
5526         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5527         before accessing operands.
5528         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5529         decide whether an initialization expression respects SPARK rules, as
5530         the plain node is the expanded one. This allows for more valid warnings
5531         to be issued.
5532         * gnat_rm.texi: Minor update.
5533
5534 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5535
5536         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5537         previous change.
5538
5539 2011-08-02  Robert Dewar  <dewar@adacore.com>
5540
5541         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5542
5543 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5544
5545         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5546         loop statements and the element renaming declaration with a block when
5547         the element type is controlled.
5548
5549 2011-08-02  Yannick Moy  <moy@adacore.com>
5550
5551         * sinfo.ads: Minor formatting.
5552
5553 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5554
5555         * sem_aggr.adb (Add_Association): if the association has a box and no
5556         expression, use the Sloc of the aggregate itself for the new
5557         association.
5558         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5559         the Original_Node.
5560
5561 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5562
5563         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5564         When a container is provided via a function call, generate a renaming
5565         of the function result. This avoids the creation of a transient scope
5566         and the premature finalization of the container.
5567         * exp_ch7.adb (Is_Container_Cursor): Removed.
5568         (Wrap_Transient_Declaration): Remove the supression of the finalization
5569         of the list controller when the declaration denotes a container cursor,
5570         it is not needed.
5571
5572 2011-08-02  Yannick Moy  <moy@adacore.com>
5573
5574         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5575         node is from source, instead of the original node being from source.
5576         * sem_aggr.adb
5577         (Resolve_Array_Aggregate): refine the check for a static expression, to
5578         recognize also static ranges
5579         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5580         Array_Type_Declaration): postpone the test for the type being a subtype
5581         mark after the type has been resolved, so that component-selection and
5582         expanded-name are discriminated.
5583         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5584         to distinguish the case of an iteration scheme, so that an error is
5585         issed on a non-static range in SPARK except in an iteration scheme.
5586         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5587         In_Iter_Schm = True.
5588         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5589         user-defined operators so that they are allowed in renaming
5590         * sem_ch8.adb
5591         (Find_Selected_Component): refine the check for prefixing of operators
5592         so that they are allowed in renaming. Move the checks for restrictions
5593         on selector name after analysis discriminated between
5594         component-selection and expanded-name.
5595         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5596         concatenation argument of string type if it is static.
5597         * sem_util.adb, sem_util.ads
5598         (Check_Later_Vs_Basic_Declarations): add a new function
5599         Is_Later_Declarative_Item to decice which declarations are allowed as
5600         later items, in the two different modes Ada 83 and SPARK. In the SPARK
5601         mode, add that renamings are considered as later items.
5602         (Enclosing_Package): new function to return the enclosing package
5603         (Enter_Name): correct the rule for homonyms in SPARK
5604         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5605         from source (result of expansion) to avoid issuing wrong warnings.
5606
5607 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5608
5609         * errout.adb: On anything but an expression First_Node returns its
5610         argument.
5611
5612 2011-08-02  Pascal Obry  <obry@adacore.com>
5613
5614         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5615
5616 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
5617
5618         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5619         Set the associated loop as the related expression of internally
5620         generated cursors.
5621         * exp_ch7.adb (Is_Container_Cursor): New routine.
5622         (Wrap_Transient_Declaration): Supress the finalization of the list
5623         controller when the declaration denotes a container cursor.
5624
5625 2011-08-02  Yannick Moy  <moy@adacore.com>
5626
5627         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5628         command line now.
5629         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5630         expression is a simple expression. This check cannot be performed in
5631         the semantics, so just drop it.
5632         (P_Index_Or_Discriminant_Constraint): move check that the index or
5633         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5634         semantics. Other cases were previously checked in the semantics.
5635         * par-ch4.adb (P_Name): move checks that a selector name is not
5636         character literal or an operator symbol to Find_Selected_Component in
5637         the semantics
5638         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5639         declarations are not placed after later declarations in a separate
5640         procedure in Sem_Util (possibly not the best choice?), to be used both
5641         during parsing, for Ada 83 mode, and during semantic analysis, for
5642         SPARK mode.
5643         * par-endh.adb (Check_End): move check that end label is not missing
5644         to Process_End_Label in the semantics
5645         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5646         the special case for SPARK restriction
5647         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5648         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5649         parameter Force to issue the error message even on internal node (used
5650         for generated end label). Call Check_Restriction to check when an error
5651         must be issued. In SPARK mode, issue an error message even if the
5652         restriction is not set.
5653         (Check_Restriction): new procedure with an additional out parameter to
5654         inform the caller that a message has been issued
5655         * sem_aggr.adb: Minor modification of message
5656         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5657         instead of issuing an error message directly
5658         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5659         declarations are not placed after later declarations, by calling
5660         Check_Later_Vs_Basic_Declarations
5661         (Analyze_Subtype_Declaration): move here the check that an index or
5662         discriminant constraint must be a subtype mark. Change the check that
5663         a subtype of String must start at one so that it works on subtype marks.
5664         * sem_ch4.adb (Analyze_Call): move here the check that a named
5665         association cannot follow a positional one in a call
5666         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5667         instead of issuing an error message directly
5668         * sem_ch8.adb (Find_Selected_Component): move here the check that a
5669         selector name is not a character literal or an operator symbol. Move
5670         here the check that the prefix of an expanded name cannot be a
5671         subprogram or a loop statement.
5672         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5673         procedure called from parsing and semantics to check that basic
5674         declarations are not placed after later declarations
5675         (Process_End_Label): move here the check that end label is not missing
5676
5677 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
5678
5679         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5680         representation clause in codepeer mode, since it confuses CodePeer and
5681         does not bring useful info.
5682
5683 2011-08-02  Ed Falis  <falis@adacore.com>
5684
5685         * init.c: initialize fp hw on MILS.
5686
5687 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5688
5689         * errout.adb (First_Node): for bodies, return the node itself (small
5690         optimization). For other nodes, do not check source_unit if the node
5691         comes from Standard.
5692
5693 2011-08-02  Robert Dewar  <dewar@adacore.com>
5694
5695         * exp_ch3.adb: Minor comment additions.
5696         * sem_ch13.adb: Minor reformatting.
5697
5698 2011-08-02  Pascal Obry  <obry@adacore.com>
5699
5700         * make.adb, makeutl.adb: Removes some superfluous directory separator.
5701
5702 2011-08-02  Robert Dewar  <dewar@adacore.com>
5703
5704         * sem_attr.adb: Minor reformatting.
5705
5706 2011-08-02  Robert Dewar  <dewar@adacore.com>
5707
5708         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5709         (Has_Default_Component_Value): Removed
5710         * einfo.ads Comment updates
5711         (Has_Default_Aspect): Replaces Has_Default_Value
5712         (Has_Default_Component_Value): Removed
5713         * exp_ch13.adb
5714         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5715         * exp_ch3.adb
5716         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5717         (Get_Simple_Init_Val): Handle Default_Value aspect
5718         (Needs_Simple_Initialization): Handle Default_Value aspect
5719         * exp_ch3.ads: Needs_Simple_Initialization
5720         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5721         * par-prag.adb (Pragma_Default[_Component]Value) Removed
5722         * sem_ch13.adb
5723         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5724         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5725         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5726
5727 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5728
5729         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5730         package containing iteration primitives.
5731         exp_ch5.adb (Expand_Iterator_Loop): ditto.
5732
5733 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5734
5735         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5736         "of", pre-analyze expression in case it is a function call with
5737         finalization actions that must be placed ahead of the loop.
5738         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5739         on an Ada2012 iterator, insert them ahead of the rewritten loop.
5740
5741 2011-08-02  Geert Bosch  <bosch@adacore.com>
5742
5743         * cstand.adb (Create_Float_Types): Only consider C's long double for
5744         Long_Long_Float, in addition to double.
5745
5746 2011-08-02  Robert Dewar  <dewar@adacore.com>
5747
5748         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5749         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5750         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5751         Minor reformatting.
5752
5753 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5754
5755         * sem_attr.adb: handle properly 'Result when it is a prefix of an
5756         indexed component.
5757
5758 2011-08-02  Javier Miranda  <miranda@adacore.com>
5759
5760         * einfo.ads, einfo.adb
5761         (Original_Access_Type): Move this attribute to Node26 since there was
5762         an undocumented use of Node21 in E_Access_Subprogram_Type entities
5763         which causes conflicts and breaks the generation of the .NET compiler.
5764         (Interface_Name): Add missing documentation on JGNAT only uses of
5765         this attribute.
5766
5767 2011-08-02  Geert Bosch  <bosch@adacore.com>
5768
5769         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5770         (Find_Back_End_Float_Type): Likewise
5771         (Create_Back_End_Float_Types): Likewise
5772         (Create_Float_Types): Likewise
5773         (Register_Float_Type): Likewise
5774         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5775         Nlist and split out type selection in new local Find_Base_Type function.
5776         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5777         Nlist
5778         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5779
5780 2011-08-02  Robert Dewar  <dewar@adacore.com>
5781
5782         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5783         alpha order).
5784         * opt.ads: Minor comment change.
5785         * sem_ch12.adb: Minor code reorganization.
5786
5787 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
5788
5789         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5790         subtype's list of rep items to the list on the full subtype in the case
5791         where the lists are the same.
5792
5793 2011-08-02  Geert Bosch  <bosch@adacore.com>
5794
5795         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5796         using the one from System.Strings, which also deallocates all strings.
5797
5798 2011-08-02  Geert Bosch  <bosch@adacore.com>
5799
5800         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5801         function.
5802         * gcc-interface/Make-lang.in: Update dependencies.
5803
5804 2011-08-02  Olivier Hainque  <hainque@adacore.com>
5805
5806         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5807         end_locus.
5808
5809 2011-08-02  Javier Miranda  <miranda@adacore.com>
5810
5811         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5812         associated with anonymous access to subprograms.
5813
5814 2011-08-02  Geert Bosch  <bosch@adacore.com>
5815
5816         * opt.ads
5817         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5818         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5819         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5820         (Add_Symbol_Definition): Move to switch-c.adb
5821         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5822         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5823         (Add_Symbol_Definition): Move to switch-c.adb.
5824         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5825         * sem_warn.adb
5826         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5827         Move to warnsw.adb.
5828         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5829         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5830         Move to warnsw.adb.
5831         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5832         (Add_Symbol_Definition): Moved from Prepcomp.
5833         * switch-c.ads: Update copyright notice. Use String_List instead of
5834         Argument_List, removing dependency on System.OS_Lib.
5835
5836 2011-08-02  Yannick Moy  <moy@adacore.com>
5837
5838         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5839         mode on initialization expression which does not respect SPARK
5840         restrictions.
5841         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5842         if the tree referenced by its argument represents an initialization
5843         expression in SPARK, suitable for initializing an object in an object
5844         declaration.
5845
5846 2011-08-02  Javier Miranda  <miranda@adacore.com>
5847
5848         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5849         internally generated access to subprogram with its associated protected
5850         subprogram type.
5851         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5852
5853 2011-08-02  Geert Bosch  <bosch@adacore.com>
5854
5855         * cstand.adb (Register_Float_Type): Print information about type to
5856         register, if the Debug_Flag_Dot_B is set.
5857         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5858         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5859         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5860         with a requested precision of more than Max_Digits digits and no more
5861         than Max_Base_Digits digits, if a range specification is present and the
5862         Predefined_Float_Types list has a suitable type to derive from.
5863         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5864         case of type completion with pragma Import
5865         * sem_prag.adb
5866         (Process_Import_Predefined_Type): Processing to complete a type
5867         with pragma Import. Currently supports floating point types only.
5868         (Set_Convention_From_Pragma): Do nothing without underlying type.
5869         (Process_Convention): Guard against absence of underlying type,
5870         which may happen when importing incomplete types.
5871         (Process_Import_Or_Interface): Handle case of importing predefined
5872         types. Tweak error message.
5873
5874 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5875
5876         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5877         functions to previous change.  Reorganize code slightly.
5878
5879 2011-08-02  Geert Bosch  <bosch@adacore.com>
5880
5881         * back_end.ads (Register_Type_Proc): New call back procedure type for
5882         allowing the back end to provide information about available types.
5883         (Register_Back_End_Types): New procedure to register back end types.
5884         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5885         available types.
5886         * cstand.adb (Back_End_Float_Types): New list for floating point types
5887         supported by the back end.
5888         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5889         (Copy_Float_Type): New procedure to make new copies of predefined types.
5890         (Register_Float_Type): New call back procedure to populate the BEFT list
5891         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5892         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5893         (Create_Float_Types): New procedure to create entities for floating
5894         point types predefined in Standard, and put these and any remaining
5895         BEFTs on the Predefined_Float_Types list.
5896         * stand.ads (Predefined_Float_Types): New list for predefined floating
5897         point types that do not have declarations in package Standard.
5898
5899 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5900
5901         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
5902         entity node for the unit containing the parameter.
5903         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5904         (Add_Inlined_Subprogram): Likewise.
5905         * gcc-interface/Make-lang.in: Update dependencies.
5906
5907 2011-08-02  Thomas Quinot  <quinot@adacore.com>
5908
5909         * s-stusta.adb (Print): Make sure Pos is always initialized to a
5910         suitable value.
5911
5912 2011-08-02  Geert Bosch  <bosch@adacore.com>
5913
5914         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5915
5916 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
5917
5918         * sem_type.adb (Covers): Move trivial case to the top and reuse the
5919         computed value of Base_Type.
5920
5921 2011-08-02  Yannick Moy  <moy@adacore.com>
5922
5923         * restrict.adb (Check_Restriction): issue an error for any use of
5924         class-wide, even if the No_Dispatch restriction is not set.
5925         * sem_aggr.adb: Correct typos in comments and messages in formal mode
5926         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5927         when completing a private extension, the type named in the private part
5928         is not the same as that named in the visible part.
5929         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5930         of an inherited primitive operations of a tagged type or type extension
5931         that returns the tagged type.
5932         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5933         function which returns True for an implicit operation inherited by the
5934         derived type declaration for the argument type.
5935         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5936         order.
5937
5938 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5939
5940         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5941         Process_Bounds, to perform analysis with expansion of a range or an
5942         expression that is the iteration scheme for a loop.
5943         (Analyze_Iterator_Specification): If domain of iteration is given by a
5944         function call with a controlled result, as is the case if call returns
5945         a predefined container, ensure that finalization actions are properly
5946         generated.
5947         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5948
5949 2011-08-02  Javier Miranda  <miranda@adacore.com>
5950
5951         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5952         * gcc-interface/Make-lang.in: Update dependencies.
5953
5954 2011-08-02  Javier Miranda  <miranda@adacore.com>
5955
5956         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5957         determine if the analysis is performed using N or Original_Node (N).
5958         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5959         functionality of routine Is_Variable avoids code duplication.
5960         * checks.adb (Determine_Range): Handle temporaries generated by
5961         Remove_Side_Effects.
5962
5963 2011-08-02  Javier Miranda  <miranda@adacore.com>
5964
5965         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5966         expansion of the condition. Required since the previous analysis was
5967         done with expansion disabled (see Resolve_Quantified_Expression) and
5968         hence checks were not inserted and record comparisons have not been
5969         expanded.
5970
5971 2011-08-02  Ed Falis  <falis@adacore.com>
5972
5973         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5974         Update header.
5975
5976 2011-08-02  Bob Duff  <duff@adacore.com>
5977
5978         * opt.ads: Minor comment fix.
5979
5980 2011-08-02  Bob Duff  <duff@adacore.com>
5981
5982         * sem_ch12.adb (Analyze_Package_Instantiation,
5983         Analyze_Subprogram_Instantiation): Turn off style checking while
5984         analyzing an instance. Whatever style checks that apply to the generic
5985         unit should apply, so it makes no sense to apply them in an instance.
5986         This was causing trouble when compiling an instance of a runtime
5987         unit that violates the -gnatyO switch.
5988         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5989         one of the two case statements, causing spurious errors.
5990
5991 2011-08-02  Robert Dewar  <dewar@adacore.com>
5992
5993         * uname.adb: Minor reformatting.
5994         * gnatcmd.adb: Minor reformatting.
5995         * exp_attr.adb: Minor reformatting.
5996
5997 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
5998
5999         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6000         No_Dispatching_Calls, do not look for the Assign primitive, because
6001         predefined primitives are not created in this case.
6002
6003 2011-08-02  Bob Duff  <duff@adacore.com>
6004
6005         * stylesw.ads: Minor comment fixes.
6006
6007 2011-08-02  Robert Dewar  <dewar@adacore.com>
6008
6009         * freeze.adb (Add_To_Result): New procedure.
6010
6011 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6012
6013         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6014         time, if the specific run-time routines for handling streams of strings
6015         are not available, use the default mechanism.
6016
6017 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6018
6019         * s-regpat.ads: Fix typo.
6020
6021 2011-08-02  Vincent Celier  <celier@adacore.com>
6022
6023         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
6024         not null, call it to create the in memory config project file without
6025         parsing an existing default config project file.
6026
6027 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6028
6029         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
6030
6031 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6032
6033         * sem_elim.adb: an abstract subprogram does not need an eliminate
6034         pragma for its descendant to be eliminable.
6035
6036 2011-08-02  Ed Falis  <falis@adacore.com>
6037
6038         * init.c: revert to handling before previous checkin for VxWorks
6039         * s-intman-vxworks.adb: delete unnecessary declarations related to
6040         using Ada interrupt facilities for handling signals.
6041         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
6042         * s-intman-vxworks.ads: Import __gnat_install_handler as
6043         Initialize_Interrupts.
6044         * s-taprop-vxworks.adb: Delete Signal_Mask.
6045         (Abort_Handler): change construction of mask to unblock exception
6046         signals.
6047
6048 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6049
6050         * a-except-2005.adb (Raise_From_Signal_Handler): Call
6051         Debug_Raise_Exception before propagation starts.
6052
6053 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6054
6055         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
6056         to Restriction_Check_Required.
6057         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
6058         * sem_res.adb (Resolve_Call): Likewise.
6059         * sem_attr.adb (Check_Stream_Attribute): Likewise.
6060
6061 2011-08-02  Bob Duff  <duff@adacore.com>
6062
6063         * stylesw.ads: Update comment.
6064         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
6065         * errout.ads: Remove obsolete comment.
6066
6067 2011-08-02  Javier Miranda  <miranda@adacore.com>
6068
6069         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
6070         (Set_Is_Safe_To_Reevaluate): new procedure.
6071         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
6072         assignment is allowed on safe-to-reevaluate variables.
6073         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
6074         temporary created to remove side effects in expressions that use
6075         the secondary stack as safe-to-reevaluate.
6076         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
6077         variables that are not true constants.
6078
6079 2011-08-02  Robert Dewar  <dewar@adacore.com>
6080
6081         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
6082         sem_res.adb, sem_ch6.adb: Minor reformatting.
6083
6084 2011-08-02  Jerome Guitton  <guitton@adacore.com>
6085
6086         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
6087
6088 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6089
6090         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
6091         not set Overridden_Operation if subprogram is an initialization
6092         procedure.
6093
6094 2011-08-02  Yannick Moy  <moy@adacore.com>
6095
6096         * par-ch6.adb: Correct obsolete name in comments
6097         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
6098         which takes two message arguments (existing function takes one), with
6099         second message used for continuation.
6100         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
6101         block statements that originate from a source block statement, not
6102         generated block statements
6103         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
6104         symmetry with procedure case
6105         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
6106         function to issue an error in formal mode if a package specification
6107         contains more than one tagged type or type extension.
6108         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
6109         parameters matching formals of tagged types are objects (or ancestor
6110         type conversions of objects), not general expressions. Issue an error
6111         on view conversions that are not involving ancestor conversion of an
6112         extended type.
6113         (Resolve_Type_Conversion): in formal mode, issue an error on the
6114         operand of an ancestor type conversion which is not an object
6115         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
6116         procedure so that it works also for actuals of function calls
6117         (Is_Actual_Tagged_Parameter): new function which determines if its
6118         argument is an actual parameter of a formal of tagged type in a
6119         subprogram call
6120         (Is_SPARK_Object_Reference): new function which determines if the tree
6121         referenced by its argument represents an object in SPARK
6122
6123 2011-08-02  Robert Dewar  <dewar@adacore.com>
6124
6125         * sem_ch3.adb: Minor reformatting
6126         Minor comment addition
6127         Minor error msg text change
6128
6129 2011-08-02  Javier Miranda  <miranda@adacore.com>
6130
6131         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
6132         function. Used to be more precise when we generate a variable plus one
6133         assignment to remove side effects in the evaluation of the Bound
6134         expressions.
6135         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
6136         of the bound expression to force its re-analysis and thus expand the
6137         associated transient scope (if required). Code cleanup replacing the
6138         previous code that declared the constant entity by an invocation to
6139         routine Force_Evaluation which centralizes this work in the frontend.
6140
6141 2011-08-02  Robert Dewar  <dewar@adacore.com>
6142
6143         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
6144         (Base_Type): Now uses improved Is_Base_Type function
6145         * einfo.ads (Base_Type): Inline this function
6146
6147 2011-08-02  Robert Dewar  <dewar@adacore.com>
6148
6149         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
6150         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
6151
6152 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6153
6154         * gcc-interface/Make-lang.in: Update dependencies.
6155         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
6156         targets.
6157
6158 2011-08-02  Yannick Moy  <moy@adacore.com>
6159
6160         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
6161         non-simple expression used in delta constraint
6162         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
6163         index constraint which is not a subtype mark
6164         * par.adb: With and use Restrict
6165         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
6166         mode on component type which is not a subtype mark and default
6167         expression on component
6168         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6169         of string which does not have a lower index bound equal to 1
6170         (Array_Type_Declaration): issue an error in formal mode on index or
6171         component type which is not a subtype mark, and on aliased keyword on
6172         component
6173         (Derived_Type_Declaration): issue an error in formal mode on interface,
6174         limited or abstract type
6175         (Record_Type_Declaration): issue an error in formal mode on interface
6176         (Record_Type_Definition): issue an error in formal mode on tagged types
6177         and type extensions not declared in the specification of a library unit
6178         package; on null non-tagged record; on variant part
6179
6180 2011-08-02  Vincent Celier  <celier@adacore.com>
6181
6182         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6183         not declared for qualified library project when Library_Name is not
6184         declared, but Library_Dir is.
6185
6186 2011-08-02  Robert Dewar  <dewar@adacore.com>
6187
6188         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6189         pragmas (affects aspects [Component_]Default_Value
6190         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6191         component type for the resolution
6192
6193 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6194
6195         * einfo.adb (Base_Type): Tune implementation for speed.
6196
6197 2011-08-02  Robert Dewar  <dewar@adacore.com>
6198
6199         * freeze.adb: Minor reformatting.
6200
6201 2011-08-02  Thomas Quinot  <quinot@adacore.com>
6202
6203         * scos.ads: Update comments.
6204
6205 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6206
6207         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6208         base type, because the parent may be a subtype of a private type whose
6209         convention is established in a private part.
6210
6211 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
6212
6213         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6214         statement in a block when the expansion of the return expression has
6215         created a finalization chain.
6216         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6217         with the parent node.
6218         Add N_Extended_Return_Statement to handle the case where a transient
6219         object declaration appears in the Return_Object_Declarations list of
6220         an extended return statement.
6221
6222 2011-08-02  Matthew Gingell  <gingell@adacore.com>
6223
6224         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6225         unused parameter 'name'.
6226
6227 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6228
6229         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6230         inherited operation, check whether its alias, which is the source
6231         operastion that it renames, has been marked eliminated.
6232
6233 2011-08-02  Javier Miranda  <miranda@adacore.com>
6234
6235         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6236         in-mode parameter whose type is an access type since it can be used to
6237         modify its designated object. Enforce code that handles as safe an
6238         access type that is not access-to-constant but it is the result of a
6239         previous removal of side-effects.
6240         (Remove_Side_Effects): Minor code reorganization of cases which require
6241         no action. Done to incorporate documentation on new cases uncovered
6242         working in this ticket: no action needed if this routine was invoked
6243         too early and the nodes are not yet decorated.
6244         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6245         to routine Remove_Side_Effects by calls to Force_Evaluation since they
6246         were issued with actuals that are implicitly provided by
6247         Force_Evaluation.
6248
6249 2011-08-02  Robert Dewar  <dewar@adacore.com>
6250
6251         * sem_ch3.adb, sem_res.adb: Minor reformatting.
6252
6253 2011-08-02  Yannick Moy  <moy@adacore.com>
6254
6255         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6256         to issue an error in formal mode on attribute not supported in this mode
6257         (Analyze_Attribute): issue errors on standard attributes not supported
6258         in formal mode.
6259         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6260         comment, and issue error in formal mode on modulus which is not a power
6261         of 2.
6262         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6263         range.
6264         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6265         subtype mark.
6266         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6267         operator on modular type (except 'not').
6268
6269 2011-08-02  Robert Dewar  <dewar@adacore.com>
6270
6271         * gnat_rm.texi: Minor reformatting.
6272
6273 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
6274
6275         * s-osinte-linux.ads: Minor comment update and reformatting.
6276         * i-cexten.ads: Make this unit pure, as for its parent.
6277         Will allow its usage in more contexts if needed.
6278
6279 2011-08-02  Robert Dewar  <dewar@adacore.com>
6280
6281         * s-utf_32.ads: Minor comment fix.
6282
6283 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6284
6285         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6286         operation of a tagged synchronized type, handle the case where the
6287         controlling argument is overloaded.
6288
6289 2011-08-02  Yannick Moy  <moy@adacore.com>
6290
6291         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6292         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6293         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6294         SPARK mode and formal verification mode on processing SPARK restriction
6295         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6296         requiring consistency checking.
6297
6298 2011-08-02  Robert Dewar  <dewar@adacore.com>
6299
6300         * sem_res.adb: Minor reformatting.
6301
6302 2011-08-02  Robert Dewar  <dewar@adacore.com>
6303
6304         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6305         a-cforse.ads: Remove unneeded with of Ada.Containers
6306         Remove commented out pragma Inline's
6307         Move specifications of new subprograms to the actual specs
6308
6309 2011-08-02  Yannick Moy  <moy@adacore.com>
6310
6311         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6312         a-cforse.ads: Update comments.
6313
6314 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6315
6316         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6317
6318 2011-08-02  Robert Dewar  <dewar@adacore.com>
6319
6320         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6321         a-cforse.ads, a-cofove.ads: Minor reformatting.
6322
6323 2011-08-02  Claire Dross  <dross@adacore.com>
6324
6325         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6326         a-cofove.ads: Add comments.
6327
6328 2011-08-02  Yannick Moy  <moy@adacore.com>
6329
6330         * gnat_rm.texi: Document formal containers.
6331
6332 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6333
6334         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6335         are empty sections.
6336
6337 2011-08-02  Robert Dewar  <dewar@adacore.com>
6338
6339         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6340         reformatting.
6341
6342 2011-08-02  Robert Dewar  <dewar@adacore.com>
6343
6344         * aspects.adb: New aspects Default_Value and Default_Component_Value
6345         New format of Aspect_Names table checks for omitted entries
6346         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6347         handling of boolean aspects for derived types.
6348         New aspects Default_Value and Default_Component_Value
6349         New format of Aspect_Names table checks for omitted entries
6350         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6351         (Has_Default_Value): New flag
6352         (Has_Default_Component_Value): New flag
6353         (Has_Default_Value): New flag
6354         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6355         table.
6356         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6357         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6358         Default_Value and Default_Component_Value
6359         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6360         New aspects Default_Value and Default_Component_Value
6361         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6362         * sprint.adb: Print N_Aspect_Specification node when called from gdb
6363
6364 2011-08-02  Vincent Celier  <celier@adacore.com>
6365
6366         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6367         inherit library kind.
6368
6369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6370
6371         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6372         Minor reformatting.
6373
6374 2011-08-02  Robert Dewar  <dewar@adacore.com>
6375
6376         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6377
6378 2011-08-02  Yannick Moy  <moy@adacore.com>
6379
6380         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6381
6382 2011-08-02  Robert Dewar  <dewar@adacore.com>
6383
6384         * impunit.adb: Add comment.
6385
6386 2011-08-02  Yannick Moy  <moy@adacore.com>
6387
6388         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6389         qualification of aggregates in formal mode
6390         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6391         another aggregate
6392         (Resolve_Aggregate): complete the test that an aggregate is adequately
6393         qualified in formal mode
6394
6395 2011-08-02  Pascal Obry  <obry@adacore.com>
6396
6397         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6398         * mlib-prj.adb: Supress warning when compiling binder generated file.
6399         (Build_Library): Supress all warnings when compiling the binder
6400         generated file.
6401
6402 2011-08-02  Yannick Moy  <moy@adacore.com>
6403
6404         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6405         from here...
6406         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6407         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6408         Add with/use clauses to make Check_Formal_Restriction visible
6409
6410 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6411
6412         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6413         in-parameters when type of the generic formal is private in the generic
6414         spec and non-private in the body.
6415
6416 2011-08-02  Claire Dross  <dross@adacore.com>
6417
6418         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6419         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6420         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6421         * impunit.adb, Makefile.rtl: Take new files into account.
6422
6423 2011-08-02  Robert Dewar  <dewar@adacore.com>
6424
6425         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6426         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6427
6428 2011-08-02  Yannick Moy  <moy@adacore.com>
6429
6430         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6431         formal mode
6432         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6433         matching static array bounds, taking into account the special case of
6434         string literals
6435         * sem_ch3.adb: Typo in comment.
6436
6437 2011-08-02  Yannick Moy  <moy@adacore.com>
6438
6439         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6440         which issues an error in formal mode if its argument node is originally
6441         from source
6442         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6443         has a discriminant specification so that it does not include the case
6444         of derived types
6445         (Derived_Type_Declaration): move here the test that a derived type has a
6446         discriminant specification
6447         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6448         first element of a component association before accessing its choices
6449         (presence of component association is not enough)
6450         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6451         declaration is a library item before accessing the next element in a
6452         list, as library items are not member of lists
6453         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6454         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6455         Check_Formal_Restriction whenever possible.
6456
6457 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6458
6459         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6460         reference when needed.
6461
6462 2011-08-02  Bob Duff  <duff@adacore.com>
6463
6464         * gnat_ugn.texi: Fix typo.
6465
6466 2011-08-02  Vincent Celier  <celier@adacore.com>
6467
6468         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6469         archive file name. Do not use the full path name of archives for Open
6470         VMS.
6471
6472 2011-08-02  Robert Dewar  <dewar@adacore.com>
6473
6474         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6475         Analyze_Aspect_Specifications
6476         * sem_ch13.adb
6477         (Analyze_Aspect_Specifications): New handling for boolean aspects
6478         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6479         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6480         sequence for Analyze_Aspect_Specifications
6481         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6482         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6483
6484 2011-08-02  Robert Dewar  <dewar@adacore.com>
6485
6486         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6487         aspects, since these no longer exist.
6488
6489 2011-08-02  Robert Dewar  <dewar@adacore.com>
6490
6491         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6492         semicolon, do not try to see if there are aspects following it.
6493         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6494         aspect spec.
6495
6496 2011-08-02  Robert Dewar  <dewar@adacore.com>
6497
6498         * sem_ch8.adb, aspects.ads: Minor reformatting.
6499
6500 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
6501
6502         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6503         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6504         extracted from...
6505         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
6506
6507 2011-08-02  Yannick Moy  <moy@adacore.com>
6508
6509         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6510         mode on subprogram declaration outside of package specification, unless
6511         it is followed by a pragma Import
6512         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6513         Access_Type_Declaration): issue error in formal mode on access type
6514         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6515         incomplete type
6516         (Analyze_Object_Declaration): issue error in formal mode on object
6517         declaration which does not respect SPARK restrictions
6518         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6519         declaration which does not respect SPARK restrictions
6520         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6521         error in formal mode on digits or delta constraint
6522         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6523         decimal fixed point type
6524         (Derived_Type_Declaration): issue error in formal mode on derived type
6525         other than type extensions of tagged record types
6526         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6527         with check on access definition
6528         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6529         mode on protected definition.
6530         (Analyze_Task_Definition): issue error in formal mode on task definition
6531
6532 2011-08-02  Robert Dewar  <dewar@adacore.com>
6533
6534         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6535
6536 2011-08-02  Javier Miranda  <miranda@adacore.com>
6537
6538         * sem_ch6.adb (Can_Override_Operator): New function.
6539         (Verify_Overriding_Indicator): Add missing code to check overriding
6540         indicator in operators. Fixes regression.
6541         (Check_Overriding_Indicator): Minor reformating after replacing the
6542         code that evaluates if the subprogram can override an operator by
6543         invocations to the above new function.
6544         * einfo.adb
6545         (Write_Field26_Name): Add missing code to ensure that, following
6546         the documentation in einfo.ads, this field is not shown as attribute
6547         "Static_Initialization" on non-dispatching functions.
6548
6549 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6550
6551         * sem_res.adb (Resolve_Call): A call to
6552         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6553         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6554         i.e., when the second parameter is of type Time_Span.
6555
6556 2011-08-02  Vincent Celier  <celier@adacore.com>
6557
6558         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6559         with an archive instead of -L<library dir> -l<library name>.
6560
6561 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6562
6563         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6564         mark the base types In_Use in addition to making the operations
6565         use_visible.
6566
6567 2011-08-02  Ed Falis  <falis@adacore.com>
6568
6569         * init.c: add and setup __gnat_signal_mask for the exception signals
6570         * s-inmaop-vxworks.adb: new file.
6571         * s-intman-vxworks.adb: remove unnecessary initializations and
6572         simplify remaining
6573         * s-intman-vxworks.ads: remove unnecessary variable
6574         * s-taprop-vxworks.adb: simplify signal initialization
6575
6576 2011-08-02  Robert Dewar  <dewar@adacore.com>
6577
6578         * sem_ch8.adb: Minor code reorganization, comment updates.
6579
6580 2011-08-02  Robert Dewar  <dewar@adacore.com>
6581
6582         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6583         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6584         here from Sem_Res.
6585         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6586         (Matching_Static_Array_Bounds): Moved here from Sem_Res
6587
6588 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6589
6590         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6591         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6592         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6593         use_type_clauses, to handle more efficiently use_type and use_all_type
6594         constructs.
6595         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6596         Ada2012 Use_All_Type clause.
6597         (Use_Class_Wide_Operations): new procedure.
6598
6599 2011-08-02  Robert Dewar  <dewar@adacore.com>
6600
6601         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6602         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6603         expression to expression function.
6604
6605 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6606
6607         * sem_ch4.adb: transform simple Ada2012 membership into equality only
6608         if types are compatible.
6609
6610 2011-08-02  Yannick Moy  <moy@adacore.com>
6611
6612         * sem_res.adb (Matching_Static_Array_Bounds): new function which
6613         returns True if its argument array types have same dimension and same
6614         static bounds at each index.
6615         (Resolve_Actuals): issue an error in formal mode on actuals passed as
6616         OUT or IN OUT paramaters which are not view conversions in SPARK.
6617         (Resolve_Arithmetic_Op): issue an error in formal mode on
6618         multiplication or division with operands of fixed point types which are
6619         not qualified or explicitly converted.
6620         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6621         Boolean or array type (except String) operands.
6622         (Resolve_Equality_Op): issue an error in formal mode on equality
6623         operators for array types other than String with non-matching static
6624         bounds.
6625         (Resolve_Logical_Op): issue an error in formal mode on logical operators
6626         for array types with non-matching static bounds. Factorize the code in
6627         Matching_Static_Array_Bounds.
6628         (Resolve_Qualified_Expression): issue an error in formal mode on
6629         qualified expressions for array types with non-matching static bounds.
6630         (Resolve_Type_Conversion): issue an error in formal mode on type
6631         conversion for array types with non-matching static bounds
6632
6633 2011-08-02  Robert Dewar  <dewar@adacore.com>
6634
6635         * par-ch10.adb: Minor code reorganization (use Nkind_In).
6636
6637 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6638
6639         * par-ch9.adb: save location of entry for proper error message.
6640
6641 2011-08-02  Javier Miranda  <miranda@adacore.com>
6642
6643         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6644         (Use_Full_View) which permits this routine to climb through the
6645         ancestors using the full-view of private parents.
6646         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6647         Use_Full_View to true in calls to Is_Ancestor.
6648         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6649         true in call to Is_Ancestor.
6650         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6651         Use_Full_View to true in call to Is_Ancestor.
6652         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6653         call to Is_Ancestor.
6654         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6655         Use_Full_View to true in calls to Is_Ancestor.
6656         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6657         Make_Select_Specific_Data_Table, Register_Primitive,
6658         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6659         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6660         to true in call to Is_Ancestor.
6661         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6662         Use_Full_View to true in calls to Is_Ancestor.
6663         * exp_cg.adb
6664         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6665         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6666
6667 2011-08-02  Robert Dewar  <dewar@adacore.com>
6668
6669         * gnat_rm.texi: Minor reformatting.
6670         * sem_prag.adb: Minor reformatting.
6671
6672 2011-08-02  Tristan Gingold  <gingold@adacore.com>
6673
6674         * vms_data.ads: Add VMS qualifier for -gnateP.
6675
6676 2011-08-02  Robert Dewar  <dewar@adacore.com>
6677
6678         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6679         * par-ch7.adb (P_Package): Proper placement of aspects for package
6680         decl/instantiation.
6681         * par-endh.adb (Check_End): Ad Is_Sloc parameter
6682         (End_Statements): Add Is_Sloc parameterr
6683         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6684         (Check_End): Ad Is_Sloc parameter
6685         (End_Statements): Add Is_Sloc parameterr
6686
6687 2011-08-02  Vincent Celier  <celier@adacore.com>
6688
6689         * ug_words: Add VMS qualifier equivalent to -gnateP:
6690         /SYMBOL_PREPROCESSING.
6691
6692 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
6693
6694         * gnat-style.texi: For hexadecimal numeric literals the typical
6695         grouping of digits is 4 to represent 2 bytes.
6696         A procedure spec which is split into several lines is indented two
6697         characters.
6698
6699 2011-08-02  Yannick Moy  <moy@adacore.com>
6700
6701         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6702         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6703         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6704         properly qualified
6705         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6706         choice in array aggregate
6707         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6708         mark as ancestor
6709         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6710         positional and named aggregate for record, or others in record
6711         aggregate, or multiple choice in record aggregate
6712         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6713         array operands to logical operations AND, OR and XOR do not have the
6714         same static lower and higher bounds
6715         * sem_ch5.adb, sinfo.ads: Correct typos in comments
6716
6717 2011-08-01  Robert Dewar  <dewar@adacore.com>
6718
6719         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6720         Replaces Last_Source_Node_In_Sequence.
6721         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6722         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6723         parens and blank in string (this was inconsistently implemented).
6724         * errout.ads
6725         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6726         blank in string (this was inconsistently implemented).
6727         * gnat1drv.adb
6728         (Set_Global_Switches): Set formal mode switches appropriately
6729         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6730         * par-prag.adb
6731         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6732         call Set_Error_Msg_Lang to set "spark" as language name.
6733         * par.adb: Remove unnecessary call to set formal language for errout
6734         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6735         appropriately and call Set_Error_Msg_Lang to set "spark" as language
6736         name.
6737         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6738         calls to it, moved after resolution so that types are known
6739         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6740         result of concatenation is not of type String
6741         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6742         concatenation is not properly restricted
6743         * gnat_rm.texi: Add doc on pragma Spark_95.
6744         * gcc-interface/Makefile.in: Remove obsolete target pairs for
6745         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6746         * gcc-interface/Make-lang.in: Update dependencies.
6747
6748 2011-08-01  Javier Miranda  <miranda@adacore.com>
6749
6750         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6751         condition that detects if the overridden operation must replace an
6752         existing entity.
6753
6754 2011-08-01  Javier Miranda  <miranda@adacore.com>
6755
6756         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6757         code declarations inserted by Insert_Actions in each alternative of the
6758         N_Case_Expression node.
6759
6760 2011-08-01  Robert Dewar  <dewar@adacore.com>
6761
6762         * sem_ch6.adb: Minor code reorganization.
6763         * sem_util.adb: Minor reformatting.
6764
6765 2011-08-01  Pascal Obry  <obry@adacore.com>
6766
6767         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6768         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6769
6770 2011-08-01  Yannick Moy  <moy@adacore.com>
6771
6772         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6773         literal or operator symbol which is prefixed
6774         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6775         mode on access attributes.
6776         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6777         that concatenation operands are properly restricted in formal mode
6778         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6779         Analyze_Concatenation_Operand. Issue an error in formal mode if the
6780         result of the concatenation has a type different from String.
6781         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6782         Analyze_Quantified_Expression, Analyze_Slice,
6783         Analyze_Null): issue an error in formal mode on unsupported constructs
6784         * sem_ch5.adb
6785         (Analyze_Block_Statement): only issue error on source block statement
6786         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6787         function which returns the last node in a list of nodes for which
6788         Comes_From_Source returns True, if any
6789         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6790         Last_Source_Node_In_Sequence
6791         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6792         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6793         mode on unsupported constructs
6794         * sem_ch9.adb Do not return after issuing error in formal mode, as the
6795         rest of the actions may be needed later on since the error is marked as
6796         not serious.
6797         * sinfo.ads: Typos in comments.
6798
6799 2011-08-01  Pascal Obry  <obry@adacore.com>
6800
6801         * projects.texi: Minor editing.
6802
6803 2011-08-01  Yannick Moy  <moy@adacore.com>
6804
6805         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6806         insertion character ~~
6807         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6808         (Set_Error_Msg_Lang): new procedure which fixes the language for use
6809         with insertion character ~~
6810         (Set_Msg_Text): treat insertion character ~~
6811         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6812         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6813         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6814         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6815         errors related to the formal language restriction not serious
6816         (insertion character |).
6817         * par.adb (Par): set formal language for error messages if needed
6818         * sem_ch6.adb (Check_Missing_Return): take into account possible
6819         generated statements at the end of the function
6820         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6821         enumeration value to define a new pragma SPARK_95
6822         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6823         SPARK_Version): new type and variables to store the SPARK version
6824         (none by default).
6825         (SPARK_Mode): return True when SPARK_Version is set
6826         * par-prag.adb: Correct indentation
6827         (Prag): take Pragma_SPARK_95 into account
6828         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6829         into account.
6830
6831 2011-08-01  Robert Dewar  <dewar@adacore.com>
6832
6833         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6834         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6835         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6836
6837 2011-08-01  Pascal Obry  <obry@adacore.com>
6838
6839         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6840         Target_Name to Get_Path call.
6841         (Parse_Single_Project): Likewise.
6842         (Post_Parse_Context_Clause): Likewise.
6843         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6844         Call Initialise_Project_Path with the proper Target_Name.
6845         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6846         search path.
6847         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6848         with the proper Target_Name.
6849         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6850         Part.Parse routine.
6851         (Parse_Project_And_Apply_Config): Likewise.
6852         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6853         This is fine as this part of the code is supporting only native
6854         compilation.
6855         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6856         is fine as this part of the code is supporting only native compilation.
6857
6858 2011-08-01  Yannick Moy  <moy@adacore.com>
6859
6860         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6861         of homonym, unless the homonym is one of the cases allowed in SPARK
6862         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6863         package declaration occurring after a body.
6864
6865 2011-08-01  Robert Dewar  <dewar@adacore.com>
6866
6867         * checks.adb, exp_ch4.adb: Minor reformatting.
6868
6869 2011-08-01  Javier Miranda  <miranda@adacore.com>
6870
6871         * einfo.ads (Access_Disp_Table): Fix documentation.
6872         (Dispatch_Table_Wrappers): Fix documentation.
6873
6874 2011-08-01  Pascal Obry  <obry@adacore.com>
6875
6876         * prj-env.adb, prj-env.ads: Minor reformatting.
6877
6878 2011-08-01  Yannick Moy  <moy@adacore.com>
6879
6880         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6881         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6882         procedures out of these packages.
6883         * errout.ads, errout.adb 
6884         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6885         procedures in of this package
6886         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6887         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6888         on misplaced later vs initial declarations, like in Ada 83
6889         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6890         formal mode on attribute of private type whose full type declaration
6891         is not visible
6892         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6893         package declaration inside a package specification
6894         (Analyze_Full_Type_Declaration): issue error in formal mode on
6895         controlled type or discriminant type
6896         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6897         user-defined operator means that it should come from the source
6898         (New_Overloaded_Entity): issue error in formal mode on overloaded
6899         entity.
6900         * sem_ch6.ads, sem_ch13.ads: typos in comments.
6901
6902 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6903
6904         * atree.adb: Minor reformatting.
6905         * checks.adb: Minor reformatting.
6906
6907 2011-08-01  Vincent Celier  <celier@adacore.com>
6908
6909         * s-parame-vms-ia64.ads: Fix typo in comment
6910         Minor reformatting
6911         * s-parame-vms-restrict.ads: Removed, unused.
6912
6913 2011-08-01  Javier Miranda  <miranda@adacore.com>
6914
6915         * exp_ch3.adb
6916         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6917         * sem_ch3.adb
6918         (Constrain_Index): Remove side effects in the evaluation of the bounds.
6919         * sem_ch3.ads, sem_ch3.adb
6920         (Is_Constant_Bound): New extended version of the subprogram that was
6921         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6922         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6923         * sem_aux.ads (Constant_Value): Fix typo in comment.
6924         * checks.adb (Generate_Index_Checks): New implementation which, for
6925         array objects with constant bounds, generates the runtime check
6926         referencing the bounds of the array type. For other cases this routine
6927         provides its previous behavior obtaining such values from the array
6928         object.
6929         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6930         parent type.
6931         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6932         we cannot have semantic interpretations of the new node.
6933
6934 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6935
6936         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6937         expressions.
6938
6939 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
6940
6941         * sem_ch8.adb: Minor code editing.
6942         * s-vxwext.adb: Remove trailing space.
6943         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6944         consistency with other files.
6945
6946 2011-08-01  Thomas Quinot  <quinot@adacore.com>
6947
6948         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6949
6950 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6951
6952         * par-ch10.adb: reject parameterized expressions as compilation unit.
6953         * sem_ch4.adb: handle properly conditional expression with overloaded
6954         then_clause and no else_clause.
6955
6956 2011-08-01  Tristan Gingold  <gingold@adacore.com>
6957
6958         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6959         like done by System.Aux_DEC.
6960         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6961
6962 2011-08-01  Yannick Moy  <moy@adacore.com>
6963
6964         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6965         missing label at end of declaration (subprogram or package)
6966         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6967         of positional and named parameter association
6968         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6969         Error_Msg_SP which adds a prefix to the error message giving the name
6970         of the formal language analyzed
6971         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6972         access result type in subprogram, unconstrained array as result type,.
6973         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6974         procedure
6975         * sem_ch8.adb: Code clean up.
6976
6977 2011-08-01  Javier Miranda  <miranda@adacore.com>
6978
6979         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6980         * einfo.ads (Access_Disp_Table): Fix documentation.
6981         (Dispatch_Table_Wrappers): Fix documentation.
6982         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6983         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6984         to enforce the documentation of this attribute.
6985         (Set_Is_Interface): Cleanup the assertion.
6986         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6987         the Underlying_Type entity before reading attribute Access_Disp_Table.
6988         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6989         Locate the Underlying_Type before reading attribute Access_Disp_Table.
6990         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6991         the Underlying_Type entity before reading attribute Access_Disp_Table.
6992         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6993         Locate the Underlying_Type entity before reading attribute
6994         Access_Disp_Table.
6995
6996 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
6997
6998         * s-poosiz.ads: Additional overriding indicators.
6999
7000 2011-08-01  Yannick Moy  <moy@adacore.com>
7001
7002         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7003         formal mode.
7004         (Analyze_Iteration_Scheme): issue error in formal mode when loop
7005         parameter specification does not include a subtype mark.
7006         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7007         formal mode on abstract subprogram.
7008         (Analyze_Subprogram_Specification): issue error in formal mode on
7009         user-defined operator.
7010         (Process_Formals): issue error in formal mode on access parameter and
7011         default expression.
7012         * sem_ch9.adb (Analyze_Abort_Statement,
7013         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7014         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7015         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7016         Analyze_Requeue, Analyze_Selective_Accept,
7017         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7018         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7019         issue error in formal mode on user-defined raise statement.
7020
7021 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7022
7023         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
7024         declaration being hidden when overriding an implicit inherited
7025         subprogram.
7026         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
7027         (-gnats), do not complain about a source file that contains only a
7028         pragma No_Body.
7029
7030 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7031
7032         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
7033         variable if already set.
7034
7035 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7036
7037         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
7038         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
7039         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
7040         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
7041         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
7042         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
7043         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
7044         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
7045         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
7046         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
7047         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
7048         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
7049         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
7050         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
7051         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
7052         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
7053         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
7054         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
7055         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
7056         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
7057         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
7058         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
7059         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
7060         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
7061         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
7062         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
7063         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
7064         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
7065         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
7066         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
7067         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
7068         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
7069         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
7070         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
7071         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
7072         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
7073         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
7074         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
7075         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
7076         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
7077         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
7078         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
7079         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
7080         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
7081         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
7082         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
7083         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
7084         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
7085         s-osinte-mingw.ads: Update to GPLv3 run-time license.
7086         Use GNAT instead of GNARL.
7087
7088 2011-08-01  Bob Duff  <duff@adacore.com>
7089
7090         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
7091         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
7092         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
7093         reformatting.
7094
7095 2011-08-01  Yannick Moy  <moy@adacore.com>
7096
7097         * debug.adb (d.D) reverve flag for the SPARK mode
7098         (d.E) reverve flag for SPARK generation mode
7099         (d.F) reverve flag for Why generation mode
7100         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode, 
7101         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
7102         functions which return True when the corresponding modes are set
7103         (Formal_Language): return "spark" or "alfa" when in formal verification
7104         mode.
7105         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
7106         Error_Msg to prefix the error message with a tag giving the formal
7107         language
7108         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
7109         message with a tag giving the formal language
7110         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
7111         block statement
7112         (Analyze_Case_Statement): issue error in formal mode on case statement
7113         with a single "others" case alternative
7114         (Analyze_Exit_Statement): issue errors in formal mode on exit
7115         statements which do not respect SPARK restrictions
7116         (Analyze_Goto_Statement): issue error in formal mode on goto statement
7117         (Check_Unreachable_Code): always issue an error (not a warning) in
7118         formal mode on unreachable code (concerns both code after an infinite
7119         loop and after an unconditional jump, both not allowed in SPARK)
7120         * sem_ch6.adb (Analyze_Return_Statement): add call to
7121         Set_Return_Present for a procedure containing a return statement
7122         (already done for functions in Analyze_Function_Return)
7123         (Analyze_Function_Return): issue error in formal mode on extended
7124         return or if return is not last statement in function
7125         (Check_Missing_Return): issue error in formal mode if function does
7126         not end with return or if procedure contains a return
7127         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
7128         function to detect if there is an inner scope of its parameter S which
7129         is a loop.
7130
7131 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7132
7133         * sem_ch6.ads: Minor reformatting.
7134
7135 2011-08-01  Javier Miranda  <miranda@adacore.com>
7136
7137         * sem_util.adb (Abstract_Interface_List): Complete condition when
7138         processing private type declarations to avoid reading unavailable
7139         attribute.
7140         (Is_Synchronized_Tagged_Type): Complete condition when processing
7141         private extension declaration nodes to avoid reading unavailable
7142         attribute.
7143
7144 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7145
7146         * sem_ch3.adb: Minor reformatting.
7147
7148 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7149
7150         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
7151         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
7152         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
7153         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
7154         for VMS, instead parametrize the common implementation with
7155         System.Parameters declarations.
7156
7157 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
7158
7159         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
7160
7161 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7162
7163         * seh_init.c: Fix SEH handler installation on win64.
7164
7165 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7166
7167         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
7168         double analysis of an anonymous access to subprogram, because it can
7169         lead to improper sharing of profiles and a back-end crash.
7170
7171 2011-08-01  Robert Dewar  <dewar@adacore.com>
7172
7173         * make.adb, sem_ch4.adb: Minor reformatting.
7174         * gcc-interface/Make-lang.in: Update dependencies.
7175         * sem_util.adb, exp_ch5.adb: Minor reformatting.
7176
7177 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7178
7179         * gnat_rm.texi: Fix definition of Long_Integer.
7180
7181 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7182
7183         * exp_aggr.adb: check limit size of static aggregate unconditionally,
7184         to prevent storage exhaustion.
7185         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7186         finalized is a function body, insert the cleanup code before the final
7187         return statement, to prevent spurious warnings.
7188         * s-pooglo.ads: add overriding indicator.
7189
7190 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7191
7192         * sem_ch4.adb (Operator_Check): improve error message when both a
7193         with_clause and a use_clause are needed to make operator usage legal.
7194         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7195         determine whether a compilation unit is visible within an other,
7196         either through a with_clause in the current unit, or a with_clause in
7197         its library unit or one one of its parents.
7198
7199 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7200
7201         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7202         over an arbitrary expression of an array or container type.
7203         * lib-xref.adb: clarify comment.
7204
7205 2011-08-01  Bob Duff  <duff@adacore.com>
7206
7207         * einfo.ads: Minor reformatting.
7208         * debug.adb: Minor comment improvement.
7209
7210 2011-08-01  Javier Miranda  <miranda@adacore.com>
7211
7212         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7213         consider hidden subprograms as valid candidates.
7214
7215 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
7216
7217         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7218
7219 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
7220
7221         * gnat_ugn.texi: Fix typo.
7222
7223 2011-08-01  Robert Dewar  <dewar@adacore.com>
7224
7225         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7226         lib-xref.adb: Minor reformatting
7227
7228 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7229
7230         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7231         when to generate a call to Move_Final_List.
7232         (Has_Controlled_Parts): Remove this function.
7233
7234 2011-08-01  Geert Bosch  <bosch@adacore.com>
7235
7236         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7237         "," in choice list.
7238
7239 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7240
7241         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7242         explicit raise of a predefined exception as Comes_From_Source if the
7243         original N_Raise_Statement comes from source.
7244
7245 2011-08-01  Robert Dewar  <dewar@adacore.com>
7246
7247         * sinfo.ads: Add comment.
7248         * sem_ch6.adb: Minor reformatting.
7249
7250 2011-08-01  Robert Dewar  <dewar@adacore.com>
7251
7252         * freeze.adb (Freeze_Entity): Refine check for bad component size
7253         clause to avoid rejecting confirming clause when atomic/aliased present.
7254
7255 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7256
7257         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7258         better determine whether an entity reference is a write.
7259         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7260         subcomponent.
7261         * lib-xref.adb (Output_References): Do no suppress a read reference at
7262         the same location as an immediately preceeding modify-reference, to
7263         handle properly in-out actuals.
7264
7265 2011-08-01  Tristan Gingold  <gingold@adacore.com>
7266
7267         * env.c (__gnat_setenv) [VMS]: Refine previous change.
7268
7269 2011-08-01  Quentin Ochem  <ochem@adacore.com>
7270
7271         * i-cstrin.adb (New_String): Changed implementation, now uses only the
7272         heap to compute the result.
7273
7274 2011-08-01  Robert Dewar  <dewar@adacore.com>
7275
7276         * atree.ads: Minor reformatting.
7277
7278 2011-08-01  Emmanuel Briot  <briot@adacore.com>
7279
7280         * g-expect.adb (Get_Command_Output): Fix memory leak.
7281
7282 2011-08-01  Geert Bosch  <bosch@adacore.com>
7283
7284         * cstand.adb (P_Float_Type): New procedure to print the definition of
7285         predefined fpt types.
7286         (P_Mixed_Name): New procedure to print a name using mixed case
7287         (Print_Standard): Use P_Float_Type for printing floating point types
7288         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7289         precision IEEE float.
7290
7291 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7292
7293         * sem_ch3.adb: Minor reformatting.
7294
7295 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7296
7297         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7298         the completion of a generic function, insert the new body rather than
7299         rewriting the original.
7300
7301 2011-08-01  Yannick Moy  <moy@adacore.com>
7302
7303         * sinfo.ads, errout.ads: Typos in comments.
7304
7305 2011-08-01  Robert Dewar  <dewar@adacore.com>
7306
7307         * par-endh.adb: Minor reformatting.
7308
7309 2011-08-01  Robert Dewar  <dewar@adacore.com>
7310
7311         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7312         (Pre_Post_Aspects): New subtype.
7313         * par-ch12.adb (P_Generic): New syntax for aspects in packages
7314         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7315         * par-ch7.adb (P_Package): Remove Decl parameter
7316         (P_Package): Handle new syntax for aspects (before IS)
7317         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7318         new aspect syntax
7319         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7320         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7321         (P_Package): Remove Decl parameter
7322         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7323         aspects
7324         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7325         specs
7326         * sem_util.ads, sem_util.adb (Static_Boolean): New function
7327         * sinfo.ads: Document new syntax for aspects in packages etc.
7328         * sprint.adb: Handle new syntax of aspects before IS in package
7329
7330 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7331
7332         * atree.ads: Minor reformatting.
7333         * sem_prag.adb: Minor reformatting.
7334
7335 2011-08-01  Robert Dewar  <dewar@adacore.com>
7336
7337         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7338         case expr alternative.
7339
7340 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7341
7342         * sem_ch12.adb: Fix typo.
7343
7344 2011-08-01  Geert Bosch  <bosch@adacore.com>
7345
7346         * sem_prag.adb (Check_No_Link_Name): New procedure.
7347         (Process_Import_Or_Interface): Use Check_No_Link_Name.
7348         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7349         instead of Standard_Long_Long_Float_Size global. Preparation for
7350         eventual removal of per type constants.
7351         * exp_util.ads (Get_Stream_Size): New function returning the stream
7352         size value of subtype E.
7353         * exp_util.adb (Get_Stream_Size): Implement new function.
7354         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7355         function.
7356         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7357         * einfo.adb:
7358         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7359
7360 2011-08-01  Geert Bosch  <bosch@adacore.com>
7361
7362         * cstand.adb: Fix comments.
7363         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7364         count of arguments.
7365
7366 2011-08-01  Robert Dewar  <dewar@adacore.com>
7367
7368         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7369
7370 2011-08-01  Geert Bosch  <bosch@adacore.com>
7371
7372         * atree.ads: Fix comment.
7373
7374 2011-08-01  Robert Dewar  <dewar@adacore.com>
7375
7376         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7377         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7378         * par.adb: Add with for Namet.Sp.
7379         * par-tchk.adb: Minor reformatting.
7380
7381 2011-08-01  Vincent Celier  <celier@adacore.com>
7382
7383         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7384         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7385         of the init procedure of a SAL.
7386         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7387         New procedure.
7388
7389 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7390
7391         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7392         reformatting.
7393
7394 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7395
7396         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7397
7398 2011-08-01  Thomas Quinot  <quinot@adacore.com>
7399
7400         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7401         conformant with its spec (return True only for types that have
7402         an overriding Initialize primitive operation that prevents them from
7403         having preelaborable initialization).
7404         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7405         initialization for controlled types in Ada 2005 or later mode.
7406
7407 2011-08-01  Robert Dewar  <dewar@adacore.com>
7408
7409         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7410         Postcondition.
7411         (Same_Aspect): New function.
7412         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7413         Type_Invariant, Precondition, Postcondition.
7414         * snames.ads-tmpl: Add Name_Type_Invariant.
7415
7416 2011-08-01  Robert Dewar  <dewar@adacore.com>
7417
7418         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7419         here.
7420         (Freeze_All_Ent): Fix error in handling inherited aspects.
7421         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7422         already analyzed, but don't skip entire processing of a declaration,
7423         that's wrong in some cases of declarations being rewritten.
7424         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7425         Don't delay for integer, string literals
7426         Treat predicates in usual manner for delay, remove special case code,
7427         not needed.
7428         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7429         (Build_Predicate_Function): Update saved expression in aspect
7430         (Build_Invariant_Procedure): Update saved expression in aspect
7431         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7432         of replacement of discriminant references if the reference is simple.
7433
7434 2011-08-01  Robert Dewar  <dewar@adacore.com>
7435
7436         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7437         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7438         Static_Predicate and Dynamic_Predicate.
7439         (Build_Predicate_Function): Add processing for Static_Predicate
7440         and Dynamic_Predicate.
7441         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7442         (From_Static_Predicate): New flag
7443         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7444
7445 2011-08-01  Robert Dewar  <dewar@adacore.com>
7446
7447         * usage.adb: Documentation cleanup for Ada version modes in usage.
7448         * expander.adb: Minor reformatting.
7449
7450 2011-08-01  Robert Dewar  <dewar@adacore.com>
7451
7452         * atree.ads: Minor comment fix.
7453         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7454         a-witeio.ads, sem_prag.adb: Minor reformatting.
7455
7456 2011-08-01  Doug Rupp  <rupp@adacore.com>
7457
7458         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7459         pointers. Use descrip.h header file for convenience. Add some
7460         comments.
7461
7462 2011-08-01  Robert Dewar  <dewar@adacore.com>
7463
7464         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7465         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7466         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7467         New procedure.
7468         (Check_Aspect_At_End_Of_Declarations): New procedure
7469         (Analye_Aspect_Specification): Minor changes for above procedures
7470         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7471         specification node as well.
7472
7473 2011-08-01  Pascal Obry  <obry@adacore.com>
7474
7475         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7476         Windows files. Use GetFilesAttributes() in this case to check for file
7477         existence instead of returning with an error code.
7478
7479 2011-08-01  Vincent Celier  <celier@adacore.com>
7480
7481         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7482         High is above Source length.
7483
7484 2011-08-01  Robert Dewar  <dewar@adacore.com>
7485
7486         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7487
7488 2011-08-01  Robert Dewar  <dewar@adacore.com>
7489
7490         * aspects.ads (Boolean_Aspects): New subtype.
7491         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7492         for derived types in cases where the parent type and derived type have
7493         aspects.
7494         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7495         with aspects when parent type also has aspects.
7496         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7497         boolean expression at this point).
7498         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7499         accordance with final decision on the Ada 2012 feature.
7500         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7501
7502 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7503
7504         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7505
7506 2011-08-01  Pascal Obry  <obry@adacore.com>
7507
7508         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7509         Fix Replace_Slice when High is above current string size.
7510         (Replace_Slice): Fix DL computation when High is above current
7511         string length.
7512
7513 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
7514
7515         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7516
7517 2011-08-01  Matthew Heaney  <heaney@adacore.com>
7518
7519         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7520         of node.
7521
7522 2011-08-01  Pascal Obry  <obry@adacore.com>
7523
7524         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7525         reformatting.
7526
7527 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7528
7529         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7530         access to protected subprograms in generic bodies.
7531         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7532         protected type, indicate that the convention of the subprogram is
7533         Convention_Protected, because it may be used in subsequent declarations
7534         within the protected declaration.
7535
7536 2011-08-01  Vincent Celier  <celier@adacore.com>
7537
7538         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7539         and "final" procedures when the name of the library is "ada", to avoid
7540         duplicate symbols "adainit" and "adafinal" in executables.
7541
7542 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
7543
7544         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7545         quantified expression that appears within a postcondition and uses the
7546         Ada2012 'Result attribute.
7547
7548 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7549
7550         * init.c (__gnat_error_handler): Cast reason to int.
7551         (__gnat_install_handler): Explain sa_sigaction use.
7552
7553 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7554
7555         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7556         subprogram has copy-in copy-out parameters, try to promote the mode of
7557         the return type if it is passed in registers.
7558
7559 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7560
7561         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7562         left operand as addressable.
7563
7564 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
7565
7566         * gcc-interface/gigi.h (build_function_stub): Remove.
7567         (build_return_expr): Likewise.
7568         (convert_vms_descriptor): Declare.
7569         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7570         (build_function_stub): Move to...
7571         * gcc-interface/utils2.c (build_return_expr): Move to...
7572         * gcc-interface/trans.c (build_function_stub): ...here.
7573         (build_return_expr): ...here.
7574         (Subprogram_Body_to_gnu): Add local variable for language_function.
7575         Disconnect the parameter attributes cache, if any, once done with it.
7576         Call end_subprog_body only after setting the end_locus.
7577         Build the stub associated with the function, if any, at the very end.
7578         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7579         variables and streamline control flow.
7580
7581 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
7582
7583         PR ada/49819
7584         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7585         g-trasym-dwarf.adb.
7586
7587 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7588
7589         PR bootstrap/49794
7590         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7591         Assign to act.sa_sigaction.
7592         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7593         current->return_address to char * before arithmetic.
7594
7595 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7596
7597         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7598         Correct argument types.
7599         Extract code from reason.
7600         (__gnat_install_handler): Assign to act.sa_sigaction.
7601
7602 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
7603
7604         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7605         (GNAT1_OBJS): ...here.
7606
7607 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
7608
7609         PR ada/48711
7610         * g-socthi-mingw.adb (Fill): Fix formatting.
7611
7612         * gcc-interface/gigi.h: Move around comment.
7613
7614 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7615
7616         PR ada/46350
7617         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7618
7619 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
7620
7621         PR ada/48711
7622         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7623
7624 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
7625
7626         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7627         range comparison if Pmode is SImode.
7628
7629 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
7630             Eric Botcazou  <ebotcazou@adacore.com>
7631
7632         * adadecode.c: Wrap up in extern "C" block.
7633         * adadecode.h: Likewise.
7634         * adaint.c: Likewise.  Remove 'const' keyword.
7635         * adaint.h: Likewise.
7636         * argv.c: Likewise.
7637         * atree.h: Likewise.
7638         * cio.c: Likewise.
7639         * cstreams.c: Likewise.
7640         * env.c: Likewise.
7641         * exit.c: Likewise.
7642         * fe.h: Likewise.
7643         * final.c: Likewise.
7644         * init.c: Likewise.
7645         * initialize.c: Likewise.
7646         * link.c: Likewise.
7647         * namet.h: Likewise.
7648         * nlists.h: Likewise.
7649         * raise.c: Likewise.
7650         * raise.h: Likewise.
7651         * repinfo.h: Likewise.
7652         * seh_init.c: Likewise.
7653         * targext.c: Likewise.
7654         * tracebak.c: Likewise.
7655         * uintp.h: Likewise.
7656         * urealp.h: Likewise.
7657         * xeinfo.adb: Wrap up generated C code in extern "C" block.
7658         * xsinfo.adb: Likewise.
7659         * xsnamest.adb: Likewise.
7660         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7661         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7662         * gcc-interface/misc.c: Likewise.
7663         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7664         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
7665         ada/targext.o here...
7666         (GNAT_ADA_OBJS): ...and not here.
7667         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7668         (GNATBIND_OBJS): Reorder.
7669
7670 2011-07-07  Richard Henderson  <rth@redhat.com>
7671
7672         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7673         dwarf2out_frame_init.
7674
7675 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
7676
7677         * gcc-interface/misc.c (gnat_init): Tweak previous change.
7678
7679 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7680
7681         PR target/39150
7682         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7683
7684 2011-07-06  Richard Guenther  <rguenther@suse.de>
7685
7686         * gcc-interface/misc.c (gnat_init): Merge calls to
7687         build_common_tree_nodes and build_common_tree_nodes_2.
7688         Re-initialize boolean_false_node.
7689
7690 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
7691             Olivier Hainque  <hainque@adacore.com>
7692             Nicolas Setton  <setton@adacore.com>
7693
7694         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7695         the type according to the ARTIFICIAL_P parameter.
7696         (create_type_decl): Likewise.
7697         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7698
7699 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
7700
7701         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7702         (gnatbind): Likewise.
7703
7704 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7705
7706         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7707
7708 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7709
7710         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7711         local variable throughout.  Remove useless call to Base_Type.
7712         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7713         Take it also into account for the volatileness of the field.  Set the
7714         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
7715
7716 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7717
7718         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7719         on a dereference built for a by-ref object if it has an address clause.
7720
7721 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
7722
7723         * einfo.ads (Address_Taken): Document use for the second argument of
7724         Asm_Input and Asm_Output attributes.
7725         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7726         argument is an entity name, then set Address_Taken on it.
7727         <Attribute_Asm_Output>: Likewise.
7728         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7729         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7730         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7731         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7732
7733 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
7734
7735         PR middle-end/46500
7736         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7737
7738 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
7739
7740         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7741         (ada/utils.o): Update dependencies.
7742         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7743         ../../../libcpp/libcpp.a.
7744         * gcc-interface/utils.c: Include common/common-target.h.
7745         (process_attributes): Use targetm_common.have_named_sections.
7746
7747 2011-06-07  Richard Guenther  <rguenther@suse.de>
7748
7749         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7750         set_sizetype.
7751
7752 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7753
7754         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7755         TREE_THIS_NOTRAP flag.
7756
7757 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7758
7759         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7760         Fix thinko.
7761
7762 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7763
7764         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7765         constants whose full view has discriminants specially.
7766
7767 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
7768
7769         * gcc-interface/utils.c: Include diagnostic.h.
7770         (gnat_write_global_declarations): Output debug information for all
7771         global type declarations before finalizing the compilation unit.
7772         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7773
7774 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
7775
7776         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7777
7778 2011-05-25  Kai Tietz  <ktietz@redhat.com>
7779
7780         * adaint.c (__gnat_to_canonical_file_list_next): Use array
7781         initialization instead of const/none-const pointer assignment.
7782
7783 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
7784
7785         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7786         $(EXTRA_GNAT1_OBJS).
7787         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7788         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7789         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7790         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7791         libcommon-target.a instead of prefix.o.
7792
7793 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
7794
7795         PR ada/49097
7796         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7797
7798 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
7799
7800         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7801         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7802         instead of version.o.
7803
7804 2011-05-18  Kai Tietz <ktietz@redhat.com>
7805
7806         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7807         boolean_false_node instead of integer_zero_node.
7808         (convert_with_check): Likewise.
7809         * gcc-interface/decl.c (choices_to_gnu): Likewise.
7810
7811 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
7812
7813         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7814         type of the parameter is an unconstrained array, convert the actual to
7815         the type of the formal in the In Out and Out cases as well.
7816
7817 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7818
7819         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7820         call build_function_type_array or build_varargs_function_type_array
7821         instead.
7822         (create_subprog_type): Don't call build_function_type; call
7823         build_function_type_vec instead.
7824
7825 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
7826
7827         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7828         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7829         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7830
7831 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
7832
7833         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7834
7835         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7836         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7837
7838 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7839
7840         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7841
7842 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7843
7844         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7845         instead of accessing TYPE_ARG_TYPES directly.
7846         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7847
7848 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7849
7850         PR ada/48844
7851         * gcc-interface/gigi.h (get_variant_part): Declare.
7852         * gcc-interface/decl.c (get_variant_part): Make global.
7853         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7854         types have the same constant size, are record types and T1 has a
7855         variant part while T2 doesn't.
7856
7857 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
7858
7859         * gcc-interface/utils.c (begin_subprog_body): Do not call
7860         get_pending_sizes.
7861         (end_subprog_body): Likewise.
7862
7863 2011-05-04  Richard Guenther  <rguenther@suse.de>
7864
7865         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7866         int_const_binop.
7867         (pos_to_constructor): Likewise.
7868
7869 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
7870             Eric Botcazou  <ebotcazou@adacore.com>
7871
7872         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7873         of build_function_type.  Adjust calls to...
7874         (build_raise_check): ...this.  Do not take a void_tree parameter.
7875         Call build_function_type_list instead of build_function_type.
7876         Fix head comment and swap couple of conditional blocks.
7877
7878 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
7879
7880         * gnatvsn.ads (Library_Version): Bump to 4.7.
7881         (Current_Year): Bump to 2011.
7882
7883 2011-04-29  Michael Matz  <matz@suse.de>
7884
7885         * gcc-interface/misc.c (gnat_handle_option): Set
7886         warn_maybe_uninitialized.
7887
7888 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
7889
7890         * gnat_ugn.texi (Complexity Metrics Control): Update link to
7891         the Watson/McCabe paper.
7892
7893 2011-04-23  Jim Meyering  <meyering@redhat.com>
7894
7895         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7896
7897 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7898
7899         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7900         onto the new type.
7901
7902 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
7903
7904         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7905         parameter.
7906         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
7907         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7908         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7909         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7910         <all>: Do not set flags on the reused DECL node coming from an alias.
7911         Set DECL_IGNORED_P on the DECL node built for subprograms if they
7912         don't need debug info here...
7913         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7914         (gigi): Adjust calls to create_subprog_decl.
7915         (build_raise_check): Likewise.
7916         (establish_gnat_vms_condition_handler): Likewise.
7917         (Compilation_Unit_to_gnu): Likewise.
7918         (gnat_to_gnu): Likewise.
7919
7920 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
7921
7922         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7923         (NO_REORDER_ADAFLAGS): New variable.
7924         (EXTRA_GNATTOOLS): Always define.
7925         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7926         Clean up and adjust list of files compiled with special options.
7927         * gcc-interface/Make-lang.in: Likewise.
7928         (ada/decl.o): Cosmetical change.
7929         (ada/misc.o): Remove dependency on $(PLUGIN_H).
7930
7931 2011-04-20  Jim Meyering  <meyering@redhat.com>
7932
7933         * initialize.c (__gnat_initialize): Remove useless if-before-free.
7934
7935 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7936
7937         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7938         $(CFLAGS) on the link line.
7939
7940 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
7941
7942         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7943         padded type built for the return type if it is unconstrained.
7944
7945 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
7946
7947         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7948
7949 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
7950
7951         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7952         before calling TREE_CHAIN.
7953         * gcc-interface/misc.c (gnat_init_ts): New function.
7954         (LANG_HOOKS_INIT_TS): Define.
7955
7956 2011-04-12  Martin Jambor  <mjambor@suse.cz>
7957
7958         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7959         instead of cgraph_node.
7960
7961 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7962
7963         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7964         alignment on fields of the RETURN type built for the Copy-In Copy-Out
7965         mechanism.
7966
7967 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
7968
7969         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7970         of aggregate types that contain a placeholder.
7971
7972 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
7973
7974         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7975         TYPE_ARG_TYPES.
7976         (handle_type_generic_attribute): Likewise.
7977
7978 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
7979
7980         PR ada/47163
7981         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7982
7983 2011-04-04  Kai Tietz  <ktietz@redhat.com>
7984
7985         PR ada/47163
7986         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7987         to flag value.
7988
7989 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7990
7991         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7992         type case, do not strip a padding type around the array type.
7993
7994 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
7995
7996         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7997         types.
7998
7999 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8000
8001         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8002         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8003         code for -feliminate-unused-debug-types.
8004         (gnat_post_options): Likewise.
8005
8006 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8007
8008         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8009         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8010         distinct copy.
8011
8012 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8013
8014         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8015         DECL_ARTIFICIAL flag on enumeration types.
8016
8017 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8018
8019         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8020         fat pointer types artificial unconditionally.
8021         <E_Array_Subtype>: Attach the base array type as a parallel type if it
8022         isn't artificial.
8023
8024 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8025
8026         * gcc-interface/gigi.h (get_dummy_type): Declare.
8027         (build_dummy_unc_pointer_types): Likewise.
8028         (finish_fat_pointer_type): Likewise.
8029         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
8030         fat pointer type has been built, complete it in place.
8031         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
8032         and thin pointers.  Remove useless variable.
8033         (finish_fat_pointer_type): Make global and move to...
8034         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
8035         (get_dummy_type): New function.
8036         (build_dummy_unc_pointer_types): Likewise.
8037         (gnat_pushdecl): Propage the name to the anonymous variants only.
8038         (update_pointer_to): Only adjust the pointer types in the unconstrained
8039         array case.
8040
8041 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8042
8043         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
8044         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
8045         if this is a Taft amendment type and the full declaration is available.
8046         * gcc-interface/trans.c (process_type): Likewise.
8047         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
8048         (process_freeze_entity): Likewise.
8049         * gcc-interface/utils.c (dummy_global): New static variable.
8050         (gnat_write_global_declarations): If there are types declared as used
8051         at the global level, insert them in the global hash table.
8052
8053 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8054
8055         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
8056         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8057         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
8058         copy.
8059         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
8060         flag of the type accordingly.
8061         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
8062
8063 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
8064
8065         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8066         finalizing types when updating the pointers to the designated type.
8067         <all>: Finalize the deferred types even if we didn't defer processing
8068         of incomplete types in this invocation.
8069
8070 2011-04-01  Olivier Hainque  <hainque@adacore.com>
8071             Nicolas Setton  <setton@adacore.com>
8072             Eric Botcazou  <ebotcazou@adacore.com>
8073
8074         * gcc-interface/misc.c (gnat_descriptive_type): New function.
8075         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
8076
8077 2011-03-28  Kai Tietz  <ktietz@redhat.com>
8078
8079         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
8080         Windows targets.
8081         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
8082         * system-mingw.ads (System): Change ZCX_By_Default default to True.
8083
8084         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
8085
8086 2011-03-28  Tristan Gingold  <gingold@adacore.com>
8087
8088         PR ada/44431
8089         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
8090         Use ada output of gnatbind.
8091         (ada/b_gnatb.adb): Ditto.
8092         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
8093         (ada.mostlyclean, ada.stage1)
8094         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
8095         (ada.stagefeedback): Adjust.
8096         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8097         Use ada output of gnatbind.
8098         (b_gnatm.adb): Ditto.
8099         (b_gnatl.o, b_gnatm.o): New rules.
8100
8101 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8102
8103         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8104         for the padded type built to support a specified size or alignment.
8105
8106 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8107
8108         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
8109         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
8110         unconditionally to the end of the unit when the designated type is
8111         limited_with'ed.
8112         <all>: Rename local variable.  Attempt to un-defer types only and do it
8113         for limited_with'ed types as well.
8114         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
8115         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
8116         consistently and remove redundant call to finalize_from_with_types.
8117
8118 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
8119
8120         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
8121         subprograms without a previous spec declared in the same unit.
8122         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
8123         subprograms at the end of the unit instead of at the beginning.
8124         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
8125         isn't public for the special handling of non-inline functions nested
8126         inside inline external functions.
8127
8128 2011-03-25  Jeff Law  <law@redhat.com>
8129
8130         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
8131
8132 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8133
8134         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
8135         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
8136         to compute Set_Size_Depends_On_Discriminant.
8137         (Layout_Type): Call it on array types in back-end layout mode.
8138         * sem_util.adb (Requires_Transient_Scope): Return true for array
8139         types only if the size depends on the value of discriminants.
8140         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
8141         type if the RHS is a call to a function that returns an unconstrained
8142         type with default discriminant.
8143
8144 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
8145
8146         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
8147         non-conversion to the nominal result type at the end.
8148
8149 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8150
8151         * gcc-interface/trans.c (create_temporary): New function taken from...
8152         (create_init_temporary): ...here.  Call it.
8153         (call_to_gnu): Create the temporary for the return value early, if any.
8154         Create it for a function with copy-in/copy-out parameters if there is
8155         no target; in other cases of copy-in/copy-out, use another temporary.
8156         Push the new binding level lazily.  Add and rename local variables.
8157
8158 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8159
8160         * gcc-interface/decl.c (validate_size): Improve comments and tweak
8161         error message.
8162         (set_rm_size): Likewise.
8163
8164 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
8165
8166         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
8167         for the padded type built in order to support a specified alignment.
8168         Fix incorrect formatting.
8169
8170 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8171
8172         PR bootstrap/48216
8173         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8174
8175 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8176
8177         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8178         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8179         to the end of the list.  Adjust recursive call.  Rename local variable.
8180         If REORDER is true, reorder components of the record type.
8181         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8182         components_to_record and adjust the parameter list.
8183
8184 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
8185
8186         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8187         disabled, use the variable for bounds of loop iteration scheme.
8188
8189 2011-03-21  Kai Tietz  <ktietz@redhat.com>
8190
8191         PR target/12171
8192         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8193
8194 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8195
8196         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8197         out whether the expression is read-only.  Short-circuit placeholder
8198         case and rename a couple of local variables.
8199
8200 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
8201
8202         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8203         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8204         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8205         (convert): Deal with conversions from a smaller form type specially.
8206
8207 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
8208
8209         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8210         its argument, except for the special -I- switch.
8211
8212 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
8213
8214         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8215         "Ada Issues".
8216
8217 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
8218
8219         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8220
8221 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
8222
8223         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8224         GNAT_FORMAL.
8225         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8226         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
8227         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
8228         Do not generate the check directly, instead instantiate the template
8229         check present in the descriptor.
8230         (make_descriptor_field): Move around.
8231         (build_vms_descriptor32): Build a template check in the POINTER field.
8232         (build_vms_descriptor): Remove useless suffixes.
8233         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8234
8235 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
8236
8237         PR bootstrap/47467
8238         * targext.c: Include target files if IN_RTS is defined.
8239
8240 2011-01-26  Richard Guenther  <rguenther@suse.de>
8241
8242         PR bootstrap/47467
8243         * targext.c: Include config.h.
8244         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8245         dependency.
8246
8247 2011-01-04  Pascal Obry  <obry@adacore.com>
8248             Eric Botcazou  <ebotcazou@adacore.com>
8249
8250         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8251
8252 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8253
8254         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8255         end-of-case on the end label and its associated gotos, if any.
8256
8257 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8258
8259         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8260         expressions of the parameter cache within the statement group of
8261         the CICO mechanism.
8262
8263 2011-01-04  Olivier Hainque  <hainque@adacore.com>
8264             Eric Botcazou  <ebotcazou@adacore.com>
8265
8266         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8267         (set_end_locus_from_node): New function.
8268         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8269         make and the function end_locus.
8270         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8271         for the elaboration subprogram.
8272         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8273         set the end_locus of the expression as well.
8274
8275 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
8276
8277         PR ada/47131
8278         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8279         variables that are referenced in exception handlers volatile.
8280
8281
8282 \f
8283 Copyright (C) 2011 Free Software Foundation, Inc.
8284
8285 Copying and distribution of this file, with or without modification,
8286 are permitted in any medium without royalty provided the copyright
8287 notice and this notice are preserved.