OSDN Git Service

2011-09-01 Vincent Celier <celier@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-09-01  Vincent Celier  <celier@adacore.com>
2
3         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
5
6 2011-09-01  Nicolas Roche  <roche@adacore.com>
7
8         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
9         on VxWorks in kernel mode.
10
11 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
12
13         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
14         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
15         directly the bit array.
16         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
17         the linux macros with the same name.
18         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
19         wrappers around the CPU_ZERO and CPU_SET linux macros.
20
21 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
22
23         * exp_ch7.adb (Find_Insertion_List): Removed.
24         (Process_Transient_Objects): Insert the declarations of the hook
25         access type and the hook object before the associated transient object.
26
27 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
28
29         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
30         package System.Aux_Dec when using restricted run-time libraries which
31         do not have this package.
32
33 2011-09-01  Tristan Gingold  <gingold@adacore.com>
34
35         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
36
37 2011-09-01  Bob Duff  <duff@adacore.com>
38
39         * sem_attr.adb (Analyze_Access_Attribute): Do not call
40         Kill_Current_Values for P'Unrestricted_Access, where P is library level
41
42 2011-09-01  Thomas Quinot  <quinot@adacore.com>
43
44         * exp_ch5.adb: Minor reformatting
45         * gnat_ugn.texi: Fix minor typos.
46         * gcc-interface/Make-lang.in: Update dependencies.
47
48 2011-09-01  Robert Dewar  <dewar@adacore.com>
49
50         * inline.adb, sem_aggr.adb: Minor reformatting.
51
52 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
53
54         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
55
56 2011-09-01  Robert Dewar  <dewar@adacore.com>
57
58         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
59
60 2011-09-01  Bob Duff  <duff@adacore.com>
61
62         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
63         body" the same as "in inlined body", because visibility shouldn't
64         apply there.
65
66 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
67
68         * inline.adb (Add_Inlined_Body): Refine previous change.
69
70 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
71
72         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
73         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
74         Test for case where call
75         initializes an object of a return statement before testing for
76         a constrained call, to ensure that all such cases get handled
77         by simply passing on the caller's parameters. Also, in that
78         case call Needs_BIP_Alloc_Form to determine whether to pass on
79         the BIP_Alloc_Form parameter of the enclosing function rather
80         than testing Is_Constrained. Add similar tests for the return
81         of a BIP call to later processing to ensure consistent handling.
82         (Needs_BIP_Alloc_Form): New utility function.
83         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
84         a BIP_Alloc_Form formal with call to new utility function
85         Needs_BIP_Alloc_Form.
86
87 2011-09-01  Pascal Obry  <obry@adacore.com>
88
89         * prj-part.adb: Minor reformatting.
90
91 2011-09-01  Vincent Celier  <celier@adacore.com>
92
93         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
94         half character in the unit name.
95
96 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
97
98         * exp_ch4.adb: Minor code and comment reformatting.
99
100 2011-09-01  Thomas Quinot  <quinot@adacore.com>
101
102         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
103         for Is_Limited_Type and Is_Tagged_Type in condition checking
104         for by-reference type.
105         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
106         subprograms may have a completion because of a previous
107         Inline_Always clause, but the enclosing package must be marked
108         inlined for the subprogram body to become visible to the backend.
109
110 2011-09-01  Thomas Quinot  <quinot@adacore.com>
111
112         * sem_aux.adb, exp_ch4.adb: Minor reformatting
113
114 2011-09-01  Pascal Obry  <obry@adacore.com>
115
116         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
117
118 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
119
120         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
121         the formals of a subprogram stub that acts as a spec.
122
123 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
124
125         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
126         type, declare a renaming for it, not an object declaration.
127
128 2011-09-01  Yannick Moy  <moy@adacore.com>
129
130         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
131         Ignore_Errors to ignore failures to read ALI files when True.
132
133 2011-09-01  Javier Miranda  <miranda@adacore.com>
134
135         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
136         constructor calls associated with non-tagged record types.
137
138 2011-09-01  Robert Dewar  <dewar@adacore.com>
139
140         * g-socthi-vms.adb: Minor reformatting.
141
142 2011-09-01  Nicolas Roche  <roche@adacore.com>
143
144         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
145         in order to avoid impact of imcompatible changes.
146         * cstreams.c: Likewise
147         * cio.c: Likewise
148         * aux-io.c: Likewise
149
150 2011-09-01  Yannick Moy  <moy@adacore.com>
151
152         * lib-writ.adb (Write_With_Lines): Always output complete information
153         on "with" line in Alfa mode, as this is required by formal verification
154         back-end.
155
156 2011-09-01  Tristan Gingold  <gingold@adacore.com>
157
158         * g-socthi-vms.adb: Add comments.
159
160 2011-09-01  Pascal Obry  <obry@adacore.com>
161
162         * prj.ads: Minor reformatting.
163
164 2011-09-01  Vincent Celier  <celier@adacore.com>
165
166         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
167         exceptions in the config pragmas file.
168
169 2011-09-01  Tristan Gingold  <gingold@adacore.com>
170
171         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
172
173 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
174
175         * exp_ch7.adb (Find_Insertion_List): New routine.
176         (Process_Transient_Objects): Add code to handle the abnormal
177         finalization of a controlled transient associated with a subprogram
178         call. Since transients are cleaned up right after the associated
179         context, an exception raised during a subprogram call may bypass the
180         finalization code.
181
182 2011-09-01  Robert Dewar  <dewar@adacore.com>
183
184         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
185         aliased.
186
187 2011-09-01  Robert Dewar  <dewar@adacore.com>
188
189         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
190
191 2011-09-01  Robert Dewar  <dewar@adacore.com>
192
193         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
194
195 2011-09-01  Thomas Quinot  <quinot@adacore.com>
196
197         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
198         GNATRTL_NONTASKING_OBJS.
199
200 2011-09-01  Robert Dewar  <dewar@adacore.com>
201
202         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
203         possibility of this flag being set for formals in Ada 2012 mode.
204         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
205         2012.
206         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
207         mode.
208         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
209         Ada 2012.
210         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
211         Ada 2012.
212
213 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
214
215         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
216         insertion node in a tree of nested Expression_With_Actions nodes.
217         (Process_Transient_Object): In the case where a complex if statement
218         has been converted into nested Expression_With_Actions nodes, the
219         "hook" object and the associated access type must be inserted before
220         the top most Expression_With_Actions.
221
222 2011-09-01  Robert Dewar  <dewar@adacore.com>
223
224         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
225         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
226
227 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
228
229         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
230
231 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
232
233         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
234         aspect.
235         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
236         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
237         in a similar way as we do for the Priority or Dispatching_Domain aspect.
238         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
239         Dispatching_Domains_Frozen): Move this local data to package
240         System.Tasking because with the CPU aspect we need to have access
241         to this data when creating the task in System.Tasking.Stages.Create_Task
242         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
243         Move these variables from the body of
244         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
245         we need to have access to this data when creating the task in
246         System.Tasking.Stages.Create_Task.
247         * s-taskin.adb (Initialize): Signal the allocation of the environment
248         task to a CPU, if any, so that we know whether the CPU can be
249         transferred to a different dispatching domain.
250         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
251         is being allocated belongs to the dispatching domain where the task
252         lives. Signal the allocation of the task to a CPU, if any, so that we
253         know whether the CPU can be transferred to a different dispatching
254         domain.
255
256 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
257
258         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
259         attributes Same_Storage and Overlaps_Storage.
260
261 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
262
263         * exp_strm.adb: Remove with and use clause for Opt.
264         (Build_Array_Input_Function): Remove the version-dependent generation
265         of the return statement. The Ada 2005 tree is now the default.
266
267 2011-09-01  Yannick Moy  <moy@adacore.com>
268
269         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
270         it is never empty when compiling in Alfa mode.
271
272 2011-09-01  Robert Dewar  <dewar@adacore.com>
273
274         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
275         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
276         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
277         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
278
279 2011-09-01  Matthew Heaney  <heaney@adacore.com>
280
281         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
282         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
283         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
284         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
285         unbounded queue container.
286         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
287         bounded queue container.
288         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
289         unbounded priority queue container.
290         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
291         bounded priority queue container.
292
293 2011-08-31  Pascal Obry  <obry@adacore.com>
294
295         * a-direct.adb: Do not try to create an UNC path on Windows.
296         (Create_Path): Skip leading computer name in UNC path if any.
297
298 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
299
300         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
301         version-dependent generation of the return statement. The Ada 2005 tree
302         is now the default.
303
304 2011-08-31  Thomas Quinot  <quinot@adacore.com>
305
306         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
307         types Stream_Element_Offset and Storage_Offset have a different native
308         type depending on whether the platform is 32 or 64 bits. When
309         exchanging them, always convert to 64 bits.
310
311 2011-08-31  Yannick Moy  <moy@adacore.com>
312
313         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
314         --force-alfa to gnat2why.
315
316 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
317
318         * sem_ch12.adb (Save_References): If the node has aspects, save
319         references within the corresponding expressions in a separate step,
320         because the aspects are not directly in the tree for the declaration
321         to which they belong.
322
323 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
324
325         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
326         in CodePeer mode, since representation clauses are partially ignored.
327         * gcc-interface/Make-lang.in: Update dependencies.
328
329 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
330
331         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
332         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
333         to any dispatching domain.
334
335 2011-08-31  Thomas Quinot  <quinot@adacore.com>
336
337         * exp_ch4.adb: Minor reformatting.
338
339 2011-08-31  Bob Duff  <duff@adacore.com>
340
341         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
342         on nodes for which it is not defined.
343         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
344         parent type.
345
346 2011-08-31  Bob Duff  <duff@adacore.com>
347
348         * sem_ch3.adb (Process_Full_View): Disable legality check if
349         In_Instance, to avoid spurious errors.
350         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
351         if In_Instance, to avoid spurious errors.
352
353 2011-08-31  Pascal Obry  <obry@adacore.com>
354
355         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
356         directory speparators.
357         (Compose): Use Dir_Seps to handle both forms.
358         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
359         changes.
360         (Extension): Use Dir_Seps to handle both forms.
361
362 2011-08-31  Pascal Obry  <obry@adacore.com>
363
364         * prj-conf.adb: Minor reformatting.
365
366 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
367
368         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
369         dispatching domain aspect.
370         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
371         aspect.
372         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
373         Dispatching_Domain aspect in a similar way as we do for the Priority
374         aspect.
375         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
376         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
377         is present.
378         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
379         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
380         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
381         Dispatching_Domain and add it to the task definition.
382         (Sig_Flags): Add Pragma_Dispatching_Domain.
383         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
384         support to find the types Dispatching_Domain and
385         Dispatching_Domain_Access.
386         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
387         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
388         query the availability of a pragma Dispatching_Domain.
389         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
390         the expander to pass the Dispatching_Domain when creating a task.
391         (Name_Dispatching_Domain): Add this new name for a pragma.
392         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
393         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
394         task has been allocated at creation time.
395         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
396         Ravenscar is always null.
397         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
398         the task has been allocated at creation time.
399         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
400         a specific dispatching domain.
401         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
402         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
403         and CPU are specified for the task, and the CPU value is not contained
404         within the range of processors for the domain.
405
406 2011-08-31  Vincent Celier  <celier@adacore.com>
407
408         * make.adb (Original_Gcc) : New constant String_Access.
409         (Gnatmake): For VM targets, do not use VM version of the compiler if
410         --GCC= has been specified.
411
412 2011-08-31  Thomas Quinot  <quinot@adacore.com>
413
414         * sem_ch5.adb: Minor reformatting.
415
416 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
417
418         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
419         not reanalyze it.
420
421 2011-08-31  Bob Duff  <duff@adacore.com>
422
423         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
424         the access type is private; we don't care about privacy in expansion.
425
426 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
427
428         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
429         subcomponents tnat may be limited, because they originate in view
430         conflicts. If the original aggregate is legal and the actuals are
431         legal, the aggregate itself is legal.
432
433 2011-08-31  Matthew Heaney  <heaney@adacore.com>
434
435         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
436         status.
437
438 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
439
440         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
441         errors in B tests.
442
443 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
444
445         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
446         Interrupt_Priority aspects, force the analysis of the aspect expression
447         (when building the equivalent pragma). Otherwise, its analysis is done
448         too late, after the task or protected object has been created.
449         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
450         Analyze_Single_Task_Declaration): Remove the code to move the aspects
451         to the object declaration because they are needed in the type
452         declaration.
453
454 2011-08-31  Robert Dewar  <dewar@adacore.com>
455
456         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
457         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
458         reformatting.
459
460 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
461
462         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
463         if the corresponding type is malformed due to restriction violations.
464
465 2011-08-31  Robert Dewar  <dewar@adacore.com>
466
467         * s-ransee.ads, s-ransee.adb: Minor reformatting.
468
469 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
470
471         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
472         would cause the generation of Set_Finalize_Address if the target is a
473         VM and the designated type is not derived from [Limited_]Controlled.
474
475 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
476
477         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
478         subprogram.
479         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
480         case of a compilation error.
481
482 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
483
484         * init.c (__gnat_error_handler): Standardize the stack overflow or
485         erroneous memory access message.
486         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
487         or erroneous memory access message.
488
489 2011-08-31  Robert Dewar  <dewar@adacore.com>
490
491         * sem_ch4.adb: Minor reformatting.
492         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
493
494 2011-08-31  Thomas Quinot  <quinot@adacore.com>
495
496         * scos.ads: Minor documentation clarification.
497         * put_scos.adb: Do not generate SCO unit header line for a unit that
498         has no SCO lines.
499
500 2011-08-31  Robert Dewar  <dewar@adacore.com>
501
502         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
503
504 2011-08-31  Tristan Gingold  <gingold@adacore.com>
505
506         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
507         hold variables between these following subprograms.
508         (Build_Exception_Handler, Build_Object_Declarations,
509         Build_Raise_Statement): Use the above type as parameter.
510         Make the above adjustments.
511         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
512
513 2011-08-31  Pascal Obry  <obry@adacore.com>
514
515         * projects.texi: Minor reformatting.
516
517 2011-08-31  Tristan Gingold  <gingold@adacore.com>
518
519         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
520         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
521
522 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
523
524         * exp_ch5.adb: Minor code cleanup.
525         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
526         prevent cascaded errors.
527         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
528         variable of an iterator specification in current scope.
529         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
530         postconditions on the stack, as they contain no return statements.
531
532 2011-08-31  Yannick Moy  <moy@adacore.com>
533
534         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
535         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
536         call Qualify_Entity_Names.
537         (Expand_Alfa): call Qualify_Entity_Names in more cases
538         * lib-xref-alfa.adb: Take into account system package.
539         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
540         CodePeer mode in which we are interested in finding bugs even if
541         compiler cannot compile source.
542         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
543         deferred constant.
544
545 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
546
547         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
548         denoted by the subtype mark to ensure getting the concurrent type in
549         the case where the subtype mark denotes a private subtype of a
550         concurrent type (needed when using -gnatc).
551         (Process_Subtype): For the processing specific to type kinds, case on
552         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
553         subtype denotes a private subtype whose base type is nonprivate (needed
554         for subtypes of private fulfilled by task types when compiling with
555         -gnatc).
556
557 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
558
559         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
560         late primitives that override interface operations when the full
561         expander is not active, to avoid blowups in Register_Primitive when
562         types don't have associated secondary dispatch tables.
563
564 2011-08-31  Yannick Moy  <moy@adacore.com>
565
566         * alfa_test.adb: Code clean up.
567
568 2011-08-31  Marc Sango  <sango@adacore.com>
569
570         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
571         by Comes_From_Source (Original_Node (N)) in order to treat also the
572         nodes which have been rewritten.
573         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
574         explicit dereference and slice violation in spark mode on the nodes 
575         coming only from the source code.
576
577 2011-08-31  Robert Dewar  <dewar@adacore.com>
578
579         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
580         lib-xref-alfa.adb: Minor reformatting.
581
582 2011-08-31  Matthew Heaney  <heaney@adacore.com>
583
584         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
585
586 2011-08-31  Javier Miranda  <miranda@adacore.com>
587
588         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
589         only for class-wide subprograms conflicting with entities of concurrent
590         tagged types.
591
592 2011-08-31  Matthew Heaney  <heaney@adacore.com>
593
594         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
595         node to null value.
596
597 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
598
599         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
600         general description of the routine.
601
602 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
603
604         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
605         doubly-linked lists.
606
607 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
608
609         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
610         check is needed for a left-hand side that is a dereference, and the
611         base type is private without discriminants (whereas the full type does
612         have discriminants), an extra retrieval of the underlying type may be
613         needed in the case where the subtype is a record subtype whose base
614         type is private. Update comments.
615
616 2011-08-31  Javier Miranda  <miranda@adacore.com>
617
618         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
619         found check if there is a class-wide subprogram covering the primitive.
620         
621 2011-08-31  Yannick Moy  <moy@adacore.com>
622
623         * sem_res.adb: Further cases where full expansion test is needed,
624         rather than expansion test.
625
626 2011-08-31  Pascal Obry  <obry@adacore.com>
627
628         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
629
630 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
631
632         * exp_ch5.adb: Handle iterators over derived container types.
633
634 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
635
636         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
637         (Has_Anonymous_Master): New routine.
638         (Set_Has_Anonymous_Master): New routine.
639         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
640         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
641         (Current_Anonymous_Master): New routine.
642         (Current_Unit_First_Declaration): Removed.
643         (Current_Unit_Scope): Removed.
644         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
645         their objects on a per-unit heterogeneous finalization master.
646
647 2011-08-31  Matthew Heaney  <heaney@adacore.com>
648
649         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
650         array.
651
652 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
653
654         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
655         when not needed.
656
657 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
658
659         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
660         where the actual is an unexpanded call to 'Input.
661
662 2011-08-31  Yannick Moy  <moy@adacore.com>
663
664         * sem_ch4.adb: Code clean up.
665
666 2011-08-31  Yannick Moy  <moy@adacore.com>
667
668         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
669
670 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
671
672         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
673         and TSS primitive Finalize_Address if finalization is suppressed.
674         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
675         primitive Finalize_Address if finalization is suppressed.
676
677 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
678
679         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
680         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
681         sure that the underlying task has already been created before trying
682         to change its affinity.
683         (Set_CPU): Use the term processor instead of CPU, as we do in
684         Assign_Task.
685
686 2011-08-31  Vincent Celier  <celier@adacore.com>
687
688         * prj-attr.adb: New Compiler attribute Source_File_Switches.
689         * prj-nmsc.adb (Process_Compiler): Process attribute
690         Source_File_Switches.
691         * prj.ads (Language_Config): New name list component
692         Name_Source_File_Switches.
693         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
694
695 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
696
697         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
698         discriminated component of an actual, expand at once to prevent
699         ouf-of-order references with generated subtypes.
700
701 2011-08-31  Yannick Moy  <moy@adacore.com>
702
703         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
704         reference to operator in Alfa xrefs.
705
706 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
707
708         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
709         where the parent instance was frozen before the current instance due to
710         the presence of a source body. Update calls to Insert_After_Last_Decl.
711         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
712         Update the comment which illustrates the purpose of the routine.
713         Package instances are now frozen by source bodies which appear after
714         the instance. This ensures that entities coming from within the
715         instance are available for use in the said bodies.
716         (Install_Body): Add code to handle the case where the parent instance
717         was frozen before the current instance due to the presence of a source
718         body. Update calls to Insert_After_Last_Decl.
719
720 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
721
722         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
723         access types.
724         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
725
726 2011-08-31  Yannick Moy  <moy@adacore.com>
727
728         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
729         full-expander test.
730         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
731         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
732         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
733         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
734         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
735         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
736         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
737         ALFA in Alfa (we dropped acronym).
738         * einfo.adb (Primitive_Operations): Correctly return list of primitive
739         operations in a case where it returned previously No_Elist.
740
741 2011-08-31  Robert Dewar  <dewar@adacore.com>
742
743         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
744         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
745         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
746         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
747         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
748         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
749         reformatting.
750
751 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
752
753         * sem_ch12 (Check_Private_View): Revert previous change.
754         * sem_res.adb (Conversion_Check): Do not emit the error message if the
755         conversion is in a generic instance.
756
757 2011-08-31  Matthew Heaney  <heaney@adacore.com>
758
759         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
760         * a-chtgbo.adb (Free): Allow 0 as index value.
761
762 2011-08-31  Matthew Heaney  <heaney@adacore.com>
763
764         * a-cborma.adb (Insert): Add comment to explain why no element
765         assignment.
766
767 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
768
769         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
770         spec discriminant is already a concurrent type, in which case just use
771         it, otherwise fetch the Corresponding_Concurrent_Type as before.
772
773 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
774
775         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
776         system-linux-mips.ads, system-linux-mipsel.ads,
777         system-linux-mips64el.ads, system-linux-ppc64.ads,
778         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
779
780 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
781
782         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
783         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
784         (build_unary_op): Likewise.
785
786 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
787
788         * raise-gcc.c: Do not include coretypes.h and tm.h.
789         (setup_to_install): Remove test for compiler macro.
790         * targext.c: Document use for the library.
791         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
792
793 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
794
795         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
796         the expression to the nominal type if the latter is a record type with
797         a variant part and the type of the former is a record type without one.
798
799 2011-08-30  Yannick Moy  <moy@adacore.com>
800
801         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
802         expansion in Alfa mode.
803         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
804         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
805         Alfa mode.
806         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
807         * sem_res.adb: Ditto.
808         * gcc-interface/Make-lang.in: Update dependencies.
809
810 2011-08-30  Thomas Quinot  <quinot@adacore.com>
811
812         * g-socket.ads: Minor documentation adjustment.
813
814 2011-08-30  Robert Dewar  <dewar@adacore.com>
815
816         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
817
818 2011-08-30  Yannick Moy  <moy@adacore.com>
819
820         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
821         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
822         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
823         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
824         Revert change which introduced files for "light"
825         expansion, to be replaced by a single file for Alfa expansion.
826
827 2011-08-30  Robert Dewar  <dewar@adacore.com>
828
829         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
830         Minor code reorg/reformatting.
831
832 2011-08-30  Yannick Moy  <moy@adacore.com>
833
834         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
835         common shorthand for (Expander_Active and not ALFA_Mode) that can be
836         used for testing full expansion, that is active expansion not in the
837         reduced mode for Alfa
838         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
839         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
840         of the verbose (Expander_Active and not ALFA_Mode)
841
842 2011-08-30  Tristan Gingold  <gingold@adacore.com>
843
844         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
845         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
846         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
847         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
848
849 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
850
851         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
852         access conversions to check that the conversion is a rewritten node,
853         rather than just having Comes_From_Source set to False, which wasn't
854         sufficient.
855
856 2011-08-30  Robert Dewar  <dewar@adacore.com>
857
858         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
859         g-socket.ads: Minor reformatting.
860
861 2011-08-30  Thomas Quinot  <quinot@adacore.com>
862
863         * sem_util.adb: Minor reformatting.
864
865 2011-08-30  Tristan Gingold  <gingold@adacore.com>
866
867         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
868         to be compliant with the ABI.
869
870 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
871
872         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
873         of a designated type when the related access type is an actual in an
874         instance. This ensures that the full view of designated type is
875         available when inside the body of the instance.
876
877 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
878
879         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
880         in a position to be modified, a slice is treated like an indexed
881         component.
882
883 2011-08-30  Thomas Quinot  <quinot@adacore.com>
884
885         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
886         field tv_sec in struct timeval.
887
888 2011-08-30  Yannick Moy  <moy@adacore.com>
889
890         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
891         blocks of code doing full expansion, previously only guarded by
892         Expander_Active, by anding the test that ALFA_Mode is not set
893
894 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
895
896         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
897         add the function to the list of private dependents, for subsequent
898         legality check on Taft amendment types.
899         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
900         Private_Dependents, as for other incomplete types.
901         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
902         Taft-amendment type is used as the return type of a function.
903
904 2011-08-30  Javier Miranda  <miranda@adacore.com>
905
906         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
907         which emits an error by a call to a new routine which report the error.
908         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
909         entity does not cover an existing interface.
910         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
911         code.
912         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
913         protected procedures or entries whose mode is not conformant.
914         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
915         an error by a call to a new routine which report the error.
916
917 2011-08-30  Robert Dewar  <dewar@adacore.com>
918
919         * gnat_rm.texi: Minor change.
920         * exp_attr_light.adb: Minor reformatting.
921
922 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
923
924         * sem_ch3.adb: Patch inheritance of aspects in
925         Complete_Private_Subtype, to avoid infinite loop.
926
927 2011-08-30  Javier Miranda  <miranda@adacore.com>
928
929         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
930         been reported and a subprogram covering an interface primitive is not
931         found then skip generating the internal entity. Done to avoid crashing
932         the frontend.
933         (Check_Abstract_Overriding): Change text of error of wrong formal of
934         protected subprogram or entry. Done for consistency to emit exactly the
935         same error reported by Check_Synchronized_Overriding. In addition, the
936         error is restricted to protected types (bug found working on AI05-0090)
937
938 2011-08-30  Yannick Moy  <moy@adacore.com>
939
940         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
941         expansion in Alfa mode.
942         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
943         * exp_light.adb, exp_light.ads: New package defining light expansion.
944         * expander.adb (Expand): Call light expansion in Alfa mode
945         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
946         constructs.
947         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
948         constructs.
949         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
950         * gnat1drv.adb (Adjust_Global_Switches): Comment
951
952 2011-08-30  Yannick Moy  <moy@adacore.com>
953
954         * lib-xref-alfa.adb: Minor refactoring.
955
956 2011-08-30  Yannick Moy  <moy@adacore.com>
957
958         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
959         mode.
960         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
961         expansion in Alfa mode.
962         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
963         mode.
964
965 2011-08-30  Robert Dewar  <dewar@adacore.com>
966
967         * debug_a.adb: Update comment.
968
969 2011-08-30  Robert Dewar  <dewar@adacore.com>
970
971         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
972         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
973         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
974         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
975
976 2011-08-30  Robert Dewar  <dewar@adacore.com>
977
978         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
979         volatile.
980
981 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
982
983         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
984         Build_Finalization_Master by supplying an insertion node and enclosing
985         scope. In its old version, the call did not generate a finalization
986         master.
987         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
988         recognize anonymous access-to-controlled components. Rewrite the
989         machinery which creates finalization masters to service anonymous
990         access-to-controlled components of a record type. In its current state,
991         only one heterogeneous master is necessary to handle multiple anonymous
992         components.
993         (Freeze_Type): Comment reformatting.
994         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
995         RE_Unit_Table.
996         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
997         associates TSS primitive Finalize_Address with either the master itself
998         or with the internal hash table depending on the mode of operation of
999         the master.
1000
1001 2011-08-30  Javier Miranda  <miranda@adacore.com>
1002
1003         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
1004         interface type then do not generate code to compare this component.
1005         Required since they have no components and their equality operator is
1006         abstract.
1007
1008 2011-08-30  Steve Baird  <baird@adacore.com>
1009
1010         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
1011         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
1012         returns the (static) accessibility level of the object. Otherwise, the
1013         same as Type_Access_Level.
1014         (Dynamic_Accessibility_Level): New function; given an expression which
1015         could occur as the rhs of an assignment to a saooaaat (i.e., an
1016         expression of an access-to-object type), return the new value for the
1017         saooaaat's associated Extra_Accessibility object.
1018         (Effective_Extra_Accessibility): New function; same as
1019         Einfo.Extra_Accessibility except that object renames are looked through.
1020         * sem_util.adb 
1021         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
1022         (Dynamic_Accessibility_Level): New function; see sem_util.ads
1023         description.
1024         (Effective_Extra_Accessibility): New function; see sem_util.ads
1025         description.
1026         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
1027         (Extra_Accessibility): Update comments.
1028         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
1029         except RM_Size field (which is only for types) is unaffected.
1030         * einfo.adb
1031         (Extra_Accessibility): Expand domain to allow objects, not just formals.
1032         (Set_Extra_Accessibility): Expand domain to allow objects, not just
1033         formals.
1034         (Init_Size): Add assertion that we are not trashing the
1035         Extra_Accessibility attribute of an object.
1036         (Init_Size_Align): Add assertion that we are not trashing the
1037         Extra_Accessibility attribute of an object.
1038         (Init_Object_Size_Align): New procedure; see einfo.ads description.
1039         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
1040         differently for the type of a (non-library-level) saooaaat depending
1041         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
1042         is queried in this set of changes - everything else (in particular,
1043         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
1044         driven off of the setting of the Is_Local_Anonymous_Access attribute.
1045         The special treatment of library-level saooaaats is an optimization,
1046         not required for correctnesss. This is based on the observation that the
1047         Ada2012 rules (static and dynamic) for saooaaats turn out to be
1048         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
1049         * exp_ch3.adb
1050         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
1051         false for the type of a saooaaat, declare and initialize its
1052         accessibility level object and set the Extra_Accessibility attribute
1053         of the saooaaat to refer to this object.
1054         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1055         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1056         calls to Effective_Extra_Accessibility in order to support
1057         renames of saooaaats.
1058         (Expand_N_Type_Conversion): Add new local function,
1059         Has_Extra_Accessibility, and call it when determining whether an
1060         accessibility check is needed.
1061         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1062         evaluate to True (without raising an exception).
1063         * exp_ch5.adb
1064         (Expand_N_Assignment_Statement): When assigning to an Ada2012
1065         saooaaat, update its associated Extra_Accessibility object (if
1066         it has one). This includes an accessibility check.
1067         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1068         a saooaaat, update its Extra_Accessibility object too (if it
1069         has one).
1070         (Expand_Call): Replace a couple of calls to Type_Access_Level
1071         with calls to Dynamic_Access_Level to handle cases where
1072         passing a literal (any literal) is incorrect.
1073         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1074         checks associated with "Saooaat := Some_Object'Access;"; this must
1075         be rejected if Some_Object is declared in a more nested scope
1076         than Saooaat.
1077         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1078         assignment to a saooaaat even if Is_Local_Anonymous_Access
1079         returns False for its type (indicating a 2012-style saooaaat).
1080         * sem_ch8.adb
1081         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1082         (which is only appropriate for objects, not types) with a call
1083         of Init_Object_Size_Align in order to avoid trashing the
1084         Extra_Accessibility attribute of a rename (the two attributes
1085         share storage).
1086         * sem_res.adb
1087         (Valid_Conversion) Replace six calls to Type_Access_Level with
1088         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1089         Ada2012 non-library-level saooaaat, the former returns library level
1090         while the latter returns the (static) accessibility level of the
1091         saooaaat. A type conversion to the anonymous type of a saooaaat
1092         can only occur as part of an assignment to the saooaaat, so we
1093         know that such a conversion must be in a lhs context, so Deepest
1094         yields the result that we need. If such a conversion could occur,
1095         say, as the operand of an equality operator, then this might not
1096         be right. Also add a test so that static accessibilty checks are
1097         performed for converting to a saooaaat's type even if
1098         Is_Local_Anonymous_Access yields False for the type.
1099
1100 2011-08-30  Javier Miranda  <miranda@adacore.com>
1101
1102         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1103         controls generation of a warning associated with late declaration of
1104         dispatching functions. Required to avoid generating spurious
1105         warnings.
1106
1107 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
1108
1109         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1110         return object has an anonymous access type and the function's type is
1111         a named access type.
1112         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1113         conversions on implicit conversions, since such conversions can occur
1114         for anonymous access cases due to expansion. Issue error for attempt
1115         to rename an anonymous expression as an object of a named access type.
1116         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1117         to indicate whether this function should report errors on invalid
1118         conversions.
1119         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1120         the expression is of an anonymous access type and the expected type is
1121         a named general access type, rewrite the expression as a type
1122         conversion, unless this is an expression of a membership test.
1123         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1124         calling of Error_Msg_N on new formal Report_Errs.
1125         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1126         calling of Error_Msg_NE on new formal Report_Errs.
1127         (Valid_Conversion): Move declaration of this function to the package
1128         spec, to allow calls from membership test processing. For Ada 2012,
1129         enforce legality restrictions on implicit conversions of anonymous
1130         access values to general access types, disallowing such conversions in
1131         cases where the expression has a dynamic accessibility level (access
1132         parameters, stand-alone anonymous access objects, or a component of a
1133         dereference of one of the first two cases).
1134         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1135         in the context of a named general access expected type.
1136         * exp_ch4.adb Add with and use of Exp_Ch2.
1137         (Expand_N_In): Add processing for membership tests applied to
1138         expressions of an anonymous access type. First, Valid_Conversion is
1139         called to check whether the test is statically False, and then the
1140         conversion is expanded to test that the expression's accessibility
1141         level is no deeper than that of the tested type. In the case of
1142         anonymous access-to-tagged types, a tagged membership test is applied
1143         as well.
1144         (Tagged_Membership): Extend to handle access type cases, applying the
1145         test to the designated types.
1146         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1147         accessibility level, and the actual is a 'Access applied to a current
1148         instance, pass the accessibility level of the type of the current
1149         instance rather than applying Object_Access_Level to the prefix. Add a
1150         ??? comment, since this level isn't quite right either (will eventually
1151         need to pass an implicit level parameter to init procs).
1152
1153 2011-08-30  Bob Duff  <duff@adacore.com>
1154
1155         * s-taskin.ads: Minor comment fix.
1156
1157 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
1158
1159         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1160         component and the selector is a dispatching operation, check if it is
1161         a prefixed call before rewriting as a parameterless function call.
1162
1163 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
1164
1165         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1166         tsystem.h into $(RTSDIR) instead of rts.
1167
1168 2011-08-29  Robert Dewar  <dewar@adacore.com>
1169
1170         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1171         reformatting.
1172         * gcc-interface/Make-lang.in: Update dependencies.
1173
1174 2011-08-29  Yannick Moy  <moy@adacore.com>
1175
1176         * alfa.ads (Name_Of_Heap_Variable): New constant name.
1177         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1178         table to hold dereferences.
1179         (Add_ALFA_Xrefs): Take into account dereferences as special
1180         reads/writes to the variable "HEAP".
1181         (Enclosing_Subprogram_Or_Package): Move subprogram here.
1182         (Generate_Dereference): New procedure to store a read/write dereferencew
1183         in the table Drefs.
1184         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1185         the special "HEAP" var.
1186         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1187         in ALFA mode.
1188         * sem_util.adb (Note_Possible_Modification): Store write dereference
1189         in ALFA mode.
1190
1191 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1192
1193         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1194         ensures that the level of the subpool access type is not deeper than
1195         that of the pool object.
1196         * sem_util.adb (Object_Access_Level): Expand to handle defining
1197         identifiers.
1198         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1199         subpool handle name of a rewritten allocator.
1200
1201 2011-08-29  Robert Dewar  <dewar@adacore.com>
1202
1203         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1204
1205 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1206
1207         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1208         values, we generate multiple triples of parameters in the TypeCode.
1209         Bump Choice_Index for each such triple so that a subsequent default
1210         choice is associated with the correct index in the typecode.
1211
1212 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1213
1214         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1215         container.
1216         (First, Last): Handle properly an iterator over a null container.
1217
1218 2011-08-29  Bob Duff  <duff@adacore.com>
1219
1220         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
1221         processing if we run across a node with no Scope. This can happen if
1222         we're with-ing an library-level instance, and that instance got errors
1223         that caused "instantiation abandoned".
1224         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
1225         an exception instead of using Assert, so it won't go into an infinite
1226         loop, even when assertions are turned off.
1227
1228 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1229
1230         * a-coorse.adb: Proper handling of empty ordered sets.
1231
1232 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1233
1234         * debug.adb: Add comments.
1235
1236 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1237
1238         * a-except.adb, a-except-2005.adb: Minor comment rewording and
1239         reformatting.
1240
1241 2011-08-29  Yannick Moy  <moy@adacore.com>
1242
1243         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
1244         declaration for Itypes in Alfa mode.
1245
1246 2011-08-29  Robert Dewar  <dewar@adacore.com>
1247
1248         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
1249         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
1250         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
1251         reformatting.
1252
1253 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1254
1255         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
1256         package spec.
1257         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
1258         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
1259         while raising PE.
1260
1261 2011-08-29  Robert Dewar  <dewar@adacore.com>
1262
1263         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
1264
1265 2011-08-29  Javier Miranda  <miranda@adacore.com>
1266
1267         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
1268         renamings of formal subprograms when the actual for a formal type is
1269         class-wide.
1270
1271 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1272
1273         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
1274         to Target.
1275
1276 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1277
1278         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
1279         components of record type.
1280         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
1281         to Target.
1282
1283 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1284
1285         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
1286         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
1287         container packages.
1288
1289 2011-08-29  Robert Dewar  <dewar@adacore.com>
1290
1291         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
1292         reformatting.
1293
1294 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1295
1296         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
1297         components of record type.
1298
1299 2011-08-29  Bob Duff  <duff@adacore.com>
1300
1301         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
1302         by the termination handler.
1303
1304 2011-08-29  Yannick Moy  <moy@adacore.com>
1305
1306         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
1307         created in Alfa mode, instead of inserting artificial declarations of
1308         non-Itypes in the tree.
1309         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
1310         know if an Itype has a corresponding declaration, as defined in
1311         itypes.ads.
1312
1313 2011-08-29  Yannick Moy  <moy@adacore.com>
1314
1315         * gnat1drv.adb: Minor rewrite.
1316
1317 2011-08-29  Bob Duff  <duff@adacore.com>
1318
1319         * s-tasuti.adb (Make_Passive): Work around race condition in
1320         Make_Independent, which can cause Wait_Count to be zero. So instead of
1321         asserting that Wait_Count > 0, and then decrementing it, decrement it
1322         only if Wait_Count > 0.
1323         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
1324         should be nonnegative, so declare them Natural instead of Integer.
1325
1326 2011-08-29  Robert Dewar  <dewar@adacore.com>
1327
1328         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
1329         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
1330         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
1331         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
1332         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
1333
1334 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1335
1336         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
1337
1338 2011-08-29  Vadim Godunko  <godunko@adacore.com>
1339
1340         * s-parint.ads: Minor comment clarification.
1341
1342 2011-08-29  Vincent Celier  <celier@adacore.com>
1343
1344         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
1345         may be used as identifiers.
1346
1347 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1348
1349         * a-coinho.ads: Minor reformating.
1350
1351 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1352
1353         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
1354         container of a derived type.
1355
1356 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1357
1358         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
1359         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
1360
1361 2011-08-29  Pascal Obry  <obry@adacore.com>
1362
1363         * exp_disp.adb: Minor comment fix.
1364         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
1365         to avoid warnings when compiling with -Wall.
1366         (Make_Disp_Conditional_Select_Body): Likewise.
1367         (Make_Disp_Timed_Select_Body): Likewise.
1368
1369 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1370
1371         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
1372         an entity name, generate reference for it.
1373
1374 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1375
1376         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
1377         iterator form.
1378         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
1379         the class-wide type.
1380         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
1381
1382 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1383
1384         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
1385         subtype for an object whose type is an unconstrained union.
1386
1387 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1388
1389         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
1390         is allowed in a component definition, by AI95-406.
1391
1392 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1393
1394         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
1395
1396 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1397
1398         * a-except-2005.adb: Alphabetize all routines.
1399         (Triggered_By_Abort): New routine.
1400         * a-except-2005.ads (Triggered_By_Abort): New routine.
1401         * a-except.adb Alphabetize all routines.
1402         (Triggered_By_Abort): New routine.
1403         * a-except.ads (Triggered_By_Abort): New routine.
1404         * exp_ch7.adb: Update all comments involving the detection of aborts in
1405         finalization code.
1406         (Build_Object_Declarations): Do not generate code to detect the
1407         presence of an abort at the start of finalization code, use a runtime
1408         routine istead.
1409         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
1410         RE_Unit_Table.
1411         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
1412         allocate a task on a subpool.
1413         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
1414         The flag disables all actions related to the maintenance of
1415         Finalize_Address_Table when subpools are not in use.
1416         (Allocate_Any_Controlled): Signal the machinery that subpools are in
1417         use.
1418         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
1419         performs costly task locking when subpools are not in use.
1420
1421 2011-08-29  Yannick Moy  <moy@adacore.com>
1422
1423         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
1424         types and dispatching calls in Alfa mode.
1425         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
1426         correspondance between body and spec scopes, to reuse utility functions
1427         (Traverse_Declarations_Or_Statements): Protect access to body for stub
1428         by testing the presence of the library unit for the body
1429         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
1430         mode the expansion of accept statements is skipped
1431         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
1432         the unique entity corresponding to the one returned by
1433         Unique_Defining_Entity applied to the enclosing declaration of the
1434         argument.
1435
1436 2011-08-29  Bob Duff  <duff@adacore.com>
1437
1438         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
1439         gdb when x is not a node (it can be a node list, name_id, etc). pp is
1440         an alias for pn. ppp is an alias for pt.
1441
1442 2011-08-29  Javier Miranda  <miranda@adacore.com>
1443
1444         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
1445         aggregate to take a consistent decision on the need to convert into
1446         assignments aggregates that initialize constant objects.
1447
1448 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1449
1450         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
1451         Build_Allocate_Deallocate_Proc in order to handle allocation of
1452         non-controlled objects on subpools.
1453         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
1454         to be end-user visible.
1455         * s-finmas.adb: Add with and use clause for System.HTable.
1456         Add an instantiation of Simple_HTable which provides a mapping between
1457         the address of a controlled object and the corresponding
1458         Finalize_Address used to clean up the object. The table is used when a
1459         master is operating in heterogeneous mode.
1460         (Attach): Explain why the input node is not verified on being already
1461         attached.
1462         (Delete_Finalize_Address): New routine.
1463         (Detach): Add pragma Assert which ensures that a node is already
1464         attached.
1465         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
1466         since nodes are no longer removed on traversal. Explain why node
1467         detachment is undesirable in this case.
1468         (Get_Finalize_Address): New routine.
1469         (Hash): New routine.
1470         (Is_Empty_List): Removed.
1471         (pm): Renamed to Print_Master. Add output for discriminant
1472         Is_Homogeneous.
1473         Comment reformatting.
1474         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1475         * s-finmas.ads: Various comments additions / improvements.
1476         Type Finalization_Master has a discriminant which determines the mode of
1477         operation.
1478         (Delete_Finalize_Address): New routine.
1479         (Get_Finalize_Address): New routine.
1480         (pm): Renamed to Print_Master.
1481         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
1482         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
1483         use clause for System.IO.
1484         (Allocate_Any_Controlled): Add machinery to set TSS primitive
1485         Finalize_Address depending on the mode of allocation and the mode of
1486         the master.
1487         (Deallocate_Any_Controlled): Remove the relation pair object -
1488         Finalize_Address regardless of the master mode. Add comment explaining
1489         the reason.
1490         (Detach): Ensure that fields Prev and Next are null after detachment.
1491         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
1492         scheme to check whether the list of subpools is empty. There is no
1493         longer need to store the next subpool or advance the current pointer.
1494         (Is_Empty_List): New routine.
1495         (Print_Pool): New routine.
1496         (Print_Subpool): New routine.
1497         * s-stposu.ads: Various comments additions / improvements.
1498         Field Master of type Root_Subpool is now a heterogeneous collection.
1499         (Print_Pool): New routine.
1500         (Print_Subpool): New routine.
1501
1502 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1503
1504         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
1505         forms, using aspects of container types.
1506         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
1507         Has_Implicit_Dereference flags, that may be set on the partial view.
1508         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
1509         container type with an indexing aspect.
1510         (Analyze_Quantified_Expression): Analyze construct with expansion
1511         disabled, because it will be rewritten as a loop during expansion.
1512         (Try_Container_Indexing): The prefix itself may be a container type
1513         with an indexing aspect, as with a vector of vectors.
1514         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
1515         the original doamin of iteration, for name capture.
1516         (Analyze_Iterator_Specification): If the domain is an expression that
1517         needs finalization, create a separate declaration for it.
1518         For an iterator with "of" retrieve default iterator info from aspect of
1519         container type. For "in" iterator, retrieve type of Iterate function.
1520         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
1521         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
1522         analysis, to prevent spurious errors about late attributes.
1523         * sprint.adb: Handle quantified expression with either loop or iterator
1524         specification.
1525         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
1526         iterator.
1527
1528 2011-08-29  Vincent Celier  <celier@adacore.com>
1529
1530         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
1531         Binder or Linker of the main project file.
1532
1533 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1534
1535         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
1536         unit.
1537
1538 2011-08-29  Yannick Moy  <moy@adacore.com>
1539
1540         * exp_ch9.adb: Partial revert of previous change for Alfa mode
1541
1542 2011-08-29  Yannick Moy  <moy@adacore.com>
1543
1544         * exp_ch11.adb: Minor expansion of comment.
1545
1546 2011-08-29  Yannick Moy  <moy@adacore.com>
1547
1548         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
1549
1550 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1551
1552         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
1553         interpretation, set the type before resolving the operands, because
1554         legality checks on an exponention operand need to know the type of the
1555         context.
1556
1557 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1558
1559         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
1560         cleanups on a master if the instance is within a generic unit.
1561         Complement to the corresponding fix to inline.adb for K520-030.
1562
1563 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1564
1565         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
1566         occurrence.
1567         * exp_intr.adb: Minor comment fix.
1568
1569 2011-08-29  Bob Duff  <duff@adacore.com>
1570
1571         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
1572         Delay_Required was used as an uninitialized variable.
1573
1574 2011-08-29  Robert Dewar  <dewar@adacore.com>
1575
1576         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
1577         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
1578         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
1579
1580 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1581
1582         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
1583         Remove unused variables.
1584
1585 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1586
1587         * sem_res.adb: Remove Build_Explicit_Dereference.
1588         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
1589         from sem_res.adb, used in analysis of additional constructs.
1590         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
1591         expansion of iterators.
1592         (Is_Object_Reference): Recognize variables rewritten as explicit
1593         dereferences in Ada2012.
1594         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
1595         Reversible_Iterator names, for expansion of Ada2012 iterators.
1596         * aspects.ads, aspects.adb (Find_Aspect): Utility.
1597         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
1598         linked list container.
1599         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
1600         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
1601
1602 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1603
1604         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
1605         containers.
1606
1607 2011-08-29  Vincent Celier  <celier@adacore.com>
1608
1609         * make.adb (Gnatmake): Get the maximum number of simultaneous
1610         compilation processes after the Builder switches has been scanned, as
1611         there may include -jnn.
1612
1613 2011-08-29  Matthew Heaney  <heaney@adacore.com>
1614
1615         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
1616
1617 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1618
1619         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
1620         GNAT_DRIVER_COMMAND_LINE to 255.
1621
1622 2011-08-29  Pascal Obry  <obry@adacore.com>
1623
1624         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
1625         reformatting and style fix (class attribute casing).
1626
1627 2011-08-29  Yannick Moy  <moy@adacore.com>
1628
1629         * exp_ch11.adb: Yet another case where expansion should be common
1630         between CodePeer and Alfa.
1631
1632 2011-08-29  Yannick Moy  <moy@adacore.com>
1633
1634         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
1635
1636 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1637
1638         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
1639         incomplete type and its completion match.
1640
1641 2011-08-29  Yannick Moy  <moy@adacore.com>
1642
1643         * exp_ch13.adb: Adjust previous change.
1644
1645 2011-08-29  Robert Dewar  <dewar@adacore.com>
1646
1647         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
1648         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
1649         Minor reformatting.
1650
1651 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1652
1653         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
1654         initialize aggregated projects.
1655
1656 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1657
1658         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
1659         depth of candidates to resolve a potentially spurious ambiguity between
1660         two visible subprograms.
1661
1662 2011-08-29  Yannick Moy  <moy@adacore.com>
1663
1664         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
1665         Requires/Ensures.
1666         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
1667         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
1668         Requires/Ensures.
1669
1670 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1671
1672         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
1673         Add comment.
1674
1675 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1676
1677         * sem_res.adb: Minor reformatting.
1678
1679 2011-08-29  Johannes Kanig  <kanig@adacore.com>
1680
1681         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
1682         mode.
1683         * gnat1drv.adb (Adjust_Global_Switches): Set
1684         Use_Expressions_With_Actions to False in ALFA mode.
1685         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
1686         ALFA mode.
1687
1688 2011-08-29  Yannick Moy  <moy@adacore.com>
1689
1690         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
1691         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
1692         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
1693         tagged types and dispatching calls in Alfa mode.
1694
1695 2011-08-29  Javier Miranda  <miranda@adacore.com>
1696
1697         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
1698         we do not report an error on an Empty node.
1699
1700 2011-08-29  Geert Bosch  <bosch@adacore.com>
1701
1702         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
1703         a-nlrear.o and a-nurear.o.
1704
1705 2011-08-29  Robert Dewar  <dewar@adacore.com>
1706
1707         * freeze.adb: Minor code reorganization.
1708         Minor reformatting.
1709         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
1710         sem_ch6.adb: Minor reformatting
1711
1712 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1713
1714         * s-except.ads, s-except.adb: Provide dummy body.
1715
1716 2011-08-29  Yannick Moy  <moy@adacore.com>
1717
1718         * sem_warn.adb (Within_Postcondition): Take into account the case of
1719         an Ensures component in a Test_Case.
1720
1721 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1722
1723         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
1724         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
1725         System_Exceptions_Debug
1726         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
1727         * a-except.adb: With and use System.Exceptions_Debug instead of
1728         System.Exceptions.
1729         * a-except-2005.adb: Likewise.
1730         * s-assert.adb: Likewise.
1731         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
1732         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
1733         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
1734         s-excdeb. Update dependencies.
1735         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
1736         as these no longer need external libraries.
1737
1738 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1739
1740         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
1741         exponentiation operator on universal values in a context that requires
1742         a fixed-point type.
1743
1744 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1745
1746         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
1747         before calling notify_handled_exception.
1748         * a-exextr.adb: Fix comment.
1749
1750 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1751
1752         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
1753         Finalize_Address of the access type's finalization master.
1754         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
1755         access type's finalization master. Add a guard to prevent
1756         Associated_Storage_Pool from being set on .NET/JVM.
1757         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
1758         attribute Finalize_Address of the access type's finalization master.
1759         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
1760         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
1761         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
1762         RE_Unit_Table.
1763         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
1764         use clause for System.IO
1765         (Detach): Relax the assertion, to be reinstated later.
1766         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
1767         Relax the assertion on Finalize_Address, to be reinstated later.
1768         (Is_Empty_List): New routine.
1769         (pm): New debug routine.
1770         (Set_Finalize_Address): New routine.
1771         * s-finmas.ads (pm): New debug routine.
1772         (Set_Finalize_Address): New routine.
1773         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
1774
1775 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1776
1777         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
1778         Remove convention C.
1779
1780 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1781
1782         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
1783         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
1784         (Finalize_TCB): Remove its finalization.
1785         (Initialize): Remove assignment of GET_Exc_Stack_Addr
1786         * s-soflin.adb (NT_Exc_Stack): Remove
1787         (Get_Exc_Stack_Addr_NT): Likewise.
1788         (Get_Exc_Stack_Addr_Soft): Likewise.
1789         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
1790         (Get_Exc_Stack_Addr): Likewise.
1791         (Get_Exc_Stack_Addr_Soft): Likewise
1792         * s-taspri-vms.ads (Exc_Stack_T): Remove.
1793         (Exc_Stack_Ptr_T): Likewise.
1794         (Private_Data): Remove Exc_Stack_Ptr component.
1795
1796 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1797
1798         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
1799
1800 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1801
1802         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
1803
1804 2011-08-29  Geert Bosch  <bosch@adacore.com>
1805
1806         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
1807         L2_Norm, Swap_Column): New generic subprograms
1808         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
1809         L2_Norm, Swap_Column): Implement new subprograms in order to
1810         eliminate dependency on BLAS and LAPACK libraries in
1811         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
1812         version. Forward_Eliminate/Back_Substitute can be used to put a
1813         matrix in row echelon or reduced row echelon form using partial
1814         pivoting.
1815         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
1816         Swap_Column): Instantiate from System.Generic_Array_Operations.
1817         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
1818         (Sqrt): Local function for simple computation of square root without
1819         adding dependencies on Generic_Elementary_Functions.
1820         (Swap): New subprogram to exchange floating point numbers.
1821         (Inverse): Reimplement using Jordan-Gauss elimination.
1822         (Jacobi): New procedure implementing Jacobi's method for computation
1823         of eigensystems, based on Rutishauser's implementation.
1824         (L2_Norm): Implement directly using the inner product.
1825         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
1826         decreasing eigenvalue as required by the Ada RM.
1827         (Swap_Column): New helper procedure for Sort_Eigensystem.
1828         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
1829         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1830         Sort_Eigensystems.
1831
1832 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1833
1834         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1835         statements line.
1836
1837 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1838
1839         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1840         than the current node.
1841         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1842         Finalization_Master. The list headers have two fields instead of three.
1843         This should fix alignment issue but subpool allocations are now
1844         unusable. Alphabetize subprograms.
1845         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1846         the size of the header when converting the beginning of the object to
1847         a FM_Node. Set the master's Finalize_Address attribute if not already
1848         set.
1849         (Deallocate_Any_Controlled): Use the offset rather than the size of the
1850         header when converting the beginning of the object to a FM_Node.
1851
1852 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1853
1854         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1855         reraise when compiling for CodePeer.
1856
1857 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
1858
1859         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1860         now needed by a-convec.adb. Fix warning.
1861
1862 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1863
1864         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1865         processing of TSS routine Finalize_Address when compiling in
1866         CodePeer_Mode.
1867
1868 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1869
1870         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1871         sem_warn.adb: Minor reformatting.
1872
1873 2011-08-29  Emmanuel Briot  <briot@adacore.com>
1874
1875         * prj-conf.adb (Get_Config_Switches): Also collect the list of
1876         languages from aggregated projects.
1877
1878 2011-08-29  Yannick Moy  <moy@adacore.com>
1879
1880         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1881         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1882         Traverse_Package_Declaration, Traverse_Subprogram_Body,
1883         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1884         for stubs are traversed too when parameter is set
1885         (Traverse_All_Compilation_Units): Traverse without going inside stubs
1886         (Traverse_Declarations_Or_Statements): Do the special traversing for
1887         stubs when required.
1888         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1889         return subprogram or package body from stub.
1890         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1891         stubs without prior subprogram decl.
1892
1893 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
1894
1895         * gnat_ugn.texi: Fix typo.
1896
1897 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
1898
1899         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1900         which accounts for size vs alignment issues and calculates the size of
1901         the list header.
1902         (Deallocate_Any_Controlled): Ditto.
1903         (Nearest_Multiple_Rounded_Up): New routine.
1904
1905 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1906
1907         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1908         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1909         (Set_Exception_Msg): Ditto.
1910         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
1911         Private_Data.
1912         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1913         Use Save_Occurrence instead of Save_Occurrence_No_Private.
1914         (Raise_With_Msg): Remove Cleanup_Flag.
1915         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1916         Clean_Flag and Private_Data components.
1917
1918 2011-08-29  Yannick Moy  <moy@adacore.com>
1919
1920         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1921         in CodePeer mode.
1922         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1923         of an explicitly declared type, so that the base types of the original
1924         type and this generated type are the same, and a "type" (not a subtype
1925         like previously).
1926         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1927         small" in Alfa mode, like in CodePeer mode.
1928         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1929         clauses in Alfa mode.
1930
1931 2011-08-29  Javier Miranda  <miranda@adacore.com>
1932
1933         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1934         function to the package spec.
1935         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1936         internally generated bodies of null procedures locate the internally
1937         generated spec enforcing mode conformance.
1938         (Is_Interface_Conformant): Ensure that the controlling formal of the
1939         primitives match.
1940
1941 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1942
1943         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1944         reject the pragma if it appears to apply to a formal subprogram.
1945
1946 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
1947
1948         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1949         inner expression, to prevent double evaluation.
1950
1951 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1952
1953         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1954         they were unused.
1955         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1956         * a-except-2005.adb (Propagate_Exception): Adjust spec.
1957         (Raise_Current_Excep): Adjust call.
1958         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1959
1960 2011-08-29  Thomas Quinot  <quinot@adacore.com>
1961
1962         * exp_disp.adb: Minor reformatting.
1963
1964 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1965
1966         * a-exexpr.adb (Setup_Exception): Removed.
1967         * a-exexpr-gcc.adb (Setup_Exception): Removed.
1968         * a-except.adb (Exception_Propagation): Removed.
1969         * a-except-2005.adb (Setup_Exception): Removed.
1970         (Reraise): Remove call to Setup_Exception.
1971         (Reraise_Occurrence): Ditto.
1972         (Reraise_Occurrence_Always): Ditto.
1973         (Reraise_Occurrence_No_Defer): Ditto.
1974         (Transfer_Occurrence): Ditto.
1975         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1976         (Set_Exception_Msg): Ditto.
1977
1978 2011-08-29  Robert Dewar  <dewar@adacore.com>
1979
1980         * a-convec.adb, exp_disp.adb: Minor reformatting.
1981
1982 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1983
1984         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1985
1986 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
1987
1988         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1989         Exception_Handlers to No_List instead of Empty_List in the case where
1990         there are no handlers.
1991
1992 2011-08-29  Tristan Gingold  <gingold@adacore.com>
1993
1994         * gcc-interface/gigi.h (enum standard_datatypes): Add
1995         ADT_reraise_zcx_decl
1996         (reraise_zcx_decl): New macro.
1997         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1998         (gigi): Set reraise_zcx_decl.
1999         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
2000         (gnat_to_gnu): Handle N_Raise_Statement.
2001
2002 2011-08-29  Robert Dewar  <dewar@adacore.com>
2003
2004         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
2005         a-undesu.adb: Minor reformatting.
2006
2007 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2008
2009         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
2010         table, accept an unfrozen untagged component if it is an actual for a
2011         formal incomplete type.
2012         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
2013         provide new iterator forms over vectors.
2014         Introduce type Iterator in package body to implement operations of
2015         Reversible_Iterator interface.
2016         * a-iteint.ads: Make package pure so it is usable with new container
2017         packages, that are categorized Remote_Types.
2018
2019 2011-08-29  Robert Dewar  <dewar@adacore.com>
2020
2021         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
2022
2023 2011-08-29  Bob Duff  <duff@adacore.com>
2024
2025         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
2026         of <>, because this is the routine that checks for dimensionality
2027         errors (for example, for a two-dimensional array, (others => <>) should
2028         be (others => (others => <>)).
2029
2030 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2031
2032         * impunit.adb: Add new run-time units.
2033         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
2034         s-stposu.ads, s-stposu.adb: Code clean up.
2035         Handle protected class-wide or task class-wide types
2036         Handle C/C++/CIL/Java types.
2037         * s-spsufi.adb, s-spsufi.ads: New files.
2038
2039 2011-08-29  Yannick Moy  <moy@adacore.com>
2040
2041         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
2042         library-level subprogram.
2043         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
2044         placement.
2045         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
2046         component.
2047         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
2048         component.
2049         * gnat_rm.texi: Update doc for Test_Case pragma.
2050
2051 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2052
2053         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2054         convention C.
2055         (GCC_Exception_Access): New type.
2056         (Unwind_DeleteException): New imported procedure
2057         (Foreign_Exception): Import it.
2058         (GNAT_GCC_Exception): Simply have the occurrence inside.
2059         (To_GCC_Exception): New function.
2060         (To_GNAT_GCC_Exception): New function.
2061         (GNAT_GCC_Exception_Cleanup): New procedure..
2062         (Propagate_GCC_Exception): New procedure.
2063         (Reraise_GCC_Exception): New procedure.
2064         (Setup_Current_Excep): New procedure.
2065         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2066         (Unwind_RaiseException): Ditto.
2067         (Unwind_ForcedUnwind): Ditto.
2068         (Remove): Removed.
2069         (Begin_Handler): Change type of parameter.
2070         (End_Handler): Ditto. Now delete the exception if still present.
2071         (Setup_Key): Removed.
2072         (Is_Setup_And_Not_Propagated): Removed.
2073         (Set_Setup_And_Not_Propagated): Ditto.
2074         (Clear_Setup_And_Not_Propagated): Ditto.
2075         (Save_Occurrence_And_Private): Ditto.
2076         (EID_For): Add 'not null' constraint on parameter.
2077         (Setup_Exception): Does nothing.
2078         (Propagate_Exception): Simplified.
2079         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2080         re-raise is not expanded anymore.
2081         * s-except.ads (Foreign_Exception): New exception - placeholder for
2082         non Ada exceptions.
2083         * raise-gcc.c (__gnat_setup_current_excep): Declare
2084         (CXX_EXCEPTION_CLASS): Define (not yet used)
2085         (GNAT_EXCEPTION_CLASS): Define.
2086         (is_handled_by): Handle foreign exceptions.
2087         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2088
2089 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2090
2091         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2092
2093 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2094
2095         * a-synbar-posix.adb: Minor reformatting.
2096
2097 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2098
2099         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2100         a-exetim-default.ads (Interrupt_Clocks_Supported,
2101         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2102         definitions to be compliant with AI-0171. The target systems do not
2103         support separate account for the execution time of interrupt handlers.
2104
2105 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2106
2107         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2108         in the barrier to put first the easiest to evaluate (and the one which
2109         will be True more often). More efficient.
2110
2111 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
2112
2113         * s-atocou-x86.adb: Fix constraint in machine code insertion.
2114
2115 2011-08-29  Bob Duff  <duff@adacore.com>
2116
2117         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2118         attributes that are now aspects, as specified by AI05-0229-1.
2119         * sem_ch13.adb (Analyze_Aspect_Specifications,
2120         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2121         pragmas or attribute references, as appropriate.
2122
2123 2011-08-29  Robert Dewar  <dewar@adacore.com>
2124
2125         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2126         a-synbar-posix.ads: Minor reformatting.
2127
2128 2011-08-29  Yannick Moy  <moy@adacore.com>
2129
2130         * snames.ads-tmpl: Add name Force.
2131
2132 2011-08-29  Pascal Obry  <obry@adacore.com>
2133
2134         * prj-nmsc.adb: Minor reformatting.
2135
2136 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2137
2138         * a-exetim.ads (Interrupt_Clocks_Supported,
2139         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2140         definitions to be compliant with AI-0171.
2141
2142 2011-08-29  Robert Dewar  <dewar@adacore.com>
2143
2144         * a-ngelfu.adb: Add comments.
2145
2146 2011-08-29  Geert Bosch  <bosch@adacore.com>
2147
2148         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2149         the closest machine number to Pi / 2.0.
2150
2151 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2152
2153         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2154         package Ada.Synchronous_Barriers.
2155         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2156         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2157         default implementation using protected objects and another one
2158         a-synbar-posix using POSIX barriers as the underlying support.
2159         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2160         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2161         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2162         Clean up dependencies.
2163         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2164
2165 2011-08-29  Robert Dewar  <dewar@adacore.com>
2166
2167         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2168         exp_dist.adb: Minor code reorganization.
2169         Minor reformatting.
2170
2171 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2172
2173         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2174         primitive operation must support external streaming if it is not a
2175         controlling access result.
2176
2177 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2178
2179         * sinfo.ads, sem_ch7.adb: Minor reformatting.
2180
2181 2011-08-29  Bob Duff  <duff@adacore.com>
2182
2183         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2184         restriction on allocators, as required by AI05-0013-1.
2185         * restrict.ads: Minor comment fix.
2186
2187 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2188
2189         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2190         (To_Jmpbuf_Address): Ditto
2191         (builtin_longjmp): Ditto
2192
2193 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2194
2195         * sem_res.adb: Minor reformatting.
2196
2197 2011-08-29  Vincent Celier  <celier@adacore.com>
2198
2199         * make.adb (Gnatmake): Move special processing for VM targets after the
2200         call to Get_Target_Parameters.
2201
2202 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2203
2204         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2205
2206 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2207
2208         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2209         where an anonymous access discriminant of a limited designated type
2210         appears in a non-immutably limited discriminated type and issue an
2211         error message. Add local variable Desig_T and replace all occurrences
2212         of Designated_Type.
2213
2214 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2215
2216         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2217         implementation is compliant to RM D.15(15/2) after the modification
2218         imposed by AI05-0094-1 (binding interpretation).
2219
2220 2011-08-29  Robert Dewar  <dewar@adacore.com>
2221
2222         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
2223         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
2224
2225 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2226
2227         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
2228         the scope name, do not report a missing label as a style violation (it
2229         will be diagnosed as an illegality).
2230         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
2231         variant records: Get_Enum_Lit_From_Pos already returns a usage
2232         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
2233         on Expr in Integer_Literal case so that it can be used by
2234         Build_To_Any_Call.
2235
2236 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2237
2238         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
2239         Adjust comment.
2240         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
2241         (Build_Abort_Block_Handler): New function to build an Abort_Signal
2242         exception handler.
2243         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
2244         Build_Abort_Block_Handler to build the exception handler. Do not
2245         undefer aborts for the Abort_Signal exception handler if back-end
2246         exception mechanism.
2247         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
2248         back_end exceptions for all others and abort_signal.
2249         * s-except.ads (ZCX_By_Default): New constant.
2250         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
2251         (Raise_Exception_Always): Ditto.
2252         (Raise_From_Signal_Handler): Ditto.
2253         (Raise_With_Location_And_Msg): Ditto.
2254         (Raise_With_Msg): Ditto.
2255         (Reraise): Ditto.
2256         (Reraise_Occurence): Ditto.
2257         (Reraise_Occurrence_Always): Ditto.
2258         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
2259         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
2260
2261 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2262
2263         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
2264
2265 2011-08-29  Robert Dewar  <dewar@adacore.com>
2266
2267         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
2268         Minor code reorganization.
2269
2270 2011-08-29  Bob Duff  <duff@adacore.com>
2271
2272         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
2273         2012, not just Ada 2005.
2274
2275 2011-08-29  Vincent Celier  <celier@adacore.com>
2276
2277         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
2278         with a project file or with gprbuid, if -gnatep= is specified, the
2279         builder may need to be invoked with -x.
2280
2281 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2282
2283         * a-exexpr-gcc.adb: Minor comment fix.
2284
2285 2011-08-29  Robert Dewar  <dewar@adacore.com>
2286
2287         * sem_ch8.adb: Minor reformatting.
2288
2289 2011-08-29  Bob Duff  <duff@adacore.com>
2290
2291         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
2292         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
2293         treating "some" as unreserved in earlier Ada versions. This is now
2294         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
2295         rather than Name_Some, since Tok_Some is now recognized as reserved.
2296         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
2297         reserved word.
2298         * scans.ads: Minor comment fixes.
2299         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
2300         for other language versions.
2301         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
2302         treating "some" as unreserved in earlier Ada versions. This is now
2303         handled in Snames.Is_Keyword_Name.
2304         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
2305         Ada 2012.
2306         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
2307         unreserved in earlier Ada versions. This is now handled in
2308         Snames.Is_Keyword_Name.
2309         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
2310         words as for other language versions.
2311         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
2312         Ada 2012, not just Ada 2005.
2313
2314 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2315
2316         * sem_ch13.adb: Additional semantic checks for aspects involved in
2317         iterators.
2318
2319 2011-08-29  Matthew Heaney  <heaney@adacore.com>
2320
2321         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
2322         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
2323         Container parameter.
2324         (Ancestor_Find): ditto.
2325
2326 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2327
2328         * par-endh.adb: Minor reformatting.
2329
2330 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2331
2332         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
2333         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
2334         (Adjust_N_CLeanups_For): Remove.
2335         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
2336         stack is reached.
2337         (Propgate_Exception): Adjust.
2338         * raise-gcc.c: Add a few static/const.
2339         (Adjust_N_Cleanups_For): Remove declaration.
2340         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
2341
2342 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2343
2344         * sem_ch8.adb: Use type of function return when rewriting as object
2345         declaration.
2346
2347 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
2348
2349         * sem_type.adb: Minor reformatting.
2350
2351 2011-08-29  Robert Dewar  <dewar@adacore.com>
2352
2353         * makeutl.adb: Minor reformatting.
2354
2355 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2356
2357         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
2358         function call of a limited type, the expansion of the renaming is
2359         complicated by the presence of various temporaries and subtypes that
2360         capture constraints of the renamed object.
2361         Rewrite node as an object declaration, whose expansion is simpler.
2362         Given that the object is limited there is no copy involved and no
2363         performance hit.
2364
2365 2011-08-29  Robert Dewar  <dewar@adacore.com>
2366
2367         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
2368         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
2369
2370 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2371
2372         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
2373         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
2374         system-linux-hppa.ads, system-linux-s390.ads,
2375         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
2376         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
2377         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
2378         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
2379         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
2380         system-solaris-sparc.ads, system-lynxos-x86.ads,
2381         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
2382         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
2383         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
2384         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
2385         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
2386         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
2387         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
2388         * opt.ads: Adjust comment.
2389         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
2390         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
2391         * system.ads: Move GCC_ZCX_Support to obsolete entries.
2392
2393 2011-08-29  Emmanuel Briot  <briot@adacore.com>
2394
2395         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
2396         file name is specified on the gnatmake or gprbuild command line, and
2397         before we search for that file in the project.
2398
2399 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2400
2401         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
2402         used to determine whether a possible interpretation for an overloadable
2403         entity is declared within the current instantiation and should be
2404         included in the candidate set.
2405
2406 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
2407
2408         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
2409
2410 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2411
2412         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
2413         access subtype is access_to_subprogram, when applying checks for
2414         RM 3.10.2 (27).
2415
2416 2011-08-29  Matthew Heaney  <heaney@adacore.com>
2417
2418         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
2419         for sibling when common parent.
2420
2421 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2422
2423         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
2424         "pragma_".
2425
2426 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2427
2428         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
2429         for the return type when in ASIS mode.
2430
2431 2011-08-29  Vincent Celier  <celier@adacore.com>
2432
2433         * make.adb (Gnatmake): Get the default search dirs, then the target
2434         parameters after getting the Builder switches, as the Builder switches
2435         may include --RTS= and that could change the default search dirs.
2436
2437 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2438
2439         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
2440         Make_Final_Call. Move the processing for class-wide types before the
2441         processing for derivations from [Limited_]Controlled.
2442         (Make_Final_Call): Move the processing for class-wide types before the
2443         processing for derivations from [Limited_]Controlled.
2444         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
2445         Add code to account for alignments larger than the list header. Add a
2446         comment illustrating the structure of the allocated object + padding +
2447         header.
2448         (Deallocate_Any_Controlled): Add code to account for alignments larger
2449         than the list header.
2450
2451 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2452
2453         * sinfo.ads, sinfo.adb: New node kind
2454         N_Formal_Incomplete_Type_Definition, related flags.
2455         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
2456         Parse formal incomplete types.
2457         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
2458         sem_ch12.
2459         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
2460         Formal incomplete types do not need completion.
2461         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
2462         Validate_Incomplete_Type_Instance): New procedures to handle formal
2463         incomplete types.
2464         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
2465         that corresponds to a formal incomplete type.
2466         * sprint.adb: Handle formal incomplete type declarations.
2467         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
2468         an insertion point.
2469
2470 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2471
2472         * a-fihema.ads, a-fihema.adb: Unit removed.
2473         * a-undesu.ads, a-undesu.adb: New unit implementing
2474         Ada.Unchecked_Deallocate_Subpool.
2475         * einfo.adb: Remove Associated_Collection from the node usage.
2476         Add Finalization_Master to the node usage.
2477         (Associated_Collection): Removed.
2478         (Finalization_Master): New routine.
2479         (Set_Associated_Collection): Removed.
2480         (Set_Finalization_Master): New routine.
2481         (Write_Field23_Name): Remove Associated_Collection from the output. Add
2482         Finalization_Master to the output.
2483         * einfo.ads: Remove attribute Associated_Collection and its uses in
2484         entities.
2485         Add new attribute Finalization_Master along with its uses in entitites.
2486         (Associated_Collection): Removed along with its pragma import.
2487         (Finalization_Master): New routine along with a pragma import.
2488         (Set_Associated_Collection): Removed along with its pragma import.
2489         (Set_Finalization_Master): New routine along with a pragma import.
2490         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
2491         Build_Finalization_Collection with Build_Finalization_Master.
2492         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
2493         before the bodies of the predefined routines. Add comment explaining
2494         this. Replace call to Build_Finalization_Collection with
2495         Build_Finalization_Master.
2496         (Freeze_Type): Replace call to Build_Finalization_Collection with
2497         Build_Finalization_Master.
2498         (Make_Finalize_Address_Body): Comment reformatting.
2499         (Make_Predefined_Primitive_Specs): Code reformatting.
2500         (Stream_Operation_OK): Update comment mentioning finalization
2501         collections. Replace RE_Finalization_Collection with
2502         RE_Finalization_Master.
2503         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
2504         Associated_Collection with Finalization_Master. Replace call to
2505         Build_Finalization_Collection with Build_Finalization_Master.
2506         (Expand_Allocator_Expression): Replace call to Associated_Collection
2507         with Finalization_Master. Replace call to Set_Associated_Collection with
2508         Set_Finalization_Master. Remove the generation of
2509         Set_Finalize_Address_Ptr.
2510         (Expand_N_Allocator): Replace call to Associated_Collection with
2511         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
2512         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
2513         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
2514         comment on usage. Replace call to Needs_BIP_Collection with
2515         Needs_BIP_Finalization_Master Remplace BIP_Collection with
2516         BIP_Finalization_Master. Update all comments which mention finalization
2517         collections. Replace Associated_Collection with
2518         Finalization_Master. Replace Build_Finalization_Collection with
2519         Build_Finalization_Master.
2520         (BIP_Formal_Suffix): Update BIP_Collection's case.
2521         (Build_Heap_Allocator): Update the related comment. Rename local
2522         variable Collect to Fin_Mas_Id and update its occurrences. Update
2523         comments which mention finalization collections. Replace
2524         Set_Associated_Collection with Set_Finalization_Master.
2525         (Expand_Call): Update the code which detects a special piece of library
2526         code for .NET/JVM.
2527         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
2528         Add_Collection_Actual_To_Build_In_Place_Call with
2529         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
2530         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
2531         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
2532         Add_Collection_Actual_To_Build_In_Place_Call with
2533         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2534         (Make_Build_In_Place_Call_In_Assignment): Replace call to
2535         Add_Collection_Actual_To_Build_In_Place_Call with
2536         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
2537         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2538         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
2539         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
2540         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
2541         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
2542         Replace call to Set_Associated_Collection with Set_Finalization_Master.
2543         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
2544         Replace the call to Associated_Collection with Finalization_Master.
2545         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
2546         Update the way finalization master names are generated. Update the
2547         retrieval of the correct access type which will carry the pool and
2548         master attributes.
2549         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
2550         (Make_Finalize_Address_Body): Abstract types do not need
2551         Finalize_Address. Code reformatting.
2552         (Make_Finalize_Address_Stmts): Update comment on usage.
2553         (Make_Set_Finalize_Address_Ptr_Call): Removed.
2554         (Process_Declarations): Update comments.
2555         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
2556         Build_Finalization_Master. Update associated comment.
2557         (Make_Set_Finalize_Address_Ptr_Call): Removed.
2558         * exp_ch13.adb: Update comments which mention finalization collections.
2559         (Expand_N_Free_Statement): Replace the call to Associated_Collection
2560         with Finalization_Master.
2561         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
2562         create calls to routines Allocate_Any_Controlled and
2563         Deallocate_Any_Controlled.
2564         (Find_Finalize_Address): New routine.
2565         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
2566         comparison.
2567         (Requires_Cleanup_Actions): Update the comment on freeze node
2568         inspection.
2569         * exp_util.ads: Remove comment on generated code for
2570         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
2571         is better to simply look in the body.
2572         * freeze.adb (Freeze_All): Update the comment of finalization
2573         collections. Replace the call to Associated_Collection with
2574         Finalization_Master. Replace the call to Build_Finalization_Collection
2575         with Build_Finalization_Master.
2576         * impunit.adb: Add a-undesu and s-stposu to the list of units.
2577         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
2578         a-fihema.
2579         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
2580         Ada.Finalization. Add processing for children of System.Storage_Pools.
2581         * rtsfind.ads: Remove the naming of second level children of
2582         Ada.Finalization.
2583         Remove Ada_Finalization_Heap_Management from the list of units.
2584         Remove subtype Ada_Finalization_Child.
2585         Remove the following subprogram entities:
2586         
2587            RE_Allocate
2588            RE_Deallocate
2589            RE_Finalization_Collection
2590            RE_Finalization_Collection_Ptr
2591            RE_Set_Finalize_Address_Ptr
2592         
2593         Add the naming of second level children of System.Storage_Pools.
2594         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
2595         the list of units.
2596         Add subtype System_Storage_Pools_Child.
2597         Add the following subprogram entities to System.Finalization_Masters:
2598         
2599            RE_Finalization_Master
2600            RE_Finalization_Master_Ptr
2601         
2602         Add the following subprogram entities to System.Storage_Pools.Subpools:
2603         
2604            RE_Allocate_Any_Controlled
2605            RE_Deallocate_Any_Controlled
2606            RE_Root_Storage_Pool_With_Subpools
2607            RE_Root_Subpool
2608            RE_Subpool_Handle
2609         
2610         Move the following subprogram entities from
2611         Ada.Finalization.Heap_Management to System.Finalization_Masters:
2612         
2613            RE_Add_Offset_To_Address
2614            RE_Attach
2615            RE_Base_Pool
2616            RE_Detach
2617         
2618         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
2619         Set_Associated_Collection with Set_Finalization_Master.
2620         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
2621         BIP_Finalization_Master is created.
2622         * s-finmas.adb: New unit System.Finalization_Masters.
2623         * s-finmas.ads: New unit System.Finalization_Masters.
2624         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
2625         * s-stposu.ads, s-stposu.adb: New unit implementing
2626         System.Storage_Pools.Subpools.
2627
2628 2011-08-29  Bob Duff  <duff@adacore.com>
2629
2630         * tbuild.adb: Add assertion.
2631
2632 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2633
2634         * s-pooglo.adb: Minor reformatting.
2635
2636 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2637
2638         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
2639         an indexed component of a packed array whose element type is a record
2640         with a representation clause different from that of the right-hand
2641         side, generate a temporary to minimuze the number of bit-field
2642         operations generated.
2643
2644 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2645
2646         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
2647         declarations, and thus are likely insertion points for actions.
2648
2649 2011-08-29  Bob Duff  <duff@adacore.com>
2650
2651         * einfo.ads: Minor comment fix.
2652
2653 2011-08-29  Robert Dewar  <dewar@adacore.com>
2654
2655         * frontend.adb, gnat1drv.adb: Minor reformatting.
2656
2657 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2658
2659         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
2660         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
2661         space in front of the header.
2662
2663 2011-08-29  Johannes Kanig  <kanig@adacore.com>
2664
2665         * frontend.adb (Frontend): Exit after creating Standard package when
2666         -gnatd.H is present.
2667         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
2668         present.
2669
2670 2011-08-29  Robert Dewar  <dewar@adacore.com>
2671
2672         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
2673         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
2674         snames.ads-tmpl: Minor reformatting.
2675
2676 2011-08-29  Philippe Gil  <gil@adacore.com>
2677
2678         * prj.adb (Reset_Units_In_Table): New procedure.
2679         Reset units to avoid access to freed memory.
2680
2681 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2682
2683         * get_scos.adb: When reading a P statement SCO without a pragma name
2684         (from an older ALI file), ensure that the Pragma_Name component is set
2685         to Unknown_Pragma (not left uninitialized).
2686
2687 2011-08-29  Vincent Celier  <celier@adacore.com>
2688
2689         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
2690         modified to compute correctly the object path of a SAL project that is
2691         extending another library project.
2692         (Write_Path_File): New procedure.
2693         * makeutl.ads (Directories): New table moved from Buildgpr
2694         (Get_Directories): New procedure moved from Buildgpr
2695         (Write_Path_File): New procedure
2696         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
2697         paths before binding SALs, instead of Set_Ada_Paths.
2698         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
2699         Prj.
2700         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
2701         (Current_Source_Path_File_Of): New function
2702         (Set_Current_Object_Path_File_Of): New procedure
2703         (Current_Source_Object_File_Of): New function
2704         (Set_Current_Object_Path_File_Of): New procedure
2705         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
2706         (Current_Source_Path_File_Of): New function
2707         (Set_Current_Object_Path_File_Of): New procedure
2708         (Current_Source_Object_File_Of): New function
2709         (Set_Current_Object_Path_File_Of): New procedure
2710
2711 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2712
2713         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
2714         packed entity, use a bit-field assignment only if there is no change of
2715         representation.
2716
2717 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2718
2719         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
2720         Is_RTU instead of using Chars comparisons.
2721
2722 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2723
2724         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
2725         temporary object if the actual is constrained, and the discriminants
2726         read from the stream don't match.
2727
2728 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2729
2730         * sem_attr.adb, exp_attr.adb: Add handling of
2731         Attribute_System_Allocator_Alignment
2732         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
2733         Attribute_System_Allocator_Alignment.
2734         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
2735         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
2736         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
2737         get_target_system_allocator_alignment.
2738
2739 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
2740
2741         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2742         dependencies.
2743
2744 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
2745
2746         * exp_ch3.adb (In_Runtime): Fix typo.
2747
2748 2011-08-29  Bob Duff  <duff@adacore.com>
2749
2750         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
2751
2752 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2753
2754         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
2755         and a separate tag assignment is generated, ensure that the tag
2756         assignment is analyzed.
2757
2758 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2759
2760         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
2761         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
2762         of statement lists that may contain local declarations.
2763         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
2764         duplicate the triggering statements needed for the expansion of this
2765         construct, when the trigger is a dispatching call to a synchronized
2766         primitive.
2767
2768 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
2769
2770         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
2771         * bindgen.adb: Add comments.
2772         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
2773         in CodePeer mode.
2774
2775 2011-08-29  Robert Dewar  <dewar@adacore.com>
2776
2777         * exp_attr.adb: Minor reformatting.
2778         Minor code reorganization and commenting.
2779         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
2780         reformatting.
2781
2782 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2783
2784         * get_scos.adb: Ignore chaining indicators not currently supported
2785         by Ada.
2786
2787 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
2788
2789         * system.ads: Minor editing.
2790
2791 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
2792
2793         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
2794         CodePeer mode.
2795         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
2796         Attribute_Elab_Subp_Body.
2797         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
2798         * sem_util.adb: Update comments.
2799
2800 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2801
2802         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
2803         pragma name for each SCO statement corresponding to a pragma.
2804
2805 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
2806
2807         * opt.ads: Minor editing.
2808
2809 2011-08-29  Yannick Moy  <moy@adacore.com>
2810
2811         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
2812         that only made sense for CodePeer mode.
2813
2814 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
2815
2816         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
2817         which is no longer used.
2818         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
2819         handling of the 64-bit division check.
2820         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
2821         division available.
2822         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
2823         longer used.
2824
2825 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2826
2827         * get_scos.adb: Minor reformatting.
2828
2829 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2830
2831         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2832         statement list is wrapped in a block, the block is explicitly analyzed
2833         in order to properly redecorate the entities and create a servicing
2834         finalizer.
2835
2836 2011-08-29  Tristan Gingold  <gingold@adacore.com>
2837
2838         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2839         (Set_Zero_Cost_Handling): Remove.
2840
2841 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2842
2843         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2844
2845 2011-08-29  Geert Bosch  <bosch@adacore.com>
2846
2847         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2848         instruction, as the latter may produce -0.0, which is not a valid VAX
2849         F float number.
2850         (Neg_G): Likewise for VAX F float.
2851
2852 2011-08-29  Robert Dewar  <dewar@adacore.com>
2853
2854         * exp_util.adb: Minor reformatting.
2855
2856 2011-08-29  Yannick Moy  <moy@adacore.com>
2857
2858         * sem_ch3.adb: Minor comment update.
2859
2860 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2861
2862         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2863         the operand type.
2864
2865 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2866
2867         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2868         current statement sequence on a generic instantiation or a subprogram
2869         declaration.
2870
2871 2011-08-29  Robert Dewar  <dewar@adacore.com>
2872
2873         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2874         Minor reformatting.
2875
2876 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
2877
2878         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2879         Correct the check which involves the freeze node of a controlled or
2880         access-to-controlled type.
2881
2882 2011-08-29  Geert Bosch  <bosch@adacore.com>
2883
2884         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2885         statements.
2886         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2887         Asm statements.
2888
2889 2011-08-29  Yannick Moy  <moy@adacore.com>
2890
2891         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2892         for every index type and component type that is not a subtype_mark.
2893         (Process_Subtype): Set Etype of subtype.
2894
2895 2011-08-29  Robert Dewar  <dewar@adacore.com>
2896
2897         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2898         reorganization.  Minor reformatting.
2899
2900 2011-08-29  Steve Baird  <baird@adacore.com>
2901
2902         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2903         for CodePeer and ALFA modes.
2904
2905 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
2906
2907         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2908         that comes from an enclosing scope if it is not the renaming of an
2909         actual, to handle properly a spurious ambiguity in an instance.
2910
2911 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
2912
2913         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2914         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
2915         use it instead of the Esize of the first parameter.
2916         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2917         above change.
2918         <Size>: Likewise.  Call it for composite types on the RM size.
2919
2920 2011-08-29  Yannick Moy  <moy@adacore.com>
2921
2922         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2923         * sem_util.adb (Unique_Name): Correct behaviour for names of
2924         compilation units.
2925
2926 2011-08-29  Yannick Moy  <moy@adacore.com>
2927
2928         * sem_prag.adb (Check_Precondition_Postcondition): In formal
2929         verification mode, analyze pragma expression for correctness, for
2930         pre/post on library-level subprogram, as it is not expanded later.
2931
2932 2011-08-29  Yannick Moy  <moy@adacore.com>
2933
2934         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2935         in formal verification.
2936
2937 2011-08-29  Thomas Quinot  <quinot@adacore.com>
2938
2939         * sem_util.adb: Minor reformatting.
2940         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2941         there's no pragma.
2942         * par_sco.ads, par_sco.adb: Update comments.
2943
2944 2011-08-29  Yannick Moy  <moy@adacore.com>
2945
2946         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2947         associated getter/setter.
2948         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2949
2950 2011-08-29  Vincent Celier  <celier@adacore.com>
2951
2952         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2953         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2954         with declarations for Language_Kind and Dependency_Kind for Ada.
2955         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2956         (Process_Compiler): Take into account the new attributes Dependency_Kind
2957         and Language_Kind.
2958         (Check_Configuration): Check if language kind is unit based, not if the
2959         language name is Ada.
2960         (Process_Exceptions_Unit_Based): Ditto
2961         (Add_Language): Remove default additions of language and dependency kind
2962         * prj.ads: Minor comment change
2963         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2964
2965 2011-08-29  Johannes Kanig  <kanig@adacore.com>
2966
2967         * debug.adb: Update comments.
2968
2969 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
2970
2971         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2972         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2973         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2974         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2975         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2976
2977 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2978
2979         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2980         (GNATLIBCFLAGS_FOR_C): Replace
2981         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2982         (gnatlib-shared-default, gnatlib-shared-dual-win32)
2983         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2984         (gnatlib-sjlj, gnatlib-zcx): Likewise.
2985
2986 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
2987
2988         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2989
2990         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2991
2992         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2993
2994 2011-08-05  Nicolas Roche  <roche@adacore.com>
2995
2996         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2997         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2998         canadian cross.
2999         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
3000
3001 2011-08-05  Matthew Heaney  <heaney@adacore.com>
3002
3003         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
3004         subprogram bodies declared out-of-order.
3005
3006 2011-08-05  Yannick Moy  <moy@adacore.com>
3007
3008         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
3009         entities directly in package Standard, otherwise skip the standard
3010         prefix.
3011
3012 2011-08-05  Robert Dewar  <dewar@adacore.com>
3013
3014         * a-cbmutr.adb: Minor reformatting
3015         (Allocate_Node): refactor node allocation algorithm
3016
3017 2011-08-05  Robert Dewar  <dewar@adacore.com>
3018
3019         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
3020         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
3021         mode.
3022         (Analyze_Pragma, case Check_Policy): Ditto.
3023         * sem_prag.ads (Check_Disabled): New function
3024         * snames.ads-tmpl: Add Name_Disable.
3025
3026 2011-08-05  Robert Dewar  <dewar@adacore.com>
3027
3028         * gnat_rm.texi: Document implementation-defined policy DISABLE for
3029         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
3030
3031 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3032
3033         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
3034         that appears in a generic formal part and applies to a formal
3035         subprogram.
3036
3037 2011-08-05  Robert Dewar  <dewar@adacore.com>
3038
3039         * a-cbmutr.ads: Minor reformatting.
3040
3041 2011-08-05  Matthew Heaney  <heaney@adacore.com>
3042
3043         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
3044         to check count, check sign of value instead.
3045         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
3046         (Copy_Subtree): allocate copy of source element
3047         (Equal_Subtree): compare elements, not access objects
3048
3049 2011-08-05  Vincent Celier  <celier@adacore.com>
3050
3051         * gnat_ugn.texi: Fix VMS alternative.
3052
3053 2011-08-05  Thomas Quinot  <quinot@adacore.com>
3054
3055         * sem_ch11.adb: Add comment.
3056
3057 2011-08-05  Robert Dewar  <dewar@adacore.com>
3058
3059         * exp_util.adb: Minor comment fix.
3060
3061 2011-08-05  Robert Dewar  <dewar@adacore.com>
3062
3063         * scng.adb (Error_Unterminated_String): Improve flag position when
3064         comma present.
3065
3066 2011-08-05  Matthew Heaney  <heaney@adacore.com>
3067
3068         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3069         tree containers).
3070         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3071         multiway tree containers.
3072
3073 2011-08-05  Robert Dewar  <dewar@adacore.com>
3074
3075         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3076         * stylesw.adb: Implement -gnatyC to control comment spacing
3077         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3078         -gnatyc/C).
3079         * usage.adb: Add line for -gnatyC.
3080
3081 2011-08-05  Robert Dewar  <dewar@adacore.com>
3082
3083         * gnat_ugn.texi: Document -gnatyC.
3084         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3085         synonym for COMMENTS2).
3086
3087 2011-08-05  Robert Dewar  <dewar@adacore.com>
3088
3089         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3090         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3091         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3092         a-comutr.ads, lib-xref.adb: Minor reformatting.
3093
3094 2011-08-05  Robert Dewar  <dewar@adacore.com>
3095
3096         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3097         warning if there is an exception handler present.
3098
3099 2011-08-05  Pascal Obry  <obry@adacore.com>
3100
3101         * a-iteint.ads: Fix copyright year.
3102
3103 2011-08-05  Thomas Quinot  <quinot@adacore.com>
3104
3105         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3106         statement SCO for a USE clause or a representation clause.
3107
3108 2011-08-05  Yannick Moy  <moy@adacore.com>
3109
3110         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3111         between body and spec for stub.
3112         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3113         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3114         pragma precondition or postcondition, for which the enclosing
3115         subprogram or package in the AST is not the desired one, return empty.
3116
3117 2011-08-05  Thomas Quinot  <quinot@adacore.com>
3118
3119         * g-expect.adb: Minor reformatting.
3120
3121 2011-08-05  Bob Duff  <duff@adacore.com>
3122
3123         * a-fihema.adb: Comment out OS_Lib.
3124
3125 2011-08-05  Matthew Heaney  <heaney@adacore.com>
3126
3127         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3128         (unbounded multiway tree containers) and a-iteint.ads.
3129         * a-comutr.ads, a-comutr.adb:
3130         This is the new Ada 2012 unit for unbounded multiway tree containers
3131         * a-cimutr.ads, a-cimutr.adb
3132         This is the new Ada 2012 unit for indefinite multiway tree containers
3133         * a-iteint.ads: New file.
3134
3135 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3136
3137         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
3138
3139 2011-08-05  Bob Duff  <duff@adacore.com>
3140
3141         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3142         subpools.
3143         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3144
3145 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3146
3147         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3148         general indexing aspects of Ada2012. Called when analyzing indexed
3149         components when other interpretations fail.
3150         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3151         in an expression context where overloading is meaningful. This excludes
3152         the occurrence in an aspect specification (efficiency only).
3153         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3154         related to iterators can be set by an attribute specification, but
3155         cannot be queried.
3156         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3157         Constant_Indexing and Variable_Indexing.
3158         (Check_Indexing_Functions): New procedure to perform legality checks.
3159         Additional semantic checks at end of declarations.
3160
3161 2011-08-05  Sergey Rybin  <rybin@adacore.com>
3162
3163         * tree_io.ads: Update ASIS_Version_Number because of the change of the
3164         order of calling Tree_Write/Tree_Read routines made for aspects.
3165
3166 2011-08-05  Bob Duff  <duff@adacore.com>
3167
3168         * a-fihema.adb (Finalize): Fix race condition.
3169
3170 2011-08-05  Yannick Moy  <moy@adacore.com>
3171
3172         * sem_ch12.adb (Analyze_Package_Instantiation,
3173         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3174         mode.
3175
3176 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3177
3178         * sem_type.adb (Specific_Type): in an instance, the type-specific
3179         operand of an equality check that involves null may have a private
3180         type. Use full view to determine legality of construct.
3181
3182 2011-08-05  Vincent Celier  <celier@adacore.com>
3183
3184         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3185         delete or close the file when the call to gnatmake was successful.
3186
3187 2011-08-05  Yannick Moy  <moy@adacore.com>
3188
3189         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3190         Global_Discard_Names.
3191
3192 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3193
3194         * sinfo.ads: comments on use of entity field for aspect specifications.
3195
3196 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3197
3198         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3199         node is not itself an entity but a selected component, it is a
3200         rewritten parameterless call to an en enclosing synchronized operation,
3201         and this expansion will be performed again in the instance, so there is
3202         no global information to preserve.
3203
3204 2011-08-05  Javier Miranda  <miranda@adacore.com>
3205
3206         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3207         for renamings of predefined primitives.
3208         (In_Predef_Prims_DT): New subprogram.
3209
3210 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3211
3212         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3213         possible interpretation of name is a reference type, add an
3214         interpretation that is the designated type of the reference
3215         discriminant of that type.
3216         * sem_res.adb (resolve): If the interpretation imposed by context is an
3217         implicit dereference, rewrite the node as the deference of the
3218         reference discriminant.
3219         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
3220         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
3221         parent type or base type.
3222         * sem_ch4.adb (Process_Indexed_Component,
3223         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
3224         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
3225         Check for implicit dereference.
3226         (List_Operand_Interps): Indicate when an implicit dereference is
3227         ambiguous.
3228         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
3229
3230 2011-08-05  Thomas Quinot  <quinot@adacore.com>
3231
3232         * scos.ads: Update documentation of SCO table. Pragma statements can now
3233         be marked as disabled (using 'p' instead of 'P' as the statement kind).
3234         * par_sco.ads, par_sco.adb: Implement the above change.
3235         (Process_Decisions_Defer): Generate a P decision for the first parameter
3236         of a dyadic pragma Debug.
3237         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
3238         necessary.
3239         * put_scos.adb: Code simplification based on above change.
3240
3241 2011-08-05  Robert Dewar  <dewar@adacore.com>
3242
3243         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
3244         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
3245         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
3246         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
3247
3248 2011-08-05  Bob Duff  <duff@adacore.com>
3249
3250         * a-stunau.ads, g-spipat.adb: Update comments.
3251
3252 2011-08-05  Bob Duff  <duff@adacore.com>
3253
3254         * a-fihema.ads: Minor comment fix.
3255         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
3256         correct.
3257         (Attach, Detach): Remove some unnecessary code.
3258         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
3259
3260 2011-08-05  Bob Duff  <duff@adacore.com>
3261
3262         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
3263         allocation for Objects component. This simplifies the code somewhat. It
3264         is also a little more efficient in the not-so-unusual case where there
3265         are no controlled objects allocated.
3266         Make Finalization_Started flag atomic.
3267         (Finalize): Avoid unnecessary detachment of items from the list.
3268         (pcol): Minor cleanup.
3269
3270 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3271
3272         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
3273         package whose name is the same as that of the generic unit, or its
3274         ultimate prefix.
3275
3276 2011-08-05  Bob Duff  <duff@adacore.com>
3277
3278         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
3279         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
3280         Minor comment fixes.
3281
3282 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
3283
3284         * make.adb (Linking_Phase): No longer need to set source search path
3285         before calling gnatlink in CodePeer mode.
3286         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
3287         gcc in CodePeer mode, since the binder generated file no longer has a
3288         'with Main'.
3289         * switch.ads, switch.adb (Is_Language_Switch): Removed.
3290         * switch-c.adb: Update comment.
3291
3292 2011-08-05  Thomas Quinot  <quinot@adacore.com>
3293
3294         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
3295
3296 2011-08-05  Nicolas Roche  <roche@adacore.com>
3297
3298         * gnat_ugn.texi: Fix minor syntax error issue.
3299
3300 2011-08-05  Vincent Celier  <celier@adacore.com>
3301
3302         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3303         delete or close the file when the call to gnatmake returns a non
3304         successful return code.
3305
3306 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3307
3308         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
3309         check, indicate that the copy of the original node does not come from
3310         source, to prevent an infinite recursion of the expansion.
3311
3312 2011-08-05  Johannes Kanig  <kanig@adacore.com>
3313
3314         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
3315         VC generation for subprogram bodies.
3316
3317 2011-08-05  Yannick Moy  <moy@adacore.com>
3318
3319         * einfo.ads: Typo.
3320         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
3321         the base type with the smallest allowed base type.
3322
3323 2011-08-05  Sergey Rybin  <rybin@adacore.com>
3324
3325         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
3326         aspects.
3327
3328 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3329
3330         * sem_ch12.ads: minor comment updates.
3331
3332 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3333
3334         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
3335         instantiation and a formal package the compiler generates a package
3336         renaming declaration so that the generic name within the declaration
3337         is interpreted as a renaming of the instance. At the end of a formal
3338         package declaration, this renaming must become invisible.
3339
3340 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
3341
3342         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
3343         comparison and rely on concrete entities instead.
3344
3345 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3346
3347         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
3348         and discriminants, to indicate that the type has an access discriminant
3349         that supports implicit dereference.
3350         * snames.ads-tmpl: Add names of aspects and attributes related to
3351         Ada2012 iterators: constant_indexing, default_iterator,
3352         iterator_element, implicit_dereference, variable_indexing.
3353         * aspects.ads, aspects.adb: entries for iterator-related aspects.
3354         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
3355         iterator-related aspects.
3356         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
3357
3358 2011-08-05  Sergey Rybin  <rybin@adacore.com>
3359
3360         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
3361         metrics in gnatmetric to cover new kinds of coupling mentrics.
3362
3363 2011-08-05  Steve Baird  <baird@adacore.com>
3364
3365         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
3366         of calling the user-defined main subprogram.
3367         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
3368         is set) Call_Main_Subprogram ahead of, as opposed to
3369         inside of, Main.
3370         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
3371         generation of a "with" of the user-defined main subprogram.
3372         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
3373         (which is now called from Gen_Main instead).
3374
3375 2011-08-05  Emmanuel Briot  <briot@adacore.com>
3376
3377         * projects.texi: Added reference to the Makefile package.
3378
3379 2011-08-05  Thomas Quinot  <quinot@adacore.com>
3380
3381         * exp_ch7.adb: Minor comment rewording.
3382
3383 2011-08-05  Ed Falis  <falis@adacore.com>
3384
3385         * env.c: Fix comment.
3386
3387 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
3388
3389         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
3390         character comparison and rely on concrete entities instead.
3391
3392 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3393
3394         * sem_ch3.adb: (Check_Private_Overriding): better error message,
3395         suggested by AI95-0068.
3396
3397 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
3398
3399         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
3400         the two potential initialization calls. This accounts for any
3401         access-before-elaboration checks which may precede the initialization
3402         calls.
3403         (Next_Suitable_Statement): New routine. Returns the next real statement
3404         after the input node while skipping generated checks.
3405         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
3406         with comment on usage.
3407         Do not generate Elaborate_All when the trigger is a finalization call
3408         coming from a type init proc.
3409         (Check_Elab_Call): Propagate the initialization procedure context to
3410         subsequent calls to Check_A_Call.
3411         (Check_Internal_Call_Continue): Propagate the initialization procedure
3412         context to subsequent calls to Check_Elab_Call.
3413         (Is_Finalization_Procedure): New routine. Returns True if the input
3414         entity denotes a [Deep_]Finalize routine.
3415         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
3416         along with comment on usage.
3417
3418 2011-08-05  Vadim Godunko  <godunko@adacore.com>
3419
3420         * s-atocou.ads: Add list of supported platforms.
3421
3422 2011-08-05  Yannick Moy  <moy@adacore.com>
3423
3424         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
3425
3426         * opt.ads (Disable_ALI_File): new Boolean flag
3427         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
3428
3429 2011-08-05  Ed Falis  <falis@adacore.com>
3430
3431         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
3432         environ is properly defined.
3433
3434 2011-08-05  Vincent Celier  <celier@adacore.com>
3435
3436         * make.adb (Compilation_Phase): Exit immediately when all objects have
3437         been found up to date, to avoid multiple exit messages.
3438         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
3439         same project for languages with no compiler.
3440         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
3441         -eI.
3442 2011-08-05  Robert Dewar  <dewar@adacore.com>
3443
3444         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
3445         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
3446         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
3447         s-atocou-builtin.adb: Minor reformatting.
3448
3449 2011-08-05  Yannick Moy  <moy@adacore.com>
3450
3451         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
3452         if the node to wrap is a pragma check, this node and enclosed
3453         expression are not expanded, so do not apply any transformations here.
3454         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
3455         introducing transient scopes.
3456
3457 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
3458
3459         * adaint.c (__gnat_set_writable, __gnat_set_readable,
3460         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
3461         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
3462         routine is available, so we use the default implementation of these
3463         functions.
3464         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
3465         support for copying attributes on VxWorks 6.
3466
3467 2011-08-05  Yannick Moy  <moy@adacore.com>
3468
3469         * debug.adb: Remove use of -gnatd.D.
3470         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
3471         * opt.ads: Simplify variables for ALFA mode, to keep one only
3472         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
3473         to ALFA mode.
3474
3475 2011-08-05  Vincent Celier  <celier@adacore.com>
3476
3477         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
3478         Builder'Default_Switches.
3479
3480 2011-08-05  Vincent Celier  <celier@adacore.com>
3481
3482         * makeusg.adb: Add lines for --create-map-file switches.
3483
3484 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
3485
3486         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
3487         profile is incomplete and the full view is available, replace it with
3488         the full view.
3489         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
3490         incomplete, freezing the subprogram is delayed until the full view is
3491         frozen.
3492         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
3493         fixed-point multiplication operator and the predefined operator is
3494         resolved in favor of the user-defined one.
3495
3496 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3497
3498         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
3499         CONST_CAST.
3500
3501 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3502
3503         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
3504         whether a type lacks user-defined Read or Write operations, or has a
3505         component that lacks them.
3506         * sem_attr.adb (Check_Stream_Attribute): if restriction
3507         No_Default_Stream_Attributes is active, verify that all subcomponent
3508         types of the target have user-defined stream operations, and report
3509         error otherwise.
3510         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
3511         * exp_strm.adb: Build_Elementary_Input_Call,
3512         Build_Elementary_Write_Call): remove checks for restriction
3513         No_Default_Stream_Attributes, now checked in semantics.
3514
3515 2011-08-04  Vincent Celier  <celier@adacore.com>
3516
3517         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
3518         switches on the command line, look for all valid --RTS switches in the
3519         Builder switches and for each language use the first runtime name found
3520         to invoke gprconfig.
3521         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
3522         command line and there is no auto-configuration.
3523         (Runtime_Name_Set_For): New function.
3524
3525 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3526
3527         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
3528         elaborate initialization expression for variable Abort when processing
3529         a package body or a declaration.
3530         (Create_Finalizer): Propagate the package context when creating the
3531         exception-related variables.
3532         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
3533         For_Package along with usage comment.
3534
3535 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3536
3537         * gcc-interface/Makefile.in: Clean up targets.
3538         Enable new package for atomic counters and copy-on-write implementation
3539         of unbounded strings on x86 platforms.
3540         * gcc-interface/Make-lang.in: Update dependencies.
3541
3542 2011-08-04  Robert Dewar  <dewar@adacore.com>
3543
3544         * exp_ch7.adb: Minor reformatting.
3545
3546 2011-08-04  Robert Dewar  <dewar@adacore.com>
3547
3548         * exp_strm.adb: Minor reformatting.
3549
3550 2011-08-04  Vadim Godunko  <godunko@adacore.com>
3551
3552         * s-atocou.adb: Replace by dummy version and use on targets where atomic
3553         operations are not supported.
3554         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
3555         * s-atocou-x86.adb: New file.
3556         * Makefile.rtl: Add s-atocou.o file
3557
3558 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3559
3560         * make.adb (Compile): Move setting of CodePeer_Mode to ...
3561         (Compilation_Phase): ... here.
3562         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
3563
3564 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3565
3566         * Make-generated.in: Fix minor typo in comment.
3567
3568 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3569
3570         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
3571         the project path.
3572
3573 2011-08-04  Robert Dewar  <dewar@adacore.com>
3574
3575         * a-coinho.adb: Minor reformatting.
3576
3577 2011-08-04  Robert Dewar  <dewar@adacore.com>
3578
3579         * a-coinho.ads: Minor reformatting.
3580
3581 2011-08-04  Vadim Godunko  <godunko@adacore.com>
3582
3583         * s-atocou.ads, s-atocou.adb: New files.
3584         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
3585         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
3586         direct use of GCC's atomic builtins and replace them by use of new
3587         atomic counter package.
3588
3589 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3590
3591         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
3592
3593 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3594
3595         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
3596         with a call to Get_External_Tag.
3597         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
3598         subprogram usage. Remove the guard against package declarations and
3599         bodies since Build_Cleanup_Statements is no longer invoked in that
3600         context.
3601         (Build_Components): Initialize Tagged_Type_Stmts when the context
3602         contains at least one library-level tagged type.
3603         (Build_Finalizer): New local variables Has_Tagged_Types and
3604         Tagged_Type_Stmts along with associated comments on usage. Update the
3605         logic to include tagged type processing.
3606         (Create_Finalizer): Insert all library-level tagged type unregistration
3607         code before the jump block circuitry.
3608         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
3609         (Expand_N_Package_Declaration): Remove the call to
3610         Build_Cleanup_Statements.
3611         (Process_Tagged_Type_Declaration): New routine. Generate a call to
3612         unregister the external tag of a tagged type.
3613         (Processing_Actions): Reimplemented to handle tagged types.
3614         (Process_Declarations): Detect the declaration of a library-level
3615         tagged type and carry out the appropriate actions.
3616         (Unregister_Tagged_Types): Removed. The machinery has been directly
3617         merged with Build_Finalizer.
3618
3619 2011-08-04  Robert Dewar  <dewar@adacore.com>
3620
3621         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
3622         gnatls.adb, exp_ch3.adb: Minor reformatting.
3623
3624 2011-08-04  Marc Sango  <sango@adacore.com>
3625
3626         * sem_attr.adb (Analyze_Attribute): Replace the message
3627         "invisible attribute of}" of the spark restriction violation in
3628         attribute reference by the simple message "invisible attribute of type".
3629         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
3630         two insertion characters: '&' and '}'.
3631
3632 2011-08-04  Vadim Godunko  <godunko@adacore.com>
3633
3634         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
3635         * a-coinho.ads, a-coinho.adb: New file.
3636         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
3637
3638 2011-08-04  Nicolas Roche  <roche@adacore.com>
3639
3640         * alfa_test.adb: Not all ali files are containing alfa information even
3641         if compiled with -gnatd.F. So suppress warning about missing ALFA
3642         information.
3643
3644 2011-08-04  Yannick Moy  <moy@adacore.com>
3645
3646         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
3647         scope.
3648         * put_alfa.adb: Check that scope name is not empty.
3649
3650 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3651
3652         * exp_ch3.adb (Stream_Operation_Ok): new predicate
3653         Needs_Elementary_Stream_Operation, to determine whether user-defined
3654         Read and Write attributes are available for the elementary components
3655         of the given type. If only the predefined attributes are available,
3656         then when restriction No_Default_Stream_Attributes is active the
3657         predefined stream attributes for the composite type cannot be created.
3658
3659 2011-08-04  Robert Dewar  <dewar@adacore.com>
3660
3661         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
3662         Put routines in alpha order
3663
3664 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
3665
3666         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
3667         * gcc-interface/Make-lang.in: Update dependencies.
3668
3669 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3670
3671         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
3672         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
3673         gnat1why).
3674
3675 2011-08-04  Robert Dewar  <dewar@adacore.com>
3676
3677         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
3678         lib-xref-alfa.adb: Minor reformatting.
3679
3680 2011-08-04  Marc Sango  <sango@adacore.com>
3681
3682         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
3683         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
3684         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
3685         mode.
3686
3687 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3688
3689         * bindgen.adb (Gen_Adainit_C): Remove.
3690         (Gen_Adafinal_C): Ditto.
3691         (Gen_Elab_Externals_C): Ditto.
3692         (Gen_Elab_Calls_C): Ditto.
3693         (Gen_Elab_Order_C): Ditto.
3694         (Gen_Elab_Defs_C): Ditto.
3695         (Gen_Finalize_Library_C): Ditto.
3696         (Gen_Finalize_Library_Defs_C): Ditto.
3697         (Gen_Main_C): Ditto.
3698         (Gen_Output_File_C): Ditto.
3699         (Gen_Restrictions_C): Ditto.
3700         (Gen_Versions_C): Ditto.
3701         (Write_Info_Ada_C): Ditto.
3702         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
3703         (Gen_Output_File): Do not force Ada_Bind_File anymore.
3704         Always call Gen_Output_File_Ada.
3705         * gnatlink.adb (Begin_Info): Now a constant.
3706         (End_Info): Ditto.
3707         (Ada_Bind_File): Remove
3708         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
3709         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
3710         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
3711         * opt.ads (Ada_Bind_File): Remove.
3712
3713 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3714
3715         * projects.texi: Document target-specific directory in default project
3716         path for gnatmake.
3717
3718 2011-08-04  Thomas Quinot  <quinot@adacore.com>
3719
3720         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
3721         path in all cases .
3722
3723 2011-08-04  Yannick Moy  <moy@adacore.com>
3724
3725         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
3726         opt.ads, lib-xref.ads: Code clean up.
3727
3728 2011-08-04  Yannick Moy  <moy@adacore.com>
3729
3730         * gnat_rm.texi: Update description of Test_Case
3731         * gnat_ugn.texi: Typo.
3732
3733 2011-08-04  Ed Falis  <falis@adacore.com>
3734
3735         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
3736
3737 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3738
3739         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
3740         it is of type Root_Controlled. This action eliminates fields Prev and
3741         Next from type equality.
3742
3743 2011-08-04  Yannick Moy  <moy@adacore.com>
3744
3745         * lib-xref-alfa.adb: Correct typo.
3746
3747 2011-08-04  Matthew Heaney  <heaney@adacore.com>
3748
3749         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
3750         component.
3751
3752 2011-08-04  Yannick Moy  <moy@adacore.com>
3753
3754         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
3755         (Analyze_Pragma): allow static string expression for name of Test_Case,
3756         instead of simply string literals.
3757         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
3758         expressions.
3759
3760 2011-08-04  Vincent Celier  <celier@adacore.com>
3761
3762         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
3763         case suffixes to find truncated main sources.
3764
3765 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3766
3767         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
3768         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
3769         (Compute_Current_Task): Ditto.
3770
3771 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3772
3773         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
3774
3775 2011-08-04  Yannick Moy  <moy@adacore.com>
3776
3777         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
3778         library-level constant.
3779         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
3780         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
3781         used as selector of parameter association, in ALFA mode.
3782
3783 2011-08-04  Robert Dewar  <dewar@adacore.com>
3784
3785         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
3786         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
3787         reformatting.
3788
3789 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3790
3791         * make.adb (Linking_Phase): Set source search path before calling
3792         gnatlink in CodePeer mode.
3793
3794 2011-08-04  Javier Miranda  <miranda@adacore.com>
3795
3796         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
3797         Remove code which takes care of building TSDs.
3798         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
3799         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
3800         the accessibility check in VM targets.
3801         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
3802         (Building_Static_DT): Now returns false for VM targets.
3803         (Build_VM_TSDs): Removed.
3804         (Expand_Interface_Conversion): Generate missing runtime check for
3805         conversions to interface types whose target type is unknown at compile
3806         time.
3807         (Make_VM_TSD): Add missing code to disable the generation of calls to
3808         Check_TSD if the tagged type is not defined at library level, or not
3809         has a representation clause specifying its external tag, or -gnatdQ is
3810         active.
3811         * exp_disp.ads (Build_VM_TSDs): Removed.
3812         (Make_VM_TSDs): Spec relocated from exp_disp.adb
3813         * sem_disp.adb (Check_Dispatching_Operation): No code required to
3814         register primitives in the dispatch tables in VM targets.
3815         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
3816         initialization of class-wide interface objects in VM targets.
3817         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
3818         of Make_DT).
3819
3820 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
3821
3822         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
3823         when dotnet-ld cannot be found.
3824
3825 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
3826
3827         * bindgen.adb: Simplify significantly generation of binder body file in
3828         CodePeer mode.
3829         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
3830         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3831         not expanded).
3832
3833 2011-08-04  Yannick Moy  <moy@adacore.com>
3834
3835         * sem_prag.adb, sem.ads: Code cleanup.
3836
3837 2011-08-04  Tristan Gingold  <gingold@adacore.com>
3838
3839         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3840         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3841         results if possible.
3842         * s-stusta.adb (Print): Adjust after changes in s-stausa.
3843         * gnat_ugn.texi: Update dynamic stack usage section.
3844
3845 2011-08-04  Steve Baird  <baird@adacore.com>
3846
3847         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3848         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3849         contains only a call to the user-defined main subprogram.
3850         (Gen_Main_Ada) - If CodePeer_Mode is set, then
3851         call the "wrapper" subprogram instead of directly
3852         calling the user-defined main subprogram.
3853
3854 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3855
3856         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3857         alternatives of a case statement for controlled objects. Rename local
3858         variable A to Dead_Alt.
3859         (Expand_N_If_Statement): Check the then and else statements of an if
3860         statement for controlled objects. Check the then statements of all
3861         elsif parts of an if statement for controlled objects.
3862         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3863         objects.
3864         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3865         detects a loop associated with the expansion of an array object.
3866         Augment the processing of the loop statements to account for a possible
3867         wrap done by Process_Statements_For_Controlled_Objects.
3868         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3869         statements and abortable part of an asynchronous select for controlled
3870         objects.
3871         (Expand_N_Conditional_Entry_Call): Check the else statements of a
3872         conditional entry call for controlled objects.
3873         (Expand_N_Selective_Accept): Check the alternatives of a selective
3874         accept for controlled objects.
3875         (Expand_N_Timed_Entry_Call): Check the entry call and delay
3876         alternatives of a timed entry call for controlled objects.
3877         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3878         exception handler for controlled objects.
3879         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3880         Add formal parameter Nested_Constructs along with its associated
3881         comment.
3882         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3883         Requires_Cleanup_Actions.
3884         (Process_Statements_For_Controlled_Objects): New routine.
3885         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3886         routine. Inspect a node which contains a non-handled sequence of
3887         statements for controlled objects. If such an object is found, the
3888         statements are wrapped in a block.
3889
3890 2011-08-04  Bob Duff  <duff@adacore.com>
3891
3892         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3893         need to compare with Class_Wide_Type (T2), in order to get at the
3894         original class-wide type node.
3895         * sem_type.ads (Covers): Improve the comment.
3896         * einfo.ads (Class_Wide_Type): Improve the comment.
3897         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3898         the type of the Deref.
3899
3900 2011-08-04  Yannick Moy  <moy@adacore.com>
3901
3902         * gnat_rm.texi: Document that Test_Case pragma can only appear on
3903         separate declarations.
3904         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3905         check identifier of pragma argument.
3906         (Chain_TC): check that no other test case associated to the same entity
3907         share the same name.
3908         (Check_Test_Case): disallow test case inside subprogram body
3909         (Analyze_Pragma): correct call to check identifier and not argument
3910         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3911         function gets name from test case pragma.
3912
3913 2011-08-04  Yannick Moy  <moy@adacore.com>
3914
3915         * gnat_rm.texi: Document new pragma and aspect.
3916         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3917         (No_Duplicates_Allowed): new constant array defining whether duplicates
3918         aspects of each kind can appear on the same declaration.
3919         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3920         field, which points to a node holding the previous Spec_PPC_List.
3921         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3922         through the indirection with Contract.
3923         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3924         * par-prag.adb (Prag): do nothing on Test_Case pragma
3925         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3926         be called directly.
3927         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3928         component Ensures of Test_Case.
3929         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3930         (Analyze_Generic_Subprogram_Declaration,
3931         Analyze_Subprogram_Instantiation,
3932         Analyze_Abstract_Subprogram_Declaration,
3933         Analyze_Subprogram_Body_Helper,
3934         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3935         insert contract in subprogram node at point of definition
3936         * sem_ch13.adb
3937         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3938         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3939         corresponding pragma
3940         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3941         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3942         similar to the analysis of pre/post
3943         (Derive_Subprogram): insert contract in subprogram node at point of
3944         derivation.
3945         * sem_prag.adb, sem_prag.ads
3946         (Check_Arg_Is_String_Literal, Check_Identifier):
3947         new checking procedures to be called in treatment of pragmas
3948         (Check_Test_Case): new procedure to check that a Test_Case aspect or
3949         pragma is well-formed. This does not check currently that 'Result is
3950         used only in the Ensures component of a Test_Case.
3951         (Analyze_Pragma): add case for Test_Case
3952         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3953         components of a Test_Case.
3954         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3955         expressions in the 3rd (and 4th if present) arguments of a Test_Case
3956         pragma, treated as spec expressions.
3957         (Sig_Flags): add value -1 for Test_Case.
3958         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3959         Get_Requires_From_Test_Case_Pragma): getters for both expression
3960         components of a Test_Case.
3961         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3962         indirection between an entry or [generic] subprogram entity and its
3963         pre/post + test-cases.
3964         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3965         get/set for fields of an N_Contract node.
3966         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3967         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3968         names and pragma for Test_Case.
3969         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3970
3971 2011-08-04  Vincent Celier  <celier@adacore.com>
3972
3973         * gnat_ugn.texi: Improve documentation of gnatmake switch
3974         --source-info-file=.
3975
3976 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
3977
3978         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3979         type). Initialize Atyp to the appropriate type which is later checked
3980         for completion. Rewrite the assertion associated with private type
3981         completion.
3982
3983 2011-08-04  Ed Falis  <falis@adacore.com>
3984
3985         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3986         initialize the number of CPUs.
3987
3988 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
3989
3990         * sem_type.adb (Disambiguate): New subsidiary routine
3991         In_Same_Declaration_List, to implement AI05-0020: a user-defined
3992         equality on an anonymous access type whose designated type is private
3993         does not lead to an ambiguity with the universal access equality
3994         operator in the body or child units of the defining package. The same
3995         is true for a multiplication operator on a private type completed with
3996         a fixed-point-type.
3997
3998 2011-08-04  Javier Miranda  <miranda@adacore.com>
3999
4000         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
4001         (Normalize_Scalars_Config): Removed.
4002         * opt.adb
4003         (Register_Opt_Config_Switches): Remove registering config values of
4004         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
4005         (Restore_Opt_Config_Switches): Remove code which restores the values of
4006         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4007         Init_Or_Norm_Scalars.
4008         (Save_Opt_Config_Switches): Remove code which saves values of
4009         Init_Or_Norm_Scalars and Normalize_Scalars.
4010         (Set_Opt_Config_Switches): Remove code which restores config values of
4011         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4012         Init_Or_Norm_Scalars.
4013
4014 2011-08-04  Yannick Moy  <moy@adacore.com>
4015
4016         * frontend.adb (Frontend): remove previous patch to avoid full
4017         qualification in ALFA mode.
4018         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
4019         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
4020         unique name for an entity, which could be used to identify the entity
4021         across compilation units.
4022
4023 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4024
4025         * prj-env.adb
4026         (Initialize_Default_Project_Path): Add target specific directory
4027         ($prefix/$target/lib/gnat) in front of project path in all cases
4028         (making gnatmake's behaviour consistent with gprbuild).
4029         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
4030         Pass target name from Sdefault to project subsystem.
4031         * gnatls.adb: Show new target specific default project directory.
4032
4033 2011-08-04  Johannes Kanig  <kanig@adacore.com>
4034
4035         * cstand.adb: Add Information to Identifier in Standard
4036         (Identifer_For): Set Entity to the corresponding entity
4037
4038 2011-08-04  Sergey Rybin  <rybin@adacore.com>
4039
4040         * gnat_ugn.texi: Update doc on gnatcheck.
4041
4042 2011-08-04  Yannick Moy  <moy@adacore.com>
4043
4044         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
4045         xrefs in a scope.
4046
4047 2011-08-04  Yannick Moy  <moy@adacore.com>
4048
4049         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
4050         performing expansion.
4051         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
4052         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
4053         it is not called in ALFA mode.
4054
4055 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4056
4057         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4058         after all, so removed.
4059
4060 2011-08-04  Sergey Rybin  <rybin@adacore.com>
4061
4062         * vms_data.ads: Add missing VMS qualifiers.
4063
4064 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4065
4066         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4067         the list of files on the command line after processing it through
4068         Complete_Mains.
4069
4070 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4071
4072         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4073         processing for .NET/JVM. These targets can now benefit from
4074         Raise_From_Controlled_Operation and they share the same processing with
4075         standard targets.
4076         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4077         These targets need transient scopes in order to properly finalize short
4078         lived controlled objects.
4079         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4080          NET/JVM. These targets can now benefit from
4081         Raise_From_Controlled_Operation and they share the same processing with
4082         standard targets.
4083
4084 2011-08-04  Geert Bosch  <bosch@adacore.com>
4085
4086         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4087
4088 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4089
4090         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4091         Expand_Record_Aggregate, to determine whether aggregate must be
4092         expanded into assignments. This is the case if the ancestor part is
4093         private, regarless of the setting of the flag Has_Private_Ancestor.
4094
4095 2011-08-04  Ed Falis  <falis@adacore.com>
4096
4097         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4098
4099 2011-08-04  Bob Duff  <duff@adacore.com>
4100
4101         * sinfo.ads: Fix comment.
4102
4103 2011-08-04  Steve Baird  <baird@adacore.com>
4104
4105         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4106         choose a package name in much the same way as is
4107         done for JGNAT when VM_Target /= No_VM, except that
4108         a slightly more distinctive prefix string is used.
4109
4110 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4111
4112         * makeutl.adb (Complete_Mains): no longer accept unit names on the
4113         gnatmake command line.
4114         This behavior was never documented (and was supported only because of
4115         an early bug in the code). This case might lead to ambiguous cases
4116         (between unit names and truncated base names without suffixes).
4117
4118 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4119
4120         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4121         Remove the external tag of a tagged type from the internal hash table.
4122         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4123         expanded usage of the routine. Strenghten the check for Is_Master. Add
4124         processing for tagged types.
4125         (Build_Finalizer): Create all the necessary lists used in finalizer
4126         creation when the processed context is a package that may contain
4127         tagged types.
4128         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4129         Requires_Cleanup_Actions.
4130         (Expand_N_Package_Body): Package bodies may need clean up code
4131         depending on whether they contain tagged types.
4132         (Expand_N_Package_Declaration): Package declarations may need clean up
4133         code depending on whether they contain tagged types.
4134         (Unregister_Tagged_Types): New routine. Search through a list of
4135         declarations or statements, looking for non-abstract Ada tagged types.
4136         For each such type, generate code to unregister the external tag.
4137         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4138         Requires_Cleanup_Actions.
4139         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4140         through a list of declarations or statements looking for non-abstract
4141         Ada tagged types or controlled objects.
4142         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4143         Requires_Cleanup_Actions.
4144         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4145         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4146         RE_Unit_Table.
4147
4148 2011-08-04  Vincent Celier  <celier@adacore.com>
4149
4150         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4151         has Ada sources, not project Project, because if the root project
4152         Project has no sources of its own, all projects will be deemed without
4153         sources.
4154
4155 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
4156
4157         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4158         of the No_Param_Proc acc-to-subp type used for initialization of
4159         __gnat_finalize_library_objects so that it's declared at library level
4160         rather than nested inside of the adainit routine.
4161
4162 2011-08-04  Javier Miranda  <miranda@adacore.com>
4163
4164         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4165         if the tagged type has a representation clause which specifies its
4166         external tag.
4167
4168 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4169
4170         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4171         Remove previous procedure with that name.
4172         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4173         when appropriate.
4174         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4175         subtype mark, the ancestor cannot have unknown discriminants.
4176         (Resolve_Record_Aggregate): if the type has invisible components
4177         because of a private ancestor, the aggregate is illegal.
4178
4179 2011-08-04  Vincent Celier  <celier@adacore.com>
4180
4181         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4182         account switches -gnat2005, -gnat12 and -gnat2012.
4183
4184 2011-08-04  Bob Duff  <duff@adacore.com>
4185
4186         * s-tasdeb.ads: Minor comment fix.
4187
4188 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
4189
4190         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4191         CodePeer mode.
4192         * switch.ads, switch.adb (Is_Language_Switch): New function.
4193
4194 2011-08-04  Vincent Celier  <celier@adacore.com>
4195
4196         * switch-c.adb: Minor comment addition.
4197
4198 2011-08-04  Vincent Celier  <celier@adacore.com>
4199
4200         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4201         ending with '=' is followed by a space (missing file name).
4202
4203 2011-08-04  Pascal Obry  <obry@adacore.com>
4204
4205         * g-regist.ads: Fix size of HKEY on x86_64-windows.
4206
4207 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4208
4209         * sem_ch12.adb (Analyze_Associations): New routine
4210         Check_Overloaded_Formal_Subprogram to reject a formal package when
4211         there is a named association or a box initialisation for an overloaded
4212         formal subprogram of the corresponding generic.
4213
4214 2011-08-04  Yannick Moy  <moy@adacore.com>
4215
4216         * alfa.ads (ALFA_Xref_Record): add component for type of entity
4217         * get_alfa.adb, put_alfa.adb: Read and write new component of
4218         cross-reference.
4219         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
4220
4221 2011-08-04  Pascal Obry  <obry@adacore.com>
4222
4223         * urealp.adb: Minor reformatting.
4224
4225 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4226
4227         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
4228         Handle the case when Cleanup_Protected_Object returns Empty.
4229
4230 2011-08-04  Yannick Moy  <moy@adacore.com>
4231
4232         * frontend.adb (Frontend): only qualify names in non-ALFA mode
4233
4234 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4235
4236         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
4237         call, ignore functions.
4238
4239 2011-08-04  Geert Bosch  <bosch@adacore.com>
4240
4241         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
4242         point.
4243
4244 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4245
4246         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
4247         as an index for Builder'Switches. This conforms to the documentation.
4248         * make.adb (Insert_Project_Sources): avoid duplicate code
4249
4250 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4251
4252         * makeutl.adb (Complete_Mains): if the user has passed a relative file
4253         name on the command line (for instance "../dummy"), never assume it can
4254         be a unit name.
4255
4256 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4257
4258         * bindgen.adb: Remove code the reference or create the
4259         Break_Start/__gnat_break_start procedure.
4260         * s-stalib.adb (Break_Start): Removed.
4261
4262 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4263
4264         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
4265         shared with gprbuild.
4266
4267 2011-08-04  Yannick Moy  <moy@adacore.com>
4268
4269         * par-ch4.adb (P_Primary): preferentially issue an error message about
4270         a missing parenthesis arount a conditional or case expression in Ada
4271         2012 mode, if we detect that the alignment is not correct for a
4272         statement.
4273
4274 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4275
4276         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
4277         tag-to-class-wide conversion as needing finalization actions.
4278         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
4279         a tag-to-class-wide conversion as needing finalization actions.
4280         (Is_Finalizable_Transient): The result of a tag-to-class-wide
4281         conversion does not need finalization actions.
4282         (Is_Tag_To_CW_Conversion): New routine.
4283         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
4284         whether an object is the result of a tag-to-class-wide conversion.
4285
4286 2011-08-04  Yannick Moy  <moy@adacore.com>
4287
4288         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
4289         the left-hand-side and right-hand-side of a conjunct are inserted when
4290         translating a pre- or postcondition
4291         * sem_ch6.adb: Correct typo in comment
4292
4293 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4294
4295         * gnat_rm.texi: Ravenscar does not prohibit dependence on
4296         Unchecked_Conversion and Unchecked_Deallocation.
4297
4298 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4299
4300         * make.adb: Minor reformatting.
4301
4302 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4303
4304         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
4305         sources in the project and its imported projects, but not in the whole
4306         tree.
4307
4308 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4309
4310         * make.adb: Remove debug trace.
4311
4312 2011-08-04  Vincent Celier  <celier@adacore.com>
4313
4314         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
4315         path in canonical form, to be able to compare path names on platforms
4316         such as Windows or Darwin.
4317
4318 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4319
4320         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
4321         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
4322         * scos.ads: Update documentation accordingly.
4323         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
4324         pragmas.
4325
4326 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4327
4328         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
4329         attribute only if prefix type is scalar.
4330
4331 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4332
4333         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
4334         in gnatmake for specifying mains on the command line that do not belong
4335         to the main project. These mains must currently all belong to the same
4336         project, though.
4337         (Ultimate_Extension_Of): removed, since duplicated
4338         Ultimate_Extending_Project.
4339
4340 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
4341
4342         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
4343         instead.
4344         (CodePeer_Mode_String): New.
4345         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
4346         CodePeer mode.
4347         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
4348         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
4349         mode, since no useful elaboration subprogram is needed by CodePeer.
4350         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
4351         In this mode, compile binder file with -gnatC and do stop after this
4352         step.
4353
4354 2011-08-04  Vincent Celier  <celier@adacore.com>
4355
4356         * exp_ch7.adb: Minor comment fix.
4357
4358 2011-08-04  Robert Dewar  <dewar@adacore.com>
4359
4360         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
4361         exp_ch4.adb, makeutl.adb: Minor reformatting.
4362
4363 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4364
4365         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
4366         Create several new subprograms to move code out of Make. This makes the
4367         code more readable, removes code duplication, and is a preparation work
4368         for adding support for aggregate projects.
4369
4370 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4371
4372         * s-po32gl.ads, s-po32gl.adb: New files.
4373         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
4374         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
4375         (Build_Finalization_Collection): Use it.
4376         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
4377         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
4378         literals.
4379         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
4380         * gcc-interface/Make-lang.in: Update dependencies.
4381
4382 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4383
4384         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
4385         the command line.
4386
4387 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4388
4389         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
4390         command line is not a file name, also check whether it could be a unit
4391         name.
4392
4393 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4394
4395         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
4396         the header of the finalization routine.
4397         If the unit has no finalizer but is a body whose spec has one, then
4398         generate the decrement of the elaboration entity only.
4399         If the unit has a finalizer and is a spec, then do not generate the
4400         decrement of the elaboration entity.
4401         (Gen_Finalize_Library_C): Likewise.
4402
4403 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4404
4405         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
4406         (Bounds_Size_Expression): Removed.
4407         (Double_Alignment_Of): New subsidiary routine.
4408         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
4409         for a hole in the dope vector of unconstrained arrays due to different
4410         index and element alignments.
4411
4412 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4413
4414         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
4415         raise program_error because body has not been seen yet.
4416
4417 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4418
4419         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
4420         an unresolved name.
4421
4422 2011-08-04  Vincent Celier  <celier@adacore.com>
4423
4424         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
4425
4426 2011-08-04  Yannick Moy  <moy@adacore.com>
4427
4428         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
4429         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
4430
4431 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4432
4433         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
4434         instantiation in RCI.
4435
4436 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4437
4438         * make.adb: Share more code with gprbuild
4439
4440 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4441
4442         * projects.texi: Added documentation for the IDE'Gnat project file
4443         attribute.
4444
4445 2011-08-04  Nicolas Roche  <roche@adacore.com>
4446
4447         * gnat_rm.texi: Minor editing.
4448
4449 2011-08-04  Javier Miranda  <miranda@adacore.com>
4450
4451         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
4452         and the library case for VM targets.
4453         (Gen_Adainit_Ada): Likewise.
4454
4455 2011-08-04  Robert Dewar  <dewar@adacore.com>
4456
4457         * g-altive.ads: Minor comment updates.
4458         * prj-nmsc.adb: Minor reformatting.
4459
4460 2011-08-04  Javier Miranda  <miranda@adacore.com>
4461
4462         * opt.ads
4463         (Normalize_Scalars_Config): Value of the configuration switch set by
4464         pragma Normalize_Scalars when it appears in the gnat.adc file.
4465         (Normalize_Scalars): New field for record Config_Switches_Type. Used
4466         to save and restore settings of this pragma.
4467         * opt.adb
4468         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
4469         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
4470
4471 2011-08-04  Vincent Celier  <celier@adacore.com>
4472
4473         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
4474
4475 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
4476
4477         * makeutl.adb: Minor reformatting.
4478
4479 2011-08-04  Olivier Hainque  <hainque@adacore.com>
4480
4481         * g-altive.ads: Update comments to reflect that only the soft
4482         binding is available today.
4483
4484 2011-08-04  Robert Dewar  <dewar@adacore.com>
4485
4486         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
4487         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
4488         * gcc-interface/Make-lang.in: Update dependencies.
4489
4490 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
4491
4492         * prj-env.adb: Remove local debug traces.
4493
4494 2011-08-04  Yannick Moy  <moy@adacore.com>
4495
4496         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
4497         was used instead of Hi_OK, which could cause a read of an uninitialized
4498         value later on. Detected while working on the new warning.
4499         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
4500         to local variable.
4501         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
4502         in more cases, in order to detect more unreferenced values.
4503         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
4504         object for expression, if any.
4505
4506 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4507
4508         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
4509         the operand types instead of the Esize.
4510
4511 2011-08-04  Steve Baird  <baird@adacore.com>
4512
4513         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
4514         enable CodePeer_Mode.
4515         * bindusg.adb (Display): Add help message describing -P binder switch.
4516         * gnat_ugn.texi: Document -P binder switch.
4517         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
4518         user-defined main program directly.
4519         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
4520         user-defined main program in the context clause of the package body.
4521
4522 2011-08-04  Yannick Moy  <moy@adacore.com>
4523
4524         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
4525         duplicate of Defining_Entity
4526         (Get_Unique_Entity_For_Decl): rename function into
4527         Unique_Defining_Entity
4528         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
4529         (Formal_Proof_On): remove synthesized flag
4530         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4531         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
4532         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
4533         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
4534         Annotate (Formal_Proof)
4535
4536 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4537
4538         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
4539         source files with non-standard naming schemes, in imported projects
4540
4541 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4542
4543         * makeutl.adb (Complete_Mains): when a multi-unit source file is
4544         specified on the gprbuild command line, we need to compile all units
4545         within that file, not just the first one we find
4546         Fix error message for mains that are not found.
4547
4548 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4549
4550         * sem_ch6.adb: Update comment.
4551         * sem_ch12.adb: Minor reformatting.
4552
4553 2011-08-04  Bob Duff  <duff@adacore.com>
4554
4555         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
4556         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
4557         race condition whose symptom is to fail to lock Parent. That, in turn,
4558         causes Parent.Awake_Count to be accessed without locking Parent, which
4559         causes another race condition whose symptom is that Parent.Awake_Count
4560         can be off by 1 (either too high or too low). The solution is to lock
4561         Parent unconditionally, and then lock Acceptor, before reading
4562         Acceptor.Terminate_Alternative.
4563
4564 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
4565
4566         * debug.adb: Update comment.
4567
4568 2011-08-04  Robert Dewar  <dewar@adacore.com>
4569
4570         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
4571         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
4572         exp_ch6.adb: Minor reformatting.
4573
4574 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
4575
4576         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
4577         checks for -gnateE.
4578
4579 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4580
4581         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
4582
4583 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4584
4585         * sinfo.ads: Minor reformatting.
4586
4587 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4588
4589         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
4590         even if there is no location.
4591
4592 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4593
4594         * sem_res.adb, sem_ch4.adb: move check for restriction
4595         No_Task_Hierarchy to resolve_allocator.
4596
4597 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4598
4599         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
4600         This flag of N_Pragma nodes is not used, remove it as well as all of
4601         the associated circuitry.
4602
4603 2011-08-04  Javier Miranda  <miranda@adacore.com>
4604
4605         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
4606         runtime check on duplicated externa tags
4607         * debug.adb Document switch -gnatdQ.
4608
4609 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
4610
4611         * a-fihema.ads: Minor typo fix.
4612
4613 2011-08-04  Yannick Moy  <moy@adacore.com>
4614
4615         * sem_ch10.adb: Minor comment update.
4616
4617 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4618
4619         * einfo.adb: Update the node field usage to reflect the renaming of
4620         Return_Flag to Return_ Flag_Or_Transient_Decl.
4621         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
4622         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
4623         (Write_Field15_Name): Change Return_Flag to
4624         Return_Flag_Or_Transient_Decl.
4625         * einfo.ads: Rename node field Return_Flag to
4626         Return_Flag_Or_Transient_Decl. Update the associated comment and all
4627         occurrences in entities.
4628         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
4629         associated Inline pragma.
4630         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
4631         associated Inline pragma.
4632         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
4633         routine.
4634         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
4635         Return_Flag and Set_Return_Flag.
4636         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
4637         objects generated for controlled transients declared inside an
4638         Exception_With_Actions. Update the calls to Return_Flag.
4639         (Process_Object_Declaration): Add code to add a null guard for hook
4640         objects generated for controlled transients declared inside an
4641         Exception_With_Actions. Update related comment.
4642         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
4643         objects generated for controlled transients declared inside an
4644         Exception_With_Actions. Update the calls to Return_Flag.
4645         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
4646
4647 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4648
4649         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
4650         positional aggregate.
4651
4652 2011-08-04  Vincent Celier  <celier@adacore.com>
4653
4654         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
4655         SLOC only for pragmas.
4656
4657 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4658
4659         * projects.texi: Minor typo fix.
4660
4661 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4662
4663         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
4664         on case-sensitive file systems.
4665
4666 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4667
4668         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
4669         nested in a disabled pragma.
4670         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
4671         enclosing pragma, if any, for X decisions.
4672
4673 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4674
4675         * sem_prag.adb: Minor reformatting.
4676
4677 2011-08-04  Vincent Celier  <celier@adacore.com>
4678
4679         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
4680         allowed in no run time mode.
4681
4682 2011-08-04  Vincent Celier  <celier@adacore.com>
4683
4684         * make.adb (Check): When -gnatc is used, check for the source file
4685         inside the ALI file with a canonical case file name.
4686
4687 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4688
4689         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
4690         overriding the separator.
4691
4692 2011-08-04  Robert Dewar  <dewar@adacore.com>
4693
4694         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
4695         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
4696
4697 2011-08-04  Robert Dewar  <dewar@adacore.com>
4698
4699         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
4700
4701 2011-08-04  Yannick Moy  <moy@adacore.com>
4702
4703         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
4704         'Result only appears in postcondition of function.
4705
4706 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4707
4708         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
4709         external tag, include the value of the external tag in the exception
4710         message.
4711
4712 2011-08-04  Yannick Moy  <moy@adacore.com>
4713
4714         * sem_attr.adb (Result): modify error message for misplaced 'Result
4715
4716 2011-08-04  Sergey Rybin  <rybin@adacore.com>
4717
4718         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
4719         clear that the second argument must be an identifier.
4720
4721 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4722
4723         * exp_ch9.adb (Build_Barrier_Function): When compiling with
4724         -fpreserve-control-flow, insert an IF statement on the barrier
4725         condition to ensure that a conditional branch instruction is generated.
4726
4727 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4728
4729         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
4730         (Processing_Flags.Ignore_Missing_With): new flag.
4731
4732 2011-08-04  Emmanuel Briot  <briot@adacore.com>
4733
4734         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
4735         Source_List_File on case-insensitive systems where the file is actually
4736         on a case-sensitive file system (NFS,...).
4737
4738 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4739
4740         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
4741         function return contains a controlled [extension] aggregate and the
4742         return statement is not part of a handled sequence of statements, wrap
4743         the return in a block. This ensures that all controlled temporaries
4744         generated during aggregate resolution will be picked up by the
4745         finalization machinery.
4746
4747 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4748
4749         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
4750         components, freeze type before resolution, to ensure that default
4751         initializations are present for all components.
4752         * sem_res.adb (Resolve_Actuals): the designated object of an
4753         accces-to-constant type is a legal actual in a call to an
4754         initialization procedure.
4755
4756 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4757
4758         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
4759         N_Unchecked_Type_Conversion to the possible containers of a renamed
4760         transient variable.
4761
4762 2011-08-04  Yannick Moy  <moy@adacore.com>
4763
4764         * par-ch13.adb (Aspect_Specifications_Present): recognize
4765         "with Identifier'Class =>" as an aspect, so that a meaningful warning
4766         is issued in Strict mode.
4767         * par.adb: Fix typos in comments.
4768
4769 2011-08-04  Yannick Moy  <moy@adacore.com>
4770
4771         * sem_attr.adb (Result): modify error message to take into account Post
4772         aspect when compiling Ada 2012 (or newer) code.
4773
4774 2011-08-04  Nicolas Roche  <roche@adacore.com>
4775
4776         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
4777         remove need for GCC exceptions.
4778
4779 2011-08-04  Vincent Celier  <celier@adacore.com>
4780
4781         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
4782         project, not the source file name.
4783         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
4784         excluded, continue looking. This excluded source will only be returned
4785         if there is no other source with the same base name that is not locally
4786         removed.
4787
4788 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4789
4790         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
4791         private and one of the operands is a real literal, use a qualified
4792         expression rather than a conversion which is not meaningful to the
4793         back-end.
4794
4795 2011-08-04  Yannick Moy  <moy@adacore.com>
4796
4797         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
4798         corresponding aspect X'Class are allowed, proceed with analysis of the
4799         aspect instead of skipping it.
4800
4801 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4802
4803         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
4804         This will allow to have an Ada implementation for the subprogram.
4805
4806 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4807
4808         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
4809         completion and aspects are present, apply them to the entity for the
4810         type which is currently the partial view, but which is the one that
4811         will be frozen.
4812         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
4813         applies to a partial view, indicate that the full view has predicates
4814         and delayed aspects.
4815         (Replace_Type_Reference): Handle properly predicates that apply to the
4816         full view of a private completion.
4817
4818 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4819
4820         * layout.adb (Layout_Type): For composite types, do not set Esize.
4821         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
4822         set Esize.
4823         (Size_Known): Look at the RM size of components instead of the Esize.
4824         (Freeze_Record_Type): Look at the RM size instead of the Esize to
4825         issue warning and activate Implicit_Packing.
4826         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
4827         if the Esize is not known.
4828         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
4829         for elementary types only.
4830         (Analyze_Record_Representation_Clause): Look at the RM size instead
4831         of the Esize to issue errors.
4832         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4833         is not known.
4834         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
4835         obsolete block.
4836         Look at the RM size instead of the Esize for types if the latter is
4837         not known.
4838         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4839
4840 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4841
4842         * sem_type.adb: proper handling of equality not involving anonymous
4843         access types.
4844
4845 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4846
4847         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4848         Vis_Decls. When creating a library-level finalizer for a package spec,
4849         both the declaration and body of the finalizer are inserted either in
4850         the visible or private declarations of the package spec.
4851
4852 2011-08-04  Javier Miranda  <miranda@adacore.com>
4853
4854         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4855         use of the full-view of a type when invoking Is_Ancestor.
4856         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4857         the full-view of private parents is requested, then use also the
4858         full-view of the parent of the first derivation.
4859
4860 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4861
4862         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4863         instead of the locally imported procedure.
4864         * s-taprop-mingw.adb (Enter_Task): Ditto.
4865         * s-valrea.adb (Scan_Real): Ditto.
4866         * s-imgrea.adb (Set_Image_Real): Ditto.
4867         * s-flocon.ads: Make the package pure.
4868
4869 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4870
4871         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4872         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4873         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4874         New subprogram, moved here from...
4875         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4876         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4877         rewriting of the last argument into a procedure call statement here...
4878         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4879         instead.
4880
4881 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4882
4883         * par_sco.adb: Minor reformatting.
4884
4885 2011-08-04  Robert Dewar  <dewar@adacore.com>
4886
4887         * erroutc.adb: Minor reformatting.
4888
4889 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4890
4891         * par_sco.adb: Comment update.
4892
4893 2011-08-04  Tristan Gingold  <gingold@adacore.com>
4894
4895         * s-flocon.ads: New file.
4896         * g-flocon.ads: Now a renaming of s-flocon.
4897         * Makefile.rtl: Add s-flocon.o
4898
4899 2011-08-04  Javier Miranda  <miranda@adacore.com>
4900
4901         * exp_strm.adb (Build_Array_Input_Function): if the array type is
4902         constrained, do not attempt to build a subtype of it.
4903
4904 2011-08-04  Yannick Moy  <moy@adacore.com>
4905
4906         * errout.ads Change comments: remove 'R'M as an example where quotes
4907         are needed; add ALFA as another case where quotes are not needed
4908         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4909         case where quotes are not needed.
4910         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4911         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4912         Remove all occurrences of 'A'L'F'A
4913
4914 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4915
4916         * sem_ch13.adb: check legality of invariant pragma.
4917
4918 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4919
4920         * bindgen.adb: Add comments.
4921
4922 2011-08-04  Yannick Moy  <moy@adacore.com>
4923
4924         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4925         synthesized flag.
4926         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4927         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4928
4929 2011-08-04  Robert Dewar  <dewar@adacore.com>
4930
4931         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4932         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4933         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4934
4935 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4936
4937         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4938
4939 2011-08-04  Thomas Quinot  <quinot@adacore.com>
4940
4941         PR ada/47880
4942         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4943         allocated object.
4944
4945 2011-08-04  Robert Dewar  <dewar@adacore.com>
4946
4947         * einfo.ads, exp_ch4.adb: Minor reformatting.
4948
4949 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4950
4951         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4952
4953 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
4954
4955         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4956         type in all cases to compute list of primitive operations, because full
4957         view may be an itype that is not attached to the list of declarations.
4958
4959 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4960
4961         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4962         library has already been finalized.
4963         (Gen_Adafinal_C): Likewise.
4964         (Gen_Adainit_Ada): Generate an early return if the library has
4965         already been elaborated.
4966         (Gen_Adainit_C): Likewise.
4967         (Gen_Output_File_Ada): Generate an elaboration flag.
4968         (Gen_Output_File_C): Likewise.
4969
4970 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4971
4972         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4973         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4974         built in the first place.
4975         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4976         for CodePeer because Finalize_Address was not built to begin with.
4977         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4978
4979 2011-08-04  Pascal Obry  <obry@adacore.com>
4980
4981         * adaint.c (__gnat_tmp_name): Use current process id to create temp
4982         filenames, this ensures unicity of filenames across processes.
4983
4984 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
4985
4986         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4987         Raise_Controlled to Raise_From_Controlled_Operation. Update the
4988         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4989         Add False as the actual to From_Abort in the generated call to
4990         Raise_From_Controlled_Operation.
4991
4992 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
4993
4994         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4995         so that the ali file name can be retrieved from outside of this package.
4996         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4997         doing nothing in the general case, but used to update the object file
4998         timestamp if directly generated by the backend.
4999         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
5000         to a later time than the ali file one.
5001
5002 2011-08-04  Yannick Moy  <moy@adacore.com>
5003
5004         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
5005         entities whose body contains an Annotate pragma which forces formal
5006         proof on this body.
5007         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5008         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
5009         Mark_Non_ALFA_Subprogram to pass in a message and node.
5010         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
5011         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
5012         surrounding subprogram.
5013         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
5014         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
5015         as not in ALFA is annotated with Formal_Proof being On, then an error
5016         is issued based on the additional parameters for message and node.
5017         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
5018         * gcc-interface/Make-lang.in: Update dependencies.
5019
5020 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
5021
5022         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
5023         Finalize_Address when CodePeer is enabled.
5024
5025 2011-08-04  Pascal Obry  <obry@adacore.com>
5026
5027         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
5028         the latter returns a pointer to a static buffer which is deallocated
5029         at the end of the routine.
5030
5031 2011-08-04  Yannick Moy  <moy@adacore.com>
5032
5033         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
5034         after index creation; mark unconstrained base array type generated as
5035         being in/not in ALFA as well
5036         (Make_Index): mark subtype created as in/not in ALFA
5037         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
5038         over a loop as in/not in ALFA, depending on its type and form of loop
5039         iteration.
5040
5041 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
5042
5043         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
5044         directly to False on .NET and JVM.
5045
5046 2011-08-04  Yannick Moy  <moy@adacore.com>
5047
5048         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
5049         constraint that subtype must come from source code to be in ALFA, so
5050         that anonymous subtypes can be in ALFA too.
5051
5052 2011-08-04  Yannick Moy  <moy@adacore.com>
5053
5054         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5055         reference for ALFA mode.
5056         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5057         procedure public so as to use it from formal verification back-end.
5058
5059 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
5060
5061         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5062         invalid checks of the Parameter, making Remove_Switch not working
5063         correctly.
5064
5065 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
5066
5067         * targparm.ads: Update header: no run-time exception is needed on this
5068         file.
5069
5070 2011-08-04  Vincent Celier  <celier@adacore.com>
5071
5072         * a-fihema.adb: Use System.IO instead of GNAT.IO
5073
5074 2011-08-04  Thomas Quinot  <quinot@adacore.com>
5075
5076         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5077         are forbidden in Compiler_Unit mode.
5078
5079 2011-08-04  Robert Dewar  <dewar@adacore.com>
5080
5081         * sem_util.adb: Minor reformatting.
5082
5083 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
5084
5085         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5086         library-level finalizers.
5087         (Gen_Finalize_Library_C): Update the import string for library-level
5088         finalizers.
5089         (Gen_Finalize_Library_Defs_C): Update the definition name of a
5090         library-level finalizer.
5091         * exp_ch7.adb: Remove with and use clauses for Stringt.
5092         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5093         Spec_Decl. Add local variable Body_Id. The names of library-level
5094         finalizers are now manually fully qualified and are no longer external.
5095         A single name is now capable of servicing .NET, JVM and non-VM targets.
5096         Pragma Export is no longer required to provide visibility for the name.
5097         (Create_Finalizer_String): Removed.
5098         (New_Finalizer_Name): New routine which mimics New_..._Name.
5099
5100 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
5101
5102         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5103         elaboration counter to Standard_Short_Integer.
5104         * sem_util.adb (Build_Elaboration_Entity): Likewise.
5105         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5106         (Gen_Elab_Externals_C): Likewise.
5107
5108 2011-08-04  Ed Falis  <falis@adacore.com>
5109
5110         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5111         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5112         system-vxworks-mips.ads, system-vxworks-x86.ads
5113         (Always_Compatible_Rep): set to False for all VxWorks targets.
5114
5115 2011-08-04  Robert Dewar  <dewar@adacore.com>
5116
5117         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5118         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5119         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5120         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5121         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5122         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5123         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5124         Minor reformatting and code reorganization.
5125
5126 2011-08-04  Emmanuel Briot  <briot@adacore.com>
5127
5128         * projects.texi: Added doc for aggregate projects.
5129
5130 2011-08-04  Emmanuel Briot  <briot@adacore.com>
5131
5132         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5133         Add support for overriding the Project_Path in aggregate projects.
5134
5135 2011-08-04  Robert Dewar  <dewar@adacore.com>
5136
5137         * a-cofove.ads: Minor reformatting.
5138
5139 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
5140
5141         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5142         on the generated code.
5143         (Build_Finalize_Statements): Update the comment on the generated code.
5144         (Build_Initialize_Statements): Update the comment on the generated code.
5145         (Build_Object_Declarations): Add local variable Result. The object
5146         declarations are now built in sequence.
5147         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5148         RE_Unit_Table.
5149
5150 2011-08-04  Robert Dewar  <dewar@adacore.com>
5151
5152         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5153
5154 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
5155
5156         * einfo.ads (Elaboration_Entity): Document new definition and use.
5157         (Elaboration_Entity_Required): Adjust to above change.
5158         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5159         * exp_ch12.adb: And with and use for Snames.
5160         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5161         * exp_util.adb (Set_Elaboration_Flag): Likewise.
5162         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5163         <Check_Unit_Name>: Deal with N_Expanded_Name.
5164         <Attribute_Elaborated>: Extend to all unit names.
5165         * sem_elab.adb: And with and use for Uintp.
5166         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5167         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5168         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5169         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5170         from Gen_Adainit_Ada.
5171         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5172         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
5173         case, do not call System.Standard_Library.Adafinal; instead call
5174         finalize_library if needed.
5175         (Gen_Adafinal_C): Likewise.
5176         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5177         non-main program case.
5178         (Gen_Adainit_C): Generate a couple of external declarations here.
5179         In the main program case, set SSL.Finalize_Library_Objects.
5180         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5181         (Gen_Elab_Calls_C): Likewise.
5182         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
5183         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
5184         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5185         objects here.
5186         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5187         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
5188         Gen_Adafinal_Ada.
5189         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5190         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
5191         of external declarations.  Call Gen_Finalize_Library_C.
5192
5193 2011-08-04  Emmanuel Briot  <briot@adacore.com>
5194
5195         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5196         Compute_Compilation_Phases): new subprogram.
5197         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5198         The number of mains as well as the various compilation phases that
5199         need to be run are now project tree specific, since various
5200         aggregated trees might have different requirements. In particular,
5201         they do not all require bind or link phases.
5202
5203 2011-08-04  Emmanuel Briot  <briot@adacore.com>
5204
5205         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5206         (Project_Tree_Appdata): New type.
5207         It is now possible to associate application-specific data to a project
5208         tree. In particular, this is used in the gprbuild builder to avoid a
5209         number of global tables and htables, especially now that there can be
5210         several project trees loaded at once because of aggregate projects.
5211         (Debug_Name): new procedure.
5212         * projects.texi: Clarify syntax of "**" for Source_Dirs
5213
5214 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5215
5216         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5217         the "roots" for a main.
5218         (Fill_From_Project): add support for aggregate projects. Main units
5219         in aggregated projects are now automatically added in the list of
5220         files to build (although this fails later on in gprbuild, because
5221         these files are not using the root proejct tree, so this needs
5222         further cleanup)
5223         * gcc-interface/Make-lang.in: Update dependencies.
5224
5225 2011-08-03  Yannick Moy  <moy@adacore.com>
5226
5227         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
5228         conditional expression in ALFA.
5229         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
5230         expressions as not in ALFA.
5231
5232 2011-08-03  Robert Dewar  <dewar@adacore.com>
5233
5234         * a-cofove.adb: Minor reformatting.
5235
5236 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5237
5238         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
5239         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
5240         gprbuild sources.
5241         These packages are more logically placed in the Queue package, since
5242         they manipulate the queue. It is also likely that they can be adapted
5243         for gnatmake, thus sharing more code.
5244         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
5245         that we could move the above.
5246
5247 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5248
5249         * errutil.adb (Finalize): clean up the list of error messages on exit.
5250         Calling this subprogram multiple times will no longer show duplicate
5251         error messages on stderr.
5252
5253 2011-08-03  Emmanuel Briot  <briot@adacore.com>
5254
5255         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
5256         Getopt_Switches when we have already define a command line
5257         configuration.
5258
5259 2011-08-03  Yannick Moy  <moy@adacore.com>
5260
5261         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
5262         in ALFA. Instead, they are considered as assertions to prove.
5263         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
5264         nodes as not in ALFA. Instead, include conditional expressions in ALFA
5265         if they have no ELSE part, or if they occur in pre- and postconditions,
5266         where the Condition cannot have side-effects in ALFA
5267         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
5268         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
5269         Instead, include type conversion between scalar types in ALFA.
5270         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
5271         if-and-only-if its type is in ALFA.
5272
5273 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5274
5275         * scos.adb, get_scos.adb, put_scos.adb
5276         New code letter for decisions: G (entry guard)
5277         * par_sco.adb
5278         (Traverse_Subprogram_Body): Rename to...
5279         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
5280         (Traverse_Protected_Body): New subprogram
5281         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
5282         protected bodies and entry bodies.
5283
5284 2011-08-03  Yannick Moy  <moy@adacore.com>
5285
5286         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
5287         entities with get/set subprograms, which is set on procedure entities
5288         generated by the compiler for a postcondition.
5289         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
5290         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
5291         entity for a declaration
5292         (Get_Unique_Entity_For_Decl): new function returning an entity which
5293         represents a declaration, so that matching spec and body have the same
5294         entity.
5295
5296 2011-08-03  Robert Dewar  <dewar@adacore.com>
5297
5298         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
5299         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
5300
5301 2011-08-03  Yannick Moy  <moy@adacore.com>
5302
5303         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
5304         library-level because retriction No_Implicit_Dynamic_Code in the
5305         front-end prevents its definition as a local subprogram
5306         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
5307         for reuse in other contexts
5308         (Traverse_Declarations_Or_Statements,
5309         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5310         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
5311         procedures take a callback parameter to be called on all declarations
5312         * lib-xref.ads
5313         (Traverse_All_Compilation_Units): new generic function to traverse a
5314         compilation unit and call a callback parameter on all declarations
5315
5316 2011-08-03  Javier Miranda  <miranda@adacore.com>
5317
5318         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
5319         in Java since they are always enclosed in a namespace that
5320         differentiates them, and overloaded entities are supported by the VM.
5321
5322 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5323
5324         * checks.adb (Determine_Range): If a computed bound of an operation is
5325         outside the range of the base type of the expression, and overflow
5326         checks are enabled, the result is unknown and cannot be used for any
5327         subsequent constant folding.
5328         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
5329         unknown, so is the result of the comparison.
5330
5331 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
5332
5333         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
5334         From_Abort. When finalization was triggered by an abort, propagate
5335         Standard'Abort_Signal rather than Program_Error.
5336         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
5337         From_Abort.
5338         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
5339         From_Abort. When finalization was triggered by an abort, propagate
5340         Standard'Abort_Signal rather than Program_Error.
5341         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
5342         From_Abort.
5343         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
5344         Abort_Id. Update the calls to Build_Object_Declarations and
5345         Build_Raise_Statement to include Abort_Id.
5346         (Build_Adjust_Statements): New local variable Abort_Id. Update the
5347         calls to Build_Object_Declarations and Build_Raise_Statement to include
5348         Abort_Id.
5349         (Build_Finalize_Statements): New local variable Abort_Id. Update the
5350         calls to Build_Object_Declarations and Build_Raise_Statement to include
5351         Abort_Id.
5352         (Build_Components): Create an entity for Abort_Id when exceptions are
5353         allowed on the target.
5354         (Build_Finalizer): New local variable Abort_Id.
5355         (Build_Initialize_Statements): New local variable Abort_Id. Update the
5356         calls to Build_Object_Declarations and Build_Raise_Statement to include
5357         Abort_Id.
5358         (Build_Object_Declarations): Add new formal Abort_Id. Create the
5359         declaration of flag Abort_Id to preserve the original abort status
5360         before finalization code is executed.
5361         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
5362         runtime routine Raise_From_Controlled_Operation.
5363         (Create_Finalizer): Update the call to Build_Raise_Statement to include
5364         Abort_Id. Update the call to Build_Object_Declarations to include
5365         Abort_Id. Update the layout of the finalizer body.
5366         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
5367         (Process_Transient_Objects): New local variable Abort_Id. Remove the
5368         clunky code to create all flags and objects related to
5369         exception propagation and replace it with a call to
5370         Build_Object_Declarations. Update the call to Build_Raise_Statement to
5371         include Abort_Id.
5372         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
5373         Add new formal Abort_Id and associated comment on its use.
5374         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
5375         on its use.
5376         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
5377         Remove the clunky code to create all flags and objects related to
5378         exception propagation and replace it with a call to
5379         Build_Object_Declarations. Update the call to Build_Raise_Statement.
5380
5381 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5382
5383         * s-tassta.adb: Fix minor typos.
5384
5385 2011-08-03  Robert Dewar  <dewar@adacore.com>
5386
5387         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
5388         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
5389
5390 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
5391
5392         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
5393         to packages. This ensures that the finalizer body will not end up
5394         inside the freeze node.
5395         (Process_Declarations): Add code to detect whether a freeze node has a
5396         nested finalization collection.
5397
5398 2011-08-03  Pascal Obry  <obry@adacore.com>
5399
5400         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
5401         (Current_Session): Return a not null access to Session_Type.
5402         (Default_Session): Likewise.
5403
5404 2011-08-03  Robert Dewar  <dewar@adacore.com>
5405
5406         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
5407         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
5408
5409 2011-08-03  Pascal Obry  <obry@adacore.com>
5410
5411         * g-awk.ads: Minor comment fix.
5412
5413 2011-08-03  Sergey Rybin  <rybin@adacore.com>
5414
5415         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5416         the tree structure related to discriminant constraints.
5417         Original_Discriminant cannot be used any more for computing the
5418         defining name for the reference to a discriminant.
5419
5420 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5421
5422         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
5423         function is not visibly tagged, this is not a dispatching call and
5424         therfore is not Tag_Indeterminate, even if the function is marked as
5425         dispatching on result.
5426
5427 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
5428
5429         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
5430         (Expand_N_Free_Statement): Add a guard to protect against run-times
5431         which do not support controlled types.
5432         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
5433         against run-times which do not support controlled types.
5434         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
5435         against run-times which do not support controlled types.
5436         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
5437         against run-times which do not support controlled types.
5438         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
5439         protect against run-times which do not support controlled types.
5440
5441 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
5442
5443         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
5444         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
5445
5446 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5447
5448         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
5449         modified in the source, to prevent spurious warnings when compiling
5450         with -gnatg.
5451
5452 2011-08-03  Thomas Quinot  <quinot@adacore.com>
5453
5454         * a-except-2005.adb: Minor reformatting.
5455
5456 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5457
5458         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
5459         is a renaming declaration in the private part of a package, do not emit
5460         a warning that the with_clause could be moved because the renaming may
5461         be used in the body or in a child unit.
5462
5463 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
5464
5465         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5466         Propagate the Comes_From_Source attribute from the original return
5467         object to the renaming.
5468
5469 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
5470
5471         * exp_ch7.adb (Build_Raise_Statement): Do not call
5472         Raise_From_Controlled_Operation when this routine is not present in
5473         the run-time library.
5474         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
5475         libraries (Ravenscar), tasks are non-terminating, and protected objects
5476         and tasks can only appear at library level, so we do not want
5477         finalization of protected objects nor tasks.
5478         * exp_intr.adb: Minor clarification in comment.
5479         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
5480         Gen_Output_File_C): Remove references to finalization of library-level
5481         objects when using restricted run-time libraries.
5482
5483 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
5484
5485         * sem_ch3.adb (Build_Discriminant_Constraints): Set
5486         Original_Discriminant only if the parent type is a generic formal.
5487
5488 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
5489
5490         * exp_ch13.adb: Add with and use clause for Targparm;
5491         (Expand_N_Free_Statement): Prevent the generation of a custom
5492         Deallocate on .NET/JVM targets since this requires pools and address
5493         arithmetic.
5494         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
5495         .NET/JVM targets, attach the newly allocated object to the access
5496         type's finalization collection. Do not generate a call to
5497         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
5498         exist in the runtime.
5499         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
5500         create a custom Allocate for object that do not require initialization.
5501         Attach a newly allocated object to the access type's finalization
5502         collection on .NET/JVM.
5503         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
5504         assignment of controlled types on .NET/JVM. The two hidden pointers
5505         Prev and Next and stored and later restored after the assignment takes
5506         place.
5507         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
5508         kludge for .NET/JVM to recognize a particular piece of code coming from
5509         Heap_Management and change the call to Finalize into Deep_Finalize.
5510         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
5511         finalization collections on .NET/JVM only for types derived from
5512         Controlled. Separate the association of storage pools with a collection
5513         and only allow it on non-.NET/JVM targets.
5514         (Make_Attach_Call): New routine.
5515         (Make_Detach_Call): New routine.
5516         (Process_Object_Declarations): Suppress the generation of
5517         build-in-place return object clean up code on .NET/JVM since it uses
5518         pools.
5519         * exp_ch7.ads (Make_Attach_Call): New routine.
5520         (Make_Detach_Call): New routine.
5521         * exp_intr.adb Add with and use clause for Targparm.
5522         (Expand_Unc_Deallocation): Detach a controlled object from a collection
5523         on .NET/JVM targets.
5524         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
5525         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
5526         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
5527         names used in finalization.
5528
5529 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
5530
5531         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
5532         (Attach, Detach): Lock the current task when chaining an object onto a
5533         collection.
5534
5535 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
5536
5537         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
5538         Rewritten to create the message strings when the exception is not
5539         raised by an abort during finalization.
5540         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
5541         Raise_From_Controlled_Operation and update its associated comment.
5542         * a-fihema.ads, a-fihema.adb: New GNAT unit.
5543         Ada.Finalization.Heap_Management provides key functionality
5544         associated with controlled objects on the heap, their creation,
5545         finalization and reclamation. Type Finalization_Collection is
5546         effectively a wrapper which sits ontop of a storage pool and performs
5547         all necessary bookkeeping for all the objects it contains. Each
5548         access-to-controlled or access-to-class-wide type receives a collection
5549         as part of its expansion. The compiler generates buffer code and
5550         invokes Allocate / Deallocate to create and destroy allocated
5551         controlled objects.
5552         * a-finali.adb ("="): Removed.
5553         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
5554         fields Prev and Next.
5555         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
5556         A library unit with at least one controlled object on the library level
5557         has a special finalizer which is invoked by the binder. To signal this,
5558         ali files carry field PF.
5559         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
5560         associated comment on field usage.
5561         * a-tags.adb (Get_RC_Offset): Removed.
5562         (Needs_Finalization): New routine.
5563         * a-tags.ads: Update the structure of the GNAT dispatch tables.
5564         Dispatch tables now carry field Needs_Finalization which provides
5565         runtime indication whether a type is controlled or has controlled
5566         components or both. Remove field RC_Offset.
5567         (Get_RC_Offset): Removed along with its associated pragma Export.
5568         Since tagged types with controlled components no longer carry hidden
5569         field _controller, the special mechanism to retrieve its location is no
5570         longer needed.
5571         (Needs_Finalization): New routine.
5572         * atree.ads, atree.adb (Elist24): New routine.
5573         (Set_Elist24): New routine.
5574         * atree.h: Add a define clause for Elist24.
5575         * bindgen.adb New library-level variable Lib_Final_Built.
5576         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
5577         presence of a VM target, the routine generates calls to the proper
5578         library finalization routine.
5579         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
5580         targets. Set the correct library finalization routine depending on
5581         whether the library has controlled objects or this is a VM compilation.
5582         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
5583         to library-level finalizers of compiled units in reverse order of
5584         elaboration. It also produces exception management code and reraises a
5585         potential exception after all units have been finalized.
5586         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
5587         library-level finalizers of compiled units in reverse order of
5588         elaboration.
5589         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
5590         definitions of all library-level finalizers available to the compilation
5591         (Gen_Main_Ada): Directly call Adafinal which now contails all target
5592         dependent code.
5593         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
5594         System.Standard_Library.Adafinal directly. If the library needs
5595         finalization actions, create the sequence of finalization calls.
5596         (Gen_Output_File_Ada): Alphabetize local variables and constants.
5597         Generate a with clause for System.Soft_Links when compiling for a VM.
5598         Remove the code which imports System.Standard_Library.Adafinal as
5599         Do_Finalize. Generate the library finalization routine.
5600         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
5601         If the library needs finalization actions, create all the definitions
5602         of library- level finalizers.
5603         (Has_Finalizer): New routine. Determines whether at least one compiled
5604         unit has a library-level finalizer.
5605         Add type Qualification_Mode.
5606         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
5607         * einfo.adb: New usage of field 15 as Return_Flag.
5608         Remove Finalization_Chain_Entity from the usages of field 19.
5609         Remove Associated_Final_Chain from the usages of field 23.
5610         New usage of field 23 as Associated_Collection.
5611         New usage of field 24 as Finalizer.
5612         New usage of flag 252 as Is_Processed_Transient.
5613         (Associated_Final_Chain): Removed.
5614         (Associated_Collection): New routine.
5615         (Finalization_Chain_Entity): Removed.
5616         (Finalizer): New routine.
5617         (Is_Finalizer): New routine.
5618         (Is_Processed_Transient): New routine.
5619         (Return_Flag): New routine.
5620         (Set_Associated_Final_Chain): Removed.
5621         (Set_Associated_Collection): New routine.
5622         (Set_Finalization_Chain_Entity): Removed.
5623         (Set_Finalizer): New routine.
5624         (Set_Is_Processed_Transient): New routine.
5625         (Set_Return_Flag): New routine.
5626         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
5627         displayed flags.
5628         (Write_Field8_Name): Alphabetize the output.
5629         (Write_Field11_Name): Alphabetize the output.
5630         (Write_Field12_Name): Alphabetize the output.
5631         (Write_Field13_Name): Alphabetize the output.
5632         (Write_Field14_Name): Alphabetize the output.
5633         (Write_Field15_Name): Alphabetize the output.
5634         (Write_Field16_Name): Alphabetize the output.
5635         (Write_Field17_Name): Alphabetize the output.
5636         (Write_Field18_Name): Alphabetize the output.
5637         (Write_Field19_Name): Alphabetize the output. Remove the output of
5638         Finalization_Chain_Entity.
5639         (Write_Field20_Name): Alphabetize the output.
5640         (Write_Field21_Name): Alphabetize the output.
5641         (Write_Field22_Name): Alphabetize the output.
5642         (Write_Field23_Name): Alphabetize the output. Remove the output of
5643         Associated_Final_Chain. Add output for Associated_Collection.
5644         (Write_Field24_Name): Alphabetize the output.
5645         (Write_Field25_Name): Add output for Finalizer.
5646         (Write_Field26_Name): Alphabetize the output.
5647         (Write_Field27_Name): Alphabetize the output.
5648         (Write_Field28_Name): Alphabetize the output.
5649         * einfo.ads: Add new field description for Associated_Collection and
5650         its uses in nodes.
5651         Remove Associated_Final_Chain and its uses in nodes.
5652         Remove Finalization_Chain_Entity and its uses in nodes.
5653         Add new field description for Finalizer and its uses in nodes.
5654         Add new synthesized attribute Is_Finalizer.
5655         Add new flag description for Is_Processed_Transient and its uses in
5656         nodes.
5657         Add new field description for Return_Flag and its uses in nodes.
5658         (Associated_Final_Chain): Removed along with its pragma Inline.
5659         (Associated_Collection): New routine and pragma Inline.
5660         (Finalization_Chain_Entity): Removed along with its pragma Inline.
5661         (Finalizer): New routine and pragma Inline.
5662         (Is_Finalizer): New routine and pragma Inline.
5663         (Is_Processed_Transient): New routine and pragma Inline.
5664         (Return_Flag): New routine and pragma Inline.
5665         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
5666         (Set_Associated_Collection): New routine and pragma Inline.
5667         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
5668         (Set_Finalizer): New routine and pragma Inline.
5669         (Set_Is_Processed_Transient): New routine and pragma Inline.
5670         (Set_Return_Flag): New routine and pragma Inline.
5671         * exp_aggr.adb: Alphabetize subprograms.
5672         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
5673         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
5674         associated comments. Remove local variables External_Final_List and
5675         Attach.
5676         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
5677         Ancestor. Remove the retrieval of finalization lists. Update the call to
5678         Make_Adjust_Call.
5679         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
5680         lists. Update the call to Late_Expansion.
5681         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
5682         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
5683         (Gen_Assign): Remove the retrieval of the finalization list used to
5684         build the assignment. Update the calls to Make_Init_Call and
5685         Make_Adjust_Call.
5686         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
5687         Remove the mechanism to determine attachment levels and finalization
5688         list retrieval. Remove the processing for coextensions.
5689         (Init_Controller): Removed. Controllers no longer exist.
5690         (Late_Expansion): Remove formals Flist and Obj along with their
5691         associated comments. Update the calls to Build_Record_Aggr_Code and
5692         Build_Array_Aggr_Code.
5693         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
5694         (Expand_N_Freeze_Entity): Add special processing for finalizers which
5695         appear in entry bodies, protected subprograms and task bodies.
5696         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
5697         * exp_ch3.adb (Add_Final_Chain): Removed.
5698         (Build_Array_Init_Proc): Alphabetize local variables.
5699         (Build_Assignment): Alphabetize local variables. Update the call to
5700         Maked_Adjust_Call.
5701         (Build_Class_Wide_Master): Rename local variables to better reflect
5702         their role.
5703         (Build_Discriminant_Assignments): Code reformatting.
5704         (Build_Init_Call_Thru): Code reformatting.
5705         (Build_Init_Procedure): Code reformatting. Generate a special version
5706         of Deep_Finalize which is capable of finalizing all initialized
5707         components and ignore the rest.
5708         (Build_Init_Statements): Rename local variables to better reflect their
5709         role.
5710         Reimplement the mechanism to include the creation and update of an index
5711         variable called a "counter". It is used as a bookmark for tracing
5712         initialized and non-initialized components.
5713         (Build_Initialization_Call): Remove local variable Controller_Typ.
5714         Alphabetize all local variables. Remove the initialization of the
5715         record controller and update the call to Make_Init_Call.
5716         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
5717         New local variable Counter.
5718         (Constrain_Array): Alphabetize.
5719         (Expand_Freeze_Array_Type): Create a collection instead of a
5720         finalization list.
5721         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
5722         Finalize_Address which is used in conjunction with allocated controlled
5723         objects.
5724         (Expand_N_Object_Declaration): Remove the creation of a finalization
5725         list for anonymous access types. Update the calls to Make_Init_Call and
5726         Make_Adjust_Call.
5727         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
5728         retrieval of finalization lists. Remove the expansion of the record
5729         controller. Create TSS primitive Finalize_Address used in conjunction
5730         with controlled objects on the heap. Create finalization collections
5731         for access-to-controlled record components.
5732         (Expand_Record_Controller): Removed.
5733         (Freeze_Type): Remove the freezing of record controllers. Freezing of
5734         class-wide types now requires additional processing. Create
5735         finalization collections for access-to-controlled types.
5736         (Increment_Counter): New routine.
5737         (Make_Counter): New routine.
5738         (Make_Eq_If): Remove the mention of Name_uController.
5739         (Make_Predefined_Primitive_Specs): There is no longer need to skip
5740         types coming from System.Finalization_Root.
5741         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
5742         (Predefined_Primitive_Bodies): There is no longer need to skip types
5743         coming from System.Finalization_Root.
5744         (Stream_Operation_OK): Do not generate stream routines for
5745         type Ada.Finalization.Heap_Management.Finalization_Collection.
5746         * exp_ch3.ads: Alphabetize subprograms.
5747         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
5748         Add with and use clause for Lib.
5749         (Complete_Coextension_Finalization): Removed.
5750         (Complete_Controlled_Allocation): New routine. Create a finalization
5751         collection for anonymous access-to-controlled types. Create a custom
5752         Allocate which interfaces with the back end and the machinery in
5753         Heap_Management.
5754         (Expand_Allocator_Expression): Add necessary calls to
5755         Complete_Controlled_Allocation. Remove the retrieval of finalization
5756         lists. Update the calls to Make_Adjust_Call. Generate a call to
5757         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5758         the associated collection.
5759         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
5760         Code clean up. Remove the retrieval of finalization lists and
5761         attachment levels.
5762         Update the call to Make_Init_Call. Generate a call to
5763         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
5764         the associated collection.
5765         (Get_Allocator_Final_List): Removed. Finalization lists are not
5766         available.
5767         (Suitable_Element): Remove the mention of Name_uController.
5768         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
5769         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
5770         the left hand side, carry out the assignment and adjust the left hand
5771         side.
5772         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
5773         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
5774         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
5775         BIP_Collection and BIPcollection.
5776         (Build_Heap_Allocator): New routine used to allocate the return object
5777         of a build-in-place function onto a collection.
5778         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
5779         (Expand_Call): Do not replace direct calls to Deep routines with their
5780         aliases.
5781         (Expand_N_Extended_Return_Statement): Give all variables shorter names
5782         and update their occurrences. Add a special return flag to monitor the
5783         [ab]normal execution of the function. The flag is set right before the
5784         return statement.
5785         Rewrite the mechanism used to allocate a build-in-place return object
5786         on the heap or on a storage pool.
5787         (Is_Direct_Deep_Call): New routine.
5788         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
5789         build-in-place function call instead of a final list. Build a call to
5790         Set_Finalize_Address_Ptr to decorate the associated collection.
5791         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
5792         order to name the build-in-place function call's result for later
5793         finalization. Add a collection to a build-in-place function call
5794         instead of a final list.
5795         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
5796         build-in-place function call instead of a final list. Remove the code
5797         which moves one final list and transforms it into the actual in a
5798         nested build-in-place call.
5799         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
5800         build-in-place function call instead of a final list.
5801         (Move_Final_List): Removed.
5802         (Needs_BIP_Collection): New routine.
5803         (Needs_BIP_Final_List): Removed.
5804         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
5805         enumeration type BIP_Formal_Kind.
5806         Update the related comment.
5807         (Needs_BIP_Collection): New routine.
5808         (Needs_BIP_Final_List): Removed.
5809         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
5810         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
5811         majority of subprograms in this unit. Add Name_Finalize_Address to
5812         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
5813         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
5814         statements for an array type.
5815         (Build_Adjust_Statements): Create the adjust statements for a record
5816         type.
5817         (Build_Cleanup_Statements): New routine. A procedure which given any
5818         construct containing asynchronous calls, references to _master, or is a
5819         task body, a task allocation or a protected body produces the necessary
5820         runtime calls to clean up these constructs.
5821         (Build_Exception_Handler): New routine.
5822         (Build_Final_List): Removed.
5823         (Build_Finalization_Collection): New routine. A core procedure which
5824         creates a collection to service heap allocated controlled objects
5825         associated with an access-to-controlled type.
5826         (Build_Finalize_Statements): Create the finalization statements for a
5827         record types.
5828         (Build_Finalizer): New routine. A core procedure which given any
5829         construct with declarations and/or statements detects all objects which
5830         need any type of clean up (controlled objects, protected objects) and
5831         generates all necessary code to clean up the said objects in the proper
5832         order.
5833         (Build_Finalizer_Call): New routine.
5834         (Build_Initialize_Statements): Create the initialization statements for
5835         an array type. The generated routine contains code to finalize partially
5836         initialized arrays.
5837         (Build_Object_Declarations): New routine.
5838         (Build_Raise_Statement): New routine.
5839         (Clean_Simple_Protected_Objects): Removed.
5840         (Controller_Component): Removed.
5841         (Enclosing_Function): New routine.
5842         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5843         either declarations or statements or both.
5844         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5845         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5846         package.
5847         (Find_Final_List): Removed.
5848         (Global_Flist_Ref): Removed.
5849         (In_Finalization_Root): Removed.
5850         (Insert_Actions_In_Scope_Around): Determine the range of the transient
5851         scope in terms of tree nodes. Process all transient variables within
5852         that range.
5853         (Make_Adjust_Call): Rewritten. There is no longer an attach call
5854         generated after the adjust.
5855         (Make_Attach_Call): Removed.
5856         (Make_Call): New routine.
5857         (Make_Clean): Removed.
5858         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5859         build routines.
5860         (Make_Deep_Proc): Rewritten to generate the new profile signature used
5861         in Deep routines.
5862         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5863         build routines.
5864         (Make_Final_Call): Modified to simply create a call to either
5865         Deep_Finalize or Finalize.
5866         (Make_Finalize_Address_Body): New routine.
5867         (Make_Finalize_Address_Stmts): New routine. A function which produces
5868         TSS primitive Finalize_Address used in conjunction with heap allocated
5869         controlled objects.
5870         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5871         (Make_Init_Call): Rewritten. There is no longer an attach call
5872         generated after initialization.
5873         (Make_Local_Deep_Finalize): New routine.
5874         (Make_Set_Finalize_Address_Ptr_Call): New routine.
5875         (Make_Transient_Block): Remove the finalization list retrieval and
5876         manipulation.
5877         (Needs_Finalization): Moved to Exp_Util.
5878         (Parent_Field_Type): New routine.
5879         (Preprocess_Components): New routine.
5880         (Process_Transient_Objects): New routine.
5881         (Wrap_HSS_In_Block): New routine.
5882         (Wrap_Transient_Declaration): Remove finalization list management and
5883         controller insertion.
5884         (Wrap_Transient_Expression): Code reformatting.
5885         (Wrap_Transient_Statement): Code reformatting.
5886         * exp_ch7.ads (Build_Final_List): Removed.
5887         (Build_Finalization_Collection): New routine.
5888         (Build_Raise_Statement): New routine.
5889         (Controller_Component): Removed.
5890         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5891         (Find_Final_List): Removed.
5892         (In_Finalization_Root): Removed.
5893         (Is_Simple_Protected_Type): Update related comment.
5894         (Make_Adjust_Call): New parameter profile and associated comments.
5895         (Make_Attach_Call): Removed.
5896         (Make_Final_Call): New parameter profile and associated comments.
5897         (Make_Finalize_Address_Body): New routine.
5898         (Make_Init_Call): New parameter profile and associated comments.
5899         (Make_Local_Deep_Finalize): New routine.
5900         (Make_Set_Finalize_Address_Ptr_Call): New routine.
5901         (Needs_Finalization): Moved to Exp_Util.
5902         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5903         (Expand_N_Protected_Body): Remove the handling of finalization lists.
5904         (Find_Protection_Type): Moved to Exp_Util.
5905         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5906         (Make_DT): Update sequence of dispatch table initialization. Remove the
5907         initialization of field RC_Offset. Add initialization of field Needs_
5908         Finalization.
5909         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5910         Reimplement how an object is first finalized, then deallocated.
5911         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5912         Code reformatting.
5913         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5914         Register TSS_Finalize_Address with type TSS_Names.
5915         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5916         procedure provides the interface between an allocation / deallocation
5917         and the support machinery in Ada.Finalization.Heap_Management.
5918         (Find_Init_Call): Code reformatting.
5919         (Find_Init_Call_In_List): Code reformatting.
5920         (Find_Protection_Type): Moved from Exp_Ch9.
5921         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5922         (Has_Controlled_Coextensions): Removed.
5923         (Has_Controlled_Objects): New routine.
5924         (In_Library_Level_Package_Body): New routine.
5925         (Insert_Action_After): New routine.
5926         (Is_Finalizable_Transient): New routine. This predicate determines
5927         whether an object declaration is one of the many variants of controlled
5928         transients.
5929         (Is_Null_Access_BIP_Func_Call): New routine.
5930         (Is_Non_BIP_Func_Call): New routine.
5931         (Is_Related_To_Func_Return): New routine.
5932         (Needs_Finalization): Moved from Exp_Ch7.
5933         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5934         (Find_Protection_Type): Moved from Exp_Ch9.
5935         (Has_Controlled_Coextensions): Removed.
5936         (Has_Controlled_Objects): New routine.
5937         (In_Library_Level_Package_Body): New routine.
5938         (Insert_Action_After): New routine.
5939         (Is_Finalizable_Transient): New routine.
5940         (Is_Null_Access_BIP_Func_Call): New routine.
5941         (Is_Non_BIP_Func_Call): New routine.
5942         (Is_Related_To_Func_Return): New routine.
5943         (Needs_Finalization): Moved from Exp_ch7.
5944         * expander.adb (Expand): Add a case for N_Free_Statement.
5945         * freeze.adb (Freeze_All): Replace the generation of a finalization
5946         list with a collection for access-to-controlled types.
5947         (Freeze_Entity): Code reformatting.
5948         (Freeze_Record_Type): Remove the freezing of a record controller
5949         component.
5950         (Freeze_Subprogram): Code reformatting.
5951         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5952         finalization list.
5953         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5954         has a library-level finalizer.
5955         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5956         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5957         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5958         files. Add a-fihema to the list of object files.
5959         * par-ch4.adb:
5960         Alphabetize the associations in type Is_Parameterless_Attribute.
5961         * rtsfind.ads: Ada.Finalization_List.Controller and
5962         System.Finalization_Implementation are no longer a GNAT unit.
5963         Update the range of type Ada_Finalization_Child. Remove the following
5964         recoverable entities:
5965
5966            RE_Attach_To_Final_List
5967            RE_Deep_Tag_Attach
5968            RE_Finalize_List
5969            RE_Finalize_One
5970            RE_Finalizable_Ptr_Ptr
5971            RE_Global_Final_List
5972            RE_Limited_Record_Controller
5973            RE_List_Controller
5974            RE_Move_Final_List
5975            RE_Record_Controller
5976            RE_Simple_List_Controller
5977
5978         Add the following recoverable entities:
5979
5980            RE_Add_Offset_To_Address
5981            RE_Allocate
5982            RE_Base_Pool
5983            RE_Deallocate
5984            RE_Exception_Identity
5985            RE_Finalization_Collection
5986            RE_Finalization_Collection_Ptr
5987            RE_Needs_Finalization
5988            RE_Save_Library_Occurrence
5989            RE_Set_Finalize_Address_Ptr
5990            RE_Set_Storage_Pool_Ptr
5991            RE_Storage_Count
5992         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5993         Name_uController.
5994         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5995         (First_Stored_Discriminant): Remove the mention of Name_uController.
5996         * sem_aux.ads: Comment reformatting.
5997         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5998         to redecorate an already existing class-wide type.
5999         (Decorate_Tagged_Type): New parameter profile and associated comment.
6000         Create a "shadow class-wide type" for a shadow entity.
6001         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
6002         of the final chain along with the associated comment.
6003         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
6004         Full_Desig and set it to the full view of the designated type.
6005         Initialize the finalization collection to empty.
6006         (Build_Derived_Record_Type): Alphabetize local variables. Code
6007         reformatting.
6008         (Collect_Fixed_Components): Remove the mention of Name_uController.
6009         (Create_Constrained_Components): Remove the mention of Name_uController.
6010         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
6011         class-wide type of a shadow entity.
6012         (Process_Full_View): Update the machinery which marks type
6013         Limited_Controlled's entity as limited.
6014         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
6015         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
6016         list, instead make a collection build-in-place formal.
6017         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
6018         a designated type in order to establish a match between the renaming
6019         and the renamed entity.
6020         (Find_Selected_Component): Add guard to prevent spurious exceptions
6021         from being raised on .NET/JVM.
6022         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
6023         to the list of primitive that need special processing. Update arrays
6024         C_Names and D_Names.
6025         (Replace_Types): Handle class-wide types.
6026         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
6027         different parameter profile, look at the first formal.
6028         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
6029         use clauses for Exp_Util.
6030         * sem_res.adb: Remove with and use clauses for Elists.
6031         (Propagate_Coextensions): Removed.
6032         (Resolve_Allocator): Do not propagate the list of coextensions from one
6033         allocator to another.
6034         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
6035         Deaccessed_T to Desig_Typ.
6036         (Enter_Name): Remove the mention of Name_uController.
6037         (Gather_Components): Remove the mention of Name_uController.
6038         (Incomplete_Or_Private_View): New routine.
6039         (Is_Coextension_Root): Removed.
6040         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
6041         * sem_util.ads (Incomplete_Or_Private_View): New routine.
6042         (Is_Coextension_Root): Removed.
6043         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
6044         Controlled types are now derived from a null tagged record. Remove
6045         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
6046         * sinfo.adb (Coextensions): Removed.
6047         (Set_Coextensions): Removed.
6048         * sinfo.ads: Remove Coextensions from the explanation of node fields
6049         and its uses in nodes.
6050         Update the field usage of N_Allocator.
6051         (Coextensions): Removed along with its pragma Inline.
6052         (Set_Coextensions): Removed along with its pragma Inline.
6053         * snames.ads-tmpl: Remove names
6054
6055           Name_uClean
6056           Name_uController
6057           Name_uFinal_List
6058           Name_uLocal_Final_List
6059           Name_Finalization_Root
6060           Name_Next
6061           Name_Prev
6062
6063         Add names
6064
6065           Name_uFinalizer
6066           Name_Finalize_Address
6067         * s-pooglo.adb (Allocate): Add overriding indicator.
6068         (Deallocate): Add overriding indicator.
6069         (Storage_Size): Add overriding indicator.
6070         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6071         than Finalize_Global_List.
6072         (Null_Finalize_Global_List): Removed.
6073         (Save_Library_Occurrence): New routine.
6074         * s-soflin.ads: Remove variable Finalize_Global_List along with its
6075         initialization. Add variable Finalize_Library_Objects along with its
6076         pragma Export. Add variables Library_Exception and
6077         Library_Exception_Set along with their pragma Export.
6078         (Null_Finalize_Global_List): Removed.
6079         (Save_Library_Occurrence): New routine.
6080         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6081         rather than Finalize_Global_List.
6082         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6083         of the constructed node.
6084
6085 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6086
6087         * link.c: Include "auto-host.h" before system headers.
6088
6089 2011-08-03  Vincent Celier  <celier@adacore.com>
6090
6091         * make.adb (Gnatmake): Add to table Library_Projs only library projects
6092         that are not extended. Do not check if a library project that is
6093         extended should be regenerated. Do not add to table Library_Paths the
6094         libraries that are in extended projects. Link only with libraries that
6095         are in libray projects that are not extended.
6096         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6097         for a library project that is extended.
6098
6099 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
6100
6101         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6102         conforming subprogram renamings that appear to be completions if they
6103         are not fully conformant.
6104         Such renamings are homographs but not completions.
6105         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6106         names in a subprogram renaming that appears in an instance.
6107
6108 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6109
6110         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6111         not immutably limited, build actual subtype from expression to provide
6112         proper bounds to caller.
6113
6114 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
6115
6116         * sem_ch8.adb: Minor comment correction.
6117
6118 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6119
6120         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6121         returning a limited array, use an extended return statement.
6122
6123 2011-08-03  Vincent Celier  <celier@adacore.com>
6124
6125         * make.adb (Initialize): If --subdirs= is used, but no project file is
6126         specified, attempt to create the specify subdir if it does not already
6127         exist and use it as the object directory as if -D had been specified.
6128
6129 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
6130
6131         * s-tpopsp-vms.adb: New file.
6132         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6133         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6134
6135 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6136
6137         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6138         package.
6139
6140 2011-08-03  Yannick Moy  <moy@adacore.com>
6141
6142         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6143         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6144         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6145         detect that an array has static bounds.
6146
6147 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6148
6149         * exp_dist.adb: Minor reformatting.
6150
6151 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
6152
6153         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6154         (ATCB_Key): Removed, not always used.
6155
6156 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6157
6158         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6159         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6160         most remaining global variables.
6161
6162 2011-08-03  Robert Dewar  <dewar@adacore.com>
6163
6164         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6165         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6166         reformatting.
6167
6168 2011-08-03  Javier Miranda  <miranda@adacore.com>
6169
6170         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6171         that must be passed by copy in VM targets.
6172
6173 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6174
6175         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6176         duplicates a similar htable now in the project tree.
6177
6178 2011-08-03  Claire Dross  <dross@adacore.com>
6179
6180         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6181         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6182         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6183         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6184         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6185         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6186         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6187         update.
6188
6189 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
6190
6191         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6192         (ATCB_Key): Removed, not always used.
6193         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6194         s-taprop-posix.adb.
6195         * s-tpopsp-tls.adb: New file.
6196         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6197         x86/x64/ia64/powerpc/sparc Linux.
6198
6199 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
6200
6201         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6202         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6203
6204 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6205
6206         * rtsfind.ads, exp_dist.adb, exp_dist.ads
6207         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6208         Fix type selection for mapping integer types to PolyORB types.
6209
6210 2011-08-03  Bob Duff  <duff@adacore.com>
6211
6212         * sem_ch7.adb: Minor comment clarification.
6213
6214 2011-08-03  Bob Duff  <duff@adacore.com>
6215
6216         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6217         an error analyzing a choice, skip further processing. Further
6218         processing could cause a crash or cascade errors.
6219
6220 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6221
6222         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
6223         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
6224         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
6225         prj-env.ads (Shared_Project_Tree_Data): new type
6226         An aggregate project and its aggregated trees need to share the common
6227         data structures used for lists of strings, packages,... This makes the
6228         code simpler since otherwise we have to pass the root tree (also used
6229         for the configuration file data) in addition to the current project
6230         tree. This also avoids ambiguities as to which tree should be used.
6231         And finally this saves a bit of memory.
6232         (For_Every_Project_Imported): new parameter Tree.
6233         Since aggregated projects are using a different tree, we need to let
6234         the caller know which tree to use to manipulate the returned project.
6235
6236 2011-08-03  Robert Dewar  <dewar@adacore.com>
6237
6238         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
6239         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
6240         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
6241         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
6242
6243 2011-08-03  Javier Miranda  <miranda@adacore.com>
6244
6245         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
6246         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
6247
6248 2011-08-03  Bob Duff  <duff@adacore.com>
6249
6250         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
6251         the Base_Type.
6252
6253 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
6254
6255         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
6256         g-sehash.ads: Fix typo. Update header.
6257
6258 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6259
6260         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
6261         expansion.
6262
6263 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
6264
6265         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
6266         prefixes of private types along with records, since the selector may be
6267         a discriminant.
6268         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
6269         private types along with records, since the selector may be a
6270         discriminant.
6271
6272 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6273
6274         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
6275
6276 2011-08-03  Javier Miranda  <miranda@adacore.com>
6277
6278         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
6279         Tagged_Type_Expansion.
6280
6281 2011-08-03  Yannick Moy  <moy@adacore.com>
6282
6283         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
6284         violation when the argument of concatenation is the name of a
6285         constant.
6286
6287 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6288
6289         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
6290         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
6291         (Process_Declarative_Items): new parameter Child_Env.
6292
6293 2011-08-03  Yannick Moy  <moy@adacore.com>
6294
6295         * alfa.ads: Update format of ALFA section in ALI file in order to
6296         add a mapping from bodies to specs when both are present.
6297         (ALFA_Scope_Record): Add components for spec file/scope.
6298         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
6299         present.
6300         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
6301         collected, fill in the spec information when relevant.
6302         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
6303         present.
6304
6305 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
6306
6307         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
6308         code unit to decide whether to add internally generated subprograms.
6309
6310 2011-08-03  Javier Miranda  <miranda@adacore.com>
6311
6312         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
6313         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
6314         be handled by copy in VM targets.
6315
6316 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6317
6318         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
6319         code with Makeutl.Get_Switches.
6320         * prj-tree.adb: Update comment.
6321
6322 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6323
6324         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
6325         subprogram with a limited formal that does not support external
6326         streaming.
6327
6328 2011-08-03  Yannick Moy  <moy@adacore.com>
6329
6330         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
6331         continuation line
6332         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
6333         not from current unit in two phases, because it is not possible to
6334         change the table while iterating over its content.
6335         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
6336
6337 2011-08-03  Sergey Rybin  <rybin@adacore.com>
6338
6339         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
6340         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
6341
6342 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6343
6344         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
6345         and the component type is composite, this is ambiguous for predefined
6346         concatenation, but if the node is not overloaded and the entity is a use
6347         -defined function its profile can be used to resolve that aggregate.
6348
6349 2011-08-03  Robert Dewar  <dewar@adacore.com>
6350
6351         * exp_ch4.adb: Minor code cleanup.
6352
6353 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6354
6355         * exp_dist.adb: Do not generate distribution stubs if serious errors
6356         have been diagnosed.
6357
6358 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6359
6360         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
6361         the first formal of a primitive operation, go to the base type to
6362         handle properly an access to a derived type with constrained
6363         discriminants.
6364         * sem_type.adb (Disambiguate): an immediately visible operator hides a
6365         user-defined function that is only use-visible.
6366
6367 2011-08-03  Robert Dewar  <dewar@adacore.com>
6368
6369         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
6370         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
6371         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
6372         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
6373         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
6374         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
6375         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
6376         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
6377
6378 2011-08-03  Robert Dewar  <dewar@adacore.com>
6379
6380         * repinfo.adb (List_Mechanism): Add handling of
6381         Convention_Ada_Pass_By_XXX.
6382         * sem_mech.adb (Set_Mechanism): Ditto.
6383         * sem_prag.adb (Process_Convention): Add entries for
6384         Convention_Ada_Pass_By_XXX.
6385         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
6386
6387 2011-08-03  Pascal Obry  <obry@adacore.com>
6388
6389         * makeutl.adb: Minor reformatting.
6390
6391 2011-08-03  Vincent Celier  <celier@adacore.com>
6392
6393         * fname-uf.adb
6394         (Get_File_Name) If the file cannot be found when there are no config
6395         pragmas file and May_Fail is True, return No_File instead of the file
6396         name, to be consistent.
6397
6398 2011-08-03  Pascal Obry  <obry@adacore.com>
6399
6400         * adaint.c (__gnat_is_executable_file_attr): Avoid access
6401         to null pointer.
6402
6403 2011-08-03  Javier Miranda  <miranda@adacore.com>
6404
6405         * sem_ch13.adb
6406         (Same_Representation): In VM targets the representation of arrays with
6407         aliased components differs from arrays with non-aliased components.
6408
6409 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6410
6411         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
6412         not systematically lower case attribute indexes that contain no "."
6413         Fix definition of several Naming attributes, which take
6414         a unit name as index and therefore should be case insensitive.
6415         Minor refactoring (reduce length of variable names).
6416
6417 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6418
6419         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
6420
6421 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6422
6423         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
6424         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
6425         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
6426         prj-tree.ads (Prj.Tree.Environment): new type.
6427
6428 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6429
6430         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
6431         prj-tree.adb, prj-tree.ads (Environment): new type.
6432
6433 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6434
6435         * prj-tree.ads: Remove unused variable.
6436
6437 2011-08-03  Yannick Moy  <moy@adacore.com>
6438
6439         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
6440         issuing messages related to SPARK restriction violation.
6441
6442 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6443
6444         * sem_ch6.adb: guard against error nodes in return statements.
6445
6446 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
6447
6448         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
6449         a warning can only appear on a configuration file, so emit warning
6450         without further checks.
6451
6452 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
6453
6454         * s-interr.ads: add overriding keyword.
6455
6456 2011-08-03  Geert Bosch  <bosch@adacore.com>
6457
6458         * exp_attr.adb: Fix minor typo.
6459
6460 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6461
6462         * par-ch4.adb: improve error recovery.
6463
6464 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6465
6466         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
6467         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
6468         to Errout_Handling.
6469
6470 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6471
6472         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
6473         "external" as an attribute name in aggregate projects.
6474
6475 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
6476
6477         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
6478         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
6479         from 0, so we need to adjust.
6480
6481 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6482
6483         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
6484         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
6485
6486 2011-08-03  Yannick Moy  <moy@adacore.com>
6487
6488         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
6489         restriction on overloaded entity if the entity is not an operator.
6490
6491 2011-08-03  Yannick Moy  <moy@adacore.com>
6492
6493         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
6494         restrict.ads: Rename remaining Check_Formal_Restriction* into
6495         Check_SPARK_Restriction*.
6496
6497 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6498
6499         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
6500         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
6501         qualifier.
6502         (Project_Empty): removed
6503         (Empty_Project): new parameter Qualifier
6504         This is used to have fields specific to aggregate projects, cleaner
6505         New field to store the list of aggregated projects.
6506         (Check_Aggregate_Project): removed
6507         (Process_Aggregated_Projects, Free): new subprograms.
6508
6509 2011-08-03  Olivier Hainque  <hainque@adacore.com>
6510
6511         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
6512
6513 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6514
6515         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
6516         explicit dereference of an unconstrained type, create a constrained
6517         subtype for it, as is done for function calls that return an
6518         unconstrained type.
6519
6520 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6521
6522         * g-pehage.adb (Finalize): Avoid possible double-free.
6523
6524 2011-08-03  Steve Baird  <baird@adacore.com>
6525
6526         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
6527         Elab_Spec/Body attrs in CodePeer_Mode.
6528
6529 2011-08-03  Javier Miranda  <miranda@adacore.com>
6530
6531         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
6532         low bound is not known at compile time but they have no others choice.
6533         Done because in this case the bounds can be obtained directly from the
6534         aggregate.
6535
6536 2011-08-03  Ed Falis  <falis@adacore.com>
6537
6538         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
6539         on VxWorks SMP. Remove unusable constant ANY_CPU.
6540
6541 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6542
6543         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
6544         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
6545         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
6546         Prj.Env.Initialize_Empty): new subprograms
6547         (Get_Env, Find_Project): remove parameter Target_Name.
6548
6549 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
6550
6551         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
6552         as a condition for the delayed call to Derived_Subprograms done for the
6553         case of the rewriting of a derived type that constrains the
6554         discriminants of its parent type.
6555         Avoids redundant subprogram derivations for private subtype derivations.
6556
6557 2011-08-03  Javier Miranda  <miranda@adacore.com>
6558
6559         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
6560         Build_Record_Aggr_Code.
6561         (Build_Record_Aggr_Code): Add missing support to initialize hidden
6562         discriminants in extension aggregates.
6563
6564 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6565
6566         * prj-pp.adb (Print): also output project qualifiers, since in
6567         particular "aggregate" is mandatory in an aggregate project.
6568
6569 2011-08-03  Emmanuel Briot  <briot@adacore.com>
6570
6571         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
6572         (Debug_Output): new function.
6573
6574 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
6575
6576         * gnat_ugn.texi: Document -Wstack-usage.
6577         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
6578
6579 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6580
6581         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
6582         have keyword LIMITED.
6583
6584 2011-08-03  Yannick Moy  <moy@adacore.com>
6585
6586         * alfa.adb, alfa.ads, alfa_test.adb: New files.
6587         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
6588         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
6589         section (does not happen in compiler, only if code directly calls
6590         Scan_ALI).
6591         * get_alfa.adb, get_alfa.ads: New files.
6592         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
6593         needed.
6594         * lib-xref-alfa.adb: New file.
6595         * lib-xref.adb, lib-xref.ads
6596         (Xref_Entry): redefine information needed in cross-references for ALFA.
6597         Push ALFA treatments in separated local package.
6598         (Enclosing_Subpragram_Or_Package): treat specially subprogram
6599         identifiers. Return entity of package body instead of spec. Return
6600         Empty for a scope with no location.
6601         (Generate_Reference): adapt to new components for ALFA information.
6602         Remove the need for D references on definitions.
6603         (Is_Local_Reference): moved to ALFA local package
6604         (Output_References): extract subfunction as Extract_Source_Name
6605         (Output_Local_References): remove procedure, replaced by filtering of
6606         cross-references in package ALFA and printing in Put_ALFA.
6607         (Write_Entity_Name): remove procedure
6608         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
6609         print exact name of entity as it appears in source file
6610         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
6611         * put_alfa.adb, put_alfa.ads: New files.
6612         * xref_lib.adb (Search_Xref): protect read of cross-references against
6613         reading other sections of the ALI file, in gnatxref
6614         (Search): protect read of cross-references against reading other
6615         sections of the ALI file, in gnatfind.
6616         * gcc-interface/Make-lang.in: Update dependencies.
6617
6618 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6619
6620         * sem_ch3.adb: Minor reformatting.
6621
6622 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
6623
6624         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
6625         raising an exception.
6626
6627 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6628
6629         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
6630         type, always use 1 as the lower bound or string, even if lower bound of
6631         context is not static, to handle properly null strings in a non-static
6632         context.
6633
6634 2011-08-03  Bob Duff  <duff@adacore.com>
6635
6636         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
6637         always legal on the right-hand side of an assignment statement; there
6638         is always an applicable index constraint in this case. Therefore, the
6639         check for Pkind = N_Assignment_Statement is now unconditional -- it
6640         doesn't depend on whether Is_Constrained (Typ).
6641
6642 2011-08-03  Robert Dewar  <dewar@adacore.com>
6643
6644         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
6645
6646 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6647
6648         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
6649         for an itype created within a generic unit.
6650
6651 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
6652
6653         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
6654         suppresses all inlining.
6655
6656 2011-08-03  Robert Dewar  <dewar@adacore.com>
6657
6658         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
6659         exp_aggr.adb: Minor reformatting.
6660
6661 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6662
6663         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
6664         tagged assignment when discriminant checks are suppressed. This is
6665         useless and extremely costly in terms of static stack usage.
6666
6667 2011-08-03  Bob Duff  <duff@adacore.com>
6668
6669         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
6670         of generics, because this leads to the wrong entity in the wrong scope,
6671         causing (e.g.) pragma Export_Procedure to get an error if the entity is
6672         an instance.
6673         (Process_Interface_Name): Follow Alias for instances of generics, to
6674         correct for the above change.
6675
6676 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6677
6678         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
6679         is an integer literal it is always safe to replace the reference. In
6680         addition, if the reference appears in the generated code for an object
6681         declaration it is necessary to copy because otherwise the reference
6682         might be to the uninitilized value of the discriminant of the object
6683         itself.
6684
6685 2011-08-03  Pascal Obry  <obry@adacore.com>
6686
6687         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
6688         ACL used, in this case we want to check for ending .exe, not .exe
6689         anywhere in the path.
6690
6691 2011-08-03  Sergey Rybin  <rybin@adacore.com>
6692
6693         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6694         the tree structure (semantic decoration of references to record
6695         discriminants).
6696
6697 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
6698
6699         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
6700         choices of a named array aggregate, bail out when any choices are
6701         marked as Errors_Posted.
6702
6703 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6704
6705         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
6706         in which entity is frozen, to handle properly loop variables in
6707         iterators.
6708
6709 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6710
6711         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
6712         subtype is not static, compute the upper bound using attributes, to
6713         handle properly index types that are not integer types.
6714
6715 2011-08-03  Bob Duff  <duff@adacore.com>
6716
6717         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
6718         Update copyright notice.
6719
6720 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6721
6722         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
6723         Original_Discriminant if within an instance.
6724         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
6725
6726 2011-08-03  Thomas Quinot  <quinot@adacore.com>
6727
6728         * einfo.ads: Minor reformatting.
6729
6730 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6731
6732         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
6733         composite type with an unfrozen subcomponent, in the profile of a
6734         primitive operation.
6735
6736 2011-08-03  Robert Dewar  <dewar@adacore.com>
6737
6738         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
6739
6740 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6741
6742         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
6743         unconstrained type with discriminants is initialized with an aggregate,
6744         use the constrained subtype of the aggregate as the type of the object,
6745         because it is immutable, and this allows the back-end to generate no
6746         code for the object declaration.
6747
6748 2011-08-03  Robert Dewar  <dewar@adacore.com>
6749
6750         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
6751         comparison operand is variable, and turns out to be zero or negative.
6752
6753 2011-08-03  Javier Miranda  <miranda@adacore.com>
6754
6755         * exp_intr.adb
6756         (Expand_Dispatching_Constructor_Call): Disable expansion of
6757         code required for native targets. Done to avoid generating
6758         references to unavailable runtime entities in VM targets.
6759         * exp_ch3.adb
6760         (Expand_N_Object_Declaration): Add missing support to handle
6761         the explicit initialization of class-wide interface objects.
6762         Fix documentation.
6763
6764 2011-08-03  Matthew Heaney  <heaney@adacore.com>
6765
6766         * a-cobove.adb (Merge): Move source onto target, instead of using Assign
6767
6768 2011-08-03  Matthew Heaney  <heaney@adacore.com>
6769
6770         * a-cbdlli.adb (Splice): move source items from first to last
6771
6772 2011-08-03  Yannick Moy  <moy@adacore.com>
6773
6774         * sem_util.ads: comment added.
6775
6776 2011-08-03  Javier Miranda  <miranda@adacore.com>
6777
6778         * exp_aggr.adb
6779         (Expand_Record_Aggregate): In VM targets disable the expansion into
6780         assignments of aggregates whose type is not known at compile time.
6781
6782 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
6783
6784         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
6785         protected entries and task entries, to build the proper renaming
6786         declaration for entry formals, used in debugging.
6787         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
6788         parameters in the same way.
6789
6790 2011-08-02  Robert Dewar  <dewar@adacore.com>
6791
6792         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
6793         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
6794         code reorganization.
6795
6796 2011-08-02  Robert Dewar  <dewar@adacore.com>
6797
6798         * debug.adb: Debug flag d.P to suppress length comparison optimization
6799         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
6800         comparison of Length by comparing First/Last instead.
6801
6802 2011-08-02  Matthew Heaney  <heaney@adacore.com>
6803
6804         * a-cobove.ads: Code clean up.
6805
6806 2011-08-02  Vincent Celier  <celier@adacore.com>
6807
6808         * adaint.c (file_names_case_sensitive_cache): New static int.
6809         (__gnat_get_file_names_case_sensitive): Cache the return value in
6810         file_names_case_sensitive_cache at the first invocation, to avoid
6811         multiple calls to getenv.
6812
6813 2011-08-02  Bob Duff  <duff@adacore.com>
6814
6815         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
6816
6817 2011-08-02  Yannick Moy  <moy@adacore.com>
6818
6819         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
6820         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
6821         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
6822         indicate that we are in a precondition or postcondition. This is used in
6823         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
6824         decide whether to flag the spec or body of the current subprogram as
6825         not in ALFA.
6826
6827 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
6828
6829         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6830         list.
6831         * a-extiin.ads: New file.
6832
6833 2011-08-02  Bob Duff  <duff@adacore.com>
6834
6835         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6836         now raises Name_Error instead of Use_Error in certain cases. The other
6837         parts of this AI were already implemented properly.
6838
6839 2011-08-02  Vincent Celier  <celier@adacore.com>
6840
6841         * link.c: Only import "auto-host.h" when building the gnattools.
6842
6843 2011-08-02  Yannick Moy  <moy@adacore.com>
6844
6845         * sem_util.adb: Inter-unit inlining does not work for a subprogram
6846         which calls a local subprogram, so extract subprogram
6847         from Mark_Non_ALFA_Subprogram_Body.
6848
6849 2011-08-02  Javier Miranda  <miranda@adacore.com>
6850
6851         * exp_ch9.adb
6852         (Extract_Dispatching_Call): If the type of the dispatching object is an
6853         access type then return an explicit dereference in the Object out-mode
6854         parameter.
6855
6856 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
6857
6858         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6859         compatibility checks for all indexes of an array subtype, not just the
6860         first. Reset Has_Dynamic_Range_Check on the subtype before each
6861         potential check to ensure that Insert_Range_Checks will not elide any
6862         of the dynamic checks.
6863
6864 2011-08-02  Yannick Moy  <moy@adacore.com>
6865
6866         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6867         SPARK restriction at parsing time.
6868         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6869         directive only if the SPARK restriction is set for this unit.
6870
6871 2011-08-02  Yannick Moy  <moy@adacore.com>
6872
6873         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6874         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6875         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6876         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6877         Mark_Non_ALFA_Subprogram_Body.
6878         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6879         inlined.
6880
6881 2011-08-02  Yannick Moy  <moy@adacore.com>
6882
6883         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6884         might be costly.
6885
6886 2011-08-02  Robert Dewar  <dewar@adacore.com>
6887
6888         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6889         exp_ch3.adb: Minor reformatting.
6890
6891 2011-08-02  Emmanuel Briot  <briot@adacore.com>
6892
6893         * adaint.c (__gnat_locate_exec_on_path): only returns executable
6894         files, not any regular file.
6895         (__gnat_locate_file_with_predicate): new subprogram.
6896
6897 2011-08-02  Yannick Moy  <moy@adacore.com>
6898
6899         * sinfo.adb, sinfo.ads: Restrict the use of flags
6900         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6901         nodes, plus N_Subtype_Declaration for the 2nd one.
6902
6903 2011-08-02  Sergey Rybin  <rybin@adacore.com>
6904
6905         * gnat_rm.texi: Ramification of pragma Eliminate documentation
6906          - fix bugs in the description of Source_Trace;
6907          - get rid of UNIT_NAME;
6908
6909 2011-08-02  Javier Miranda  <miranda@adacore.com>
6910
6911         * exp_ch9.adb
6912         (Build_Dispatching_Requeue): Adding support for VM targets
6913         since we cannot directly reference the Tag entity.
6914         * exp_sel.adb (Build_K): Adding support for VM targets.
6915         (Build_S_Assignment): Adding support for VM targets.
6916         * exp_disp.adb
6917         (Default_Prim_Op_Position): In VM targets do not restrict availability
6918         of predefined interface primitives to compiling in Ada 2005 mode.
6919         (Is_Predefined_Interface_Primitive): In VM targets this service is not
6920         restricted to compiling in Ada 2005 mode.
6921         (Make_VM_TSD): Generate code that declares and initializes the OSD
6922         record. Needed to support dispatching calls through synchronized
6923         interfaces.
6924         * exp_ch3.adb
6925         (Make_Predefined_Primitive_Specs): Enable generation of predefined
6926         primitives associated with synchronized interfaces.
6927         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6928         primitives associated with synchronized interfaces.
6929
6930 2011-08-02  Yannick Moy  <moy@adacore.com>
6931
6932         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6933         statements hidden in SPARK if preceded by the HIDE directive
6934         (Parse_Exception_Handlers): mark each exception handler in a sequence of
6935         exception handlers as hidden in SPARK if preceded by the HIDE directive
6936         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6937         if starting with the HIDE directive
6938         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6939         starting with the HIDE directive; mark the declarations in a private
6940         part as hidden in SPARK if the private part starts with the HIDE
6941         directive
6942         * restrict.adb, restrict.ads
6943         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6944         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6945         argument node belongs to a part which is hidden in SPARK
6946         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6947         parts in SPARK; protect the possibly costly call to
6948         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6949         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6950         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6951         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6952         Tok_SPARK_Hide.
6953         (Scan): recognize special comment starting with '#' and followed by
6954         SPARK keyword "hide" as a HIDE directive.
6955
6956 2011-08-02  Yannick Moy  <moy@adacore.com>
6957
6958         * types.ads, erroutc.ads: Minor reformatting.
6959
6960 2011-08-02  Vincent Celier  <celier@adacore.com>
6961
6962         * link.c: Add response file support for cross platforms.
6963
6964 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
6965
6966         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6967         in an association, set parent field of copy before partial analysis.
6968         * sem_res.adb (Resolve_Slice): create reference to itype only when
6969         expansion is enabled.
6970
6971 2011-08-02  Yannick Moy  <moy@adacore.com>
6972
6973         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6974         for new flag denoting which subprogram bodies are in ALFA
6975         * restrict.adb, sem_ch7.adb: Update comment
6976         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6977         sem_ch9.adb, sem_res.adb: Add calls to
6978         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6979         * sem_ch6.adb (Analyze_Function_Return): add calls to
6980         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6981         middle of the body, and extended return.
6982         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6983         False when missing return.
6984         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6985         to True for subprograms whose spec is in ALFA. Remove later on the flag
6986         on the entity used for a subprogram body when there exists a separate
6987         declaration.
6988         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6989         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6990         False, otherwise do nothing.
6991
6992 2011-08-02  Robert Dewar  <dewar@adacore.com>
6993
6994         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6995
6996 2011-08-02  Yannick Moy  <moy@adacore.com>
6997
6998         * sem_ch4.ads: minor formatting.
6999
7000 2011-08-02  Yannick Moy  <moy@adacore.com>
7001
7002         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7003         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7004         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7005         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7006         opt.ads: cleanup of SPARK mode
7007
7008 2011-08-02  Yannick Moy  <moy@adacore.com>
7009
7010         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7011         types.
7012         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7013         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7014         * sem_ch3.adb
7015         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7016         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7017         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7018         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7019         types.
7020         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7021         non-static range.
7022         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7023         functions whose return type is not in ALFA.
7024         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7025         specifications.
7026         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7027         parameter's type is not in ALFA.
7028         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7029         types are in ALFA.
7030
7031 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7032
7033         * sem_ch6 (Analyze_Expression_Function): treat the function as
7034         Inline_Always, and introduce a subprogram declaration for it when it is
7035         not a completion.
7036         * inline.adb (Add_Inlined_Body): recognize bodies that come from
7037         expression functions, so that the back-end can determine whether they
7038         can in fact be inlined.
7039         * sem_util.adb (Is_Expression_Function): predicate to determine whether
7040         a function body comes from an expression function.
7041
7042 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
7043
7044         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7045         null exclusions to test Can_Never_Be_Null on the anonymous access types
7046         of the formals rather than testing the formals themselves. Exclude this
7047         check in cases where the Old_Formal is marked as a controlling formal,
7048         to avoid issuing spurious errors for bodies completing dispatching
7049         operations (due to the flag not getting set on controlling access
7050         formals in body specs).
7051         (Find_Corresponding_Spec): When checking full and subtype conformance of
7052         subprogram bodies in instances, pass Designated and E in that order, for
7053         consistency with the expected order of the formals (New_Id followed by
7054         Old_Id).
7055
7056 2011-08-02  Robert Dewar  <dewar@adacore.com>
7057
7058         * sem_ch8.adb: Minor reformatting.
7059
7060 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7061
7062         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7063         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7064         primitive operations of class-wide actuals.
7065
7066 2011-08-02  Javier Miranda  <miranda@adacore.com>
7067
7068         * exp_atag.ads, exp_atag.adb
7069         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7070         since its value is implicitly passed in argument Typ.
7071         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7072         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7073         Build_Common_Dispatching_Select_Statements.
7074
7075 2011-08-02  Robert Dewar  <dewar@adacore.com>
7076
7077         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7078         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7079         Minor reformatting.
7080
7081 2011-08-02  Robert Dewar  <dewar@adacore.com>
7082
7083         * sem_res.adb: Minor reformatting.
7084         * sem_prag.adb: Minor reformatting.
7085
7086 2011-08-02  Javier Miranda  <miranda@adacore.com>
7087
7088         * exp_atag.adb, exp_atags.ads
7089         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7090         by the tagged type Entity. Required to use this routine in the VM
7091         targets since we do not have available the Tag entity in the VM
7092         platforms.
7093         * exp_ch6.adb
7094         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7095         Ada.Tags has not been previously loaded.
7096         * exp_ch7.adb
7097         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7098         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7099         * sem_aux.adb
7100         (Enclosing_Dynamic_Scope): Add missing support to handle the full
7101         view of enclosing scopes. Required to handle enclosing scopes that
7102         are synchronized types whose full view is a task type.
7103         * exp_disp.adb
7104         (Build_VM_TSDs): Minor code improvement to avoid generating and
7105         analyzing lists with empty nodes.
7106         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7107         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7108         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7109         (Make_Disp_Timed_Select_Body): Add support for VM targets.
7110         (Make_Select_Specific_Data_Table): Add support for VM targets.
7111         (Make_VM_TSD): Generate code to initialize the SSD structure of
7112         the TSD.
7113
7114 2011-08-02  Yannick Moy  <moy@adacore.com>
7115
7116         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7117         cross-references section in ALI.
7118         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7119         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7120         Sub).
7121         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7122         subprogram or package entity of a node
7123         (Is_Local_Reference_Type): new function returns True for references
7124         selected in local cross-references.
7125         (Lt): function extracted from Lt in Output_References
7126         (Write_Entity_Name): function extracted from Output_References
7127         (Generate_Definition): generate reference with type 'D' for definition
7128         of objects (object declaration and parameter specification), with
7129         appropriate locations and units, for use in local cross-references.
7130         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7131         references of type 'I' for initialization in object definition.
7132         (Output_References): move part of function Lt and procedure
7133         Write_Entity_Name outside of the body. Ignore references of types 'D'
7134         and 'I' introduced for local cross-references.
7135         (Output_Local_References): new procedure to output the local
7136         cross-references sections.
7137         (Lref_Entity_Status): new array defining whether an entity is a local
7138         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7139         with 'I' type when initialization expression is present.
7140         * get_scos.adb, get_scos.ads: Correct comments and typos
7141
7142 2011-08-02  Javier Miranda  <miranda@adacore.com>
7143
7144         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7145         the JVM target.
7146         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7147         the JVM target.
7148         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7149         TSD support.
7150
7151 2011-08-02  Vincent Celier  <celier@adacore.com>
7152
7153         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7154         (No_Space_Img): New function
7155         (Find_Excluded_Sources): When reading from a file, record the file name
7156         and the line number for each excluded source.
7157         (Mark_Excluded_Sources): When reporting an error, if the excluded
7158         sources were read from a file, include file name and line number in
7159         the error message.
7160
7161 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7162
7163         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7164
7165 2011-08-02  Robert Dewar  <dewar@adacore.com>
7166
7167         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7168
7169 2011-08-02  Javier Miranda  <miranda@adacore.com>
7170
7171         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7172         generation of TSDs to the DOTNET compiler.
7173         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7174         generation of TSDs to the DOTNET compiler.
7175
7176 2011-08-02  Javier Miranda  <miranda@adacore.com>
7177
7178         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7179         record of all the tagged types declared inside library level package
7180         declarations, library level package bodies or library level subprograms.
7181         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7182         associated with a given tagged type.
7183         (Build_VM_TSDs): New subprogram.
7184         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7185         compilation units that are subprograms.
7186         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7187         compilation units that are package bodies.
7188         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7189         units that are a package declaration or a package instantiation.
7190         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7191         reorganization to improve the error generated by the frontend when the
7192         function Ada.Tags.Secondary_Tag is not available.
7193         * rtsfind.ads (RE_Register_TSD): New runtime entity.
7194         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7195
7196 2011-08-02  Javier Miranda  <miranda@adacore.com>
7197
7198         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7199
7200 2011-08-02  Robert Dewar  <dewar@adacore.com>
7201
7202         * s-imenne.ads: Minor reformatting.
7203
7204 2011-08-02  Robert Dewar  <dewar@adacore.com>
7205
7206         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7207         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7208         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7209
7210 2011-08-02  Robert Dewar  <dewar@adacore.com>
7211
7212         * einfo.ads (Materialize_Entity): Document this is only for renamings
7213         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7214         required debug information in the case where we transform the object
7215         declaration into a renaming declaration.
7216         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7217         object
7218         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7219         Materialize_Entity.
7220
7221 2011-08-02  Robert Dewar  <dewar@adacore.com>
7222
7223         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7224         Suppress_Init_Procs.
7225         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7226         Suppress_Initialization/Initialization_Suppressed.
7227         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7228         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7229         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7230         * sem_prag.adb: New processing for pragma Suppress_Initialization.
7231
7232 2011-08-02  Robert Dewar  <dewar@adacore.com>
7233
7234         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7235         Minor reformatting.
7236
7237 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7238
7239         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7240         only have inheritable classwide pre/postconditions.
7241
7242 2011-08-02  Javier Miranda  <miranda@adacore.com>
7243
7244         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7245         * rtsfind.ads (RE_Check_TSD): New runtime entity.
7246         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7247         checks if the external tag of a type is the same as the external tag
7248         of some other declaration.
7249
7250 2011-08-02  Thomas Quinot  <quinot@adacore.com>
7251
7252         * s-taskin.ads: Minor reformatting.
7253
7254 2011-08-02  Emmanuel Briot  <briot@adacore.com>
7255
7256         * g-comlin.adb (Display_Help): swap the order in which it prints the
7257         short help and the general usage.
7258
7259 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7260
7261         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7262         the aspect declarations and attach them to the generic copy for
7263         subsequent analysis.
7264         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7265         declarations of the generic tree to the new subprogram declarations.
7266         * sem_attr.adb (Check_Precondition_Postcondition): recognize
7267         conditions that apply to a subprogram instance.
7268
7269 2011-08-02  Robert Dewar  <dewar@adacore.com>
7270
7271         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7272
7273 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7274
7275         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7276         private type with a tagged full view is not derived in the immediate
7277         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7278
7279 2011-08-02  Robert Dewar  <dewar@adacore.com>
7280
7281         * exp_ch4.adb: Minor reformatting.
7282
7283 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7284
7285         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
7286         Ada2012 iterator, the loop will be rewritten during expansion into a
7287         while loop with a cursor and an element declaration. Do not analyze the
7288         body in this case, because if the container is for indefinite types the
7289         actual subtype of the elements will only be determined when the cursor
7290         declaration is analyzed.
7291
7292 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7293
7294         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7295         size/alignment related attributes in CodePeer_Mode.
7296
7297 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
7298
7299         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7300         Prepend_Element, since this can result in the operation getting the
7301         wrong slot in the full type's dispatch table if the full type has
7302         inherited operations. The incomplete type's operation will get added
7303         to the proper position in the full type's primitives
7304         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7305         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7306         dispatching operations, since there are cases where nonprimitive
7307         subprograms can get added to the list of incomplete dependents (such
7308         as subprograms in nested packages).
7309         * sem_ch6.adb (Process_Formals): First, remove test for being in a
7310         private part when determining whether to add a primitive with a
7311         parameter of a tagged incomplete type to the Private_Dependents list.
7312         Such primitives can also occur in the visible part, and should not have
7313         been excluded from being private dependents.
7314         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7315         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7316         list of a Taft-amendment incomplete type is a primitive before issuing
7317         an error that the full type must appear in the same unit. There are
7318         cases where nonprimitives can be in the list (such as subprograms in
7319         nested packages).
7320         * sem_disp.adb (Derives_From): Use correct condition for checking that
7321         a formal's type is derived from the type of the corresponding formal in
7322         the parent subprogram (the condition was completely wrong). Add
7323         checking that was missing for controlling result types being derived
7324         from the result type of the parent operation.
7325
7326 2011-08-02  Yannick Moy  <moy@adacore.com>
7327
7328         * errout.adb (First_Node): minor renaming
7329         * restrict.adb (Check_Formal_Restriction): put restriction warning on
7330         first node.
7331
7332 2011-08-02  Yannick Moy  <moy@adacore.com>
7333
7334         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7335         before accessing operands.
7336         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7337         decide whether an initialization expression respects SPARK rules, as
7338         the plain node is the expanded one. This allows for more valid warnings
7339         to be issued.
7340         * gnat_rm.texi: Minor update.
7341
7342 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7343
7344         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7345         previous change.
7346
7347 2011-08-02  Robert Dewar  <dewar@adacore.com>
7348
7349         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7350
7351 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7352
7353         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7354         loop statements and the element renaming declaration with a block when
7355         the element type is controlled.
7356
7357 2011-08-02  Yannick Moy  <moy@adacore.com>
7358
7359         * sinfo.ads: Minor formatting.
7360
7361 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7362
7363         * sem_aggr.adb (Add_Association): if the association has a box and no
7364         expression, use the Sloc of the aggregate itself for the new
7365         association.
7366         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7367         the Original_Node.
7368
7369 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7370
7371         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7372         When a container is provided via a function call, generate a renaming
7373         of the function result. This avoids the creation of a transient scope
7374         and the premature finalization of the container.
7375         * exp_ch7.adb (Is_Container_Cursor): Removed.
7376         (Wrap_Transient_Declaration): Remove the supression of the finalization
7377         of the list controller when the declaration denotes a container cursor,
7378         it is not needed.
7379
7380 2011-08-02  Yannick Moy  <moy@adacore.com>
7381
7382         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7383         node is from source, instead of the original node being from source.
7384         * sem_aggr.adb
7385         (Resolve_Array_Aggregate): refine the check for a static expression, to
7386         recognize also static ranges
7387         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7388         Array_Type_Declaration): postpone the test for the type being a subtype
7389         mark after the type has been resolved, so that component-selection and
7390         expanded-name are discriminated.
7391         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7392         to distinguish the case of an iteration scheme, so that an error is
7393         issed on a non-static range in SPARK except in an iteration scheme.
7394         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7395         In_Iter_Schm = True.
7396         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7397         user-defined operators so that they are allowed in renaming
7398         * sem_ch8.adb
7399         (Find_Selected_Component): refine the check for prefixing of operators
7400         so that they are allowed in renaming. Move the checks for restrictions
7401         on selector name after analysis discriminated between
7402         component-selection and expanded-name.
7403         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7404         concatenation argument of string type if it is static.
7405         * sem_util.adb, sem_util.ads
7406         (Check_Later_Vs_Basic_Declarations): add a new function
7407         Is_Later_Declarative_Item to decice which declarations are allowed as
7408         later items, in the two different modes Ada 83 and SPARK. In the SPARK
7409         mode, add that renamings are considered as later items.
7410         (Enclosing_Package): new function to return the enclosing package
7411         (Enter_Name): correct the rule for homonyms in SPARK
7412         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7413         from source (result of expansion) to avoid issuing wrong warnings.
7414
7415 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7416
7417         * errout.adb: On anything but an expression First_Node returns its
7418         argument.
7419
7420 2011-08-02  Pascal Obry  <obry@adacore.com>
7421
7422         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7423
7424 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
7425
7426         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7427         Set the associated loop as the related expression of internally
7428         generated cursors.
7429         * exp_ch7.adb (Is_Container_Cursor): New routine.
7430         (Wrap_Transient_Declaration): Supress the finalization of the list
7431         controller when the declaration denotes a container cursor.
7432
7433 2011-08-02  Yannick Moy  <moy@adacore.com>
7434
7435         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7436         command line now.
7437         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7438         expression is a simple expression. This check cannot be performed in
7439         the semantics, so just drop it.
7440         (P_Index_Or_Discriminant_Constraint): move check that the index or
7441         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7442         semantics. Other cases were previously checked in the semantics.
7443         * par-ch4.adb (P_Name): move checks that a selector name is not
7444         character literal or an operator symbol to Find_Selected_Component in
7445         the semantics
7446         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7447         declarations are not placed after later declarations in a separate
7448         procedure in Sem_Util (possibly not the best choice?), to be used both
7449         during parsing, for Ada 83 mode, and during semantic analysis, for
7450         SPARK mode.
7451         * par-endh.adb (Check_End): move check that end label is not missing
7452         to Process_End_Label in the semantics
7453         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7454         the special case for SPARK restriction
7455         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7456         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7457         parameter Force to issue the error message even on internal node (used
7458         for generated end label). Call Check_Restriction to check when an error
7459         must be issued. In SPARK mode, issue an error message even if the
7460         restriction is not set.
7461         (Check_Restriction): new procedure with an additional out parameter to
7462         inform the caller that a message has been issued
7463         * sem_aggr.adb: Minor modification of message
7464         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7465         instead of issuing an error message directly
7466         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7467         declarations are not placed after later declarations, by calling
7468         Check_Later_Vs_Basic_Declarations
7469         (Analyze_Subtype_Declaration): move here the check that an index or
7470         discriminant constraint must be a subtype mark. Change the check that
7471         a subtype of String must start at one so that it works on subtype marks.
7472         * sem_ch4.adb (Analyze_Call): move here the check that a named
7473         association cannot follow a positional one in a call
7474         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7475         instead of issuing an error message directly
7476         * sem_ch8.adb (Find_Selected_Component): move here the check that a
7477         selector name is not a character literal or an operator symbol. Move
7478         here the check that the prefix of an expanded name cannot be a
7479         subprogram or a loop statement.
7480         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7481         procedure called from parsing and semantics to check that basic
7482         declarations are not placed after later declarations
7483         (Process_End_Label): move here the check that end label is not missing
7484
7485 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7486
7487         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7488         representation clause in codepeer mode, since it confuses CodePeer and
7489         does not bring useful info.
7490
7491 2011-08-02  Ed Falis  <falis@adacore.com>
7492
7493         * init.c: initialize fp hw on MILS.
7494
7495 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7496
7497         * errout.adb (First_Node): for bodies, return the node itself (small
7498         optimization). For other nodes, do not check source_unit if the node
7499         comes from Standard.
7500
7501 2011-08-02  Robert Dewar  <dewar@adacore.com>
7502
7503         * exp_ch3.adb: Minor comment additions.
7504         * sem_ch13.adb: Minor reformatting.
7505
7506 2011-08-02  Pascal Obry  <obry@adacore.com>
7507
7508         * make.adb, makeutl.adb: Removes some superfluous directory separator.
7509
7510 2011-08-02  Robert Dewar  <dewar@adacore.com>
7511
7512         * sem_attr.adb: Minor reformatting.
7513
7514 2011-08-02  Robert Dewar  <dewar@adacore.com>
7515
7516         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7517         (Has_Default_Component_Value): Removed
7518         * einfo.ads Comment updates
7519         (Has_Default_Aspect): Replaces Has_Default_Value
7520         (Has_Default_Component_Value): Removed
7521         * exp_ch13.adb
7522         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7523         * exp_ch3.adb
7524         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7525         (Get_Simple_Init_Val): Handle Default_Value aspect
7526         (Needs_Simple_Initialization): Handle Default_Value aspect
7527         * exp_ch3.ads: Needs_Simple_Initialization
7528         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7529         * par-prag.adb (Pragma_Default[_Component]Value) Removed
7530         * sem_ch13.adb
7531         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7532         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7533         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7534
7535 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7536
7537         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7538         package containing iteration primitives.
7539         exp_ch5.adb (Expand_Iterator_Loop): ditto.
7540
7541 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7542
7543         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7544         "of", pre-analyze expression in case it is a function call with
7545         finalization actions that must be placed ahead of the loop.
7546         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7547         on an Ada2012 iterator, insert them ahead of the rewritten loop.
7548
7549 2011-08-02  Geert Bosch  <bosch@adacore.com>
7550
7551         * cstand.adb (Create_Float_Types): Only consider C's long double for
7552         Long_Long_Float, in addition to double.
7553
7554 2011-08-02  Robert Dewar  <dewar@adacore.com>
7555
7556         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7557         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7558         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7559         Minor reformatting.
7560
7561 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7562
7563         * sem_attr.adb: handle properly 'Result when it is a prefix of an
7564         indexed component.
7565
7566 2011-08-02  Javier Miranda  <miranda@adacore.com>
7567
7568         * einfo.ads, einfo.adb
7569         (Original_Access_Type): Move this attribute to Node26 since there was
7570         an undocumented use of Node21 in E_Access_Subprogram_Type entities
7571         which causes conflicts and breaks the generation of the .NET compiler.
7572         (Interface_Name): Add missing documentation on JGNAT only uses of
7573         this attribute.
7574
7575 2011-08-02  Geert Bosch  <bosch@adacore.com>
7576
7577         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7578         (Find_Back_End_Float_Type): Likewise
7579         (Create_Back_End_Float_Types): Likewise
7580         (Create_Float_Types): Likewise
7581         (Register_Float_Type): Likewise
7582         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7583         Nlist and split out type selection in new local Find_Base_Type function.
7584         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7585         Nlist
7586         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7587
7588 2011-08-02  Robert Dewar  <dewar@adacore.com>
7589
7590         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7591         alpha order).
7592         * opt.ads: Minor comment change.
7593         * sem_ch12.adb: Minor code reorganization.
7594
7595 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
7596
7597         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7598         subtype's list of rep items to the list on the full subtype in the case
7599         where the lists are the same.
7600
7601 2011-08-02  Geert Bosch  <bosch@adacore.com>
7602
7603         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7604         using the one from System.Strings, which also deallocates all strings.
7605
7606 2011-08-02  Geert Bosch  <bosch@adacore.com>
7607
7608         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7609         function.
7610         * gcc-interface/Make-lang.in: Update dependencies.
7611
7612 2011-08-02  Olivier Hainque  <hainque@adacore.com>
7613
7614         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7615         end_locus.
7616
7617 2011-08-02  Javier Miranda  <miranda@adacore.com>
7618
7619         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7620         associated with anonymous access to subprograms.
7621
7622 2011-08-02  Geert Bosch  <bosch@adacore.com>
7623
7624         * opt.ads
7625         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7626         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7627         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7628         (Add_Symbol_Definition): Move to switch-c.adb
7629         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7630         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7631         (Add_Symbol_Definition): Move to switch-c.adb.
7632         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7633         * sem_warn.adb
7634         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7635         Move to warnsw.adb.
7636         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7637         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7638         Move to warnsw.adb.
7639         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7640         (Add_Symbol_Definition): Moved from Prepcomp.
7641         * switch-c.ads: Update copyright notice. Use String_List instead of
7642         Argument_List, removing dependency on System.OS_Lib.
7643
7644 2011-08-02  Yannick Moy  <moy@adacore.com>
7645
7646         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7647         mode on initialization expression which does not respect SPARK
7648         restrictions.
7649         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7650         if the tree referenced by its argument represents an initialization
7651         expression in SPARK, suitable for initializing an object in an object
7652         declaration.
7653
7654 2011-08-02  Javier Miranda  <miranda@adacore.com>
7655
7656         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7657         internally generated access to subprogram with its associated protected
7658         subprogram type.
7659         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7660
7661 2011-08-02  Geert Bosch  <bosch@adacore.com>
7662
7663         * cstand.adb (Register_Float_Type): Print information about type to
7664         register, if the Debug_Flag_Dot_B is set.
7665         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7666         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7667         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7668         with a requested precision of more than Max_Digits digits and no more
7669         than Max_Base_Digits digits, if a range specification is present and the
7670         Predefined_Float_Types list has a suitable type to derive from.
7671         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7672         case of type completion with pragma Import
7673         * sem_prag.adb
7674         (Process_Import_Predefined_Type): Processing to complete a type
7675         with pragma Import. Currently supports floating point types only.
7676         (Set_Convention_From_Pragma): Do nothing without underlying type.
7677         (Process_Convention): Guard against absence of underlying type,
7678         which may happen when importing incomplete types.
7679         (Process_Import_Or_Interface): Handle case of importing predefined
7680         types. Tweak error message.
7681
7682 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7683
7684         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7685         functions to previous change.  Reorganize code slightly.
7686
7687 2011-08-02  Geert Bosch  <bosch@adacore.com>
7688
7689         * back_end.ads (Register_Type_Proc): New call back procedure type for
7690         allowing the back end to provide information about available types.
7691         (Register_Back_End_Types): New procedure to register back end types.
7692         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7693         available types.
7694         * cstand.adb (Back_End_Float_Types): New list for floating point types
7695         supported by the back end.
7696         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7697         (Copy_Float_Type): New procedure to make new copies of predefined types.
7698         (Register_Float_Type): New call back procedure to populate the BEFT list
7699         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7700         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7701         (Create_Float_Types): New procedure to create entities for floating
7702         point types predefined in Standard, and put these and any remaining
7703         BEFTs on the Predefined_Float_Types list.
7704         * stand.ads (Predefined_Float_Types): New list for predefined floating
7705         point types that do not have declarations in package Standard.
7706
7707 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7708
7709         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
7710         entity node for the unit containing the parameter.
7711         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7712         (Add_Inlined_Subprogram): Likewise.
7713         * gcc-interface/Make-lang.in: Update dependencies.
7714
7715 2011-08-02  Thomas Quinot  <quinot@adacore.com>
7716
7717         * s-stusta.adb (Print): Make sure Pos is always initialized to a
7718         suitable value.
7719
7720 2011-08-02  Geert Bosch  <bosch@adacore.com>
7721
7722         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7723
7724 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7725
7726         * sem_type.adb (Covers): Move trivial case to the top and reuse the
7727         computed value of Base_Type.
7728
7729 2011-08-02  Yannick Moy  <moy@adacore.com>
7730
7731         * restrict.adb (Check_Restriction): issue an error for any use of
7732         class-wide, even if the No_Dispatch restriction is not set.
7733         * sem_aggr.adb: Correct typos in comments and messages in formal mode
7734         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7735         when completing a private extension, the type named in the private part
7736         is not the same as that named in the visible part.
7737         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7738         of an inherited primitive operations of a tagged type or type extension
7739         that returns the tagged type.
7740         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7741         function which returns True for an implicit operation inherited by the
7742         derived type declaration for the argument type.
7743         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7744         order.
7745
7746 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7747
7748         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7749         Process_Bounds, to perform analysis with expansion of a range or an
7750         expression that is the iteration scheme for a loop.
7751         (Analyze_Iterator_Specification): If domain of iteration is given by a
7752         function call with a controlled result, as is the case if call returns
7753         a predefined container, ensure that finalization actions are properly
7754         generated.
7755         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7756
7757 2011-08-02  Javier Miranda  <miranda@adacore.com>
7758
7759         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7760         * gcc-interface/Make-lang.in: Update dependencies.
7761
7762 2011-08-02  Javier Miranda  <miranda@adacore.com>
7763
7764         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7765         determine if the analysis is performed using N or Original_Node (N).
7766         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7767         functionality of routine Is_Variable avoids code duplication.
7768         * checks.adb (Determine_Range): Handle temporaries generated by
7769         Remove_Side_Effects.
7770
7771 2011-08-02  Javier Miranda  <miranda@adacore.com>
7772
7773         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7774         expansion of the condition. Required since the previous analysis was
7775         done with expansion disabled (see Resolve_Quantified_Expression) and
7776         hence checks were not inserted and record comparisons have not been
7777         expanded.
7778
7779 2011-08-02  Ed Falis  <falis@adacore.com>
7780
7781         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7782         Update header.
7783
7784 2011-08-02  Bob Duff  <duff@adacore.com>
7785
7786         * opt.ads: Minor comment fix.
7787
7788 2011-08-02  Bob Duff  <duff@adacore.com>
7789
7790         * sem_ch12.adb (Analyze_Package_Instantiation,
7791         Analyze_Subprogram_Instantiation): Turn off style checking while
7792         analyzing an instance. Whatever style checks that apply to the generic
7793         unit should apply, so it makes no sense to apply them in an instance.
7794         This was causing trouble when compiling an instance of a runtime
7795         unit that violates the -gnatyO switch.
7796         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7797         one of the two case statements, causing spurious errors.
7798
7799 2011-08-02  Robert Dewar  <dewar@adacore.com>
7800
7801         * uname.adb: Minor reformatting.
7802         * gnatcmd.adb: Minor reformatting.
7803         * exp_attr.adb: Minor reformatting.
7804
7805 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7806
7807         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7808         No_Dispatching_Calls, do not look for the Assign primitive, because
7809         predefined primitives are not created in this case.
7810
7811 2011-08-02  Bob Duff  <duff@adacore.com>
7812
7813         * stylesw.ads: Minor comment fixes.
7814
7815 2011-08-02  Robert Dewar  <dewar@adacore.com>
7816
7817         * freeze.adb (Add_To_Result): New procedure.
7818
7819 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
7820
7821         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7822         time, if the specific run-time routines for handling streams of strings
7823         are not available, use the default mechanism.
7824
7825 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7826
7827         * s-regpat.ads: Fix typo.
7828
7829 2011-08-02  Vincent Celier  <celier@adacore.com>
7830
7831         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7832         not null, call it to create the in memory config project file without
7833         parsing an existing default config project file.
7834
7835 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7836
7837         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7838
7839 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7840
7841         * sem_elim.adb: an abstract subprogram does not need an eliminate
7842         pragma for its descendant to be eliminable.
7843
7844 2011-08-02  Ed Falis  <falis@adacore.com>
7845
7846         * init.c: revert to handling before previous checkin for VxWorks
7847         * s-intman-vxworks.adb: delete unnecessary declarations related to
7848         using Ada interrupt facilities for handling signals.
7849         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7850         * s-intman-vxworks.ads: Import __gnat_install_handler as
7851         Initialize_Interrupts.
7852         * s-taprop-vxworks.adb: Delete Signal_Mask.
7853         (Abort_Handler): change construction of mask to unblock exception
7854         signals.
7855
7856 2011-08-02  Jerome Guitton  <guitton@adacore.com>
7857
7858         * a-except-2005.adb (Raise_From_Signal_Handler): Call
7859         Debug_Raise_Exception before propagation starts.
7860
7861 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
7862
7863         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7864         to Restriction_Check_Required.
7865         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7866         * sem_res.adb (Resolve_Call): Likewise.
7867         * sem_attr.adb (Check_Stream_Attribute): Likewise.
7868
7869 2011-08-02  Bob Duff  <duff@adacore.com>
7870
7871         * stylesw.ads: Update comment.
7872         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7873         * errout.ads: Remove obsolete comment.
7874
7875 2011-08-02  Javier Miranda  <miranda@adacore.com>
7876
7877         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7878         (Set_Is_Safe_To_Reevaluate): new procedure.
7879         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7880         assignment is allowed on safe-to-reevaluate variables.
7881         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7882         temporary created to remove side effects in expressions that use
7883         the secondary stack as safe-to-reevaluate.
7884         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7885         variables that are not true constants.
7886
7887 2011-08-02  Robert Dewar  <dewar@adacore.com>
7888
7889         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7890         sem_res.adb, sem_ch6.adb: Minor reformatting.
7891
7892 2011-08-02  Jerome Guitton  <guitton@adacore.com>
7893
7894         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7895
7896 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
7897
7898         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7899         not set Overridden_Operation if subprogram is an initialization
7900         procedure.
7901
7902 2011-08-02  Yannick Moy  <moy@adacore.com>
7903
7904         * par-ch6.adb: Correct obsolete name in comments
7905         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7906         which takes two message arguments (existing function takes one), with
7907         second message used for continuation.
7908         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7909         block statements that originate from a source block statement, not
7910         generated block statements
7911         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7912         symmetry with procedure case
7913         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7914         function to issue an error in formal mode if a package specification
7915         contains more than one tagged type or type extension.
7916         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7917         parameters matching formals of tagged types are objects (or ancestor
7918         type conversions of objects), not general expressions. Issue an error
7919         on view conversions that are not involving ancestor conversion of an
7920         extended type.
7921         (Resolve_Type_Conversion): in formal mode, issue an error on the
7922         operand of an ancestor type conversion which is not an object
7923         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7924         procedure so that it works also for actuals of function calls
7925         (Is_Actual_Tagged_Parameter): new function which determines if its
7926         argument is an actual parameter of a formal of tagged type in a
7927         subprogram call
7928         (Is_SPARK_Object_Reference): new function which determines if the tree
7929         referenced by its argument represents an object in SPARK
7930
7931 2011-08-02  Robert Dewar  <dewar@adacore.com>
7932
7933         * sem_ch3.adb: Minor reformatting
7934         Minor comment addition
7935         Minor error msg text change
7936
7937 2011-08-02  Javier Miranda  <miranda@adacore.com>
7938
7939         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7940         function. Used to be more precise when we generate a variable plus one
7941         assignment to remove side effects in the evaluation of the Bound
7942         expressions.
7943         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7944         of the bound expression to force its re-analysis and thus expand the
7945         associated transient scope (if required). Code cleanup replacing the
7946         previous code that declared the constant entity by an invocation to
7947         routine Force_Evaluation which centralizes this work in the frontend.
7948
7949 2011-08-02  Robert Dewar  <dewar@adacore.com>
7950
7951         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7952         (Base_Type): Now uses improved Is_Base_Type function
7953         * einfo.ads (Base_Type): Inline this function
7954
7955 2011-08-02  Robert Dewar  <dewar@adacore.com>
7956
7957         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7958         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7959
7960 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
7961
7962         * gcc-interface/Make-lang.in: Update dependencies.
7963         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7964         targets.
7965
7966 2011-08-02  Yannick Moy  <moy@adacore.com>
7967
7968         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7969         non-simple expression used in delta constraint
7970         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7971         index constraint which is not a subtype mark
7972         * par.adb: With and use Restrict
7973         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7974         mode on component type which is not a subtype mark and default
7975         expression on component
7976         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7977         of string which does not have a lower index bound equal to 1
7978         (Array_Type_Declaration): issue an error in formal mode on index or
7979         component type which is not a subtype mark, and on aliased keyword on
7980         component
7981         (Derived_Type_Declaration): issue an error in formal mode on interface,
7982         limited or abstract type
7983         (Record_Type_Declaration): issue an error in formal mode on interface
7984         (Record_Type_Definition): issue an error in formal mode on tagged types
7985         and type extensions not declared in the specification of a library unit
7986         package; on null non-tagged record; on variant part
7987
7988 2011-08-02  Vincent Celier  <celier@adacore.com>
7989
7990         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7991         not declared for qualified library project when Library_Name is not
7992         declared, but Library_Dir is.
7993
7994 2011-08-02  Robert Dewar  <dewar@adacore.com>
7995
7996         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7997         pragmas (affects aspects [Component_]Default_Value
7998         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7999         component type for the resolution
8000
8001 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8002
8003         * einfo.adb (Base_Type): Tune implementation for speed.
8004
8005 2011-08-02  Robert Dewar  <dewar@adacore.com>
8006
8007         * freeze.adb: Minor reformatting.
8008
8009 2011-08-02  Thomas Quinot  <quinot@adacore.com>
8010
8011         * scos.ads: Update comments.
8012
8013 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8014
8015         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8016         base type, because the parent may be a subtype of a private type whose
8017         convention is established in a private part.
8018
8019 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
8020
8021         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8022         statement in a block when the expansion of the return expression has
8023         created a finalization chain.
8024         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8025         with the parent node.
8026         Add N_Extended_Return_Statement to handle the case where a transient
8027         object declaration appears in the Return_Object_Declarations list of
8028         an extended return statement.
8029
8030 2011-08-02  Matthew Gingell  <gingell@adacore.com>
8031
8032         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8033         unused parameter 'name'.
8034
8035 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8036
8037         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8038         inherited operation, check whether its alias, which is the source
8039         operastion that it renames, has been marked eliminated.
8040
8041 2011-08-02  Javier Miranda  <miranda@adacore.com>
8042
8043         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8044         in-mode parameter whose type is an access type since it can be used to
8045         modify its designated object. Enforce code that handles as safe an
8046         access type that is not access-to-constant but it is the result of a
8047         previous removal of side-effects.
8048         (Remove_Side_Effects): Minor code reorganization of cases which require
8049         no action. Done to incorporate documentation on new cases uncovered
8050         working in this ticket: no action needed if this routine was invoked
8051         too early and the nodes are not yet decorated.
8052         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8053         to routine Remove_Side_Effects by calls to Force_Evaluation since they
8054         were issued with actuals that are implicitly provided by
8055         Force_Evaluation.
8056
8057 2011-08-02  Robert Dewar  <dewar@adacore.com>
8058
8059         * sem_ch3.adb, sem_res.adb: Minor reformatting.
8060
8061 2011-08-02  Yannick Moy  <moy@adacore.com>
8062
8063         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8064         to issue an error in formal mode on attribute not supported in this mode
8065         (Analyze_Attribute): issue errors on standard attributes not supported
8066         in formal mode.
8067         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8068         comment, and issue error in formal mode on modulus which is not a power
8069         of 2.
8070         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8071         range.
8072         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8073         subtype mark.
8074         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8075         operator on modular type (except 'not').
8076
8077 2011-08-02  Robert Dewar  <dewar@adacore.com>
8078
8079         * gnat_rm.texi: Minor reformatting.
8080
8081 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
8082
8083         * s-osinte-linux.ads: Minor comment update and reformatting.
8084         * i-cexten.ads: Make this unit pure, as for its parent.
8085         Will allow its usage in more contexts if needed.
8086
8087 2011-08-02  Robert Dewar  <dewar@adacore.com>
8088
8089         * s-utf_32.ads: Minor comment fix.
8090
8091 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8092
8093         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8094         operation of a tagged synchronized type, handle the case where the
8095         controlling argument is overloaded.
8096
8097 2011-08-02  Yannick Moy  <moy@adacore.com>
8098
8099         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8100         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8101         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8102         SPARK mode and formal verification mode on processing SPARK restriction
8103         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8104         requiring consistency checking.
8105
8106 2011-08-02  Robert Dewar  <dewar@adacore.com>
8107
8108         * sem_res.adb: Minor reformatting.
8109
8110 2011-08-02  Robert Dewar  <dewar@adacore.com>
8111
8112         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8113         a-cforse.ads: Remove unneeded with of Ada.Containers
8114         Remove commented out pragma Inline's
8115         Move specifications of new subprograms to the actual specs
8116
8117 2011-08-02  Yannick Moy  <moy@adacore.com>
8118
8119         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8120         a-cforse.ads: Update comments.
8121
8122 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8123
8124         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8125
8126 2011-08-02  Robert Dewar  <dewar@adacore.com>
8127
8128         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8129         a-cforse.ads, a-cofove.ads: Minor reformatting.
8130
8131 2011-08-02  Claire Dross  <dross@adacore.com>
8132
8133         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8134         a-cofove.ads: Add comments.
8135
8136 2011-08-02  Yannick Moy  <moy@adacore.com>
8137
8138         * gnat_rm.texi: Document formal containers.
8139
8140 2011-08-02  Emmanuel Briot  <briot@adacore.com>
8141
8142         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8143         are empty sections.
8144
8145 2011-08-02  Robert Dewar  <dewar@adacore.com>
8146
8147         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8148         reformatting.
8149
8150 2011-08-02  Robert Dewar  <dewar@adacore.com>
8151
8152         * aspects.adb: New aspects Default_Value and Default_Component_Value
8153         New format of Aspect_Names table checks for omitted entries
8154         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8155         handling of boolean aspects for derived types.
8156         New aspects Default_Value and Default_Component_Value
8157         New format of Aspect_Names table checks for omitted entries
8158         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8159         (Has_Default_Value): New flag
8160         (Has_Default_Component_Value): New flag
8161         (Has_Default_Value): New flag
8162         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8163         table.
8164         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8165         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8166         Default_Value and Default_Component_Value
8167         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8168         New aspects Default_Value and Default_Component_Value
8169         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8170         * sprint.adb: Print N_Aspect_Specification node when called from gdb
8171
8172 2011-08-02  Vincent Celier  <celier@adacore.com>
8173
8174         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8175         inherit library kind.
8176
8177 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8178
8179         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8180         Minor reformatting.
8181
8182 2011-08-02  Robert Dewar  <dewar@adacore.com>
8183
8184         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8185
8186 2011-08-02  Yannick Moy  <moy@adacore.com>
8187
8188         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8189
8190 2011-08-02  Robert Dewar  <dewar@adacore.com>
8191
8192         * impunit.adb: Add comment.
8193
8194 2011-08-02  Yannick Moy  <moy@adacore.com>
8195
8196         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8197         qualification of aggregates in formal mode
8198         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8199         another aggregate
8200         (Resolve_Aggregate): complete the test that an aggregate is adequately
8201         qualified in formal mode
8202
8203 2011-08-02  Pascal Obry  <obry@adacore.com>
8204
8205         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8206         * mlib-prj.adb: Supress warning when compiling binder generated file.
8207         (Build_Library): Supress all warnings when compiling the binder
8208         generated file.
8209
8210 2011-08-02  Yannick Moy  <moy@adacore.com>
8211
8212         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8213         from here...
8214         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8215         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8216         Add with/use clauses to make Check_Formal_Restriction visible
8217
8218 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8219
8220         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8221         in-parameters when type of the generic formal is private in the generic
8222         spec and non-private in the body.
8223
8224 2011-08-02  Claire Dross  <dross@adacore.com>
8225
8226         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8227         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8228         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8229         * impunit.adb, Makefile.rtl: Take new files into account.
8230
8231 2011-08-02  Robert Dewar  <dewar@adacore.com>
8232
8233         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8234         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8235
8236 2011-08-02  Yannick Moy  <moy@adacore.com>
8237
8238         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8239         formal mode
8240         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8241         matching static array bounds, taking into account the special case of
8242         string literals
8243         * sem_ch3.adb: Typo in comment.
8244
8245 2011-08-02  Yannick Moy  <moy@adacore.com>
8246
8247         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8248         which issues an error in formal mode if its argument node is originally
8249         from source
8250         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8251         has a discriminant specification so that it does not include the case
8252         of derived types
8253         (Derived_Type_Declaration): move here the test that a derived type has a
8254         discriminant specification
8255         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8256         first element of a component association before accessing its choices
8257         (presence of component association is not enough)
8258         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8259         declaration is a library item before accessing the next element in a
8260         list, as library items are not member of lists
8261         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8262         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8263         Check_Formal_Restriction whenever possible.
8264
8265 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8266
8267         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8268         reference when needed.
8269
8270 2011-08-02  Bob Duff  <duff@adacore.com>
8271
8272         * gnat_ugn.texi: Fix typo.
8273
8274 2011-08-02  Vincent Celier  <celier@adacore.com>
8275
8276         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8277         archive file name. Do not use the full path name of archives for Open
8278         VMS.
8279
8280 2011-08-02  Robert Dewar  <dewar@adacore.com>
8281
8282         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8283         Analyze_Aspect_Specifications
8284         * sem_ch13.adb
8285         (Analyze_Aspect_Specifications): New handling for boolean aspects
8286         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8287         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8288         sequence for Analyze_Aspect_Specifications
8289         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8290         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8291
8292 2011-08-02  Robert Dewar  <dewar@adacore.com>
8293
8294         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8295         aspects, since these no longer exist.
8296
8297 2011-08-02  Robert Dewar  <dewar@adacore.com>
8298
8299         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8300         semicolon, do not try to see if there are aspects following it.
8301         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8302         aspect spec.
8303
8304 2011-08-02  Robert Dewar  <dewar@adacore.com>
8305
8306         * sem_ch8.adb, aspects.ads: Minor reformatting.
8307
8308 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
8309
8310         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8311         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8312         extracted from...
8313         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
8314
8315 2011-08-02  Yannick Moy  <moy@adacore.com>
8316
8317         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8318         mode on subprogram declaration outside of package specification, unless
8319         it is followed by a pragma Import
8320         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8321         Access_Type_Declaration): issue error in formal mode on access type
8322         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8323         incomplete type
8324         (Analyze_Object_Declaration): issue error in formal mode on object
8325         declaration which does not respect SPARK restrictions
8326         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8327         declaration which does not respect SPARK restrictions
8328         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8329         error in formal mode on digits or delta constraint
8330         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8331         decimal fixed point type
8332         (Derived_Type_Declaration): issue error in formal mode on derived type
8333         other than type extensions of tagged record types
8334         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8335         with check on access definition
8336         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8337         mode on protected definition.
8338         (Analyze_Task_Definition): issue error in formal mode on task definition
8339
8340 2011-08-02  Robert Dewar  <dewar@adacore.com>
8341
8342         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8343
8344 2011-08-02  Javier Miranda  <miranda@adacore.com>
8345
8346         * sem_ch6.adb (Can_Override_Operator): New function.
8347         (Verify_Overriding_Indicator): Add missing code to check overriding
8348         indicator in operators. Fixes regression.
8349         (Check_Overriding_Indicator): Minor reformating after replacing the
8350         code that evaluates if the subprogram can override an operator by
8351         invocations to the above new function.
8352         * einfo.adb
8353         (Write_Field26_Name): Add missing code to ensure that, following
8354         the documentation in einfo.ads, this field is not shown as attribute
8355         "Static_Initialization" on non-dispatching functions.
8356
8357 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8358
8359         * sem_res.adb (Resolve_Call): A call to
8360         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8361         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8362         i.e., when the second parameter is of type Time_Span.
8363
8364 2011-08-02  Vincent Celier  <celier@adacore.com>
8365
8366         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8367         with an archive instead of -L<library dir> -l<library name>.
8368
8369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8370
8371         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8372         mark the base types In_Use in addition to making the operations
8373         use_visible.
8374
8375 2011-08-02  Ed Falis  <falis@adacore.com>
8376
8377         * init.c: add and setup __gnat_signal_mask for the exception signals
8378         * s-inmaop-vxworks.adb: new file.
8379         * s-intman-vxworks.adb: remove unnecessary initializations and
8380         simplify remaining
8381         * s-intman-vxworks.ads: remove unnecessary variable
8382         * s-taprop-vxworks.adb: simplify signal initialization
8383
8384 2011-08-02  Robert Dewar  <dewar@adacore.com>
8385
8386         * sem_ch8.adb: Minor code reorganization, comment updates.
8387
8388 2011-08-02  Robert Dewar  <dewar@adacore.com>
8389
8390         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8391         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8392         here from Sem_Res.
8393         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8394         (Matching_Static_Array_Bounds): Moved here from Sem_Res
8395
8396 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8397
8398         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8399         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8400         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8401         use_type_clauses, to handle more efficiently use_type and use_all_type
8402         constructs.
8403         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8404         Ada2012 Use_All_Type clause.
8405         (Use_Class_Wide_Operations): new procedure.
8406
8407 2011-08-02  Robert Dewar  <dewar@adacore.com>
8408
8409         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8410         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8411         expression to expression function.
8412
8413 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8414
8415         * sem_ch4.adb: transform simple Ada2012 membership into equality only
8416         if types are compatible.
8417
8418 2011-08-02  Yannick Moy  <moy@adacore.com>
8419
8420         * sem_res.adb (Matching_Static_Array_Bounds): new function which
8421         returns True if its argument array types have same dimension and same
8422         static bounds at each index.
8423         (Resolve_Actuals): issue an error in formal mode on actuals passed as
8424         OUT or IN OUT paramaters which are not view conversions in SPARK.
8425         (Resolve_Arithmetic_Op): issue an error in formal mode on
8426         multiplication or division with operands of fixed point types which are
8427         not qualified or explicitly converted.
8428         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8429         Boolean or array type (except String) operands.
8430         (Resolve_Equality_Op): issue an error in formal mode on equality
8431         operators for array types other than String with non-matching static
8432         bounds.
8433         (Resolve_Logical_Op): issue an error in formal mode on logical operators
8434         for array types with non-matching static bounds. Factorize the code in
8435         Matching_Static_Array_Bounds.
8436         (Resolve_Qualified_Expression): issue an error in formal mode on
8437         qualified expressions for array types with non-matching static bounds.
8438         (Resolve_Type_Conversion): issue an error in formal mode on type
8439         conversion for array types with non-matching static bounds
8440
8441 2011-08-02  Robert Dewar  <dewar@adacore.com>
8442
8443         * par-ch10.adb: Minor code reorganization (use Nkind_In).
8444
8445 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
8446
8447         * par-ch9.adb: save location of entry for proper error message.
8448
8449 2011-08-02  Javier Miranda  <miranda@adacore.com>
8450
8451         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8452         (Use_Full_View) which permits this routine to climb through the
8453         ancestors using the full-view of private parents.
8454         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8455         Use_Full_View to true in calls to Is_Ancestor.
8456         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8457         true in call to Is_Ancestor.
8458         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8459         Use_Full_View to true in call to Is_Ancestor.
8460         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8461         call to Is_Ancestor.
8462         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8463         Use_Full_View to true in calls to Is_Ancestor.
8464         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8465         Make_Select_Specific_Data_Table, Register_Primitive,
8466         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8467         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8468         to true in call to Is_Ancestor.
8469         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8470         Use_Full_View to true in calls to Is_Ancestor.
8471         * exp_cg.adb
8472         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8473         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8474
8475 2011-08-02  Robert Dewar  <dewar@adacore.com>
8476
8477         * gnat_rm.texi: Minor reformatting.
8478         * sem_prag.adb: Minor reformatting.
8479
8480 2011-08-02  Tristan Gingold  <gingold@adacore.com>
8481
8482         * vms_data.ads: Add VMS qualifier for -gnateP.
8483
8484 2011-08-02  Robert Dewar  <dewar@adacore.com>
8485
8486         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8487         * par-ch7.adb (P_Package): Proper placement of aspects for package
8488         decl/instantiation.
8489         * par-endh.adb (Check_End): Ad Is_Sloc parameter
8490         (End_Statements): Add Is_Sloc parameterr
8491         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8492         (Check_End): Ad Is_Sloc parameter
8493         (End_Statements): Add Is_Sloc parameterr
8494
8495 2011-08-02  Vincent Celier  <celier@adacore.com>
8496
8497         * ug_words: Add VMS qualifier equivalent to -gnateP:
8498         /SYMBOL_PREPROCESSING.
8499
8500 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
8501
8502         * gnat-style.texi: For hexadecimal numeric literals the typical
8503         grouping of digits is 4 to represent 2 bytes.
8504         A procedure spec which is split into several lines is indented two
8505         characters.
8506
8507 2011-08-02  Yannick Moy  <moy@adacore.com>
8508
8509         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8510         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8511         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8512         properly qualified
8513         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8514         choice in array aggregate
8515         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8516         mark as ancestor
8517         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8518         positional and named aggregate for record, or others in record
8519         aggregate, or multiple choice in record aggregate
8520         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8521         array operands to logical operations AND, OR and XOR do not have the
8522         same static lower and higher bounds
8523         * sem_ch5.adb, sinfo.ads: Correct typos in comments
8524
8525 2011-08-01  Robert Dewar  <dewar@adacore.com>
8526
8527         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8528         Replaces Last_Source_Node_In_Sequence.
8529         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8530         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8531         parens and blank in string (this was inconsistently implemented).
8532         * errout.ads
8533         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8534         blank in string (this was inconsistently implemented).
8535         * gnat1drv.adb
8536         (Set_Global_Switches): Set formal mode switches appropriately
8537         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8538         * par-prag.adb
8539         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8540         call Set_Error_Msg_Lang to set "spark" as language name.
8541         * par.adb: Remove unnecessary call to set formal language for errout
8542         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8543         appropriately and call Set_Error_Msg_Lang to set "spark" as language
8544         name.
8545         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8546         calls to it, moved after resolution so that types are known
8547         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8548         result of concatenation is not of type String
8549         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8550         concatenation is not properly restricted
8551         * gnat_rm.texi: Add doc on pragma Spark_95.
8552         * gcc-interface/Makefile.in: Remove obsolete target pairs for
8553         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8554         * gcc-interface/Make-lang.in: Update dependencies.
8555
8556 2011-08-01  Javier Miranda  <miranda@adacore.com>
8557
8558         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8559         condition that detects if the overridden operation must replace an
8560         existing entity.
8561
8562 2011-08-01  Javier Miranda  <miranda@adacore.com>
8563
8564         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8565         code declarations inserted by Insert_Actions in each alternative of the
8566         N_Case_Expression node.
8567
8568 2011-08-01  Robert Dewar  <dewar@adacore.com>
8569
8570         * sem_ch6.adb: Minor code reorganization.
8571         * sem_util.adb: Minor reformatting.
8572
8573 2011-08-01  Pascal Obry  <obry@adacore.com>
8574
8575         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8576         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8577
8578 2011-08-01  Yannick Moy  <moy@adacore.com>
8579
8580         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8581         literal or operator symbol which is prefixed
8582         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8583         mode on access attributes.
8584         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8585         that concatenation operands are properly restricted in formal mode
8586         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8587         Analyze_Concatenation_Operand. Issue an error in formal mode if the
8588         result of the concatenation has a type different from String.
8589         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8590         Analyze_Quantified_Expression, Analyze_Slice,
8591         Analyze_Null): issue an error in formal mode on unsupported constructs
8592         * sem_ch5.adb
8593         (Analyze_Block_Statement): only issue error on source block statement
8594         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8595         function which returns the last node in a list of nodes for which
8596         Comes_From_Source returns True, if any
8597         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8598         Last_Source_Node_In_Sequence
8599         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8600         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8601         mode on unsupported constructs
8602         * sem_ch9.adb Do not return after issuing error in formal mode, as the
8603         rest of the actions may be needed later on since the error is marked as
8604         not serious.
8605         * sinfo.ads: Typos in comments.
8606
8607 2011-08-01  Pascal Obry  <obry@adacore.com>
8608
8609         * projects.texi: Minor editing.
8610
8611 2011-08-01  Yannick Moy  <moy@adacore.com>
8612
8613         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8614         insertion character ~~
8615         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8616         (Set_Error_Msg_Lang): new procedure which fixes the language for use
8617         with insertion character ~~
8618         (Set_Msg_Text): treat insertion character ~~
8619         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8620         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8621         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8622         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8623         errors related to the formal language restriction not serious
8624         (insertion character |).
8625         * par.adb (Par): set formal language for error messages if needed
8626         * sem_ch6.adb (Check_Missing_Return): take into account possible
8627         generated statements at the end of the function
8628         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8629         enumeration value to define a new pragma SPARK_95
8630         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8631         SPARK_Version): new type and variables to store the SPARK version
8632         (none by default).
8633         (SPARK_Mode): return True when SPARK_Version is set
8634         * par-prag.adb: Correct indentation
8635         (Prag): take Pragma_SPARK_95 into account
8636         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8637         into account.
8638
8639 2011-08-01  Robert Dewar  <dewar@adacore.com>
8640
8641         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8642         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8643         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8644
8645 2011-08-01  Pascal Obry  <obry@adacore.com>
8646
8647         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8648         Target_Name to Get_Path call.
8649         (Parse_Single_Project): Likewise.
8650         (Post_Parse_Context_Clause): Likewise.
8651         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8652         Call Initialise_Project_Path with the proper Target_Name.
8653         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8654         search path.
8655         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8656         with the proper Target_Name.
8657         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8658         Part.Parse routine.
8659         (Parse_Project_And_Apply_Config): Likewise.
8660         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8661         This is fine as this part of the code is supporting only native
8662         compilation.
8663         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8664         is fine as this part of the code is supporting only native compilation.
8665
8666 2011-08-01  Yannick Moy  <moy@adacore.com>
8667
8668         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8669         of homonym, unless the homonym is one of the cases allowed in SPARK
8670         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8671         package declaration occurring after a body.
8672
8673 2011-08-01  Robert Dewar  <dewar@adacore.com>
8674
8675         * checks.adb, exp_ch4.adb: Minor reformatting.
8676
8677 2011-08-01  Javier Miranda  <miranda@adacore.com>
8678
8679         * einfo.ads (Access_Disp_Table): Fix documentation.
8680         (Dispatch_Table_Wrappers): Fix documentation.
8681
8682 2011-08-01  Pascal Obry  <obry@adacore.com>
8683
8684         * prj-env.adb, prj-env.ads: Minor reformatting.
8685
8686 2011-08-01  Yannick Moy  <moy@adacore.com>
8687
8688         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8689         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8690         procedures out of these packages.
8691         * errout.ads, errout.adb
8692         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8693         procedures in of this package
8694         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8695         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8696         on misplaced later vs initial declarations, like in Ada 83
8697         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8698         formal mode on attribute of private type whose full type declaration
8699         is not visible
8700         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8701         package declaration inside a package specification
8702         (Analyze_Full_Type_Declaration): issue error in formal mode on
8703         controlled type or discriminant type
8704         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8705         user-defined operator means that it should come from the source
8706         (New_Overloaded_Entity): issue error in formal mode on overloaded
8707         entity.
8708         * sem_ch6.ads, sem_ch13.ads: typos in comments.
8709
8710 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8711
8712         * atree.adb: Minor reformatting.
8713         * checks.adb: Minor reformatting.
8714
8715 2011-08-01  Vincent Celier  <celier@adacore.com>
8716
8717         * s-parame-vms-ia64.ads: Fix typo in comment
8718         Minor reformatting
8719         * s-parame-vms-restrict.ads: Removed, unused.
8720
8721 2011-08-01  Javier Miranda  <miranda@adacore.com>
8722
8723         * exp_ch3.adb
8724         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8725         * sem_ch3.adb
8726         (Constrain_Index): Remove side effects in the evaluation of the bounds.
8727         * sem_ch3.ads, sem_ch3.adb
8728         (Is_Constant_Bound): New extended version of the subprogram that was
8729         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8730         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8731         * sem_aux.ads (Constant_Value): Fix typo in comment.
8732         * checks.adb (Generate_Index_Checks): New implementation which, for
8733         array objects with constant bounds, generates the runtime check
8734         referencing the bounds of the array type. For other cases this routine
8735         provides its previous behavior obtaining such values from the array
8736         object.
8737         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8738         parent type.
8739         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8740         we cannot have semantic interpretations of the new node.
8741
8742 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8743
8744         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8745         expressions.
8746
8747 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8748
8749         * sem_ch8.adb: Minor code editing.
8750         * s-vxwext.adb: Remove trailing space.
8751         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8752         consistency with other files.
8753
8754 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8755
8756         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8757
8758 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8759
8760         * par-ch10.adb: reject parameterized expressions as compilation unit.
8761         * sem_ch4.adb: handle properly conditional expression with overloaded
8762         then_clause and no else_clause.
8763
8764 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8765
8766         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8767         like done by System.Aux_DEC.
8768         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8769
8770 2011-08-01  Yannick Moy  <moy@adacore.com>
8771
8772         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8773         missing label at end of declaration (subprogram or package)
8774         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8775         of positional and named parameter association
8776         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8777         Error_Msg_SP which adds a prefix to the error message giving the name
8778         of the formal language analyzed
8779         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8780         access result type in subprogram, unconstrained array as result type,.
8781         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8782         procedure
8783         * sem_ch8.adb: Code clean up.
8784
8785 2011-08-01  Javier Miranda  <miranda@adacore.com>
8786
8787         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8788         * einfo.ads (Access_Disp_Table): Fix documentation.
8789         (Dispatch_Table_Wrappers): Fix documentation.
8790         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8791         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8792         to enforce the documentation of this attribute.
8793         (Set_Is_Interface): Cleanup the assertion.
8794         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8795         the Underlying_Type entity before reading attribute Access_Disp_Table.
8796         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8797         Locate the Underlying_Type before reading attribute Access_Disp_Table.
8798         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8799         the Underlying_Type entity before reading attribute Access_Disp_Table.
8800         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8801         Locate the Underlying_Type entity before reading attribute
8802         Access_Disp_Table.
8803
8804 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8805
8806         * s-poosiz.ads: Additional overriding indicators.
8807
8808 2011-08-01  Yannick Moy  <moy@adacore.com>
8809
8810         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8811         formal mode.
8812         (Analyze_Iteration_Scheme): issue error in formal mode when loop
8813         parameter specification does not include a subtype mark.
8814         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8815         formal mode on abstract subprogram.
8816         (Analyze_Subprogram_Specification): issue error in formal mode on
8817         user-defined operator.
8818         (Process_Formals): issue error in formal mode on access parameter and
8819         default expression.
8820         * sem_ch9.adb (Analyze_Abort_Statement,
8821         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8822         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8823         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8824         Analyze_Requeue, Analyze_Selective_Accept,
8825         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8826         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8827         issue error in formal mode on user-defined raise statement.
8828
8829 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8830
8831         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8832         declaration being hidden when overriding an implicit inherited
8833         subprogram.
8834         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8835         (-gnats), do not complain about a source file that contains only a
8836         pragma No_Body.
8837
8838 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8839
8840         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8841         variable if already set.
8842
8843 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8844
8845         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8846         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8847         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8848         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8849         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8850         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8851         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8852         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8853         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8854         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8855         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8856         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8857         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8858         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8859         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8860         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8861         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8862         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8863         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8864         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8865         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8866         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8867         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8868         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8869         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8870         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8871         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8872         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8873         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8874         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8875         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8876         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8877         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8878         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8879         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8880         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8881         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8882         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8883         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8884         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8885         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8886         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8887         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8888         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8889         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8890         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8891         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8892         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8893         s-osinte-mingw.ads: Update to GPLv3 run-time license.
8894         Use GNAT instead of GNARL.
8895
8896 2011-08-01  Bob Duff  <duff@adacore.com>
8897
8898         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8899         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8900         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8901         reformatting.
8902
8903 2011-08-01  Yannick Moy  <moy@adacore.com>
8904
8905         * debug.adb (d.D) reverve flag for the SPARK mode
8906         (d.E) reverve flag for SPARK generation mode
8907         (d.F) reverve flag for Why generation mode
8908         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8909         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
8910         functions which return True when the corresponding modes are set
8911         (Formal_Language): return "spark" or "alfa" when in formal verification
8912         mode.
8913         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8914         Error_Msg to prefix the error message with a tag giving the formal
8915         language
8916         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8917         message with a tag giving the formal language
8918         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8919         block statement
8920         (Analyze_Case_Statement): issue error in formal mode on case statement
8921         with a single "others" case alternative
8922         (Analyze_Exit_Statement): issue errors in formal mode on exit
8923         statements which do not respect SPARK restrictions
8924         (Analyze_Goto_Statement): issue error in formal mode on goto statement
8925         (Check_Unreachable_Code): always issue an error (not a warning) in
8926         formal mode on unreachable code (concerns both code after an infinite
8927         loop and after an unconditional jump, both not allowed in SPARK)
8928         * sem_ch6.adb (Analyze_Return_Statement): add call to
8929         Set_Return_Present for a procedure containing a return statement
8930         (already done for functions in Analyze_Function_Return)
8931         (Analyze_Function_Return): issue error in formal mode on extended
8932         return or if return is not last statement in function
8933         (Check_Missing_Return): issue error in formal mode if function does
8934         not end with return or if procedure contains a return
8935         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8936         function to detect if there is an inner scope of its parameter S which
8937         is a loop.
8938
8939 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8940
8941         * sem_ch6.ads: Minor reformatting.
8942
8943 2011-08-01  Javier Miranda  <miranda@adacore.com>
8944
8945         * sem_util.adb (Abstract_Interface_List): Complete condition when
8946         processing private type declarations to avoid reading unavailable
8947         attribute.
8948         (Is_Synchronized_Tagged_Type): Complete condition when processing
8949         private extension declaration nodes to avoid reading unavailable
8950         attribute.
8951
8952 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8953
8954         * sem_ch3.adb: Minor reformatting.
8955
8956 2011-08-01  Thomas Quinot  <quinot@adacore.com>
8957
8958         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8959         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8960         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8961         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8962         for VMS, instead parametrize the common implementation with
8963         System.Parameters declarations.
8964
8965 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
8966
8967         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8968
8969 2011-08-01  Tristan Gingold  <gingold@adacore.com>
8970
8971         * seh_init.c: Fix SEH handler installation on win64.
8972
8973 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8974
8975         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8976         double analysis of an anonymous access to subprogram, because it can
8977         lead to improper sharing of profiles and a back-end crash.
8978
8979 2011-08-01  Robert Dewar  <dewar@adacore.com>
8980
8981         * make.adb, sem_ch4.adb: Minor reformatting.
8982         * gcc-interface/Make-lang.in: Update dependencies.
8983         * sem_util.adb, exp_ch5.adb: Minor reformatting.
8984
8985 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
8986
8987         * gnat_rm.texi: Fix definition of Long_Integer.
8988
8989 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8990
8991         * exp_aggr.adb: check limit size of static aggregate unconditionally,
8992         to prevent storage exhaustion.
8993         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8994         finalized is a function body, insert the cleanup code before the final
8995         return statement, to prevent spurious warnings.
8996         * s-pooglo.ads: add overriding indicator.
8997
8998 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
8999
9000         * sem_ch4.adb (Operator_Check): improve error message when both a
9001         with_clause and a use_clause are needed to make operator usage legal.
9002         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9003         determine whether a compilation unit is visible within an other,
9004         either through a with_clause in the current unit, or a with_clause in
9005         its library unit or one one of its parents.
9006
9007 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9008
9009         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9010         over an arbitrary expression of an array or container type.
9011         * lib-xref.adb: clarify comment.
9012
9013 2011-08-01  Bob Duff  <duff@adacore.com>
9014
9015         * einfo.ads: Minor reformatting.
9016         * debug.adb: Minor comment improvement.
9017
9018 2011-08-01  Javier Miranda  <miranda@adacore.com>
9019
9020         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9021         consider hidden subprograms as valid candidates.
9022
9023 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
9024
9025         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9026
9027 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
9028
9029         * gnat_ugn.texi: Fix typo.
9030
9031 2011-08-01  Robert Dewar  <dewar@adacore.com>
9032
9033         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9034         lib-xref.adb: Minor reformatting
9035
9036 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
9037
9038         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9039         when to generate a call to Move_Final_List.
9040         (Has_Controlled_Parts): Remove this function.
9041
9042 2011-08-01  Geert Bosch  <bosch@adacore.com>
9043
9044         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9045         "," in choice list.
9046
9047 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9048
9049         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9050         explicit raise of a predefined exception as Comes_From_Source if the
9051         original N_Raise_Statement comes from source.
9052
9053 2011-08-01  Robert Dewar  <dewar@adacore.com>
9054
9055         * sinfo.ads: Add comment.
9056         * sem_ch6.adb: Minor reformatting.
9057
9058 2011-08-01  Robert Dewar  <dewar@adacore.com>
9059
9060         * freeze.adb (Freeze_Entity): Refine check for bad component size
9061         clause to avoid rejecting confirming clause when atomic/aliased present.
9062
9063 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9064
9065         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9066         better determine whether an entity reference is a write.
9067         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9068         subcomponent.
9069         * lib-xref.adb (Output_References): Do no suppress a read reference at
9070         the same location as an immediately preceeding modify-reference, to
9071         handle properly in-out actuals.
9072
9073 2011-08-01  Tristan Gingold  <gingold@adacore.com>
9074
9075         * env.c (__gnat_setenv) [VMS]: Refine previous change.
9076
9077 2011-08-01  Quentin Ochem  <ochem@adacore.com>
9078
9079         * i-cstrin.adb (New_String): Changed implementation, now uses only the
9080         heap to compute the result.
9081
9082 2011-08-01  Robert Dewar  <dewar@adacore.com>
9083
9084         * atree.ads: Minor reformatting.
9085
9086 2011-08-01  Emmanuel Briot  <briot@adacore.com>
9087
9088         * g-expect.adb (Get_Command_Output): Fix memory leak.
9089
9090 2011-08-01  Geert Bosch  <bosch@adacore.com>
9091
9092         * cstand.adb (P_Float_Type): New procedure to print the definition of
9093         predefined fpt types.
9094         (P_Mixed_Name): New procedure to print a name using mixed case
9095         (Print_Standard): Use P_Float_Type for printing floating point types
9096         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9097         precision IEEE float.
9098
9099 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9100
9101         * sem_ch3.adb: Minor reformatting.
9102
9103 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9104
9105         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9106         the completion of a generic function, insert the new body rather than
9107         rewriting the original.
9108
9109 2011-08-01  Yannick Moy  <moy@adacore.com>
9110
9111         * sinfo.ads, errout.ads: Typos in comments.
9112
9113 2011-08-01  Robert Dewar  <dewar@adacore.com>
9114
9115         * par-endh.adb: Minor reformatting.
9116
9117 2011-08-01  Robert Dewar  <dewar@adacore.com>
9118
9119         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9120         (Pre_Post_Aspects): New subtype.
9121         * par-ch12.adb (P_Generic): New syntax for aspects in packages
9122         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9123         * par-ch7.adb (P_Package): Remove Decl parameter
9124         (P_Package): Handle new syntax for aspects (before IS)
9125         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9126         new aspect syntax
9127         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9128         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9129         (P_Package): Remove Decl parameter
9130         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9131         aspects
9132         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9133         specs
9134         * sem_util.ads, sem_util.adb (Static_Boolean): New function
9135         * sinfo.ads: Document new syntax for aspects in packages etc.
9136         * sprint.adb: Handle new syntax of aspects before IS in package
9137
9138 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9139
9140         * atree.ads: Minor reformatting.
9141         * sem_prag.adb: Minor reformatting.
9142
9143 2011-08-01  Robert Dewar  <dewar@adacore.com>
9144
9145         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9146         case expr alternative.
9147
9148 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9149
9150         * sem_ch12.adb: Fix typo.
9151
9152 2011-08-01  Geert Bosch  <bosch@adacore.com>
9153
9154         * sem_prag.adb (Check_No_Link_Name): New procedure.
9155         (Process_Import_Or_Interface): Use Check_No_Link_Name.
9156         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9157         instead of Standard_Long_Long_Float_Size global. Preparation for
9158         eventual removal of per type constants.
9159         * exp_util.ads (Get_Stream_Size): New function returning the stream
9160         size value of subtype E.
9161         * exp_util.adb (Get_Stream_Size): Implement new function.
9162         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9163         function.
9164         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9165         * einfo.adb:
9166         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9167
9168 2011-08-01  Geert Bosch  <bosch@adacore.com>
9169
9170         * cstand.adb: Fix comments.
9171         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9172         count of arguments.
9173
9174 2011-08-01  Robert Dewar  <dewar@adacore.com>
9175
9176         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9177
9178 2011-08-01  Geert Bosch  <bosch@adacore.com>
9179
9180         * atree.ads: Fix comment.
9181
9182 2011-08-01  Robert Dewar  <dewar@adacore.com>
9183
9184         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9185         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9186         * par.adb: Add with for Namet.Sp.
9187         * par-tchk.adb: Minor reformatting.
9188
9189 2011-08-01  Vincent Celier  <celier@adacore.com>
9190
9191         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9192         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9193         of the init procedure of a SAL.
9194         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9195         New procedure.
9196
9197 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9198
9199         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9200         reformatting.
9201
9202 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9203
9204         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9205
9206 2011-08-01  Thomas Quinot  <quinot@adacore.com>
9207
9208         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9209         conformant with its spec (return True only for types that have
9210         an overriding Initialize primitive operation that prevents them from
9211         having preelaborable initialization).
9212         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9213         initialization for controlled types in Ada 2005 or later mode.
9214
9215 2011-08-01  Robert Dewar  <dewar@adacore.com>
9216
9217         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9218         Postcondition.
9219         (Same_Aspect): New function.
9220         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9221         Type_Invariant, Precondition, Postcondition.
9222         * snames.ads-tmpl: Add Name_Type_Invariant.
9223
9224 2011-08-01  Robert Dewar  <dewar@adacore.com>
9225
9226         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9227         here.
9228         (Freeze_All_Ent): Fix error in handling inherited aspects.
9229         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9230         already analyzed, but don't skip entire processing of a declaration,
9231         that's wrong in some cases of declarations being rewritten.
9232         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9233         Don't delay for integer, string literals
9234         Treat predicates in usual manner for delay, remove special case code,
9235         not needed.
9236         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9237         (Build_Predicate_Function): Update saved expression in aspect
9238         (Build_Invariant_Procedure): Update saved expression in aspect
9239         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9240         of replacement of discriminant references if the reference is simple.
9241
9242 2011-08-01  Robert Dewar  <dewar@adacore.com>
9243
9244         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9245         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9246         Static_Predicate and Dynamic_Predicate.
9247         (Build_Predicate_Function): Add processing for Static_Predicate
9248         and Dynamic_Predicate.
9249         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9250         (From_Static_Predicate): New flag
9251         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9252
9253 2011-08-01  Robert Dewar  <dewar@adacore.com>
9254
9255         * usage.adb: Documentation cleanup for Ada version modes in usage.
9256         * expander.adb: Minor reformatting.
9257
9258 2011-08-01  Robert Dewar  <dewar@adacore.com>
9259
9260         * atree.ads: Minor comment fix.
9261         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9262         a-witeio.ads, sem_prag.adb: Minor reformatting.
9263
9264 2011-08-01  Doug Rupp  <rupp@adacore.com>
9265
9266         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9267         pointers. Use descrip.h header file for convenience. Add some
9268         comments.
9269
9270 2011-08-01  Robert Dewar  <dewar@adacore.com>
9271
9272         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9273         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9274         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9275         New procedure.
9276         (Check_Aspect_At_End_Of_Declarations): New procedure
9277         (Analye_Aspect_Specification): Minor changes for above procedures
9278         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9279         specification node as well.
9280
9281 2011-08-01  Pascal Obry  <obry@adacore.com>
9282
9283         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9284         Windows files. Use GetFilesAttributes() in this case to check for file
9285         existence instead of returning with an error code.
9286
9287 2011-08-01  Vincent Celier  <celier@adacore.com>
9288
9289         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9290         High is above Source length.
9291
9292 2011-08-01  Robert Dewar  <dewar@adacore.com>
9293
9294         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9295
9296 2011-08-01  Robert Dewar  <dewar@adacore.com>
9297
9298         * aspects.ads (Boolean_Aspects): New subtype.
9299         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9300         for derived types in cases where the parent type and derived type have
9301         aspects.
9302         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9303         with aspects when parent type also has aspects.
9304         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9305         boolean expression at this point).
9306         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9307         accordance with final decision on the Ada 2012 feature.
9308         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9309
9310 2011-08-01  Matthew Heaney  <heaney@adacore.com>
9311
9312         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9313
9314 2011-08-01  Pascal Obry  <obry@adacore.com>
9315
9316         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9317         Fix Replace_Slice when High is above current string size.
9318         (Replace_Slice): Fix DL computation when High is above current
9319         string length.
9320
9321 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
9322
9323         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9324
9325 2011-08-01  Matthew Heaney  <heaney@adacore.com>
9326
9327         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9328         of node.
9329
9330 2011-08-01  Pascal Obry  <obry@adacore.com>
9331
9332         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9333         reformatting.
9334
9335 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9336
9337         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9338         access to protected subprograms in generic bodies.
9339         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9340         protected type, indicate that the convention of the subprogram is
9341         Convention_Protected, because it may be used in subsequent declarations
9342         within the protected declaration.
9343
9344 2011-08-01  Vincent Celier  <celier@adacore.com>
9345
9346         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9347         and "final" procedures when the name of the library is "ada", to avoid
9348         duplicate symbols "adainit" and "adafinal" in executables.
9349
9350 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
9351
9352         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9353         quantified expression that appears within a postcondition and uses the
9354         Ada2012 'Result attribute.
9355
9356 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9357
9358         * init.c (__gnat_error_handler): Cast reason to int.
9359         (__gnat_install_handler): Explain sa_sigaction use.
9360
9361 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9362
9363         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9364         subprogram has copy-in copy-out parameters, try to promote the mode of
9365         the return type if it is passed in registers.
9366
9367 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9368
9369         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9370         left operand as addressable.
9371
9372 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
9373
9374         * gcc-interface/gigi.h (build_function_stub): Remove.
9375         (build_return_expr): Likewise.
9376         (convert_vms_descriptor): Declare.
9377         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9378         (build_function_stub): Move to...
9379         * gcc-interface/utils2.c (build_return_expr): Move to...
9380         * gcc-interface/trans.c (build_function_stub): ...here.
9381         (build_return_expr): ...here.
9382         (Subprogram_Body_to_gnu): Add local variable for language_function.
9383         Disconnect the parameter attributes cache, if any, once done with it.
9384         Call end_subprog_body only after setting the end_locus.
9385         Build the stub associated with the function, if any, at the very end.
9386         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9387         variables and streamline control flow.
9388
9389 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
9390
9391         PR ada/49819
9392         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9393         g-trasym-dwarf.adb.
9394
9395 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9396
9397         PR bootstrap/49794
9398         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9399         Assign to act.sa_sigaction.
9400         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9401         current->return_address to char * before arithmetic.
9402
9403 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9404
9405         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9406         Correct argument types.
9407         Extract code from reason.
9408         (__gnat_install_handler): Assign to act.sa_sigaction.
9409
9410 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
9411
9412         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9413         (GNAT1_OBJS): ...here.
9414
9415 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
9416
9417         PR ada/48711
9418         * g-socthi-mingw.adb (Fill): Fix formatting.
9419
9420         * gcc-interface/gigi.h: Move around comment.
9421
9422 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
9423
9424         PR ada/46350
9425         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9426
9427 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
9428
9429         PR ada/48711
9430         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9431
9432 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
9433
9434         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9435         range comparison if Pmode is SImode.
9436
9437 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
9438             Eric Botcazou  <ebotcazou@adacore.com>
9439
9440         * adadecode.c: Wrap up in extern "C" block.
9441         * adadecode.h: Likewise.
9442         * adaint.c: Likewise.  Remove 'const' keyword.
9443         * adaint.h: Likewise.
9444         * argv.c: Likewise.
9445         * atree.h: Likewise.
9446         * cio.c: Likewise.
9447         * cstreams.c: Likewise.
9448         * env.c: Likewise.
9449         * exit.c: Likewise.
9450         * fe.h: Likewise.
9451         * final.c: Likewise.
9452         * init.c: Likewise.
9453         * initialize.c: Likewise.
9454         * link.c: Likewise.
9455         * namet.h: Likewise.
9456         * nlists.h: Likewise.
9457         * raise.c: Likewise.
9458         * raise.h: Likewise.
9459         * repinfo.h: Likewise.
9460         * seh_init.c: Likewise.
9461         * targext.c: Likewise.
9462         * tracebak.c: Likewise.
9463         * uintp.h: Likewise.
9464         * urealp.h: Likewise.
9465         * xeinfo.adb: Wrap up generated C code in extern "C" block.
9466         * xsinfo.adb: Likewise.
9467         * xsnamest.adb: Likewise.
9468         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9469         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9470         * gcc-interface/misc.c: Likewise.
9471         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9472         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
9473         ada/targext.o here...
9474         (GNAT_ADA_OBJS): ...and not here.
9475         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9476         (GNATBIND_OBJS): Reorder.
9477
9478 2011-07-07  Richard Henderson  <rth@redhat.com>
9479
9480         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9481         dwarf2out_frame_init.
9482
9483 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
9484
9485         * gcc-interface/misc.c (gnat_init): Tweak previous change.
9486
9487 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9488
9489         PR target/39150
9490         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9491
9492 2011-07-06  Richard Guenther  <rguenther@suse.de>
9493
9494         * gcc-interface/misc.c (gnat_init): Merge calls to
9495         build_common_tree_nodes and build_common_tree_nodes_2.
9496         Re-initialize boolean_false_node.
9497
9498 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
9499             Olivier Hainque  <hainque@adacore.com>
9500             Nicolas Setton  <setton@adacore.com>
9501
9502         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9503         the type according to the ARTIFICIAL_P parameter.
9504         (create_type_decl): Likewise.
9505         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9506
9507 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
9508
9509         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9510         (gnatbind): Likewise.
9511
9512 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9513
9514         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9515
9516 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9517
9518         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9519         local variable throughout.  Remove useless call to Base_Type.
9520         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9521         Take it also into account for the volatileness of the field.  Set the
9522         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
9523
9524 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9525
9526         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9527         on a dereference built for a by-ref object if it has an address clause.
9528
9529 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
9530
9531         * einfo.ads (Address_Taken): Document use for the second argument of
9532         Asm_Input and Asm_Output attributes.
9533         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9534         argument is an entity name, then set Address_Taken on it.
9535         <Attribute_Asm_Output>: Likewise.
9536         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9537         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9538         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9539         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9540
9541 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
9542
9543         PR middle-end/46500
9544         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9545
9546 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
9547
9548         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9549         (ada/utils.o): Update dependencies.
9550         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9551         ../../../libcpp/libcpp.a.
9552         * gcc-interface/utils.c: Include common/common-target.h.
9553         (process_attributes): Use targetm_common.have_named_sections.
9554
9555 2011-06-07  Richard Guenther  <rguenther@suse.de>
9556
9557         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9558         set_sizetype.
9559
9560 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9561
9562         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9563         TREE_THIS_NOTRAP flag.
9564
9565 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9566
9567         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9568         Fix thinko.
9569
9570 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9571
9572         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9573         constants whose full view has discriminants specially.
9574
9575 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9576
9577         * gcc-interface/utils.c: Include diagnostic.h.
9578         (gnat_write_global_declarations): Output debug information for all
9579         global type declarations before finalizing the compilation unit.
9580         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9581
9582 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
9583
9584         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9585
9586 2011-05-25  Kai Tietz  <ktietz@redhat.com>
9587
9588         * adaint.c (__gnat_to_canonical_file_list_next): Use array
9589         initialization instead of const/none-const pointer assignment.
9590
9591 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
9592
9593         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9594         $(EXTRA_GNAT1_OBJS).
9595         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9596         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9597         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9598         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9599         libcommon-target.a instead of prefix.o.
9600
9601 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
9602
9603         PR ada/49097
9604         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9605
9606 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
9607
9608         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9609         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9610         instead of version.o.
9611
9612 2011-05-18  Kai Tietz <ktietz@redhat.com>
9613
9614         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9615         boolean_false_node instead of integer_zero_node.
9616         (convert_with_check): Likewise.
9617         * gcc-interface/decl.c (choices_to_gnu): Likewise.
9618
9619 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
9620
9621         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9622         type of the parameter is an unconstrained array, convert the actual to
9623         the type of the formal in the In Out and Out cases as well.
9624
9625 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
9626
9627         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9628         call build_function_type_array or build_varargs_function_type_array
9629         instead.
9630         (create_subprog_type): Don't call build_function_type; call
9631         build_function_type_vec instead.
9632
9633 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
9634
9635         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9636         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9637         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9638
9639 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
9640
9641         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9642
9643         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9644         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9645
9646 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
9647
9648         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9649
9650 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
9651
9652         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9653         instead of accessing TYPE_ARG_TYPES directly.
9654         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9655
9656 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
9657
9658         PR ada/48844
9659         * gcc-interface/gigi.h (get_variant_part): Declare.
9660         * gcc-interface/decl.c (get_variant_part): Make global.
9661         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9662         types have the same constant size, are record types and T1 has a
9663         variant part while T2 doesn't.
9664
9665 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
9666
9667         * gcc-interface/utils.c (begin_subprog_body): Do not call
9668         get_pending_sizes.
9669         (end_subprog_body): Likewise.
9670
9671 2011-05-04  Richard Guenther  <rguenther@suse.de>
9672
9673         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9674         int_const_binop.
9675         (pos_to_constructor): Likewise.
9676
9677 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
9678             Eric Botcazou  <ebotcazou@adacore.com>
9679
9680         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9681         of build_function_type.  Adjust calls to...
9682         (build_raise_check): ...this.  Do not take a void_tree parameter.
9683         Call build_function_type_list instead of build_function_type.
9684         Fix head comment and swap couple of conditional blocks.
9685
9686 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
9687
9688         * gnatvsn.ads (Library_Version): Bump to 4.7.
9689         (Current_Year): Bump to 2011.
9690
9691 2011-04-29  Michael Matz  <matz@suse.de>
9692
9693         * gcc-interface/misc.c (gnat_handle_option): Set
9694         warn_maybe_uninitialized.
9695
9696 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
9697
9698         * gnat_ugn.texi (Complexity Metrics Control): Update link to
9699         the Watson/McCabe paper.
9700
9701 2011-04-23  Jim Meyering  <meyering@redhat.com>
9702
9703         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9704
9705 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
9706
9707         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9708         onto the new type.
9709
9710 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
9711
9712         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9713         parameter.
9714         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
9715         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9716         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9717         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9718         <all>: Do not set flags on the reused DECL node coming from an alias.
9719         Set DECL_IGNORED_P on the DECL node built for subprograms if they
9720         don't need debug info here...
9721         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9722         (gigi): Adjust calls to create_subprog_decl.
9723         (build_raise_check): Likewise.
9724         (establish_gnat_vms_condition_handler): Likewise.
9725         (Compilation_Unit_to_gnu): Likewise.
9726         (gnat_to_gnu): Likewise.
9727
9728 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
9729
9730         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9731         (NO_REORDER_ADAFLAGS): New variable.
9732         (EXTRA_GNATTOOLS): Always define.
9733         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9734         Clean up and adjust list of files compiled with special options.
9735         * gcc-interface/Make-lang.in: Likewise.
9736         (ada/decl.o): Cosmetical change.
9737         (ada/misc.o): Remove dependency on $(PLUGIN_H).
9738
9739 2011-04-20  Jim Meyering  <meyering@redhat.com>
9740
9741         * initialize.c (__gnat_initialize): Remove useless if-before-free.
9742
9743 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
9744
9745         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9746         $(CFLAGS) on the link line.
9747
9748 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
9749
9750         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9751         padded type built for the return type if it is unconstrained.
9752
9753 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
9754
9755         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9756
9757 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
9758
9759         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9760         before calling TREE_CHAIN.
9761         * gcc-interface/misc.c (gnat_init_ts): New function.
9762         (LANG_HOOKS_INIT_TS): Define.
9763
9764 2011-04-12  Martin Jambor  <mjambor@suse.cz>
9765
9766         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9767         instead of cgraph_node.
9768
9769 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
9770
9771         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9772         alignment on fields of the RETURN type built for the Copy-In Copy-Out
9773         mechanism.
9774
9775 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
9776
9777         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9778         of aggregate types that contain a placeholder.
9779
9780 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
9781
9782         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9783         TYPE_ARG_TYPES.
9784         (handle_type_generic_attribute): Likewise.
9785
9786 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
9787
9788         PR ada/47163
9789         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9790
9791 2011-04-04  Kai Tietz  <ktietz@redhat.com>
9792
9793         PR ada/47163
9794         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9795         to flag value.
9796
9797 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9798
9799         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9800         type case, do not strip a padding type around the array type.
9801
9802 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9803
9804         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9805         types.
9806
9807 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9808
9809         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9810         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9811         code for -feliminate-unused-debug-types.
9812         (gnat_post_options): Likewise.
9813
9814 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9815
9816         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9817         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9818         distinct copy.
9819
9820 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9821
9822         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9823         DECL_ARTIFICIAL flag on enumeration types.
9824
9825 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9826
9827         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9828         fat pointer types artificial unconditionally.
9829         <E_Array_Subtype>: Attach the base array type as a parallel type if it
9830         isn't artificial.
9831
9832 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9833
9834         * gcc-interface/gigi.h (get_dummy_type): Declare.
9835         (build_dummy_unc_pointer_types): Likewise.
9836         (finish_fat_pointer_type): Likewise.
9837         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9838         fat pointer type has been built, complete it in place.
9839         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9840         and thin pointers.  Remove useless variable.
9841         (finish_fat_pointer_type): Make global and move to...
9842         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9843         (get_dummy_type): New function.
9844         (build_dummy_unc_pointer_types): Likewise.
9845         (gnat_pushdecl): Propage the name to the anonymous variants only.
9846         (update_pointer_to): Only adjust the pointer types in the unconstrained
9847         array case.
9848
9849 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9850
9851         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9852         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9853         if this is a Taft amendment type and the full declaration is available.
9854         * gcc-interface/trans.c (process_type): Likewise.
9855         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9856         (process_freeze_entity): Likewise.
9857         * gcc-interface/utils.c (dummy_global): New static variable.
9858         (gnat_write_global_declarations): If there are types declared as used
9859         at the global level, insert them in the global hash table.
9860
9861 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9862
9863         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9864         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9865         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9866         copy.
9867         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
9868         flag of the type accordingly.
9869         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9870
9871 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
9872
9873         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9874         finalizing types when updating the pointers to the designated type.
9875         <all>: Finalize the deferred types even if we didn't defer processing
9876         of incomplete types in this invocation.
9877
9878 2011-04-01  Olivier Hainque  <hainque@adacore.com>
9879             Nicolas Setton  <setton@adacore.com>
9880             Eric Botcazou  <ebotcazou@adacore.com>
9881
9882         * gcc-interface/misc.c (gnat_descriptive_type): New function.
9883         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9884
9885 2011-03-28  Kai Tietz  <ktietz@redhat.com>
9886
9887         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9888         Windows targets.
9889         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9890         * system-mingw.ads (System): Change ZCX_By_Default default to True.
9891
9892         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9893
9894 2011-03-28  Tristan Gingold  <gingold@adacore.com>
9895
9896         PR ada/44431
9897         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9898         Use ada output of gnatbind.
9899         (ada/b_gnatb.adb): Ditto.
9900         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9901         (ada.mostlyclean, ada.stage1)
9902         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9903         (ada.stagefeedback): Adjust.
9904         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9905         Use ada output of gnatbind.
9906         (b_gnatm.adb): Ditto.
9907         (b_gnatl.o, b_gnatm.o): New rules.
9908
9909 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9910
9911         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9912         for the padded type built to support a specified size or alignment.
9913
9914 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9915
9916         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9917         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9918         unconditionally to the end of the unit when the designated type is
9919         limited_with'ed.
9920         <all>: Rename local variable.  Attempt to un-defer types only and do it
9921         for limited_with'ed types as well.
9922         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
9923         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9924         consistently and remove redundant call to finalize_from_with_types.
9925
9926 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
9927
9928         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9929         subprograms without a previous spec declared in the same unit.
9930         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9931         subprograms at the end of the unit instead of at the beginning.
9932         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9933         isn't public for the special handling of non-inline functions nested
9934         inside inline external functions.
9935
9936 2011-03-25  Jeff Law  <law@redhat.com>
9937
9938         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9939
9940 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
9941
9942         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9943         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9944         to compute Set_Size_Depends_On_Discriminant.
9945         (Layout_Type): Call it on array types in back-end layout mode.
9946         * sem_util.adb (Requires_Transient_Scope): Return true for array
9947         types only if the size depends on the value of discriminants.
9948         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9949         type if the RHS is a call to a function that returns an unconstrained
9950         type with default discriminant.
9951
9952 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
9953
9954         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9955         non-conversion to the nominal result type at the end.
9956
9957 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9958
9959         * gcc-interface/trans.c (create_temporary): New function taken from...
9960         (create_init_temporary): ...here.  Call it.
9961         (call_to_gnu): Create the temporary for the return value early, if any.
9962         Create it for a function with copy-in/copy-out parameters if there is
9963         no target; in other cases of copy-in/copy-out, use another temporary.
9964         Push the new binding level lazily.  Add and rename local variables.
9965
9966 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9967
9968         * gcc-interface/decl.c (validate_size): Improve comments and tweak
9969         error message.
9970         (set_rm_size): Likewise.
9971
9972 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
9973
9974         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9975         for the padded type built in order to support a specified alignment.
9976         Fix incorrect formatting.
9977
9978 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9979
9980         PR bootstrap/48216
9981         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9982
9983 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9984
9985         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9986         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9987         to the end of the list.  Adjust recursive call.  Rename local variable.
9988         If REORDER is true, reorder components of the record type.
9989         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9990         components_to_record and adjust the parameter list.
9991
9992 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
9993
9994         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9995         disabled, use the variable for bounds of loop iteration scheme.
9996
9997 2011-03-21  Kai Tietz  <ktietz@redhat.com>
9998
9999         PR target/12171
10000         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10001
10002 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
10003
10004         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10005         out whether the expression is read-only.  Short-circuit placeholder
10006         case and rename a couple of local variables.
10007
10008 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
10009
10010         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10011         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10012         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10013         (convert): Deal with conversions from a smaller form type specially.
10014
10015 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
10016
10017         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10018         its argument, except for the special -I- switch.
10019
10020 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
10021
10022         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10023         "Ada Issues".
10024
10025 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
10026
10027         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10028
10029 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
10030
10031         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10032         GNAT_FORMAL.
10033         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10034         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
10035         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
10036         Do not generate the check directly, instead instantiate the template
10037         check present in the descriptor.
10038         (make_descriptor_field): Move around.
10039         (build_vms_descriptor32): Build a template check in the POINTER field.
10040         (build_vms_descriptor): Remove useless suffixes.
10041         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10042
10043 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
10044
10045         PR bootstrap/47467
10046         * targext.c: Include target files if IN_RTS is defined.
10047
10048 2011-01-26  Richard Guenther  <rguenther@suse.de>
10049
10050         PR bootstrap/47467
10051         * targext.c: Include config.h.
10052         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10053         dependency.
10054
10055 2011-01-04  Pascal Obry  <obry@adacore.com>
10056             Eric Botcazou  <ebotcazou@adacore.com>
10057
10058         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10059
10060 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10061
10062         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10063         end-of-case on the end label and its associated gotos, if any.
10064
10065 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10066
10067         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10068         expressions of the parameter cache within the statement group of
10069         the CICO mechanism.
10070
10071 2011-01-04  Olivier Hainque  <hainque@adacore.com>
10072             Eric Botcazou  <ebotcazou@adacore.com>
10073
10074         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10075         (set_end_locus_from_node): New function.
10076         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10077         make and the function end_locus.
10078         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10079         for the elaboration subprogram.
10080         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10081         set the end_locus of the expression as well.
10082
10083 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
10084
10085         PR ada/47131
10086         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10087         variables that are referenced in exception handlers volatile.
10088
10089
10090 \f
10091 Copyright (C) 2011 Free Software Foundation, Inc.
10092
10093 Copying and distribution of this file, with or without modification,
10094 are permitted in any medium without royalty provided the copyright
10095 notice and this notice are preserved.
10096
10097         * gnat_rm.texi: Ramification of pragma Eliminate documentation
10098          - fix bugs in the description of Source_Trace;
10099          - get rid of UNIT_NAME;
10100
10101 2011-08-02  Javier Miranda  <miranda@adacore.com>
10102
10103         * exp_ch9.adb
10104         (Build_Dispatching_Requeue): Adding support for VM targets
10105         since we cannot directly reference the Tag entity.
10106         * exp_sel.adb (Build_K): Adding support for VM targets.
10107         (Build_S_Assignment): Adding support for VM targets.
10108         * exp_disp.adb
10109         (Default_Prim_Op_Position): In VM targets do not restrict availability
10110         of predefined interface primitives to compiling in Ada 2005 mode.
10111         (Is_Predefined_Interface_Primitive): In VM targets this service is not
10112         restricted to compiling in Ada 2005 mode.
10113         (Make_VM_TSD): Generate code that declares and initializes the OSD
10114         record. Needed to support dispatching calls through synchronized
10115         interfaces.
10116         * exp_ch3.adb
10117         (Make_Predefined_Primitive_Specs): Enable generation of predefined
10118         primitives associated with synchronized interfaces.
10119         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10120         primitives associated with synchronized interfaces.
10121
10122 2011-08-02  Yannick Moy  <moy@adacore.com>
10123
10124         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10125         statements hidden in SPARK if preceded by the HIDE directive
10126         (Parse_Exception_Handlers): mark each exception handler in a sequence of
10127         exception handlers as hidden in SPARK if preceded by the HIDE directive
10128         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10129         if starting with the HIDE directive
10130         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10131         starting with the HIDE directive; mark the declarations in a private
10132         part as hidden in SPARK if the private part starts with the HIDE
10133         directive
10134         * restrict.adb, restrict.ads
10135         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10136         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10137         argument node belongs to a part which is hidden in SPARK
10138         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10139         parts in SPARK; protect the possibly costly call to
10140         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10141         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10142         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10143         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10144         Tok_SPARK_Hide.
10145         (Scan): recognize special comment starting with '#' and followed by
10146         SPARK keyword "hide" as a HIDE directive.
10147
10148 2011-08-02  Yannick Moy  <moy@adacore.com>
10149
10150         * types.ads, erroutc.ads: Minor reformatting.
10151
10152 2011-08-02  Vincent Celier  <celier@adacore.com>
10153
10154         * link.c: Add response file support for cross platforms.
10155
10156 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10157
10158         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10159         in an association, set parent field of copy before partial analysis.
10160         * sem_res.adb (Resolve_Slice): create reference to itype only when
10161         expansion is enabled.
10162
10163 2011-08-02  Yannick Moy  <moy@adacore.com>
10164
10165         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10166         for new flag denoting which subprogram bodies are in ALFA
10167         * restrict.adb, sem_ch7.adb: Update comment
10168         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10169         sem_ch9.adb, sem_res.adb: Add calls to
10170         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10171         * sem_ch6.adb (Analyze_Function_Return): add calls to
10172         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10173         middle of the body, and extended return.
10174         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10175         False when missing return.
10176         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10177         to True for subprograms whose spec is in ALFA. Remove later on the flag
10178         on the entity used for a subprogram body when there exists a separate
10179         declaration.
10180         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10181         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10182         False, otherwise do nothing.
10183
10184 2011-08-02  Robert Dewar  <dewar@adacore.com>
10185
10186         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10187
10188 2011-08-02  Yannick Moy  <moy@adacore.com>
10189
10190         * sem_ch4.ads: minor formatting.
10191
10192 2011-08-02  Yannick Moy  <moy@adacore.com>
10193
10194         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10195         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10196         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10197         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10198         opt.ads: cleanup of SPARK mode
10199
10200 2011-08-02  Yannick Moy  <moy@adacore.com>
10201
10202         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10203         types.
10204         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10205         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10206         * sem_ch3.adb
10207         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10208         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10209         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10210         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10211         types.
10212         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10213         non-static range.
10214         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10215         functions whose return type is not in ALFA.
10216         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10217         specifications.
10218         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10219         parameter's type is not in ALFA.
10220         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10221         types are in ALFA.
10222
10223 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10224
10225         * sem_ch6 (Analyze_Expression_Function): treat the function as
10226         Inline_Always, and introduce a subprogram declaration for it when it is
10227         not a completion.
10228         * inline.adb (Add_Inlined_Body): recognize bodies that come from
10229         expression functions, so that the back-end can determine whether they
10230         can in fact be inlined.
10231         * sem_util.adb (Is_Expression_Function): predicate to determine whether
10232         a function body comes from an expression function.
10233
10234 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10235
10236         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10237         null exclusions to test Can_Never_Be_Null on the anonymous access types
10238         of the formals rather than testing the formals themselves. Exclude this
10239         check in cases where the Old_Formal is marked as a controlling formal,
10240         to avoid issuing spurious errors for bodies completing dispatching
10241         operations (due to the flag not getting set on controlling access
10242         formals in body specs).
10243         (Find_Corresponding_Spec): When checking full and subtype conformance of
10244         subprogram bodies in instances, pass Designated and E in that order, for
10245         consistency with the expected order of the formals (New_Id followed by
10246         Old_Id).
10247
10248 2011-08-02  Robert Dewar  <dewar@adacore.com>
10249
10250         * sem_ch8.adb: Minor reformatting.
10251
10252 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10253
10254         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10255         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10256         primitive operations of class-wide actuals.
10257
10258 2011-08-02  Javier Miranda  <miranda@adacore.com>
10259
10260         * exp_atag.ads, exp_atag.adb
10261         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10262         since its value is implicitly passed in argument Typ.
10263         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10264         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10265         Build_Common_Dispatching_Select_Statements.
10266
10267 2011-08-02  Robert Dewar  <dewar@adacore.com>
10268
10269         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10270         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10271         Minor reformatting.
10272
10273 2011-08-02  Robert Dewar  <dewar@adacore.com>
10274
10275         * sem_res.adb: Minor reformatting.
10276         * sem_prag.adb: Minor reformatting.
10277
10278 2011-08-02  Javier Miranda  <miranda@adacore.com>
10279
10280         * exp_atag.adb, exp_atags.ads
10281         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10282         by the tagged type Entity. Required to use this routine in the VM
10283         targets since we do not have available the Tag entity in the VM
10284         platforms.
10285         * exp_ch6.adb
10286         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10287         Ada.Tags has not been previously loaded.
10288         * exp_ch7.adb
10289         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10290         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10291         * sem_aux.adb
10292         (Enclosing_Dynamic_Scope): Add missing support to handle the full
10293         view of enclosing scopes. Required to handle enclosing scopes that
10294         are synchronized types whose full view is a task type.
10295         * exp_disp.adb
10296         (Build_VM_TSDs): Minor code improvement to avoid generating and
10297         analyzing lists with empty nodes.
10298         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10299         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10300         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10301         (Make_Disp_Timed_Select_Body): Add support for VM targets.
10302         (Make_Select_Specific_Data_Table): Add support for VM targets.
10303         (Make_VM_TSD): Generate code to initialize the SSD structure of
10304         the TSD.
10305
10306 2011-08-02  Yannick Moy  <moy@adacore.com>
10307
10308         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10309         cross-references section in ALI.
10310         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10311         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10312         Sub).
10313         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10314         subprogram or package entity of a node
10315         (Is_Local_Reference_Type): new function returns True for references
10316         selected in local cross-references.
10317         (Lt): function extracted from Lt in Output_References
10318         (Write_Entity_Name): function extracted from Output_References
10319         (Generate_Definition): generate reference with type 'D' for definition
10320         of objects (object declaration and parameter specification), with
10321         appropriate locations and units, for use in local cross-references.
10322         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10323         references of type 'I' for initialization in object definition.
10324         (Output_References): move part of function Lt and procedure
10325         Write_Entity_Name outside of the body. Ignore references of types 'D'
10326         and 'I' introduced for local cross-references.
10327         (Output_Local_References): new procedure to output the local
10328         cross-references sections.
10329         (Lref_Entity_Status): new array defining whether an entity is a local
10330         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10331         with 'I' type when initialization expression is present.
10332         * get_scos.adb, get_scos.ads: Correct comments and typos
10333
10334 2011-08-02  Javier Miranda  <miranda@adacore.com>
10335
10336         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10337         the JVM target.
10338         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10339         the JVM target.
10340         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10341         TSD support.
10342
10343 2011-08-02  Vincent Celier  <celier@adacore.com>
10344
10345         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10346         (No_Space_Img): New function
10347         (Find_Excluded_Sources): When reading from a file, record the file name
10348         and the line number for each excluded source.
10349         (Mark_Excluded_Sources): When reporting an error, if the excluded
10350         sources were read from a file, include file name and line number in
10351         the error message.
10352
10353 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10354
10355         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10356
10357 2011-08-02  Robert Dewar  <dewar@adacore.com>
10358
10359         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10360
10361 2011-08-02  Javier Miranda  <miranda@adacore.com>
10362
10363         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10364         generation of TSDs to the DOTNET compiler.
10365         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10366         generation of TSDs to the DOTNET compiler.
10367
10368 2011-08-02  Javier Miranda  <miranda@adacore.com>
10369
10370         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10371         record of all the tagged types declared inside library level package
10372         declarations, library level package bodies or library level subprograms.
10373         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10374         associated with a given tagged type.
10375         (Build_VM_TSDs): New subprogram.
10376         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10377         compilation units that are subprograms.
10378         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10379         compilation units that are package bodies.
10380         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10381         units that are a package declaration or a package instantiation.
10382         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10383         reorganization to improve the error generated by the frontend when the
10384         function Ada.Tags.Secondary_Tag is not available.
10385         * rtsfind.ads (RE_Register_TSD): New runtime entity.
10386         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10387
10388 2011-08-02  Javier Miranda  <miranda@adacore.com>
10389
10390         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10391
10392 2011-08-02  Robert Dewar  <dewar@adacore.com>
10393
10394         * s-imenne.ads: Minor reformatting.
10395
10396 2011-08-02  Robert Dewar  <dewar@adacore.com>
10397
10398         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10399         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10400         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10401
10402 2011-08-02  Robert Dewar  <dewar@adacore.com>
10403
10404         * einfo.ads (Materialize_Entity): Document this is only for renamings
10405         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10406         required debug information in the case where we transform the object
10407         declaration into a renaming declaration.
10408         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10409         object
10410         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10411         Materialize_Entity.
10412
10413 2011-08-02  Robert Dewar  <dewar@adacore.com>
10414
10415         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10416         Suppress_Init_Procs.
10417         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10418         Suppress_Initialization/Initialization_Suppressed.
10419         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10420         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10421         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10422         * sem_prag.adb: New processing for pragma Suppress_Initialization.
10423
10424 2011-08-02  Robert Dewar  <dewar@adacore.com>
10425
10426         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10427         Minor reformatting.
10428
10429 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10430
10431         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10432         only have inheritable classwide pre/postconditions.
10433
10434 2011-08-02  Javier Miranda  <miranda@adacore.com>
10435
10436         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10437         * rtsfind.ads (RE_Check_TSD): New runtime entity.
10438         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10439         checks if the external tag of a type is the same as the external tag
10440         of some other declaration.
10441
10442 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10443
10444         * s-taskin.ads: Minor reformatting.
10445
10446 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10447
10448         * g-comlin.adb (Display_Help): swap the order in which it prints the
10449         short help and the general usage.
10450
10451 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10452
10453         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10454         the aspect declarations and attach them to the generic copy for
10455         subsequent analysis.
10456         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10457         declarations of the generic tree to the new subprogram declarations.
10458         * sem_attr.adb (Check_Precondition_Postcondition): recognize
10459         conditions that apply to a subprogram instance.
10460
10461 2011-08-02  Robert Dewar  <dewar@adacore.com>
10462
10463         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10464
10465 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10466
10467         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10468         private type with a tagged full view is not derived in the immediate
10469         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10470
10471 2011-08-02  Robert Dewar  <dewar@adacore.com>
10472
10473         * exp_ch4.adb: Minor reformatting.
10474
10475 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10476
10477         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
10478         Ada2012 iterator, the loop will be rewritten during expansion into a
10479         while loop with a cursor and an element declaration. Do not analyze the
10480         body in this case, because if the container is for indefinite types the
10481         actual subtype of the elements will only be determined when the cursor
10482         declaration is analyzed.
10483
10484 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10485
10486         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10487         size/alignment related attributes in CodePeer_Mode.
10488
10489 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10490
10491         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10492         Prepend_Element, since this can result in the operation getting the
10493         wrong slot in the full type's dispatch table if the full type has
10494         inherited operations. The incomplete type's operation will get added
10495         to the proper position in the full type's primitives
10496         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10497         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10498         dispatching operations, since there are cases where nonprimitive
10499         subprograms can get added to the list of incomplete dependents (such
10500         as subprograms in nested packages).
10501         * sem_ch6.adb (Process_Formals): First, remove test for being in a
10502         private part when determining whether to add a primitive with a
10503         parameter of a tagged incomplete type to the Private_Dependents list.
10504         Such primitives can also occur in the visible part, and should not have
10505         been excluded from being private dependents.
10506         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10507         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10508         list of a Taft-amendment incomplete type is a primitive before issuing
10509         an error that the full type must appear in the same unit. There are
10510         cases where nonprimitives can be in the list (such as subprograms in
10511         nested packages).
10512         * sem_disp.adb (Derives_From): Use correct condition for checking that
10513         a formal's type is derived from the type of the corresponding formal in
10514         the parent subprogram (the condition was completely wrong). Add
10515         checking that was missing for controlling result types being derived
10516         from the result type of the parent operation.
10517
10518 2011-08-02  Yannick Moy  <moy@adacore.com>
10519
10520         * errout.adb (First_Node): minor renaming
10521         * restrict.adb (Check_Formal_Restriction): put restriction warning on
10522         first node.
10523
10524 2011-08-02  Yannick Moy  <moy@adacore.com>
10525
10526         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10527         before accessing operands.
10528         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10529         decide whether an initialization expression respects SPARK rules, as
10530         the plain node is the expanded one. This allows for more valid warnings
10531         to be issued.
10532         * gnat_rm.texi: Minor update.
10533
10534 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10535
10536         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10537         previous change.
10538
10539 2011-08-02  Robert Dewar  <dewar@adacore.com>
10540
10541         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10542
10543 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10544
10545         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10546         loop statements and the element renaming declaration with a block when
10547         the element type is controlled.
10548
10549 2011-08-02  Yannick Moy  <moy@adacore.com>
10550
10551         * sinfo.ads: Minor formatting.
10552
10553 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10554
10555         * sem_aggr.adb (Add_Association): if the association has a box and no
10556         expression, use the Sloc of the aggregate itself for the new
10557         association.
10558         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10559         the Original_Node.
10560
10561 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10562
10563         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10564         When a container is provided via a function call, generate a renaming
10565         of the function result. This avoids the creation of a transient scope
10566         and the premature finalization of the container.
10567         * exp_ch7.adb (Is_Container_Cursor): Removed.
10568         (Wrap_Transient_Declaration): Remove the supression of the finalization
10569         of the list controller when the declaration denotes a container cursor,
10570         it is not needed.
10571
10572 2011-08-02  Yannick Moy  <moy@adacore.com>
10573
10574         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10575         node is from source, instead of the original node being from source.
10576         * sem_aggr.adb
10577         (Resolve_Array_Aggregate): refine the check for a static expression, to
10578         recognize also static ranges
10579         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10580         Array_Type_Declaration): postpone the test for the type being a subtype
10581         mark after the type has been resolved, so that component-selection and
10582         expanded-name are discriminated.
10583         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10584         to distinguish the case of an iteration scheme, so that an error is
10585         issed on a non-static range in SPARK except in an iteration scheme.
10586         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10587         In_Iter_Schm = True.
10588         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10589         user-defined operators so that they are allowed in renaming
10590         * sem_ch8.adb
10591         (Find_Selected_Component): refine the check for prefixing of operators
10592         so that they are allowed in renaming. Move the checks for restrictions
10593         on selector name after analysis discriminated between
10594         component-selection and expanded-name.
10595         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10596         concatenation argument of string type if it is static.
10597         * sem_util.adb, sem_util.ads
10598         (Check_Later_Vs_Basic_Declarations): add a new function
10599         Is_Later_Declarative_Item to decice which declarations are allowed as
10600         later items, in the two different modes Ada 83 and SPARK. In the SPARK
10601         mode, add that renamings are considered as later items.
10602         (Enclosing_Package): new function to return the enclosing package
10603         (Enter_Name): correct the rule for homonyms in SPARK
10604         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10605         from source (result of expansion) to avoid issuing wrong warnings.
10606
10607 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10608
10609         * errout.adb: On anything but an expression First_Node returns its
10610         argument.
10611
10612 2011-08-02  Pascal Obry  <obry@adacore.com>
10613
10614         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10615
10616 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10617
10618         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10619         Set the associated loop as the related expression of internally
10620         generated cursors.
10621         * exp_ch7.adb (Is_Container_Cursor): New routine.
10622         (Wrap_Transient_Declaration): Supress the finalization of the list
10623         controller when the declaration denotes a container cursor.
10624
10625 2011-08-02  Yannick Moy  <moy@adacore.com>
10626
10627         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10628         command line now.
10629         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10630         expression is a simple expression. This check cannot be performed in
10631         the semantics, so just drop it.
10632         (P_Index_Or_Discriminant_Constraint): move check that the index or
10633         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10634         semantics. Other cases were previously checked in the semantics.
10635         * par-ch4.adb (P_Name): move checks that a selector name is not
10636         character literal or an operator symbol to Find_Selected_Component in
10637         the semantics
10638         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10639         declarations are not placed after later declarations in a separate
10640         procedure in Sem_Util (possibly not the best choice?), to be used both
10641         during parsing, for Ada 83 mode, and during semantic analysis, for
10642         SPARK mode.
10643         * par-endh.adb (Check_End): move check that end label is not missing
10644         to Process_End_Label in the semantics
10645         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10646         the special case for SPARK restriction
10647         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10648         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10649         parameter Force to issue the error message even on internal node (used
10650         for generated end label). Call Check_Restriction to check when an error
10651         must be issued. In SPARK mode, issue an error message even if the
10652         restriction is not set.
10653         (Check_Restriction): new procedure with an additional out parameter to
10654         inform the caller that a message has been issued
10655         * sem_aggr.adb: Minor modification of message
10656         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10657         instead of issuing an error message directly
10658         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10659         declarations are not placed after later declarations, by calling
10660         Check_Later_Vs_Basic_Declarations
10661         (Analyze_Subtype_Declaration): move here the check that an index or
10662         discriminant constraint must be a subtype mark. Change the check that
10663         a subtype of String must start at one so that it works on subtype marks.
10664         * sem_ch4.adb (Analyze_Call): move here the check that a named
10665         association cannot follow a positional one in a call
10666         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10667         instead of issuing an error message directly
10668         * sem_ch8.adb (Find_Selected_Component): move here the check that a
10669         selector name is not a character literal or an operator symbol. Move
10670         here the check that the prefix of an expanded name cannot be a
10671         subprogram or a loop statement.
10672         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10673         procedure called from parsing and semantics to check that basic
10674         declarations are not placed after later declarations
10675         (Process_End_Label): move here the check that end label is not missing
10676
10677 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10678
10679         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10680         representation clause in codepeer mode, since it confuses CodePeer and
10681         does not bring useful info.
10682
10683 2011-08-02  Ed Falis  <falis@adacore.com>
10684
10685         * init.c: initialize fp hw on MILS.
10686
10687 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10688
10689         * errout.adb (First_Node): for bodies, return the node itself (small
10690         optimization). For other nodes, do not check source_unit if the node
10691         comes from Standard.
10692
10693 2011-08-02  Robert Dewar  <dewar@adacore.com>
10694
10695         * exp_ch3.adb: Minor comment additions.
10696         * sem_ch13.adb: Minor reformatting.
10697
10698 2011-08-02  Pascal Obry  <obry@adacore.com>
10699
10700         * make.adb, makeutl.adb: Removes some superfluous directory separator.
10701
10702 2011-08-02  Robert Dewar  <dewar@adacore.com>
10703
10704         * sem_attr.adb: Minor reformatting.
10705
10706 2011-08-02  Robert Dewar  <dewar@adacore.com>
10707
10708         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10709         (Has_Default_Component_Value): Removed
10710         * einfo.ads Comment updates
10711         (Has_Default_Aspect): Replaces Has_Default_Value
10712         (Has_Default_Component_Value): Removed
10713         * exp_ch13.adb
10714         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10715         * exp_ch3.adb
10716         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10717         (Get_Simple_Init_Val): Handle Default_Value aspect
10718         (Needs_Simple_Initialization): Handle Default_Value aspect
10719         * exp_ch3.ads: Needs_Simple_Initialization
10720         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10721         * par-prag.adb (Pragma_Default[_Component]Value) Removed
10722         * sem_ch13.adb
10723         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10724         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10725         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10726
10727 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10728
10729         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10730         package containing iteration primitives.
10731         exp_ch5.adb (Expand_Iterator_Loop): ditto.
10732
10733 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10734
10735         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10736         "of", pre-analyze expression in case it is a function call with
10737         finalization actions that must be placed ahead of the loop.
10738         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10739         on an Ada2012 iterator, insert them ahead of the rewritten loop.
10740
10741 2011-08-02  Geert Bosch  <bosch@adacore.com>
10742
10743         * cstand.adb (Create_Float_Types): Only consider C's long double for
10744         Long_Long_Float, in addition to double.
10745
10746 2011-08-02  Robert Dewar  <dewar@adacore.com>
10747
10748         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10749         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10750         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10751         Minor reformatting.
10752
10753 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10754
10755         * sem_attr.adb: handle properly 'Result when it is a prefix of an
10756         indexed component.
10757
10758 2011-08-02  Javier Miranda  <miranda@adacore.com>
10759
10760         * einfo.ads, einfo.adb
10761         (Original_Access_Type): Move this attribute to Node26 since there was
10762         an undocumented use of Node21 in E_Access_Subprogram_Type entities
10763         which causes conflicts and breaks the generation of the .NET compiler.
10764         (Interface_Name): Add missing documentation on JGNAT only uses of
10765         this attribute.
10766
10767 2011-08-02  Geert Bosch  <bosch@adacore.com>
10768
10769         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10770         (Find_Back_End_Float_Type): Likewise
10771         (Create_Back_End_Float_Types): Likewise
10772         (Create_Float_Types): Likewise
10773         (Register_Float_Type): Likewise
10774         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10775         Nlist and split out type selection in new local Find_Base_Type function.
10776         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10777         Nlist
10778         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10779
10780 2011-08-02  Robert Dewar  <dewar@adacore.com>
10781
10782         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10783         alpha order).
10784         * opt.ads: Minor comment change.
10785         * sem_ch12.adb: Minor code reorganization.
10786
10787 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10788
10789         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10790         subtype's list of rep items to the list on the full subtype in the case
10791         where the lists are the same.
10792
10793 2011-08-02  Geert Bosch  <bosch@adacore.com>
10794
10795         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10796         using the one from System.Strings, which also deallocates all strings.
10797
10798 2011-08-02  Geert Bosch  <bosch@adacore.com>
10799
10800         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10801         function.
10802         * gcc-interface/Make-lang.in: Update dependencies.
10803
10804 2011-08-02  Olivier Hainque  <hainque@adacore.com>
10805
10806         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10807         end_locus.
10808
10809 2011-08-02  Javier Miranda  <miranda@adacore.com>
10810
10811         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10812         associated with anonymous access to subprograms.
10813
10814 2011-08-02  Geert Bosch  <bosch@adacore.com>
10815
10816         * opt.ads
10817         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10818         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10819         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10820         (Add_Symbol_Definition): Move to switch-c.adb
10821         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10822         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10823         (Add_Symbol_Definition): Move to switch-c.adb.
10824         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10825         * sem_warn.adb
10826         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10827         Move to warnsw.adb.
10828         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10829         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10830         Move to warnsw.adb.
10831         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10832         (Add_Symbol_Definition): Moved from Prepcomp.
10833         * switch-c.ads: Update copyright notice. Use String_List instead of
10834         Argument_List, removing dependency on System.OS_Lib.
10835
10836 2011-08-02  Yannick Moy  <moy@adacore.com>
10837
10838         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10839         mode on initialization expression which does not respect SPARK
10840         restrictions.
10841         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10842         if the tree referenced by its argument represents an initialization
10843         expression in SPARK, suitable for initializing an object in an object
10844         declaration.
10845
10846 2011-08-02  Javier Miranda  <miranda@adacore.com>
10847
10848         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10849         internally generated access to subprogram with its associated protected
10850         subprogram type.
10851         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10852
10853 2011-08-02  Geert Bosch  <bosch@adacore.com>
10854
10855         * cstand.adb (Register_Float_Type): Print information about type to
10856         register, if the Debug_Flag_Dot_B is set.
10857         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10858         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10859         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10860         with a requested precision of more than Max_Digits digits and no more
10861         than Max_Base_Digits digits, if a range specification is present and the
10862         Predefined_Float_Types list has a suitable type to derive from.
10863         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10864         case of type completion with pragma Import
10865         * sem_prag.adb
10866         (Process_Import_Predefined_Type): Processing to complete a type
10867         with pragma Import. Currently supports floating point types only.
10868         (Set_Convention_From_Pragma): Do nothing without underlying type.
10869         (Process_Convention): Guard against absence of underlying type,
10870         which may happen when importing incomplete types.
10871         (Process_Import_Or_Interface): Handle case of importing predefined
10872         types. Tweak error message.
10873
10874 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10875
10876         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10877         functions to previous change.  Reorganize code slightly.
10878
10879 2011-08-02  Geert Bosch  <bosch@adacore.com>
10880
10881         * back_end.ads (Register_Type_Proc): New call back procedure type for
10882         allowing the back end to provide information about available types.
10883         (Register_Back_End_Types): New procedure to register back end types.
10884         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10885         available types.
10886         * cstand.adb (Back_End_Float_Types): New list for floating point types
10887         supported by the back end.
10888         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10889         (Copy_Float_Type): New procedure to make new copies of predefined types.
10890         (Register_Float_Type): New call back procedure to populate the BEFT list
10891         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10892         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10893         (Create_Float_Types): New procedure to create entities for floating
10894         point types predefined in Standard, and put these and any remaining
10895         BEFTs on the Predefined_Float_Types list.
10896         * stand.ads (Predefined_Float_Types): New list for predefined floating
10897         point types that do not have declarations in package Standard.
10898
10899 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10900
10901         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
10902         entity node for the unit containing the parameter.
10903         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10904         (Add_Inlined_Subprogram): Likewise.
10905         * gcc-interface/Make-lang.in: Update dependencies.
10906
10907 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10908
10909         * s-stusta.adb (Print): Make sure Pos is always initialized to a
10910         suitable value.
10911
10912 2011-08-02  Geert Bosch  <bosch@adacore.com>
10913
10914         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10915
10916 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10917
10918         * sem_type.adb (Covers): Move trivial case to the top and reuse the
10919         computed value of Base_Type.
10920
10921 2011-08-02  Yannick Moy  <moy@adacore.com>
10922
10923         * restrict.adb (Check_Restriction): issue an error for any use of
10924         class-wide, even if the No_Dispatch restriction is not set.
10925         * sem_aggr.adb: Correct typos in comments and messages in formal mode
10926         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10927         when completing a private extension, the type named in the private part
10928         is not the same as that named in the visible part.
10929         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10930         of an inherited primitive operations of a tagged type or type extension
10931         that returns the tagged type.
10932         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10933         function which returns True for an implicit operation inherited by the
10934         derived type declaration for the argument type.
10935         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10936         order.
10937
10938 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10939
10940         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10941         Process_Bounds, to perform analysis with expansion of a range or an
10942         expression that is the iteration scheme for a loop.
10943         (Analyze_Iterator_Specification): If domain of iteration is given by a
10944         function call with a controlled result, as is the case if call returns
10945         a predefined container, ensure that finalization actions are properly
10946         generated.
10947         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10948
10949 2011-08-02  Javier Miranda  <miranda@adacore.com>
10950
10951         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10952         * gcc-interface/Make-lang.in: Update dependencies.
10953
10954 2011-08-02  Javier Miranda  <miranda@adacore.com>
10955
10956         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10957         determine if the analysis is performed using N or Original_Node (N).
10958         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10959         functionality of routine Is_Variable avoids code duplication.
10960         * checks.adb (Determine_Range): Handle temporaries generated by
10961         Remove_Side_Effects.
10962
10963 2011-08-02  Javier Miranda  <miranda@adacore.com>
10964
10965         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10966         expansion of the condition. Required since the previous analysis was
10967         done with expansion disabled (see Resolve_Quantified_Expression) and
10968         hence checks were not inserted and record comparisons have not been
10969         expanded.
10970
10971 2011-08-02  Ed Falis  <falis@adacore.com>
10972
10973         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10974         Update header.
10975
10976 2011-08-02  Bob Duff  <duff@adacore.com>
10977
10978         * opt.ads: Minor comment fix.
10979
10980 2011-08-02  Bob Duff  <duff@adacore.com>
10981
10982         * sem_ch12.adb (Analyze_Package_Instantiation,
10983         Analyze_Subprogram_Instantiation): Turn off style checking while
10984         analyzing an instance. Whatever style checks that apply to the generic
10985         unit should apply, so it makes no sense to apply them in an instance.
10986         This was causing trouble when compiling an instance of a runtime
10987         unit that violates the -gnatyO switch.
10988         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10989         one of the two case statements, causing spurious errors.
10990
10991 2011-08-02  Robert Dewar  <dewar@adacore.com>
10992
10993         * uname.adb: Minor reformatting.
10994         * gnatcmd.adb: Minor reformatting.
10995         * exp_attr.adb: Minor reformatting.
10996
10997 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10998
10999         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11000         No_Dispatching_Calls, do not look for the Assign primitive, because
11001         predefined primitives are not created in this case.
11002
11003 2011-08-02  Bob Duff  <duff@adacore.com>
11004
11005         * stylesw.ads: Minor comment fixes.
11006
11007 2011-08-02  Robert Dewar  <dewar@adacore.com>
11008
11009         * freeze.adb (Add_To_Result): New procedure.
11010
11011 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11012
11013         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11014         time, if the specific run-time routines for handling streams of strings
11015         are not available, use the default mechanism.
11016
11017 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11018
11019         * s-regpat.ads: Fix typo.
11020
11021 2011-08-02  Vincent Celier  <celier@adacore.com>
11022
11023         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11024         not null, call it to create the in memory config project file without
11025         parsing an existing default config project file.
11026
11027 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11028
11029         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11030
11031 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11032
11033         * sem_elim.adb: an abstract subprogram does not need an eliminate
11034         pragma for its descendant to be eliminable.
11035
11036 2011-08-02  Ed Falis  <falis@adacore.com>
11037
11038         * init.c: revert to handling before previous checkin for VxWorks
11039         * s-intman-vxworks.adb: delete unnecessary declarations related to
11040         using Ada interrupt facilities for handling signals.
11041         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11042         * s-intman-vxworks.ads: Import __gnat_install_handler as
11043         Initialize_Interrupts.
11044         * s-taprop-vxworks.adb: Delete Signal_Mask.
11045         (Abort_Handler): change construction of mask to unblock exception
11046         signals.
11047
11048 2011-08-02  Jerome Guitton  <guitton@adacore.com>
11049
11050         * a-except-2005.adb (Raise_From_Signal_Handler): Call
11051         Debug_Raise_Exception before propagation starts.
11052
11053 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11054
11055         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11056         to Restriction_Check_Required.
11057         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11058         * sem_res.adb (Resolve_Call): Likewise.
11059         * sem_attr.adb (Check_Stream_Attribute): Likewise.
11060
11061 2011-08-02  Bob Duff  <duff@adacore.com>
11062
11063         * stylesw.ads: Update comment.
11064         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11065         * errout.ads: Remove obsolete comment.
11066
11067 2011-08-02  Javier Miranda  <miranda@adacore.com>
11068
11069         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11070         (Set_Is_Safe_To_Reevaluate): new procedure.
11071         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11072         assignment is allowed on safe-to-reevaluate variables.
11073         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11074         temporary created to remove side effects in expressions that use
11075         the secondary stack as safe-to-reevaluate.
11076         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11077         variables that are not true constants.
11078
11079 2011-08-02  Robert Dewar  <dewar@adacore.com>
11080
11081         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11082         sem_res.adb, sem_ch6.adb: Minor reformatting.
11083
11084 2011-08-02  Jerome Guitton  <guitton@adacore.com>
11085
11086         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11087
11088 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11089
11090         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11091         not set Overridden_Operation if subprogram is an initialization
11092         procedure.
11093
11094 2011-08-02  Yannick Moy  <moy@adacore.com>
11095
11096         * par-ch6.adb: Correct obsolete name in comments
11097         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11098         which takes two message arguments (existing function takes one), with
11099         second message used for continuation.
11100         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11101         block statements that originate from a source block statement, not
11102         generated block statements
11103         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11104         symmetry with procedure case
11105         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11106         function to issue an error in formal mode if a package specification
11107         contains more than one tagged type or type extension.
11108         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11109         parameters matching formals of tagged types are objects (or ancestor
11110         type conversions of objects), not general expressions. Issue an error
11111         on view conversions that are not involving ancestor conversion of an
11112         extended type.
11113         (Resolve_Type_Conversion): in formal mode, issue an error on the
11114         operand of an ancestor type conversion which is not an object
11115         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11116         procedure so that it works also for actuals of function calls
11117         (Is_Actual_Tagged_Parameter): new function which determines if its
11118         argument is an actual parameter of a formal of tagged type in a
11119         subprogram call
11120         (Is_SPARK_Object_Reference): new function which determines if the tree
11121         referenced by its argument represents an object in SPARK
11122
11123 2011-08-02  Robert Dewar  <dewar@adacore.com>
11124
11125         * sem_ch3.adb: Minor reformatting
11126         Minor comment addition
11127         Minor error msg text change
11128
11129 2011-08-02  Javier Miranda  <miranda@adacore.com>
11130
11131         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11132         function. Used to be more precise when we generate a variable plus one
11133         assignment to remove side effects in the evaluation of the Bound
11134         expressions.
11135         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11136         of the bound expression to force its re-analysis and thus expand the
11137         associated transient scope (if required). Code cleanup replacing the
11138         previous code that declared the constant entity by an invocation to
11139         routine Force_Evaluation which centralizes this work in the frontend.
11140
11141 2011-08-02  Robert Dewar  <dewar@adacore.com>
11142
11143         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11144         (Base_Type): Now uses improved Is_Base_Type function
11145         * einfo.ads (Base_Type): Inline this function
11146
11147 2011-08-02  Robert Dewar  <dewar@adacore.com>
11148
11149         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11150         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11151
11152 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11153
11154         * gcc-interface/Make-lang.in: Update dependencies.
11155         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11156         targets.
11157
11158 2011-08-02  Yannick Moy  <moy@adacore.com>
11159
11160         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11161         non-simple expression used in delta constraint
11162         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11163         index constraint which is not a subtype mark
11164         * par.adb: With and use Restrict
11165         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11166         mode on component type which is not a subtype mark and default
11167         expression on component
11168         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11169         of string which does not have a lower index bound equal to 1
11170         (Array_Type_Declaration): issue an error in formal mode on index or
11171         component type which is not a subtype mark, and on aliased keyword on
11172         component
11173         (Derived_Type_Declaration): issue an error in formal mode on interface,
11174         limited or abstract type
11175         (Record_Type_Declaration): issue an error in formal mode on interface
11176         (Record_Type_Definition): issue an error in formal mode on tagged types
11177         and type extensions not declared in the specification of a library unit
11178         package; on null non-tagged record; on variant part
11179
11180 2011-08-02  Vincent Celier  <celier@adacore.com>
11181
11182         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11183         not declared for qualified library project when Library_Name is not
11184         declared, but Library_Dir is.
11185
11186 2011-08-02  Robert Dewar  <dewar@adacore.com>
11187
11188         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11189         pragmas (affects aspects [Component_]Default_Value
11190         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11191         component type for the resolution
11192
11193 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11194
11195         * einfo.adb (Base_Type): Tune implementation for speed.
11196
11197 2011-08-02  Robert Dewar  <dewar@adacore.com>
11198
11199         * freeze.adb: Minor reformatting.
11200
11201 2011-08-02  Thomas Quinot  <quinot@adacore.com>
11202
11203         * scos.ads: Update comments.
11204
11205 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11206
11207         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11208         base type, because the parent may be a subtype of a private type whose
11209         convention is established in a private part.
11210
11211 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11212
11213         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11214         statement in a block when the expansion of the return expression has
11215         created a finalization chain.
11216         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11217         with the parent node.
11218         Add N_Extended_Return_Statement to handle the case where a transient
11219         object declaration appears in the Return_Object_Declarations list of
11220         an extended return statement.
11221
11222 2011-08-02  Matthew Gingell  <gingell@adacore.com>
11223
11224         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11225         unused parameter 'name'.
11226
11227 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11228
11229         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11230         inherited operation, check whether its alias, which is the source
11231         operastion that it renames, has been marked eliminated.
11232
11233 2011-08-02  Javier Miranda  <miranda@adacore.com>
11234
11235         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11236         in-mode parameter whose type is an access type since it can be used to
11237         modify its designated object. Enforce code that handles as safe an
11238         access type that is not access-to-constant but it is the result of a
11239         previous removal of side-effects.
11240         (Remove_Side_Effects): Minor code reorganization of cases which require
11241         no action. Done to incorporate documentation on new cases uncovered
11242         working in this ticket: no action needed if this routine was invoked
11243         too early and the nodes are not yet decorated.
11244         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11245         to routine Remove_Side_Effects by calls to Force_Evaluation since they
11246         were issued with actuals that are implicitly provided by
11247         Force_Evaluation.
11248
11249 2011-08-02  Robert Dewar  <dewar@adacore.com>
11250
11251         * sem_ch3.adb, sem_res.adb: Minor reformatting.
11252
11253 2011-08-02  Yannick Moy  <moy@adacore.com>
11254
11255         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11256         to issue an error in formal mode on attribute not supported in this mode
11257         (Analyze_Attribute): issue errors on standard attributes not supported
11258         in formal mode.
11259         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11260         comment, and issue error in formal mode on modulus which is not a power
11261         of 2.
11262         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11263         range.
11264         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11265         subtype mark.
11266         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11267         operator on modular type (except 'not').
11268
11269 2011-08-02  Robert Dewar  <dewar@adacore.com>
11270
11271         * gnat_rm.texi: Minor reformatting.
11272
11273 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11274
11275         * s-osinte-linux.ads: Minor comment update and reformatting.
11276         * i-cexten.ads: Make this unit pure, as for its parent.
11277         Will allow its usage in more contexts if needed.
11278
11279 2011-08-02  Robert Dewar  <dewar@adacore.com>
11280
11281         * s-utf_32.ads: Minor comment fix.
11282
11283 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11284
11285         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11286         operation of a tagged synchronized type, handle the case where the
11287         controlling argument is overloaded.
11288
11289 2011-08-02  Yannick Moy  <moy@adacore.com>
11290
11291         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11292         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11293         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11294         SPARK mode and formal verification mode on processing SPARK restriction
11295         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11296         requiring consistency checking.
11297
11298 2011-08-02  Robert Dewar  <dewar@adacore.com>
11299
11300         * sem_res.adb: Minor reformatting.
11301
11302 2011-08-02  Robert Dewar  <dewar@adacore.com>
11303
11304         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11305         a-cforse.ads: Remove unneeded with of Ada.Containers
11306         Remove commented out pragma Inline's
11307         Move specifications of new subprograms to the actual specs
11308
11309 2011-08-02  Yannick Moy  <moy@adacore.com>
11310
11311         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11312         a-cforse.ads: Update comments.
11313
11314 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11315
11316         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11317
11318 2011-08-02  Robert Dewar  <dewar@adacore.com>
11319
11320         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11321         a-cforse.ads, a-cofove.ads: Minor reformatting.
11322
11323 2011-08-02  Claire Dross  <dross@adacore.com>
11324
11325         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11326         a-cofove.ads: Add comments.
11327
11328 2011-08-02  Yannick Moy  <moy@adacore.com>
11329
11330         * gnat_rm.texi: Document formal containers.
11331
11332 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11333
11334         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11335         are empty sections.
11336
11337 2011-08-02  Robert Dewar  <dewar@adacore.com>
11338
11339         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11340         reformatting.
11341
11342 2011-08-02  Robert Dewar  <dewar@adacore.com>
11343
11344         * aspects.adb: New aspects Default_Value and Default_Component_Value
11345         New format of Aspect_Names table checks for omitted entries
11346         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11347         handling of boolean aspects for derived types.
11348         New aspects Default_Value and Default_Component_Value
11349         New format of Aspect_Names table checks for omitted entries
11350         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11351         (Has_Default_Value): New flag
11352         (Has_Default_Component_Value): New flag
11353         (Has_Default_Value): New flag
11354         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11355         table.
11356         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11357         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11358         Default_Value and Default_Component_Value
11359         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11360         New aspects Default_Value and Default_Component_Value
11361         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11362         * sprint.adb: Print N_Aspect_Specification node when called from gdb
11363
11364 2011-08-02  Vincent Celier  <celier@adacore.com>
11365
11366         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11367         inherit library kind.
11368
11369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11370
11371         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11372         Minor reformatting.
11373
11374 2011-08-02  Robert Dewar  <dewar@adacore.com>
11375
11376         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11377
11378 2011-08-02  Yannick Moy  <moy@adacore.com>
11379
11380         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11381
11382 2011-08-02  Robert Dewar  <dewar@adacore.com>
11383
11384         * impunit.adb: Add comment.
11385
11386 2011-08-02  Yannick Moy  <moy@adacore.com>
11387
11388         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11389         qualification of aggregates in formal mode
11390         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11391         another aggregate
11392         (Resolve_Aggregate): complete the test that an aggregate is adequately
11393         qualified in formal mode
11394
11395 2011-08-02  Pascal Obry  <obry@adacore.com>
11396
11397         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11398         * mlib-prj.adb: Supress warning when compiling binder generated file.
11399         (Build_Library): Supress all warnings when compiling the binder
11400         generated file.
11401
11402 2011-08-02  Yannick Moy  <moy@adacore.com>
11403
11404         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11405         from here...
11406         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11407         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11408         Add with/use clauses to make Check_Formal_Restriction visible
11409
11410 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11411
11412         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11413         in-parameters when type of the generic formal is private in the generic
11414         spec and non-private in the body.
11415
11416 2011-08-02  Claire Dross  <dross@adacore.com>
11417
11418         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11419         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11420         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11421         * impunit.adb, Makefile.rtl: Take new files into account.
11422
11423 2011-08-02  Robert Dewar  <dewar@adacore.com>
11424
11425         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11426         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11427
11428 2011-08-02  Yannick Moy  <moy@adacore.com>
11429
11430         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11431         formal mode
11432         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11433         matching static array bounds, taking into account the special case of
11434         string literals
11435         * sem_ch3.adb: Typo in comment.
11436
11437 2011-08-02  Yannick Moy  <moy@adacore.com>
11438
11439         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11440         which issues an error in formal mode if its argument node is originally
11441         from source
11442         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11443         has a discriminant specification so that it does not include the case
11444         of derived types
11445         (Derived_Type_Declaration): move here the test that a derived type has a
11446         discriminant specification
11447         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11448         first element of a component association before accessing its choices
11449         (presence of component association is not enough)
11450         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11451         declaration is a library item before accessing the next element in a
11452         list, as library items are not member of lists
11453         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11454         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11455         Check_Formal_Restriction whenever possible.
11456
11457 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11458
11459         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11460         reference when needed.
11461
11462 2011-08-02  Bob Duff  <duff@adacore.com>
11463
11464         * gnat_ugn.texi: Fix typo.
11465
11466 2011-08-02  Vincent Celier  <celier@adacore.com>
11467
11468         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11469         archive file name. Do not use the full path name of archives for Open
11470         VMS.
11471
11472 2011-08-02  Robert Dewar  <dewar@adacore.com>
11473
11474         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11475         Analyze_Aspect_Specifications
11476         * sem_ch13.adb
11477         (Analyze_Aspect_Specifications): New handling for boolean aspects
11478         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11479         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11480         sequence for Analyze_Aspect_Specifications
11481         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11482         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11483
11484 2011-08-02  Robert Dewar  <dewar@adacore.com>
11485
11486         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11487         aspects, since these no longer exist.
11488
11489 2011-08-02  Robert Dewar  <dewar@adacore.com>
11490
11491         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11492         semicolon, do not try to see if there are aspects following it.
11493         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11494         aspect spec.
11495
11496 2011-08-02  Robert Dewar  <dewar@adacore.com>
11497
11498         * sem_ch8.adb, aspects.ads: Minor reformatting.
11499
11500 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11501
11502         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11503         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11504         extracted from...
11505         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
11506
11507 2011-08-02  Yannick Moy  <moy@adacore.com>
11508
11509         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11510         mode on subprogram declaration outside of package specification, unless
11511         it is followed by a pragma Import
11512         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11513         Access_Type_Declaration): issue error in formal mode on access type
11514         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11515         incomplete type
11516         (Analyze_Object_Declaration): issue error in formal mode on object
11517         declaration which does not respect SPARK restrictions
11518         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11519         declaration which does not respect SPARK restrictions
11520         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11521         error in formal mode on digits or delta constraint
11522         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11523         decimal fixed point type
11524         (Derived_Type_Declaration): issue error in formal mode on derived type
11525         other than type extensions of tagged record types
11526         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11527         with check on access definition
11528         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11529         mode on protected definition.
11530         (Analyze_Task_Definition): issue error in formal mode on task definition
11531
11532 2011-08-02  Robert Dewar  <dewar@adacore.com>
11533
11534         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11535
11536 2011-08-02  Javier Miranda  <miranda@adacore.com>
11537
11538         * sem_ch6.adb (Can_Override_Operator): New function.
11539         (Verify_Overriding_Indicator): Add missing code to check overriding
11540         indicator in operators. Fixes regression.
11541         (Check_Overriding_Indicator): Minor reformating after replacing the
11542         code that evaluates if the subprogram can override an operator by
11543         invocations to the above new function.
11544         * einfo.adb
11545         (Write_Field26_Name): Add missing code to ensure that, following
11546         the documentation in einfo.ads, this field is not shown as attribute
11547         "Static_Initialization" on non-dispatching functions.
11548
11549 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11550
11551         * sem_res.adb (Resolve_Call): A call to
11552         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11553         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11554         i.e., when the second parameter is of type Time_Span.
11555
11556 2011-08-02  Vincent Celier  <celier@adacore.com>
11557
11558         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11559         with an archive instead of -L<library dir> -l<library name>.
11560
11561 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11562
11563         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11564         mark the base types In_Use in addition to making the operations
11565         use_visible.
11566
11567 2011-08-02  Ed Falis  <falis@adacore.com>
11568
11569         * init.c: add and setup __gnat_signal_mask for the exception signals
11570         * s-inmaop-vxworks.adb: new file.
11571         * s-intman-vxworks.adb: remove unnecessary initializations and
11572         simplify remaining
11573         * s-intman-vxworks.ads: remove unnecessary variable
11574         * s-taprop-vxworks.adb: simplify signal initialization
11575
11576 2011-08-02  Robert Dewar  <dewar@adacore.com>
11577
11578         * sem_ch8.adb: Minor code reorganization, comment updates.
11579
11580 2011-08-02  Robert Dewar  <dewar@adacore.com>
11581
11582         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11583         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11584         here from Sem_Res.
11585         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11586         (Matching_Static_Array_Bounds): Moved here from Sem_Res
11587
11588 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11589
11590         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11591         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11592         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11593         use_type_clauses, to handle more efficiently use_type and use_all_type
11594         constructs.
11595         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11596         Ada2012 Use_All_Type clause.
11597         (Use_Class_Wide_Operations): new procedure.
11598
11599 2011-08-02  Robert Dewar  <dewar@adacore.com>
11600
11601         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11602         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11603         expression to expression function.
11604
11605 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11606
11607         * sem_ch4.adb: transform simple Ada2012 membership into equality only
11608         if types are compatible.
11609
11610 2011-08-02  Yannick Moy  <moy@adacore.com>
11611
11612         * sem_res.adb (Matching_Static_Array_Bounds): new function which
11613         returns True if its argument array types have same dimension and same
11614         static bounds at each index.
11615         (Resolve_Actuals): issue an error in formal mode on actuals passed as
11616         OUT or IN OUT paramaters which are not view conversions in SPARK.
11617         (Resolve_Arithmetic_Op): issue an error in formal mode on
11618         multiplication or division with operands of fixed point types which are
11619         not qualified or explicitly converted.
11620         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11621         Boolean or array type (except String) operands.
11622         (Resolve_Equality_Op): issue an error in formal mode on equality
11623         operators for array types other than String with non-matching static
11624         bounds.
11625         (Resolve_Logical_Op): issue an error in formal mode on logical operators
11626         for array types with non-matching static bounds. Factorize the code in
11627         Matching_Static_Array_Bounds.
11628         (Resolve_Qualified_Expression): issue an error in formal mode on
11629         qualified expressions for array types with non-matching static bounds.
11630         (Resolve_Type_Conversion): issue an error in formal mode on type
11631         conversion for array types with non-matching static bounds
11632
11633 2011-08-02  Robert Dewar  <dewar@adacore.com>
11634
11635         * par-ch10.adb: Minor code reorganization (use Nkind_In).
11636
11637 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11638
11639         * par-ch9.adb: save location of entry for proper error message.
11640
11641 2011-08-02  Javier Miranda  <miranda@adacore.com>
11642
11643         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11644         (Use_Full_View) which permits this routine to climb through the
11645         ancestors using the full-view of private parents.
11646         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11647         Use_Full_View to true in calls to Is_Ancestor.
11648         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11649         true in call to Is_Ancestor.
11650         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11651         Use_Full_View to true in call to Is_Ancestor.
11652         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11653         call to Is_Ancestor.
11654         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11655         Use_Full_View to true in calls to Is_Ancestor.
11656         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11657         Make_Select_Specific_Data_Table, Register_Primitive,
11658         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11659         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11660         to true in call to Is_Ancestor.
11661         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11662         Use_Full_View to true in calls to Is_Ancestor.
11663         * exp_cg.adb
11664         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11665         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11666
11667 2011-08-02  Robert Dewar  <dewar@adacore.com>
11668
11669         * gnat_rm.texi: Minor reformatting.
11670         * sem_prag.adb: Minor reformatting.
11671
11672 2011-08-02  Tristan Gingold  <gingold@adacore.com>
11673
11674         * vms_data.ads: Add VMS qualifier for -gnateP.
11675
11676 2011-08-02  Robert Dewar  <dewar@adacore.com>
11677
11678         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11679         * par-ch7.adb (P_Package): Proper placement of aspects for package
11680         decl/instantiation.
11681         * par-endh.adb (Check_End): Ad Is_Sloc parameter
11682         (End_Statements): Add Is_Sloc parameterr
11683         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11684         (Check_End): Ad Is_Sloc parameter
11685         (End_Statements): Add Is_Sloc parameterr
11686
11687 2011-08-02  Vincent Celier  <celier@adacore.com>
11688
11689         * ug_words: Add VMS qualifier equivalent to -gnateP:
11690         /SYMBOL_PREPROCESSING.
11691
11692 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11693
11694         * gnat-style.texi: For hexadecimal numeric literals the typical
11695         grouping of digits is 4 to represent 2 bytes.
11696         A procedure spec which is split into several lines is indented two
11697         characters.
11698
11699 2011-08-02  Yannick Moy  <moy@adacore.com>
11700
11701         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11702         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11703         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11704         properly qualified
11705         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11706         choice in array aggregate
11707         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11708         mark as ancestor
11709         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11710         positional and named aggregate for record, or others in record
11711         aggregate, or multiple choice in record aggregate
11712         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11713         array operands to logical operations AND, OR and XOR do not have the
11714         same static lower and higher bounds
11715         * sem_ch5.adb, sinfo.ads: Correct typos in comments
11716
11717 2011-08-01  Robert Dewar  <dewar@adacore.com>
11718
11719         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11720         Replaces Last_Source_Node_In_Sequence.
11721         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11722         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11723         parens and blank in string (this was inconsistently implemented).
11724         * errout.ads
11725         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11726         blank in string (this was inconsistently implemented).
11727         * gnat1drv.adb
11728         (Set_Global_Switches): Set formal mode switches appropriately
11729         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11730         * par-prag.adb
11731         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11732         call Set_Error_Msg_Lang to set "spark" as language name.
11733         * par.adb: Remove unnecessary call to set formal language for errout
11734         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11735         appropriately and call Set_Error_Msg_Lang to set "spark" as language
11736         name.
11737         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11738         calls to it, moved after resolution so that types are known
11739         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11740         result of concatenation is not of type String
11741         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11742         concatenation is not properly restricted
11743         * gnat_rm.texi: Add doc on pragma Spark_95.
11744         * gcc-interface/Makefile.in: Remove obsolete target pairs for
11745         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11746         * gcc-interface/Make-lang.in: Update dependencies.
11747
11748 2011-08-01  Javier Miranda  <miranda@adacore.com>
11749
11750         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11751         condition that detects if the overridden operation must replace an
11752         existing entity.
11753
11754 2011-08-01  Javier Miranda  <miranda@adacore.com>
11755
11756         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11757         code declarations inserted by Insert_Actions in each alternative of the
11758         N_Case_Expression node.
11759
11760 2011-08-01  Robert Dewar  <dewar@adacore.com>
11761
11762         * sem_ch6.adb: Minor code reorganization.
11763         * sem_util.adb: Minor reformatting.
11764
11765 2011-08-01  Pascal Obry  <obry@adacore.com>
11766
11767         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11768         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11769
11770 2011-08-01  Yannick Moy  <moy@adacore.com>
11771
11772         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11773         literal or operator symbol which is prefixed
11774         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11775         mode on access attributes.
11776         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11777         that concatenation operands are properly restricted in formal mode
11778         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11779         Analyze_Concatenation_Operand. Issue an error in formal mode if the
11780         result of the concatenation has a type different from String.
11781         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11782         Analyze_Quantified_Expression, Analyze_Slice,
11783         Analyze_Null): issue an error in formal mode on unsupported constructs
11784         * sem_ch5.adb
11785         (Analyze_Block_Statement): only issue error on source block statement
11786         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11787         function which returns the last node in a list of nodes for which
11788         Comes_From_Source returns True, if any
11789         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11790         Last_Source_Node_In_Sequence
11791         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11792         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11793         mode on unsupported constructs
11794         * sem_ch9.adb Do not return after issuing error in formal mode, as the
11795         rest of the actions may be needed later on since the error is marked as
11796         not serious.
11797         * sinfo.ads: Typos in comments.
11798
11799 2011-08-01  Pascal Obry  <obry@adacore.com>
11800
11801         * projects.texi: Minor editing.
11802
11803 2011-08-01  Yannick Moy  <moy@adacore.com>
11804
11805         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11806         insertion character ~~
11807         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11808         (Set_Error_Msg_Lang): new procedure which fixes the language for use
11809         with insertion character ~~
11810         (Set_Msg_Text): treat insertion character ~~
11811         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11812         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11813         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11814         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11815         errors related to the formal language restriction not serious
11816         (insertion character |).
11817         * par.adb (Par): set formal language for error messages if needed
11818         * sem_ch6.adb (Check_Missing_Return): take into account possible
11819         generated statements at the end of the function
11820         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11821         enumeration value to define a new pragma SPARK_95
11822         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11823         SPARK_Version): new type and variables to store the SPARK version
11824         (none by default).
11825         (SPARK_Mode): return True when SPARK_Version is set
11826         * par-prag.adb: Correct indentation
11827         (Prag): take Pragma_SPARK_95 into account
11828         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11829         into account.
11830
11831 2011-08-01  Robert Dewar  <dewar@adacore.com>
11832
11833         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11834         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11835         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11836
11837 2011-08-01  Pascal Obry  <obry@adacore.com>
11838
11839         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11840         Target_Name to Get_Path call.
11841         (Parse_Single_Project): Likewise.
11842         (Post_Parse_Context_Clause): Likewise.
11843         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11844         Call Initialise_Project_Path with the proper Target_Name.
11845         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11846         search path.
11847         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11848         with the proper Target_Name.
11849         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11850         Part.Parse routine.
11851         (Parse_Project_And_Apply_Config): Likewise.
11852         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11853         This is fine as this part of the code is supporting only native
11854         compilation.
11855         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11856         is fine as this part of the code is supporting only native compilation.
11857
11858 2011-08-01  Yannick Moy  <moy@adacore.com>
11859
11860         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11861         of homonym, unless the homonym is one of the cases allowed in SPARK
11862         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11863         package declaration occurring after a body.
11864
11865 2011-08-01  Robert Dewar  <dewar@adacore.com>
11866
11867         * checks.adb, exp_ch4.adb: Minor reformatting.
11868
11869 2011-08-01  Javier Miranda  <miranda@adacore.com>
11870
11871         * einfo.ads (Access_Disp_Table): Fix documentation.
11872         (Dispatch_Table_Wrappers): Fix documentation.
11873
11874 2011-08-01  Pascal Obry  <obry@adacore.com>
11875
11876         * prj-env.adb, prj-env.ads: Minor reformatting.
11877
11878 2011-08-01  Yannick Moy  <moy@adacore.com>
11879
11880         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11881         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11882         procedures out of these packages.
11883         * errout.ads, errout.adb
11884         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11885         procedures in of this package
11886         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11887         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11888         on misplaced later vs initial declarations, like in Ada 83
11889         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11890         formal mode on attribute of private type whose full type declaration
11891         is not visible
11892         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11893         package declaration inside a package specification
11894         (Analyze_Full_Type_Declaration): issue error in formal mode on
11895         controlled type or discriminant type
11896         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11897         user-defined operator means that it should come from the source
11898         (New_Overloaded_Entity): issue error in formal mode on overloaded
11899         entity.
11900         * sem_ch6.ads, sem_ch13.ads: typos in comments.
11901
11902 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11903
11904         * atree.adb: Minor reformatting.
11905         * checks.adb: Minor reformatting.
11906
11907 2011-08-01  Vincent Celier  <celier@adacore.com>
11908
11909         * s-parame-vms-ia64.ads: Fix typo in comment
11910         Minor reformatting
11911         * s-parame-vms-restrict.ads: Removed, unused.
11912
11913 2011-08-01  Javier Miranda  <miranda@adacore.com>
11914
11915         * exp_ch3.adb
11916         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11917         * sem_ch3.adb
11918         (Constrain_Index): Remove side effects in the evaluation of the bounds.
11919         * sem_ch3.ads, sem_ch3.adb
11920         (Is_Constant_Bound): New extended version of the subprogram that was
11921         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11922         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11923         * sem_aux.ads (Constant_Value): Fix typo in comment.
11924         * checks.adb (Generate_Index_Checks): New implementation which, for
11925         array objects with constant bounds, generates the runtime check
11926         referencing the bounds of the array type. For other cases this routine
11927         provides its previous behavior obtaining such values from the array
11928         object.
11929         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11930         parent type.
11931         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11932         we cannot have semantic interpretations of the new node.
11933
11934 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11935
11936         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11937         expressions.
11938
11939 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11940
11941         * sem_ch8.adb: Minor code editing.
11942         * s-vxwext.adb: Remove trailing space.
11943         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11944         consistency with other files.
11945
11946 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11947
11948         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11949
11950 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11951
11952         * par-ch10.adb: reject parameterized expressions as compilation unit.
11953         * sem_ch4.adb: handle properly conditional expression with overloaded
11954         then_clause and no else_clause.
11955
11956 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11957
11958         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11959         like done by System.Aux_DEC.
11960         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11961
11962 2011-08-01  Yannick Moy  <moy@adacore.com>
11963
11964         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11965         missing label at end of declaration (subprogram or package)
11966         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11967         of positional and named parameter association
11968         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11969         Error_Msg_SP which adds a prefix to the error message giving the name
11970         of the formal language analyzed
11971         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11972         access result type in subprogram, unconstrained array as result type,.
11973         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11974         procedure
11975         * sem_ch8.adb: Code clean up.
11976
11977 2011-08-01  Javier Miranda  <miranda@adacore.com>
11978
11979         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11980         * einfo.ads (Access_Disp_Table): Fix documentation.
11981         (Dispatch_Table_Wrappers): Fix documentation.
11982         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11983         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11984         to enforce the documentation of this attribute.
11985         (Set_Is_Interface): Cleanup the assertion.
11986         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11987         the Underlying_Type entity before reading attribute Access_Disp_Table.
11988         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11989         Locate the Underlying_Type before reading attribute Access_Disp_Table.
11990         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11991         the Underlying_Type entity before reading attribute Access_Disp_Table.
11992         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11993         Locate the Underlying_Type entity before reading attribute
11994         Access_Disp_Table.
11995
11996 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11997
11998         * s-poosiz.ads: Additional overriding indicators.
11999
12000 2011-08-01  Yannick Moy  <moy@adacore.com>
12001
12002         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12003         formal mode.
12004         (Analyze_Iteration_Scheme): issue error in formal mode when loop
12005         parameter specification does not include a subtype mark.
12006         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12007         formal mode on abstract subprogram.
12008         (Analyze_Subprogram_Specification): issue error in formal mode on
12009         user-defined operator.
12010         (Process_Formals): issue error in formal mode on access parameter and
12011         default expression.
12012         * sem_ch9.adb (Analyze_Abort_Statement,
12013         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12014         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12015         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12016         Analyze_Requeue, Analyze_Selective_Accept,
12017         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12018         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12019         issue error in formal mode on user-defined raise statement.
12020
12021 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12022
12023         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12024         declaration being hidden when overriding an implicit inherited
12025         subprogram.
12026         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12027         (-gnats), do not complain about a source file that contains only a
12028         pragma No_Body.
12029
12030 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12031
12032         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12033         variable if already set.
12034
12035 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12036
12037         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12038         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12039         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12040         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12041         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12042         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12043         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12044         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12045         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12046         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12047         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12048         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12049         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12050         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12051         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12052         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12053         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12054         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12055         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12056         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12057         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12058         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12059         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12060         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12061         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12062         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12063         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12064         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12065         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12066         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12067         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12068         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12069         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12070         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12071         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12072         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12073         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12074         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12075         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12076         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12077         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12078         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12079         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12080         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12081         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12082         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12083         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12084         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12085         s-osinte-mingw.ads: Update to GPLv3 run-time license.
12086         Use GNAT instead of GNARL.
12087
12088 2011-08-01  Bob Duff  <duff@adacore.com>
12089
12090         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12091         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12092         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12093         reformatting.
12094
12095 2011-08-01  Yannick Moy  <moy@adacore.com>
12096
12097         * debug.adb (d.D) reverve flag for the SPARK mode
12098         (d.E) reverve flag for SPARK generation mode
12099         (d.F) reverve flag for Why generation mode
12100         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12101         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
12102         functions which return True when the corresponding modes are set
12103         (Formal_Language): return "spark" or "alfa" when in formal verification
12104         mode.
12105         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12106         Error_Msg to prefix the error message with a tag giving the formal
12107         language
12108         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12109         message with a tag giving the formal language
12110         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12111         block statement
12112         (Analyze_Case_Statement): issue error in formal mode on case statement
12113         with a single "others" case alternative
12114         (Analyze_Exit_Statement): issue errors in formal mode on exit
12115         statements which do not respect SPARK restrictions
12116         (Analyze_Goto_Statement): issue error in formal mode on goto statement
12117         (Check_Unreachable_Code): always issue an error (not a warning) in
12118         formal mode on unreachable code (concerns both code after an infinite
12119         loop and after an unconditional jump, both not allowed in SPARK)
12120         * sem_ch6.adb (Analyze_Return_Statement): add call to
12121         Set_Return_Present for a procedure containing a return statement
12122         (already done for functions in Analyze_Function_Return)
12123         (Analyze_Function_Return): issue error in formal mode on extended
12124         return or if return is not last statement in function
12125         (Check_Missing_Return): issue error in formal mode if function does
12126         not end with return or if procedure contains a return
12127         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12128         function to detect if there is an inner scope of its parameter S which
12129         is a loop.
12130
12131 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12132
12133         * sem_ch6.ads: Minor reformatting.
12134
12135 2011-08-01  Javier Miranda  <miranda@adacore.com>
12136
12137         * sem_util.adb (Abstract_Interface_List): Complete condition when
12138         processing private type declarations to avoid reading unavailable
12139         attribute.
12140         (Is_Synchronized_Tagged_Type): Complete condition when processing
12141         private extension declaration nodes to avoid reading unavailable
12142         attribute.
12143
12144 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12145
12146         * sem_ch3.adb: Minor reformatting.
12147
12148 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12149
12150         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12151         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12152         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12153         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12154         for VMS, instead parametrize the common implementation with
12155         System.Parameters declarations.
12156
12157 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
12158
12159         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12160
12161 2011-08-01  Tristan Gingold  <gingold@adacore.com>
12162
12163         * seh_init.c: Fix SEH handler installation on win64.
12164
12165 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12166
12167         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12168         double analysis of an anonymous access to subprogram, because it can
12169         lead to improper sharing of profiles and a back-end crash.
12170
12171 2011-08-01  Robert Dewar  <dewar@adacore.com>
12172
12173         * make.adb, sem_ch4.adb: Minor reformatting.
12174         * gcc-interface/Make-lang.in: Update dependencies.
12175         * sem_util.adb, exp_ch5.adb: Minor reformatting.
12176
12177 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12178
12179         * gnat_rm.texi: Fix definition of Long_Integer.
12180
12181 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12182
12183         * exp_aggr.adb: check limit size of static aggregate unconditionally,
12184         to prevent storage exhaustion.
12185         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12186         finalized is a function body, insert the cleanup code before the final
12187         return statement, to prevent spurious warnings.
12188         * s-pooglo.ads: add overriding indicator.
12189
12190 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12191
12192         * sem_ch4.adb (Operator_Check): improve error message when both a
12193         with_clause and a use_clause are needed to make operator usage legal.
12194         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12195         determine whether a compilation unit is visible within an other,
12196         either through a with_clause in the current unit, or a with_clause in
12197         its library unit or one one of its parents.
12198
12199 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12200
12201         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12202         over an arbitrary expression of an array or container type.
12203         * lib-xref.adb: clarify comment.
12204
12205 2011-08-01  Bob Duff  <duff@adacore.com>
12206
12207         * einfo.ads: Minor reformatting.
12208         * debug.adb: Minor comment improvement.
12209
12210 2011-08-01  Javier Miranda  <miranda@adacore.com>
12211
12212         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12213         consider hidden subprograms as valid candidates.
12214
12215 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12216
12217         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12218
12219 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
12220
12221         * gnat_ugn.texi: Fix typo.
12222
12223 2011-08-01  Robert Dewar  <dewar@adacore.com>
12224
12225         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12226         lib-xref.adb: Minor reformatting
12227
12228 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
12229
12230         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12231         when to generate a call to Move_Final_List.
12232         (Has_Controlled_Parts): Remove this function.
12233
12234 2011-08-01  Geert Bosch  <bosch@adacore.com>
12235
12236         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12237         "," in choice list.
12238
12239 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12240
12241         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12242         explicit raise of a predefined exception as Comes_From_Source if the
12243         original N_Raise_Statement comes from source.
12244
12245 2011-08-01  Robert Dewar  <dewar@adacore.com>
12246
12247         * sinfo.ads: Add comment.
12248         * sem_ch6.adb: Minor reformatting.
12249
12250 2011-08-01  Robert Dewar  <dewar@adacore.com>
12251
12252         * freeze.adb (Freeze_Entity): Refine check for bad component size
12253         clause to avoid rejecting confirming clause when atomic/aliased present.
12254
12255 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12256
12257         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12258         better determine whether an entity reference is a write.
12259         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12260         subcomponent.
12261         * lib-xref.adb (Output_References): Do no suppress a read reference at
12262         the same location as an immediately preceeding modify-reference, to
12263         handle properly in-out actuals.
12264
12265 2011-08-01  Tristan Gingold  <gingold@adacore.com>
12266
12267         * env.c (__gnat_setenv) [VMS]: Refine previous change.
12268
12269 2011-08-01  Quentin Ochem  <ochem@adacore.com>
12270
12271         * i-cstrin.adb (New_String): Changed implementation, now uses only the
12272         heap to compute the result.
12273
12274 2011-08-01  Robert Dewar  <dewar@adacore.com>
12275
12276         * atree.ads: Minor reformatting.
12277
12278 2011-08-01  Emmanuel Briot  <briot@adacore.com>
12279
12280         * g-expect.adb (Get_Command_Output): Fix memory leak.
12281
12282 2011-08-01  Geert Bosch  <bosch@adacore.com>
12283
12284         * cstand.adb (P_Float_Type): New procedure to print the definition of
12285         predefined fpt types.
12286         (P_Mixed_Name): New procedure to print a name using mixed case
12287         (Print_Standard): Use P_Float_Type for printing floating point types
12288         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12289         precision IEEE float.
12290
12291 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12292
12293         * sem_ch3.adb: Minor reformatting.
12294
12295 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12296
12297         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12298         the completion of a generic function, insert the new body rather than
12299         rewriting the original.
12300
12301 2011-08-01  Yannick Moy  <moy@adacore.com>
12302
12303         * sinfo.ads, errout.ads: Typos in comments.
12304
12305 2011-08-01  Robert Dewar  <dewar@adacore.com>
12306
12307         * par-endh.adb: Minor reformatting.
12308
12309 2011-08-01  Robert Dewar  <dewar@adacore.com>
12310
12311         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12312         (Pre_Post_Aspects): New subtype.
12313         * par-ch12.adb (P_Generic): New syntax for aspects in packages
12314         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12315         * par-ch7.adb (P_Package): Remove Decl parameter
12316         (P_Package): Handle new syntax for aspects (before IS)
12317         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12318         new aspect syntax
12319         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12320         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12321         (P_Package): Remove Decl parameter
12322         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12323         aspects
12324         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12325         specs
12326         * sem_util.ads, sem_util.adb (Static_Boolean): New function
12327         * sinfo.ads: Document new syntax for aspects in packages etc.
12328         * sprint.adb: Handle new syntax of aspects before IS in package
12329
12330 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12331
12332         * atree.ads: Minor reformatting.
12333         * sem_prag.adb: Minor reformatting.
12334
12335 2011-08-01  Robert Dewar  <dewar@adacore.com>
12336
12337         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12338         case expr alternative.
12339
12340 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12341
12342         * sem_ch12.adb: Fix typo.
12343
12344 2011-08-01  Geert Bosch  <bosch@adacore.com>
12345
12346         * sem_prag.adb (Check_No_Link_Name): New procedure.
12347         (Process_Import_Or_Interface): Use Check_No_Link_Name.
12348         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12349         instead of Standard_Long_Long_Float_Size global. Preparation for
12350         eventual removal of per type constants.
12351         * exp_util.ads (Get_Stream_Size): New function returning the stream
12352         size value of subtype E.
12353         * exp_util.adb (Get_Stream_Size): Implement new function.
12354         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12355         function.
12356         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12357         * einfo.adb:
12358         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12359
12360 2011-08-01  Geert Bosch  <bosch@adacore.com>
12361
12362         * cstand.adb: Fix comments.
12363         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12364         count of arguments.
12365
12366 2011-08-01  Robert Dewar  <dewar@adacore.com>
12367
12368         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12369
12370 2011-08-01  Geert Bosch  <bosch@adacore.com>
12371
12372         * atree.ads: Fix comment.
12373
12374 2011-08-01  Robert Dewar  <dewar@adacore.com>
12375
12376         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12377         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12378         * par.adb: Add with for Namet.Sp.
12379         * par-tchk.adb: Minor reformatting.
12380
12381 2011-08-01  Vincent Celier  <celier@adacore.com>
12382
12383         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12384         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12385         of the init procedure of a SAL.
12386         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12387         New procedure.
12388
12389 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12390
12391         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12392         reformatting.
12393
12394 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12395
12396         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12397
12398 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12399
12400         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12401         conformant with its spec (return True only for types that have
12402         an overriding Initialize primitive operation that prevents them from
12403         having preelaborable initialization).
12404         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12405         initialization for controlled types in Ada 2005 or later mode.
12406
12407 2011-08-01  Robert Dewar  <dewar@adacore.com>
12408
12409         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12410         Postcondition.
12411         (Same_Aspect): New function.
12412         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12413         Type_Invariant, Precondition, Postcondition.
12414         * snames.ads-tmpl: Add Name_Type_Invariant.
12415
12416 2011-08-01  Robert Dewar  <dewar@adacore.com>
12417
12418         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12419         here.
12420         (Freeze_All_Ent): Fix error in handling inherited aspects.
12421         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12422         already analyzed, but don't skip entire processing of a declaration,
12423         that's wrong in some cases of declarations being rewritten.
12424         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12425         Don't delay for integer, string literals
12426         Treat predicates in usual manner for delay, remove special case code,
12427         not needed.
12428         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12429         (Build_Predicate_Function): Update saved expression in aspect
12430         (Build_Invariant_Procedure): Update saved expression in aspect
12431         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12432         of replacement of discriminant references if the reference is simple.
12433
12434 2011-08-01  Robert Dewar  <dewar@adacore.com>
12435
12436         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12437         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12438         Static_Predicate and Dynamic_Predicate.
12439         (Build_Predicate_Function): Add processing for Static_Predicate
12440         and Dynamic_Predicate.
12441         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12442         (From_Static_Predicate): New flag
12443         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12444
12445 2011-08-01  Robert Dewar  <dewar@adacore.com>
12446
12447         * usage.adb: Documentation cleanup for Ada version modes in usage.
12448         * expander.adb: Minor reformatting.
12449
12450 2011-08-01  Robert Dewar  <dewar@adacore.com>
12451
12452         * atree.ads: Minor comment fix.
12453         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12454         a-witeio.ads, sem_prag.adb: Minor reformatting.
12455
12456 2011-08-01  Doug Rupp  <rupp@adacore.com>
12457
12458         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12459         pointers. Use descrip.h header file for convenience. Add some
12460         comments.
12461
12462 2011-08-01  Robert Dewar  <dewar@adacore.com>
12463
12464         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12465         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12466         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12467         New procedure.
12468         (Check_Aspect_At_End_Of_Declarations): New procedure
12469         (Analye_Aspect_Specification): Minor changes for above procedures
12470         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12471         specification node as well.
12472
12473 2011-08-01  Pascal Obry  <obry@adacore.com>
12474
12475         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12476         Windows files. Use GetFilesAttributes() in this case to check for file
12477         existence instead of returning with an error code.
12478
12479 2011-08-01  Vincent Celier  <celier@adacore.com>
12480
12481         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12482         High is above Source length.
12483
12484 2011-08-01  Robert Dewar  <dewar@adacore.com>
12485
12486         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12487
12488 2011-08-01  Robert Dewar  <dewar@adacore.com>
12489
12490         * aspects.ads (Boolean_Aspects): New subtype.
12491         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12492         for derived types in cases where the parent type and derived type have
12493         aspects.
12494         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12495         with aspects when parent type also has aspects.
12496         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12497         boolean expression at this point).
12498         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12499         accordance with final decision on the Ada 2012 feature.
12500         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12501
12502 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12503
12504         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12505
12506 2011-08-01  Pascal Obry  <obry@adacore.com>
12507
12508         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12509         Fix Replace_Slice when High is above current string size.
12510         (Replace_Slice): Fix DL computation when High is above current
12511         string length.
12512
12513 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
12514
12515         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12516
12517 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12518
12519         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12520         of node.
12521
12522 2011-08-01  Pascal Obry  <obry@adacore.com>
12523
12524         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12525         reformatting.
12526
12527 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12528
12529         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12530         access to protected subprograms in generic bodies.
12531         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12532         protected type, indicate that the convention of the subprogram is
12533         Convention_Protected, because it may be used in subsequent declarations
12534         within the protected declaration.
12535
12536 2011-08-01  Vincent Celier  <celier@adacore.com>
12537
12538         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12539         and "final" procedures when the name of the library is "ada", to avoid
12540         duplicate symbols "adainit" and "adafinal" in executables.
12541
12542 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12543
12544         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12545         quantified expression that appears within a postcondition and uses the
12546         Ada2012 'Result attribute.
12547
12548 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12549
12550         * init.c (__gnat_error_handler): Cast reason to int.
12551         (__gnat_install_handler): Explain sa_sigaction use.
12552
12553 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12554
12555         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12556         subprogram has copy-in copy-out parameters, try to promote the mode of
12557         the return type if it is passed in registers.
12558
12559 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12560
12561         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12562         left operand as addressable.
12563
12564 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12565
12566         * gcc-interface/gigi.h (build_function_stub): Remove.
12567         (build_return_expr): Likewise.
12568         (convert_vms_descriptor): Declare.
12569         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12570         (build_function_stub): Move to...
12571         * gcc-interface/utils2.c (build_return_expr): Move to...
12572         * gcc-interface/trans.c (build_function_stub): ...here.
12573         (build_return_expr): ...here.
12574         (Subprogram_Body_to_gnu): Add local variable for language_function.
12575         Disconnect the parameter attributes cache, if any, once done with it.
12576         Call end_subprog_body only after setting the end_locus.
12577         Build the stub associated with the function, if any, at the very end.
12578         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12579         variables and streamline control flow.
12580
12581 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
12582
12583         PR ada/49819
12584         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12585         g-trasym-dwarf.adb.
12586
12587 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12588
12589         PR bootstrap/49794
12590         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12591         Assign to act.sa_sigaction.
12592         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12593         current->return_address to char * before arithmetic.
12594
12595 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12596
12597         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12598         Correct argument types.
12599         Extract code from reason.
12600         (__gnat_install_handler): Assign to act.sa_sigaction.
12601
12602 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
12603
12604         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12605         (GNAT1_OBJS): ...here.
12606
12607 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
12608
12609         PR ada/48711
12610         * g-socthi-mingw.adb (Fill): Fix formatting.
12611
12612         * gcc-interface/gigi.h: Move around comment.
12613
12614 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
12615
12616         PR ada/46350
12617         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12618
12619 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
12620
12621         PR ada/48711
12622         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12623
12624 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12625
12626         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12627         range comparison if Pmode is SImode.
12628
12629 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
12630             Eric Botcazou  <ebotcazou@adacore.com>
12631
12632         * adadecode.c: Wrap up in extern "C" block.
12633         * adadecode.h: Likewise.
12634         * adaint.c: Likewise.  Remove 'const' keyword.
12635         * adaint.h: Likewise.
12636         * argv.c: Likewise.
12637         * atree.h: Likewise.
12638         * cio.c: Likewise.
12639         * cstreams.c: Likewise.
12640         * env.c: Likewise.
12641         * exit.c: Likewise.
12642         * fe.h: Likewise.
12643         * final.c: Likewise.
12644         * init.c: Likewise.
12645         * initialize.c: Likewise.
12646         * link.c: Likewise.
12647         * namet.h: Likewise.
12648         * nlists.h: Likewise.
12649         * raise.c: Likewise.
12650         * raise.h: Likewise.
12651         * repinfo.h: Likewise.
12652         * seh_init.c: Likewise.
12653         * targext.c: Likewise.
12654         * tracebak.c: Likewise.
12655         * uintp.h: Likewise.
12656         * urealp.h: Likewise.
12657         * xeinfo.adb: Wrap up generated C code in extern "C" block.
12658         * xsinfo.adb: Likewise.
12659         * xsnamest.adb: Likewise.
12660         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12661         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12662         * gcc-interface/misc.c: Likewise.
12663         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12664         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
12665         ada/targext.o here...
12666         (GNAT_ADA_OBJS): ...and not here.
12667         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12668         (GNATBIND_OBJS): Reorder.
12669
12670 2011-07-07  Richard Henderson  <rth@redhat.com>
12671
12672         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12673         dwarf2out_frame_init.
12674
12675 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
12676
12677         * gcc-interface/misc.c (gnat_init): Tweak previous change.
12678
12679 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12680
12681         PR target/39150
12682         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12683
12684 2011-07-06  Richard Guenther  <rguenther@suse.de>
12685
12686         * gcc-interface/misc.c (gnat_init): Merge calls to
12687         build_common_tree_nodes and build_common_tree_nodes_2.
12688         Re-initialize boolean_false_node.
12689
12690 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
12691             Olivier Hainque  <hainque@adacore.com>
12692             Nicolas Setton  <setton@adacore.com>
12693
12694         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12695         the type according to the ARTIFICIAL_P parameter.
12696         (create_type_decl): Likewise.
12697         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12698
12699 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
12700
12701         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12702         (gnatbind): Likewise.
12703
12704 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12705
12706         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12707
12708 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12709
12710         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12711         local variable throughout.  Remove useless call to Base_Type.
12712         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12713         Take it also into account for the volatileness of the field.  Set the
12714         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
12715
12716 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12717
12718         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12719         on a dereference built for a by-ref object if it has an address clause.
12720
12721 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12722
12723         * einfo.ads (Address_Taken): Document use for the second argument of
12724         Asm_Input and Asm_Output attributes.
12725         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12726         argument is an entity name, then set Address_Taken on it.
12727         <Attribute_Asm_Output>: Likewise.
12728         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12729         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12730         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12731         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12732
12733 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
12734
12735         PR middle-end/46500
12736         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12737
12738 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
12739
12740         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12741         (ada/utils.o): Update dependencies.
12742         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12743         ../../../libcpp/libcpp.a.
12744         * gcc-interface/utils.c: Include common/common-target.h.
12745         (process_attributes): Use targetm_common.have_named_sections.
12746
12747 2011-06-07  Richard Guenther  <rguenther@suse.de>
12748
12749         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12750         set_sizetype.
12751
12752 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12753
12754         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12755         TREE_THIS_NOTRAP flag.
12756
12757 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12758
12759         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12760         Fix thinko.
12761
12762 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12763
12764         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12765         constants whose full view has discriminants specially.
12766
12767 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12768
12769         * gcc-interface/utils.c: Include diagnostic.h.
12770         (gnat_write_global_declarations): Output debug information for all
12771         global type declarations before finalizing the compilation unit.
12772         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12773
12774 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
12775
12776         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12777
12778 2011-05-25  Kai Tietz  <ktietz@redhat.com>
12779
12780         * adaint.c (__gnat_to_canonical_file_list_next): Use array
12781         initialization instead of const/none-const pointer assignment.
12782
12783 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
12784
12785         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12786         $(EXTRA_GNAT1_OBJS).
12787         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12788         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12789         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12790         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12791         libcommon-target.a instead of prefix.o.
12792
12793 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
12794
12795         PR ada/49097
12796         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12797
12798 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
12799
12800         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12801         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12802         instead of version.o.
12803
12804 2011-05-18  Kai Tietz <ktietz@redhat.com>
12805
12806         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12807         boolean_false_node instead of integer_zero_node.
12808         (convert_with_check): Likewise.
12809         * gcc-interface/decl.c (choices_to_gnu): Likewise.
12810
12811 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
12812
12813         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12814         type of the parameter is an unconstrained array, convert the actual to
12815         the type of the formal in the In Out and Out cases as well.
12816
12817 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12818
12819         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12820         call build_function_type_array or build_varargs_function_type_array
12821         instead.
12822         (create_subprog_type): Don't call build_function_type; call
12823         build_function_type_vec instead.
12824
12825 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12826
12827         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12828         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12829         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12830
12831 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
12832
12833         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12834
12835         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12836         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12837
12838 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12839
12840         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12841
12842 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12843
12844         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12845         instead of accessing TYPE_ARG_TYPES directly.
12846         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12847
12848 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12849
12850         PR ada/48844
12851         * gcc-interface/gigi.h (get_variant_part): Declare.
12852         * gcc-interface/decl.c (get_variant_part): Make global.
12853         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12854         types have the same constant size, are record types and T1 has a
12855         variant part while T2 doesn't.
12856
12857 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12858
12859         * gcc-interface/utils.c (begin_subprog_body): Do not call
12860         get_pending_sizes.
12861         (end_subprog_body): Likewise.
12862
12863 2011-05-04  Richard Guenther  <rguenther@suse.de>
12864
12865         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12866         int_const_binop.
12867         (pos_to_constructor): Likewise.
12868
12869 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
12870             Eric Botcazou  <ebotcazou@adacore.com>
12871
12872         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12873         of build_function_type.  Adjust calls to...
12874         (build_raise_check): ...this.  Do not take a void_tree parameter.
12875         Call build_function_type_list instead of build_function_type.
12876         Fix head comment and swap couple of conditional blocks.
12877
12878 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
12879
12880         * gnatvsn.ads (Library_Version): Bump to 4.7.
12881         (Current_Year): Bump to 2011.
12882
12883 2011-04-29  Michael Matz  <matz@suse.de>
12884
12885         * gcc-interface/misc.c (gnat_handle_option): Set
12886         warn_maybe_uninitialized.
12887
12888 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
12889
12890         * gnat_ugn.texi (Complexity Metrics Control): Update link to
12891         the Watson/McCabe paper.
12892
12893 2011-04-23  Jim Meyering  <meyering@redhat.com>
12894
12895         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12896
12897 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12898
12899         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12900         onto the new type.
12901
12902 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12903
12904         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12905         parameter.
12906         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
12907         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12908         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12909         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12910         <all>: Do not set flags on the reused DECL node coming from an alias.
12911         Set DECL_IGNORED_P on the DECL node built for subprograms if they
12912         don't need debug info here...
12913         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12914         (gigi): Adjust calls to create_subprog_decl.
12915         (build_raise_check): Likewise.
12916         (establish_gnat_vms_condition_handler): Likewise.
12917         (Compilation_Unit_to_gnu): Likewise.
12918         (gnat_to_gnu): Likewise.
12919
12920 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
12921
12922         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12923         (NO_REORDER_ADAFLAGS): New variable.
12924         (EXTRA_GNATTOOLS): Always define.
12925         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12926         Clean up and adjust list of files compiled with special options.
12927         * gcc-interface/Make-lang.in: Likewise.
12928         (ada/decl.o): Cosmetical change.
12929         (ada/misc.o): Remove dependency on $(PLUGIN_H).
12930
12931 2011-04-20  Jim Meyering  <meyering@redhat.com>
12932
12933         * initialize.c (__gnat_initialize): Remove useless if-before-free.
12934
12935 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12936
12937         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12938         $(CFLAGS) on the link line.
12939
12940 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12941
12942         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12943         padded type built for the return type if it is unconstrained.
12944
12945 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
12946
12947         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12948
12949 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
12950
12951         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12952         before calling TREE_CHAIN.
12953         * gcc-interface/misc.c (gnat_init_ts): New function.
12954         (LANG_HOOKS_INIT_TS): Define.
12955
12956 2011-04-12  Martin Jambor  <mjambor@suse.cz>
12957
12958         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12959         instead of cgraph_node.
12960
12961 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12962
12963         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12964         alignment on fields of the RETURN type built for the Copy-In Copy-Out
12965         mechanism.
12966
12967 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12968
12969         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12970         of aggregate types that contain a placeholder.
12971
12972 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
12973
12974         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12975         TYPE_ARG_TYPES.
12976         (handle_type_generic_attribute): Likewise.
12977
12978 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
12979
12980         PR ada/47163
12981         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12982
12983 2011-04-04  Kai Tietz  <ktietz@redhat.com>
12984
12985         PR ada/47163
12986         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12987         to flag value.
12988
12989 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12990
12991         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12992         type case, do not strip a padding type around the array type.
12993
12994 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12995
12996         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12997         types.
12998
12999 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13000
13001         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13002         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13003         code for -feliminate-unused-debug-types.
13004         (gnat_post_options): Likewise.
13005
13006 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13007
13008         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13009         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13010         distinct copy.
13011
13012 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13013
13014         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13015         DECL_ARTIFICIAL flag on enumeration types.
13016
13017 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13018
13019         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13020         fat pointer types artificial unconditionally.
13021         <E_Array_Subtype>: Attach the base array type as a parallel type if it
13022         isn't artificial.
13023
13024 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13025
13026         * gcc-interface/gigi.h (get_dummy_type): Declare.
13027         (build_dummy_unc_pointer_types): Likewise.
13028         (finish_fat_pointer_type): Likewise.
13029         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13030         fat pointer type has been built, complete it in place.
13031         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13032         and thin pointers.  Remove useless variable.
13033         (finish_fat_pointer_type): Make global and move to...
13034         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13035         (get_dummy_type): New function.
13036         (build_dummy_unc_pointer_types): Likewise.
13037         (gnat_pushdecl): Propage the name to the anonymous variants only.
13038         (update_pointer_to): Only adjust the pointer types in the unconstrained
13039         array case.
13040
13041 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13042
13043         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13044         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13045         if this is a Taft amendment type and the full declaration is available.
13046         * gcc-interface/trans.c (process_type): Likewise.
13047         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13048         (process_freeze_entity): Likewise.
13049         * gcc-interface/utils.c (dummy_global): New static variable.
13050         (gnat_write_global_declarations): If there are types declared as used
13051         at the global level, insert them in the global hash table.
13052
13053 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13054
13055         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13056         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13057         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13058         copy.
13059         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
13060         flag of the type accordingly.
13061         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13062
13063 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13064
13065         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13066         finalizing types when updating the pointers to the designated type.
13067         <all>: Finalize the deferred types even if we didn't defer processing
13068         of incomplete types in this invocation.
13069
13070 2011-04-01  Olivier Hainque  <hainque@adacore.com>
13071             Nicolas Setton  <setton@adacore.com>
13072             Eric Botcazou  <ebotcazou@adacore.com>
13073
13074         * gcc-interface/misc.c (gnat_descriptive_type): New function.
13075         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13076
13077 2011-03-28  Kai Tietz  <ktietz@redhat.com>
13078
13079         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13080         Windows targets.
13081         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13082         * system-mingw.ads (System): Change ZCX_By_Default default to True.
13083
13084         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13085
13086 2011-03-28  Tristan Gingold  <gingold@adacore.com>
13087
13088         PR ada/44431
13089         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13090         Use ada output of gnatbind.
13091         (ada/b_gnatb.adb): Ditto.
13092         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13093         (ada.mostlyclean, ada.stage1)
13094         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13095         (ada.stagefeedback): Adjust.
13096         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13097         Use ada output of gnatbind.
13098         (b_gnatm.adb): Ditto.
13099         (b_gnatl.o, b_gnatm.o): New rules.
13100
13101 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
13102
13103         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13104         for the padded type built to support a specified size or alignment.
13105
13106 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
13107
13108         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13109         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13110         unconditionally to the end of the unit when the designated type is
13111         limited_with'ed.
13112         <all>: Rename local variable.  Attempt to un-defer types only and do it
13113         for limited_with'ed types as well.
13114         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
13115         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13116         consistently and remove redundant call to finalize_from_with_types.
13117
13118 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
13119
13120         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13121         subprograms without a previous spec declared in the same unit.
13122         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13123         subprograms at the end of the unit instead of at the beginning.
13124         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13125         isn't public for the special handling of non-inline functions nested
13126         inside inline external functions.
13127
13128 2011-03-25  Jeff Law  <law@redhat.com>
13129
13130         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13131
13132 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
13133
13134         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13135         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13136         to compute Set_Size_Depends_On_Discriminant.
13137         (Layout_Type): Call it on array types in back-end layout mode.
13138         * sem_util.adb (Requires_Transient_Scope): Return true for array
13139         types only if the size depends on the value of discriminants.
13140         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13141         type if the RHS is a call to a function that returns an unconstrained
13142         type with default discriminant.
13143
13144 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
13145
13146         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13147         non-conversion to the nominal result type at the end.
13148
13149 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
13150
13151         * gcc-interface/trans.c (create_temporary): New function taken from...
13152         (create_init_temporary): ...here.  Call it.
13153         (call_to_gnu): Create the temporary for the return value early, if any.
13154         Create it for a function with copy-in/copy-out parameters if there is
13155         no target; in other cases of copy-in/copy-out, use another temporary.
13156         Push the new binding level lazily.  Add and rename local variables.
13157
13158 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
13159
13160         * gcc-interface/decl.c (validate_size): Improve comments and tweak
13161         error message.
13162         (set_rm_size): Likewise.
13163
13164 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
13165
13166         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13167         for the padded type built in order to support a specified alignment.
13168         Fix incorrect formatting.
13169
13170 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
13171
13172         PR bootstrap/48216
13173         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13174
13175 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
13176
13177         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13178         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13179         to the end of the list.  Adjust recursive call.  Rename local variable.
13180         If REORDER is true, reorder components of the record type.
13181         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13182         components_to_record and adjust the parameter list.
13183
13184 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
13185
13186         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13187         disabled, use the variable for bounds of loop iteration scheme.
13188
13189 2011-03-21  Kai Tietz  <ktietz@redhat.com>
13190
13191         PR target/12171
13192         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13193
13194 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
13195
13196         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13197         out whether the expression is read-only.  Short-circuit placeholder
13198         case and rename a couple of local variables.
13199
13200 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
13201
13202         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13203         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13204         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13205         (convert): Deal with conversions from a smaller form type specially.
13206
13207 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
13208
13209         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13210         its argument, except for the special -I- switch.
13211
13212 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
13213
13214         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13215         "Ada Issues".
13216
13217 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
13218
13219         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13220
13221 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
13222
13223         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13224         GNAT_FORMAL.
13225         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13226         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
13227         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
13228         Do not generate the check directly, instead instantiate the template
13229         check present in the descriptor.
13230         (make_descriptor_field): Move around.
13231         (build_vms_descriptor32): Build a template check in the POINTER field.
13232         (build_vms_descriptor): Remove useless suffixes.
13233         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13234
13235 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
13236
13237         PR bootstrap/47467
13238         * targext.c: Include target files if IN_RTS is defined.
13239
13240 2011-01-26  Richard Guenther  <rguenther@suse.de>
13241
13242         PR bootstrap/47467
13243         * targext.c: Include config.h.
13244         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13245         dependency.
13246
13247 2011-01-04  Pascal Obry  <obry@adacore.com>
13248             Eric Botcazou  <ebotcazou@adacore.com>
13249
13250         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13251
13252 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13253
13254         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13255         end-of-case on the end label and its associated gotos, if any.
13256
13257 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13258
13259         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13260         expressions of the parameter cache within the statement group of
13261         the CICO mechanism.
13262
13263 2011-01-04  Olivier Hainque  <hainque@adacore.com>
13264             Eric Botcazou  <ebotcazou@adacore.com>
13265
13266         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13267         (set_end_locus_from_node): New function.
13268         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13269         make and the function end_locus.
13270         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13271         for the elaboration subprogram.
13272         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13273         set the end_locus of the expression as well.
13274
13275 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13276
13277         PR ada/47131
13278         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13279         variables that are referenced in exception handlers volatile.
13280
13281
13282 \f
13283 Copyright (C) 2011 Free Software Foundation, Inc.
13284
13285 Copying and distribution of this file, with or without modification,
13286 are permitted in any medium without royalty provided the copyright
13287 notice and this notice are preserved.