OSDN Git Service

3bd55bffb8b1dbe856dc08a3c6771d5bc90c1cea
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
2
3         * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
4         declared as atomic.  Move around conditionally executed code.
5
6 2011-10-24  Robert Dewar  <dewar@adacore.com>
7
8         * sem.adb (Initialize): Fix bug that blew up if called a second
9         time.
10
11 2011-10-24  Robert Dewar  <dewar@adacore.com>
12
13         * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
14         tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
15
16 2011-10-24  Robert Dewar  <dewar@adacore.com>
17
18         * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
19         name in error msg.
20
21 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
22
23         * gnat_rm.texi Add an entry for restriction No_Finalization.
24
25 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
26
27         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
28         current instance is within the one that contains the generic,
29         the freeze node for the current one must appear in the current
30         declarative part. Ditto if the current instance is within another
31         package instance. In both of these cases the freeze node of the
32         previous instance is not relevant.
33
34 2011-10-24  Gary Dismukes  <dismukes@adacore.com>
35
36         * switch-m.adb (Normalize_Compiler_Switches): Add recognition
37         of AAMP-specific switches -univ and -aamp_target.
38
39 2011-10-24  Robert Dewar  <dewar@adacore.com>
40
41         * a-tienau.adb (Put): Deal properly with limited line length.
42
43 2011-10-24  Robert Dewar  <dewar@adacore.com>
44
45         * sem_warn.adb, sem_ch12.adb: Minor reformatting.
46
47 2011-10-24  Tristan Gingold  <gingold@adacore.com>
48
49         * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
50         on AIX.
51
52 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
53
54         * sem_ch12.adb (Earlier): make available globally. If both
55         nodes have the same sloc, the freeze node that does not come
56         from source is the later one.
57         (True_Parent): Make available globally.
58         (Previous_Instance): Subsidiary of
59         Insert_Freeze_Node_For_Instance, to check whether the generic
60         parent of the current instance is declared within a previous
61         instance in the same unit or declarative  part, in which case the
62         freeze nodes of both instances must appear in order to prevent
63         elaboration problems in gigi.
64         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
65         freeze point, and the freeze node of a preceding instantiation
66         must be inserted before it.
67
68 2011-10-24  Robert Dewar  <dewar@adacore.com>
69
70         * checks.ads, checks.adb: Add handling of Synchronization_Check
71         * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
72         atomic sync).
73         * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
74         flag Minor code reorganization.
75         * opt.ads (Warn_On_Atomic_Synchronization): New switch.
76         * par-prag.adb: Add dummy entries for pragma
77         Disable/Enable_Atomic_Synchronization.
78         * sem_prag.adb (Process_Suppress_Unsuppress): Handle
79         case of Atomic_Synchronization specially (not suppressed
80         by All_Checks, cannot be set from Source).
81         (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
82         * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
83         * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
84         entry for pragma Disable/Enable_Atomic_Synchronization
85         * switch-c.adb: The -gnatp switch does not disable
86         Atomic_Synchronization Add -gnatep switch to disable
87         Atomic_Synchronization.
88         * types.ads: Add entry for Synchronization_Check
89         * usage.adb: Add line for -gnated switch
90         * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
91
92 2011-10-24  Geert Bosch  <bosch@adacore.com>
93
94         * s-gearop.adb (Back_Substitute): Avoid overflow if matrix
95         bounds start at Integer'First.
96
97 2011-10-24  Robert Dewar  <dewar@adacore.com>
98
99         * sem_ch12.adb, s-gearop.adb: Minor reformatting
100
101 2011-10-24  Robert Dewar  <dewar@adacore.com>
102
103         * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings
104         * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings
105
106 2011-10-24  Emmanuel Briot  <briot@adacore.com>
107
108         * prj-proc.adb (Process_Expression_Variable_Decl): No special
109         handling for Project_Path unless it is an attribute.
110
111 2011-10-24  Javier Miranda  <miranda@adacore.com>
112
113         * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
114         (Install_Hidden_Primitives): New subprogram.
115         (Restore_Hidden_Primitives): New subprogram.
116         (Analyze_Formal_Package_Declaration,
117         Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
118         Invoke Check_Hidden_Primitives after every call to
119         Analyze_Associations, and invoke Restore_Hidden_Primitives to
120         restore their visibility after processing the instantiation.
121         (Instantiate_Package_Body): Install visible primitives before
122         analyzing the instantiation and uninstall them to restore their
123         visibility when the instantiation has been analyzed.
124         * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
125         (Remove_Suffix): New subprogram
126         * sem_ch3.adb (Derive_Subprogram): When handling
127         a derived subprogram for the instantiation of a formal derived
128         tagged type, inherit the dispatching attributes from the actual
129         subprogram (not from the parent type).
130
131 2011-10-24  Vasiliy Fofanov  <fofanov@adacore.com>
132
133         * gnat_ugn.texi: Document explicit use of XDECGNAT library.
134
135 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
136
137         * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
138         update its uses.
139         (Build_Discriminant_Assignments): Add local variable D_Loc and update
140         its uses.
141         (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
142         Var_Loc and update their uses.
143         (Build_Record_Init_Proc): Code reformatting.
144         (Increment_Counter): Add formal parameter Loc.
145         (Make_Counter): Add formal parameter Loc.
146
147 2011-10-24  Eric Botcazou  <ebotcazou@adacore.com>
148
149         * sem_disp.adb (Covers_Some_Interface): Fix typo.
150
151 2011-10-24  Matthew Heaney  <heaney@adacore.com>
152
153         * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority):
154         Predicate had wrong sense.
155
156 2011-10-24  Yannick Moy  <moy@adacore.com>
157
158         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
159         Translate arguments in positional notation into pragma argument
160         association arguments for the generated pragma.
161
162 2011-10-24  Arnaud Charlet  <charlet@adacore.com>
163
164         * exp_ch5.adb: Fix minor typo.
165
166 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
167
168         * sem_ch3.adb (Is_Visible_Component): Refine predicate for
169         the case of a component reference in an instance body, when the
170         enclosing type is private.
171
172 2011-10-24  Sergey Rybin  <rybin@adacore.com frybin>
173
174         * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
175         driver for getting the project support into gnatelim section.
176
177 2011-10-24  Robert Dewar  <dewar@adacore.com>
178
179         * gnat_rm.texi: Minor correction to documentation on address
180         clause.
181
182 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
183
184         * s-finmas.adb (Attach): Synchronize and call the unprotected version.
185         (Attach_Unprotected): New routine.
186         (Delete_Finalize_Address): Removed.
187         (Delete_Finalize_Address_Unprotected): New routine.
188         (Detach): Synchronize and call the unprotected version.
189         (Detach_Unprotected): Remove locking.
190         (Finalize): Add various comment on synchronization. Lock the critical
191         region and call the unprotected versions of routines.
192         (Finalize_Address): Removed.
193         (Finalize_Address_Unprotected): New routine.
194         (Set_Finalize_Address): Synchronize and call
195         the unprotected version.
196         (Set_Finalize_Address_Unprotected): New routine.
197         (Set_Heterogeneous_Finalize_Address): Removed.
198         (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
199         (Set_Is_Heterogeneous): Add comment on synchronization and
200         locking.
201         * s-finmas.ads: Flag Finalization_Started is no longer atomic
202         because synchronization uses task locking / unlocking.
203         (Attach): Add comment on usage.
204         (Attach_Unprotected): New routine.
205         (Delete_Finalize_Address): Renamed to
206         Delete_Finalize_Address_Unprotected.
207         (Detach): Add comment on usage.
208         (Detach_Unprotected): New routine.
209         (Finalize_Address): Renamed to Finalize_Address_Unprotected.
210         (Set_Finalize_Address): Add comment on usage.
211         (Set_Finalize_Address_Unprotected): New routine.
212         (Set_Heterogeneous_Finalize_Address): Renamed to
213         Set_Heterogeneous_Finalize_Address_Unprotected.
214         * s-stposu.adb (Allocate_Any_Controlled): Add local variable
215         Allocation_Locked. Add various comments on synchronization. Lock
216         the critical region and call the unprotected version of
217         routines.
218         (Deallocate_Any_Controlled): Add various comments on
219         synchronization. Lock the critical region and call the unprotected
220         version of routines.
221
222 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
223
224         * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
225         are universal and must carry the corresponding type.
226         * sem_eval.adb (Check_Non_Static_Context): If the type of the
227         expression is universal real, as may be the case for a fixed point
228         expression with constant operands in the context of a conversion,
229         there is nothing to check.
230         * s-finmas.adb: Minor reformatting
231
232 2011-10-23  Eric Botcazou  <ebotcazou@adacore.com>
233
234         * gcc-interface/decl.c (create_concat_name): Add explicit cast.
235
236 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
237
238         * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
239         TRACE): Reintroduce.
240         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
241         ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
242
243 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
244
245         * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
246         (unchecked_conversion_nop): Use it.
247         (gnat_to_gnu): Likewise.
248
249 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
250
251         * back_end.adb (Call_Back_End): Pass the maximum logical line number
252         instead of the maximum physical line number to gigi.
253         * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
254
255 2011-10-16  Tom Tromey  <tromey@redhat.com>
256             Dodji Seketeli  <dodji@redhat.com>
257
258         * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the
259         new public ordinary map interface.
260
261 2011-10-16  Tristan Gingold  <gingold@adacore.com>
262
263         * link.c (_AIX): Add support for GNU ld.
264
265 2011-10-16  Fedor Rybin  <frybin@adacore.com>
266
267         * gnat_ugn.texi: Fixing gnattest example names in the doc.
268         Adding explanation to additional tests usage.
269
270 2011-10-16  Robert Dewar  <dewar@adacore.com>
271
272         * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
273
274 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
275
276         * a-convec.adb: Fix minor inconsistencies.
277
278 2011-10-16  Matthew Heaney  <heaney@adacore.com>
279
280         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
281         Implementation): Specify pragma Implementation_Defined.
282
283 2011-10-15  Nicolas Roche  <roche@adacore.com>
284
285         * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
286         either rtp-smp or ravenscar-cert-rtp runtimes.
287
288 2011-10-15  Bob Duff  <duff@adacore.com>
289
290         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
291         Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
292         is available.
293         (Expand_N_Extended_Return_Statement): Do not create a renaming of the
294         build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
295         available.
296         (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
297         pool only if RE_Root_Storage_Pool_Ptr is available.
298         (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
299         pool actual unless RE_Root_Storage_Pool_Ptr is available.
300         * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
301         formal only if RE_Root_Storage_Pool_Ptr is available.
302
303 2011-10-15  Matthew Heaney  <heaney@adacore.com>
304
305         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
306         type): Specify Priority aspect for protected type.
307
308 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
309
310         * exp_disp.adb (Check_Premature_Freezing): If an untagged type
311         is a generic actual, it is a subtype of a type that was frozen
312         by the instantiation, and even if not marked frozen it does not
313         affect the construction of the dispatch table.
314
315 2011-10-14  Robert Dewar  <dewar@adacore.com>
316
317         * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
318         reformatting.
319         * s-rident.ads: Add missing Compiler_Unit pragma.
320
321 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
322
323         * sem_res.adb: Minor reformatting.
324
325 2011-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
326
327         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
328         Code and comment reformatting. Use BIP_Task_Master
329         when creating a _master.
330         (BIP_Formal_Suffix): Code reformatting. Correct the case for
331         BIP_Task_Master.
332         (Make_Build_In_Place_Call_In_Object_Declaration): Use
333         BIP_Task_Master when creating a reference to the enclosing
334         function's _master formal.
335         (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
336         to the _master.
337         * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
338         (Needs_BIP_Finalization_Master): Alphabetized.
339         * sem_ch6.adb (Create_Extra_Formals): Update the usage of
340         BIP_Task_Master.
341
342 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
343
344         * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
345         reject an aliased keyword on the object declaration of an extended
346         return statement. In older versions of the language indicate
347         that this is illegal in the standard.
348
349 2011-10-14  Pascal Obry  <obry@adacore.com>
350
351         * sem_util.adb, sem_ch4.adb: Minor reformatting.
352
353 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
354
355         * sem_ch13.adb: Recognize properly procedure calls that are
356         transformed into code statements.
357
358 2011-10-14  Vincent Celier  <celier@adacore.com>
359
360         * projects.texi: Minor fix in project example.
361
362 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
363
364         * sem_util.adb: Return objects are aliased if their type is
365         immutably limited as per AI05-0053.
366
367 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
368
369         * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
370         expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
371         Short_Circuit_And_Or expansion code (moved to sem_res).
372         * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
373         "and" and "or" operators as short-circuit "and then" and "or
374         else", when pragma Short_Circuit_And_Or is active.
375
376 2011-10-13  Robert Dewar  <dewar@adacore.com>
377
378         * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
379         sem_ch6.adb, exp_ch3.adb: Minor reformatting.
380
381 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
382
383         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
384
385 2011-10-13  Jerome Guitton  <guitton@adacore.com>
386
387         * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
388
389 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
390
391         * a-convec.ads (Cursor): Minor reformatting.
392         * a-convec.adb (Next): Fix minor inconsistencies.
393         (Previous): Likewise.
394
395 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
396
397         * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
398         New predicate to determine whether some operations on an array
399         type are available when the full view of its component may differ
400         from the view of the point of the array declaration.
401         * sem_ch4.adb (Find_Equality_Types): Use
402         Available_Full_View_Of_Component.
403         * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
404
405 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
406
407         * sem_ch9.adb: Analyze aspects while discriminants of protected
408         type are visible.
409
410 2011-10-13  Geert Bosch  <bosch@adacore.com>
411
412         * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
413         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
414         longer depend on an external library.
415         * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
416         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
417         Update dependencies.
418         * gcc-interface/Make-lang.in: Update dependencies. 
419
420 2011-10-13  Cyrille Comar  <comar@adacore.com>
421
422         * gnat_ugn.texi: Minor editing.
423
424 2011-10-13  Vincent Celier  <celier@adacore.com>
425
426         * projects.texi: Add documentation on packages and attributes
427         that are inherited from a project being extended into the
428         extended project.
429
430 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
431
432         * exp_ch3.adb (Build_Master): Rewritten.
433         (Expand_N_Full_Type_Declaration): Reformat the declarative
434         region. Update the call to Build_Master_Renaming.
435         (Expand_Previous_Access_Type): Rewritten.
436         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
437         Add local constant Result_Subt and update related usage.
438         (Expand_N_Extended_Return_Statement): Add local constant
439         Result_Subt and update related usage.
440         * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
441         new context detection mechanism.
442         (Build_Class_Wide_Master):
443         Use Insert_Action to add the renaming into the tree.
444         (Build_Master_Entity): Rewritten to use the new context detection
445         mechanism.
446         (Build_Master_Renaming): Add formal parameter Ins_Nod
447         and related usage. Use Insert_Action to add the renaming into the
448         tree.
449         (Find_Enclosing_Context): New subsidiary routine. Rather
450         than relying on enclosing scopes, this routine looks at the
451         tree structure to figure out the proper context for a _master
452         or a _chain. This approach eliminates the issues with transient
453         scopes which have not been converted into blocks.
454         * exp_ch9.ads (Build_Master_Entity): Change parameter profile
455         to better reflect the new usage. Update the related comment.
456         (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
457         the comment on usage.
458         * sem_ch3.adb (Access_Definition): Update the calls to
459         Build_Master_Entity and Build_Master_Renaming.
460         * sem_ch6.adb (Create_Extra_Formals): Add local variable
461         Full_Subt. Code reformatting.
462         * sem_util.adb (Is_Iterator): Alphabetized.
463         (Is_LHS): Alphabetized.
464         (Is_Limited_Class_Wide_Type): New routine.
465         * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
466
467 2011-10-13  Geert Bosch  <bosch@adacore.com>
468
469         * a-ngrear.adb (Solve): Make generic and move to
470         System.Generic_Array_Operations.
471         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
472         New generic solvers to  compute a vector resp. matrix Y such
473         that A * Y = X, approximately.
474         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
475         Implement using Forward_Eliminate and Back_Substitute
476         * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
477         on BLAS and LAPACK.
478         * a-ngcoar.ads ("abs"): Fix return type to be real.
479
480 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
481
482         PR ada/50589
483         * s-linux-alpha.ads: Do not "with" Interfaces.C.
484         * s-linux-sparc.ads: Likewise.
485
486 2011-10-13  Geert Bosch  <bosch@adacore.com>
487
488         * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
489         returning a Real.
490         * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
491         and use formal.
492         * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
493         new profile.
494
495 2011-10-13  Geert Bosch  <bosch@adacore.com>
496
497         * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
498         move to System.Generic_Array_Operations.
499
500 2011-10-13  Geert Bosch  <bosch@adacore.com>
501
502         * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
503         * s-gearop.ads (L2_Norm): Change profile to be suitable for
504         Complex_Vector
505         * s-gearop.adb (L2_Norm): Reimplement using direct definition,
506         not inner product
507
508 2011-10-13  Robert Dewar  <dewar@adacore.com>
509
510         * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
511         prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
512         sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
513         par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
514         par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
515         exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
516
517 2011-10-13  Geert Bosch  <bosch@adacore.com>
518
519         * s-gearop.adb: Minor comment additions.
520
521 2011-10-13  Fedor Rybin  <frybin@adacore.com>
522
523         * gnat_ugn.texi: Add gnattest section.
524
525 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
526
527         * freeze.adb: Do not create body of renaming if declaration has
528         errors.
529
530 2011-10-13  Olivier Hainque  <hainque@adacore.com>
531
532         * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
533         further, to the ppc+kernel case only.
534
535 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
536
537         * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
538         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
539         Do not create a pool formal on .NET/JVM.
540         (Expand_N_Extended_Return_Statement): Alphabetize local
541         variables. Do not create a renaming of the build-in-place pool
542         parameter on .NET/JVM.  (Make_Build_In_Place_Call_In_Allocator):
543         Add the user-defined pool only on non-VM targets.
544         (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
545         local variables.  Do not add a pool actual on .NET/JVM.
546         * sem_ch6.adb: Add with and use clause for Targparm.
547         (Create_Extra_Formals): Add build-in-place pool formal only on
548         non-VM targets.
549         * rtsfind.ads: Alphabetize entries.
550
551 2011-10-13  Sergey Rybin  <rybin@adacore.com>
552
553         * gnat_ugn.texi: Minor correction.
554
555 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
556
557         * sem_ch8.adb: Minor error message improvement.
558
559 2011-10-13  Robert Dewar  <dewar@adacore.com>
560
561         * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
562
563 2011-10-13  Gary Dismukes  <dismukes@adacore.com>
564
565         * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
566         of a for loop for an enumeration type with an enumeration rep
567         clause, which involves moving the original loop parameter into
568         a nested block, the loop parameter's entity must be removed from
569         the entity list of the loop scope.
570
571 2011-10-13  Bob Duff  <duff@adacore.com>
572
573         * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
574         that gets passed in the same cases where BIP_Alloc_Form is passed
575         (caller-unknown-size results). BIP_Storage_Pool is used when
576         BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
577         to the user-defined storage pool is passed at the call site,
578         and this pool is used in callee to allocate the result.
579         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
580         version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
581         the additional BIP_Storage_Pool actual.
582         (Expand_N_Extended_Return_Statement): Allocate the function
583         result using the user-defined storage pool, if BIP_Alloc_Form =
584         User_Storage_Pool.
585         * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
586         * exp_ch4.adb: Don't overwrite storage pool set by
587         Expand_N_Extended_Return_Statement.
588         * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
589         for use in build-in-place function calls within allocators
590         where the access type has a user-defined storage pool.
591
592 2011-10-13  Sergey Rybin  <rybin@adacore.com>
593
594         * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
595         literal casing.
596
597 2011-10-13  Nicolas Roche  <roche@adacore.com>
598
599         * gnatlink.adb: Ensure that -mrtp is passed when
600         runtime name ends with 'rtp'.
601
602 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
603
604         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
605         unchecked union type can be limited.
606
607 2011-10-13  Olivier Hainque  <hainque@adacore.com>
608
609         * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
610         the use of the signal trampoline for PPC in the sjlj case as well.
611         Add legitimate casts, preventing compile time warnings on the
612         (sighandler *) profile.
613
614 2011-10-13  Yannick Moy  <moy@adacore.com>
615
616         * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
617         analysis in Alfa mode.
618
619 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
620
621         * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
622         expressions are legal limited return values if each one of their
623         dependent expressions are legal.
624
625 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
626
627         * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
628         if the prefix of the call is a qualified expression, rewrite as
629         a code statement.
630         * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
631         code statement is legal if it is a rewriting of a procedure call.
632
633 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
634
635         * exp_aggr.adb (Flatten): If a component association has a box,
636         assume that aggregate is not static.
637         (Safe_Aggregate): If a component association in a non-limited
638         aggregate has a box, assume that it cannot be expanded in place.
639
640 2011-10-13  Vincent Celier  <celier@adacore.com>
641
642         * prj-conf.adb (Get_Or_Create_Configuration_File): Call
643         Process_Project_Tree_Phase_1 with Packages_To_Check.
644         (Process_Project_And_Apply_Config): Ditto
645         * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
646         Remove default for argument Packages_To_Check.
647         * prj-proc.adb (Recursive_Process): New argument
648         Packages_To_Check.
649         (Process): Ditto.
650         (Process_Project_Tree_Phase_1): Ditto.
651         (Recursive_Project.Process_Aggregated_Projects): Call
652         Prj.Part.Parse and Process_Project_Tree_Phase_1 with
653         Packages_To_Check.
654         * prj-proc.ads (Process): New argument Packages_To_Check
655         (Process_Project_Tree_Phase_1): Ditto
656
657 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
658
659         * gcc-interface/Makefile.in: Fix typo.
660
661 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
662
663         * sem_ch12.adb (Analyze_Formal_{Floating_Type,
664         Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
665         Use sloc of defining identifier of farmal type declaration,
666         as sloc of generated internal entity, to prevent misplaced
667         references in ali.
668
669 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
670
671         * sem_intr.adb (Check_Intrinsic_Operator): Check that type
672         is fully defined before checking that it is a numeric type.
673
674 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
675
676         * sem_aggr.adb (Resolve_Record_Aggregate): If a component
677         association for component X has a box, then X is covered in the
678         aggregate even if there is not default value for X in the type
679         declaration, and X has to be default-initialized.
680
681 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
682
683         * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
684         'Value): Mark literals as referenced only if reference is in
685         current source unit.
686
687 2011-10-13  Matthew Heaney  <heaney@adacore.com>
688
689         * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
690
691 2011-10-13  Olivier Hainque  <hainque@adacore.com>
692
693         * sigtramp.h: New file.  Prototype and spec of the signal
694         trampoline to be called by an established handler to provide
695         dwarf call frame info before the real signal processing code.
696         * sigtramp-ppcvxw.c: New file.  Implementation of the signal
697         trampoline for ppc-vxworks.
698         * init.c (vxworks section): Use it for ppc.
699
700 2011-10-13  Thomas Quinot  <quinot@adacore.com>
701
702         * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
703         (Check_Future_Identifier): New subprogram,
704         factors duplicated code from Par.Ch2.P_Identifier and
705         Par.Ch3.P_Defining_Identifier.
706
707 2011-10-13  Thomas Quinot  <quinot@adacore.com>
708
709         * s-taprop-posix.adb (Initialize): Always raise Storage_Error
710         if we fail to initialize CV attributes or CV.
711
712 2011-10-13  Thomas Quinot  <quinot@adacore.com>
713
714         * s-tasren.adb (Timed_Selective_Wait, case
715         Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
716         we know abortion is already deferred.
717
718 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
719
720         * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
721         (Build_Master_Renaming (function)): Removed.
722         (Build_Master_Renaming (procedure)): Moved to exp_ch9.
723         (Expand_Full_Type_Declaration): Alphabetize
724         variables. Reformatting of code and comments. Rewrite the
725         section on processing of anonymous access-to-task types in
726         record components.
727         * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
728         (Build_Master_Renaming): Moved to exp_ch9.
729         * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
730         (Build_Master_Entity): Add formal parameter
731         Use_Current. Reformatting of code and comments.
732         (Build_Master_Renaming): Moved from exp_ch3.
733         * exp_ch9.ads (Build_Class_Wide_Master): Moved from
734         exp_ch3. Update comment on usage.
735         (Build_Master_Entity):
736         Add formal parameter Use_Current. Update comment on usage.
737         (Build_Master_Renaming): Moved from exp_ch3.
738         * sem_ch3.adb (Access_Definition): Remove redundant code to
739         create a _master and a renaming.
740
741 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
742
743         * lib-xref.adb: Do no emit reference to overridden operation,
744         if it is internally generated.
745
746 2011-10-13  Vincent Celier  <celier@adacore.com>
747
748         * bindgen.adb: Remove any processing related to g-trasym
749         * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
750         * mlib-prj.adb: Remove any processing related to g-trasym.
751
752 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
753
754         * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
755         * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
756         (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
757         (ADA_FLAGS_TO_PASS): Likewise.
758         (COMMON_FLAGS_TO_PASS): New.
759         (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
760         native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
761         (gnatlib): Use COMMON_FLAGS_TO_PASS.
762         (ada.install-common): Likewise.
763         (install-gnatlib): Likewise.
764         (install-gnatlib-obj): Likewise.
765         (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
766         (gnat-cross): Delete.
767         (gnatboot): Likewise.
768         (gnatboot2): Likewise.
769         (gnatboot3): Likewise.
770         (gnatstage1): Likewise.
771         (gnatstage2): Likewise.
772         * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
773         (MOST_ADAFLAGS): Likewise.
774         (LOOSE_CFLAGS): Likewise.
775         (gnat-cross): Likewise.
776         (GNATLIBFLAGS): Add -W -Wall.
777         (GNATLIBCFLAGS_FOR_C): Likewise.
778         * gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
779         * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
780
781 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
782
783         * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
784         (push_range_check_info): Likewise.
785         (gnat_to_gnu) <N_Code_Statement>: Likewise.
786         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
787         (gnat_invariant_expr): Likewise.
788         * gcc-interface/utils.c (compute_related_constant): Likewise.
789         (max_size): Fix handling of SAVE_EXPR.
790         (remove_conversions): Fix formatting.
791
792 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
793
794         * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
795         (DECL_INDUCTION_VAR): New macro.
796         (SET_DECL_INDUCTION_VAR): Likewise.
797         * gcc-interface/gigi.h (convert_to_index_type): Declare.
798         (gnat_invariant_expr): Likewise.
799         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
800         parameter, set DECL_LOOP_PARM_P on it.
801         * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
802         is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
803         * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
804         (struct range_check_info_d): New type.
805         (struct loop_info_d): Likewise.
806         (gnu_loop_stack): New stack.
807         (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
808         built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
809         is set, do not test DECL_RENAMED_OBJECT.
810         (push_range_check_info): New function.
811         (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
812         the label.  Reference the label and the iteration variable from it.
813         Build the special induction variable in the unsigned version of the
814         size type, if it is larger than the base type.  And attach it to the
815         iteration variable if the latter isn't by-ref.  In the iteration scheme
816         case, initialize the invariant conditions in front of the loop if
817         deemed profitable.  Use gnu_loop_stack.
818         (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
819         <N_Raise_Constraint_Error>: Always process the reason.  In the range
820         check and related cases, and if loop unswitching is enabled, compute
821         invariant conditions and push this information onto the stack.
822         Do not translate again the condition if it has been already translated.
823         * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
824         DECL_LOOP_PARM_P isn't set.
825         (convert_to_index_type): New function.
826         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
827         to convert the index from the base index type to sizetype.
828         (gnat_invariant_expr): New function.
829
830 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
831
832         * gcc-interface/utils.c (def_builtin_1): Delete old interface with
833         two parallel arrays to hold standard builtin declarations, and
834         replace it with a function based interface that can support
835         creating builtins on the fly in the future.
836         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
837         (gnat_to_gnu): Ditto.
838
839 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
840
841         PR lto/50492
842         * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
843         * gcc-interface/utils.c (global_context): New variable.
844         (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
845         that are either public external or at top level.  Use "No" macro.
846         (end_subprog_body): Call decl_function_context.
847         (rest_of_subprog_body_compilation): Likewise.
848
849 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
850
851         * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
852         (rest_of_subprog_body_compilation): Likewise.
853         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
854         test for useless conversions by means of gnat_useless_type_conversion.
855         * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
856         (language_function): Add named_ret_val and other_ret_val.
857         (f_named_ret_val): New macro.
858         (f_other_ret_val): Likewise.
859         (gigi): Call rest_of_subprog_body_compilation.
860         (struct nrv_data): New structure.
861         (is_nrv_p): New predicate.
862         (prune_nrv_r): New helper function.
863         (prune_nrv_in_block): New function.
864         (finalize_nrv_r): New helper function.
865         (finalize_nrv): New function.
866         (return_value_ok_for_nrv_p): New predicate.
867         (build_return_expr): If optimization is enabled, record candidates for
868         the Named Return Value optimization.
869         (build_function_stub): Call rest_of_subprog_body_compilation.
870         (Subprogram_Body_to_gnu): If optimization is enabled and there are
871         candidates, finalize the Named Return Value optimization.
872         Call rest_of_subprog_body_compilation.
873         (call_to_gnu): At the end, if a return value is needed, simplify the
874         result before wrapping it up in a COMPOUND_EXPR.
875         * gcc-interface/utils.c (end_subprog_body): Split into...
876         (rest_of_subprog_body_compilation): ...this.  New function.
877         (gnat_useless_type_conversion): Likewise.
878
879 2011-10-06  Thomas Quinot  <quinot@adacore.com>
880
881         * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
882         exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
883         g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
884         par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
885         sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
886         sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
887         s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
888         * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
889
890 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
891
892         * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
893         references.
894
895 2011-10-06  Matthew Heaney  <heaney@adacore.com>
896
897         * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
898         (Dequeue_Only_High_Priority): Protected procedure now implemented.
899
900 2011-10-06  Vincent Celier  <celier@adacore.com>
901
902         * g-trasym.adb: Replace old implementation with the default
903         implementation that returns list of addresses as "0x...".
904         * g-trasym.ads: Update the list of platforms with the full
905         capability.  Indicate that there is a default implementation
906         for other platforms.
907         * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
908         * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
909         is now a default implementation for all platforms without the full
910         capability.
911
912 2011-10-06  Robert Dewar  <dewar@adacore.com>
913
914         * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
915         a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
916         a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
917         reorganization (use conditional expressions).
918
919 2011-10-06  Robert Dewar  <dewar@adacore.com>
920
921         * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
922         floating divide by zero.
923
924 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
925
926         * sem_ch6.adb: Limited interfaces that are not immutably limited
927         are OK in return statements.
928
929 2011-09-30  Iain Sandoe  <iains@gcc.gnu.org>
930
931         * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
932         change to powerpc section.
933
934 2011-09-29  Iain Sandoe  <iains@gcc.gnu.org>
935
936         * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
937         across the port.
938
939 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
940
941         * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
942         a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
943         a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
944         indefinite sets.
945         * a-coorma.ads: Minor reformmating.
946         * einfo.ads: Improve the comment describing the
947         Directly_Designated_Type function.
948         * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
949         ordered maps.
950         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
951         dependencies.
952
953 2011-09-27  Robert Dewar  <dewar@adacore.com>
954
955         * a-comutr.ads: Minor reformatting.
956
957 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
958
959         * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
960         iterators to multiway trees.
961
962 2011-09-27  Yannick Moy  <moy@adacore.com>
963
964         * debug.adb (d.D): New option for strict Alfa mode.
965         * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
966         permissions as strictly as possible.
967         * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
968         Alfa mode, now, interpret ranges of base types like GNAT does; in
969         strict mode, simply change the range of the implicit base Itype.
970         * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
971
972 2011-09-27  Robert Dewar  <dewar@adacore.com>
973
974         * exp_ch9.adb: Minor comment fixes.
975
976 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
977
978         * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
979         trees.
980
981 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
982
983         * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
984         instead of Directly_Designated_Type in the indirect array case.
985
986 2011-09-27  Robert Dewar  <dewar@adacore.com>
987
988         * exp_util.adb, exp_aggr.adb: Minor reformatting.
989
990 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
991
992         * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
993         on subtype declarations.
994         * exp_aggr.adb: Minor comment update.
995
996 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
997
998         * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
999         test in the N_Explicit_Dereference case.  Fold double logical
1000         negation in the special loop case and conditionalize it on
1001         Variable_Ref being true.
1002
1003 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1004
1005         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1006         single protected object and the selector is a discriminant or an
1007         entry family, this is a non-overloaded candidate interpretation,
1008         and possible primitive operations of the type must not be
1009         examined.
1010
1011 2011-09-27  Arnaud Charlet  <charlet@adacore.com>
1012
1013         * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1014
1015 2011-09-27  Pascal Obry  <obry@adacore.com>
1016
1017         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1018         s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1019         Add dummy definitions for pthread_rwlock_t
1020         and pthread_rwlockattr_t on all POSIX platforms.
1021         * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1022         reference.
1023         (Finalize_Lock): Likewise.
1024         (Write_Lock): Likewise.
1025         (Unlock): Likewise.
1026
1027 2011-09-27  Tristan Gingold  <gingold@adacore.com>
1028
1029         * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1030         windows 64.
1031
1032 2011-09-27  Pascal Obry  <obry@adacore.com>
1033
1034         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1035         s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1036         s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1037         s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1038         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1039         s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1040         s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1041         s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1042         s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1043         s-taprop-posix.adb: Revert previous changes.
1044         (Lock): Now a record containing the two possible lock
1045         (mutex and read/write) defined in OS_Interface.
1046         * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1047         'R' locking policy.
1048         (Initialize_Protection): Likewise.
1049         (Lock): Likewise.
1050         (Lock_Read_Only): Likewise.
1051         (Unlock): Likewise.
1052
1053 2011-09-27  Pascal Obry  <obry@adacore.com>
1054
1055         * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1056         OS_Interface.pthread_rwlock_t.
1057
1058 2011-09-27  Robert Dewar  <dewar@adacore.com>
1059
1060         * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1061         a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1062         sem_ch5.adb, sem_util.adb: Minor reformatting.
1063
1064 2011-09-27  Pascal Obry  <obry@adacore.com>
1065
1066         * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1067         (Finalize_Lock)[RW_Lock]: Likewise.
1068         (Write_Lock)[RW_Lock]: Likewise.
1069         (Unlock)[RW_Lock]: Likewise.
1070         (Read_Lock): Define L as RW_Lock (instead of Lock).
1071         * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1072         routine for r/w lock.
1073         (Finalize_Lock)[RW_Lock]: Likewise.
1074         (Write_Lock)[RW_Lock]: Likewise.
1075         (Unlock)[RW_Lock]: Likewise.
1076         (Read_Lock): Define L as RW_Lock (instead of Lock).
1077
1078         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1079         s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1080         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1081         (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1082         routine for standard lock.
1083         (Finalize_Lock)[RW_Lock]: Likewise.
1084         (Write_Lock)[RW_Lock]: Likewise.
1085         (Unlock)[RW_Lock]: Likewise.
1086         (Read_Lock): Define L as RW_Lock (instead of Lock).
1087         * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1088         in the record definition.
1089         * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1090         lock for 'R' locking policy.
1091         (Initialize_Protection): Likewise.
1092         (Lock): Likewise.
1093         (Lock_Read_Only): Likewise.
1094         (Unlock): Likewise.
1095         * s-taspri-posix.ads (RW_Lock): New type defined as
1096         OS_Interface.pthread_rwlock_t.
1097
1098         * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1099         s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1100         s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1101         s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1102
1103 2011-09-27  Pascal Obry  <obry@adacore.com>
1104
1105         * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1106
1107 2011-09-27  Pascal Obry  <obry@adacore.com>
1108
1109         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1110         s-osinte-hpux.ads, s-osinte-irix.ads,
1111         s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1112         pthread_mutex_t.
1113         (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1114         * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1115         pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1116         pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1117         pthread_rwlock_destroy, pthread_rwlock_rdlock,
1118         pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1119
1120 2011-09-27  Pascal Obry  <obry@adacore.com>
1121
1122         * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1123         (RE_Id): Add RE_Lock_Read_Only.
1124         (RE_Unit_Table): Likewise.
1125         * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1126         to lift restriction on first character. Handle now the
1127         Name_Concurrent_Readers_Locking where policy character is set to
1128         'R'.
1129         * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1130         constant.
1131         * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1132         read only lock for function in protected object.
1133         * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1134         this routine is now used.
1135
1136 2011-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1137
1138         * s-atocou-x86.adb (Decrement): Use %;.
1139         (Increment): Likewise.
1140
1141 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1142
1143         * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1144         dereference of the pointer to the storage area.  Remove useless type
1145         conversions and factor out common code.
1146
1147 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1148
1149         * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1150         variable and use it throughout.
1151         <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1152         <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1153         first step.  Also convert to the unpadded type as a last step.
1154
1155 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1156
1157         * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1158         DECL_CHAIN in comment.
1159         * gcc-interface/trans.c (gigi): Likewise.
1160         (Attribute_to_gnu): Likewise.
1161         (build_function_stub): Likewise.
1162         (gnat_to_gnu): Likewise.
1163         * gcc-interface/utils.c (create_subprog_decl): Likewise.
1164         (convert_vms_descriptor64): Likewise.
1165         (convert_vms_descriptor32): Likewise.
1166
1167 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1168
1169         * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1170         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1171         issues.  Use COMPLETE_TYPE_P in assertion.  Also set TREE_READONLY if
1172         the type of the record is TYPE_READONLY.
1173
1174 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1175             Robert Dewar  <dewar@adacore.com>
1176
1177         * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1178         OUT formal parameter which is of an null-exclusion access subtype.
1179
1180 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1181
1182         * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1183         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1184         (gnat_to_gnu_param): Likewise.
1185         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1186         maybe_unconstrained_array instead of doing the work manually.
1187         (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1188         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1189         is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1190         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1191         (gnat_stabilize_reference): Likewise.
1192
1193 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1194
1195         * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1196         (SET_TYPE_NULL_BOUNDS): Likewise.
1197         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1198         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1199         * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1200         pointer types.
1201         * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1202         check that the initializer is a valid constant expression for use in
1203         initializing a static variable.  Add missing guard.
1204         (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1205         (convert_to_fat_pointer): In the null fat pointer case, build a valid
1206         pointer for the bounds.
1207         * gcc-interface/utils2.c (compare_fat_pointers): New function.
1208         (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1209
1210 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1211
1212         * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1213         * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1214         the by-ref case.  Do not set TREE_READONLY on a renamed object.  Set
1215         TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1216         (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1217         to the indirect case.
1218         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1219         the TREE_THIS_NOTRAP flag.
1220
1221 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1222
1223         * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1224         iteration scheme, always generate the do-while form if optimization
1225         is enabled.  Use more straightforward test at the end.
1226
1227 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1228
1229         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1230         XNEW instead of xmalloc.  Do not build useless pointer type.
1231         <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1232         * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1233         * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1234
1235 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1236
1237         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1238         the alignment if this doesn't prevent BLKmode access to the object.
1239
1240 2011-09-24  Iain Sandoe  <iains@gcc.gnu.org>
1241
1242         * gcc-interface/Makefile.in (darwin): Do not issue the
1243         '-flat_namespace' linker flag during Ada build.
1244         * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1245         default shared library options.
1246
1247 2011-09-19  Alexandre Oliva  <aoliva@redhat.com>
1248
1249         * gcc-interface/decl.c (annotate_value): Look up expression for
1250         insertion in the cache at the end.
1251
1252 2011-09-19  Arnaud Charlet  <charlet@adacore.com>
1253
1254         * gcc-interface/Make-lang.in: Update dependencies.
1255
1256 2011-09-19  Steve Baird  <baird@adacore.com>
1257
1258         * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1259         configuration pragma names so that Is_Configuration_Pragma_Name
1260         will return True for Name_Annotate.  Make corresponding change in
1261         Pragma_Id enumeration type.  This is needed to allow an Annotate
1262         pragma to occur in a configuration pragma file (typically,
1263         a gnat.adc file).
1264         * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1265         * gnat_rm.texi: Note that pragma Annotate may be used as a
1266         configuration pragma.
1267
1268 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
1269
1270         * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1271         a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1272
1273 2011-09-19  Yannick Moy  <moy@adacore.com>
1274
1275         * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1276         for expansion of set membership.
1277         (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1278         * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1279         visible for use in Alfa expansion.
1280         * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1281         variable in Alfa mode.
1282
1283 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1284
1285         * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1286
1287 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1288
1289         * exp_ch9.adb: Minor reformatting.
1290
1291 2011-09-19  Hristian Kirtchev  <kirtchev@adacore.com>
1292
1293         * freeze.adb (Build_Renamed_Body): Generic subprograms
1294         instantiations cannot be poperly inlined by the compiler, do
1295         not set the Body_To_Inline attribute in such cases.
1296         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1297         inlining-related flags from the generic subprogram declaration.
1298
1299 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1300
1301         * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1302         (Build_Stub_Type): Remove, instead copy components from
1303         System.Partition_Interface.RACW_Stub_Type.
1304         (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1305         (Copy_Component_List): New subprogram.
1306
1307 2011-09-19  Yannick Moy  <moy@adacore.com>
1308
1309         * lib-xref.adb (Generate_Reference): Ignore references to
1310         constants in Standard.
1311
1312 2011-09-19  Robert Dewar  <dewar@adacore.com>
1313
1314         * err_vars.ads, errout.ads: Minor reformatting.
1315
1316 2011-09-19  Robert Dewar  <dewar@adacore.com>
1317
1318         * aspects.ads (Impl_Defined_Aspects): New array
1319         * lib-writ.adb (No_Dependences): New name for No_Dependence
1320         * restrict.adb (No_Dependences): New name for No_Dependence
1321         (Check_Restriction_No_Specification_Of_Aspect): New
1322         procedure.
1323         (Set_Restriction_No_Specification_Of_Aspect): New procedure
1324         (Restricted_Profile_Result): New variable
1325         (No_Specification_Of_Aspects): New variable
1326         (No_Specification_Of_Aspect_Warning): New variable
1327         * restrict.ads (No_Dependences): New name for No_Dependence
1328         (Check_Restriction_No_Specification_Of_Aspect): New procedure
1329         (Set_Restriction_No_Specification_Of_Aspect): New procedure
1330         * s-rident.ads: Add restriction
1331         No_Implementation_Aspect_Specifications, this is also added to
1332         the No_Implementation_Extensions profile.
1333         * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1334         No_Implementation_Defined_Aspects
1335         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1336         * sem_prag.adb (Analyze_Aspect_Specifications): Check
1337         No_Implementation_Aspects
1338         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1339         * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1340
1341 2011-09-19  Yannick Moy  <moy@adacore.com>
1342
1343         * lib-xref.adb (Generate_Reference): Take into account multiple
1344         renamings for Alfa refs.
1345
1346 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1347
1348         * g-socthi-mingw.adb: Minor reformatting.
1349
1350 2011-09-19  Yannick Moy  <moy@adacore.com>
1351
1352         * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1353         expansion to False in mode Alfa
1354
1355 2011-09-19  Pascal Obry  <obry@adacore.com>
1356
1357         * mingw32.h: Remove obsolete code needed for old versions
1358         of MingW.
1359
1360 2011-09-19  Robert Dewar  <dewar@adacore.com>
1361
1362         * errout.ads: Minor reformatting.
1363
1364 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
1365
1366         * sem_ch6.adb (Analyze_Expression_Function): When the expression
1367         function is transformed into a declaration and a body, insert
1368         body at the end of the declarative part, to prevent premature
1369         freeze actions, and preserve original specification in the
1370         subprogram declaration.
1371
1372 2011-09-19  Vincent Celier  <celier@adacore.com>
1373
1374         * projects.texi: Minor editing.
1375
1376 2011-09-19  Robert Dewar  <dewar@adacore.com>
1377
1378         * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1379         exp_aggr.adb: Minor reformatting.
1380
1381 2011-09-19  Yannick Moy  <moy@adacore.com>
1382
1383         * lib-xref.adb (Generate_Reference): Change entity referenced
1384         to underlying object if any, or else reference to the HEAP.
1385
1386 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
1387
1388         * gcc-interface/Make-lang.in: Update dependencies.
1389
1390 2011-09-15  Robert Dewar  <dewar@adacore.com>
1391
1392         * tree_io.ads: Minor reformatting.
1393         * a-intnam.ads: Fix bad header.
1394
1395 2011-09-15  Thomas Quinot  <quinot@adacore.com>
1396
1397         * a-exexpr-gcc.adb: Minor reformatting.
1398
1399 2011-09-15  Yannick Moy  <moy@adacore.com>
1400
1401         * sem_ch6.adb: Propagate information that an expression function comes
1402         from source (otherwise references to this entity are not stored).
1403
1404 2011-09-15  Robert Dewar  <dewar@adacore.com>
1405
1406         * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1407         a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1408         a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1409
1410 2011-09-15  Ed Schonberg  <schonberg@adacore.com>
1411
1412         * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1413         if the expression function is not a completion, create a
1414         new specification for the generated declaration, and keep the
1415         original specification in the generated body. Shorter code also
1416         ensures that proper warnings are generated for unused formals
1417         in all cases.
1418
1419 2011-09-15  Sergey Rybin  <rybin@adacore.com>
1420
1421         * tree_io.ads: Update ASIS_Version_Number because of the changes
1422         in the tree structures for expression functions.
1423
1424 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
1425
1426         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1427         s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1428         s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1429         (CLOCK_REALTIME): Fix wrong value on some OSes.
1430         * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1431
1432 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1433
1434         * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1435         to unconstrained array case, deal with each branch of a COND_EXPR.
1436         * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1437         a COND_EXPR in the initializer, if present.
1438
1439 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1440
1441         * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1442         of an addressable type.
1443         * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1444         Deal with those cases for which creating a temporary is mandatory.
1445
1446 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1447
1448         * gcc-interface/trans.c (call_to_gnu): Use local variable.  Make sure
1449         this is a real formal parameter before testing whether it is by ref.
1450
1451 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1452
1453         * gcc-interface/gigi.h (build_call_0_expr): Delete.
1454         (build_call_1_expr): Likewise.
1455         (build_call_2_expr): Likewise.
1456         (build_call_n_expr): New prototype.
1457         * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1458         * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1459         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1460         (Exception_Handler_to_gnu_zcx): Likewise.
1461         (gnat_to_gnu): Likewise.
1462         (build_binary_op_trapv): Likewise.
1463         * gcc-interface/utils2.c (build_call_0_expr): Delete.
1464         (build_call_1_expr): Likewise.
1465         (build_call_2_expr): Likewise.
1466         (build_call_n_expr): New function.
1467         (build_call_raise): Use build_call_n_expr.
1468         (build_call_raise_range): Likewise.
1469         (build_call_raise_column): Likewise.
1470         (build_call_alloc_dealloc_proc): Likewise.
1471         (maybe_wrap_malloc): Likewise.
1472         (maybe_wrap_free): Likewise.
1473
1474 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1475
1476         * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1477         MODIFY_EXPR.
1478         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1479         the result type is null if ENABLE_CHECKING.  Set operation_type at the
1480         end unconditionally if not set in the previous cases.
1481         Use build2 and void_type_node for MODIFY_EXPR.
1482         (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1483
1484 2011-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1485
1486         * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1487         precision when converting to or from an integral type whose precision
1488         is not equal to its size.
1489
1490 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
1491
1492         * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1493
1494 2011-09-07  Iain Sandoe  <iains@gcc.gnu.org>
1495
1496         * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1497         implementation.
1498         * system-darwin-ppc64.ads: New file.
1499
1500 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1501
1502         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1503         reference to "-lm".
1504
1505 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1506
1507         * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1508         size switches to the link phase for shared libs.
1509
1510 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1511
1512         * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1513         LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1514
1515 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1516
1517         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1518         (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1519         gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1520         New targets.
1521         (TOOLS_FLAGS_TO_PASS): New.
1522         (../stamp-tools): Reintroduce, to avoid merge conflicts.
1523
1524 2011-09-06  Robert Dewar  <dewar@adacore.com>
1525
1526         * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1527         name for Is_RM_Defined_Unit. Also several fixes to this unit.
1528
1529 2011-09-06  Robert Dewar  <dewar@adacore.com>
1530
1531         * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1532         * s-rident.ads: New restriction No_Implementation_Units
1533         (this restriction is also part of the profile
1534         No_Implementation_Extensions)
1535         * sem_ch10.adb (Analyze_With_Clause): Add check for
1536         No_Implementation_Units restriction.
1537
1538 2011-09-06  Jerome Guitton  <guitton@adacore.com>
1539
1540         * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1541         on vThreads.
1542
1543 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1544
1545         * s-solita.adb: Minor reformatting.
1546
1547 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1548
1549         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1550         is a rewriting of an expression function does not freeze previous
1551         entities.
1552
1553 2011-09-06  Robert Dewar  <dewar@adacore.com>
1554
1555         * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1556
1557 2011-09-06  Tristan Gingold  <gingold@adacore.com>
1558
1559         * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1560         powerpc-wrs-vxworksae.
1561
1562 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1563
1564         * s-os_lib.ads (Spawn): Minor documentation clarification,
1565         Success is True for a zero exit status.
1566
1567 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1568
1569         * sem_ch5.adb: Add message for common iterator error.
1570
1571 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1572
1573         * exp_ch3.adb (Build_Initialization_Call): If the target is a
1574         selected component discriminated by a current instance, replace
1575         the constraint with a reference to the target object, regardless
1576         of whether the context is an init_proc.
1577
1578 2011-09-06  Robert Dewar  <dewar@adacore.com>
1579
1580         * exp_attr.adb: Descriptor_Size is never static.
1581
1582 2011-09-06  Robert Dewar  <dewar@adacore.com>
1583
1584         * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1585
1586 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1587
1588         * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1589         non-static.
1590
1591 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1592
1593         * sem_res.adb (Resolve): An expression that is the body of an
1594         expression function does not freeze.
1595
1596 2011-09-06  Matthew Heaney  <heaney@adacore.com>
1597
1598         * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1599         a-cuprqu.adb: Changed copyright notice to indicate current
1600         year only.
1601
1602 2011-09-06  Vincent Celier  <celier@adacore.com>
1603
1604         * prj.adb: Minor spelling error fix in comment
1605         * sem_res.adb: Minor reformatting
1606
1607 2011-09-06  Pascal Obry  <obry@adacore.com>
1608
1609         * sysdep.c (winflush_nt): Removed as not needed anymore.
1610         (winflush_95): Likewise.
1611         (winflush_init): Likewise.
1612         (winflush_function): Likewise.
1613         (getc_immediate_common): Remove call to winflush_function.
1614
1615 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1616
1617         * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1618         processing for Descriptor_Size.
1619         * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1620         to account for its broader usage.
1621         * sem_attr.adb (Analyze_Attribute): Change the error detection
1622         circuitry for Descriptor_Size as the attribute is now applicable
1623         to all types.
1624
1625 2011-09-06  Robert Dewar  <dewar@adacore.com>
1626
1627         * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1628
1629 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1630
1631         * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1632         in a parameter association must not set the Referenced flag on
1633         the formal.
1634         * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1635
1636 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1637
1638         * gnat_rm.texi: Add a section on attribute Descriptor_Size
1639
1640 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1641
1642         * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1643         gnatlink-re): Speed up by using -j0.
1644
1645 2011-09-06  Yannick Moy  <moy@adacore.com>
1646
1647         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1648         Set_Corresponding_Aspect when creating pragma from aspect.
1649         (Add_Predicates): Use new field Corresponding_Aspect.
1650         * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1651         name when present, for the purpose of issuing error messages;
1652         remove local procedure Error_Pragma_Arg_Alternate_Name.
1653         * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1654         N_Pragma node.
1655         (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1656         N_Pragma node.
1657
1658 2011-09-06  Robert Dewar  <dewar@adacore.com>
1659
1660         * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1661
1662 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1663
1664         * exp_ch6.adb (Build_Heap_Allocator): Add new
1665         local variable Desig_Typ. Code and comment reformatting. Add
1666         machinery to ensure that the allocation uses a fat pointer when
1667         the type of the return object is a constrained array and the
1668         function return type is an unconstrained array.
1669
1670 2011-09-06  Vincent Celier  <celier@adacore.com>
1671
1672         * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1673         parameters in subprograms.
1674
1675 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1676
1677         * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1678
1679 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1680
1681         * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1682         (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1683         subprogram.
1684         (System.Tasking.Primitive_Operations.Specific.Set): If argument
1685         is null, destroy task specific data, to make API consistent with
1686         other platforms, and thus compatible with the shared version
1687         of s-tpoaal.adb.
1688         (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1689         Document the above assumption.
1690
1691 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1692
1693         * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1694         variable for type of return value when return type is
1695         unconstrained and context is an assignment.
1696
1697 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1698
1699         * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1700         class-wide operation if expansion is not enabled.
1701
1702 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
1703
1704         * checks.adb (Apply_Scalar_Range_Check): Deal with access
1705         type prefix.
1706
1707 2011-09-06  Yannick Moy  <moy@adacore.com>
1708
1709         * sem_ch13.adb (Analyze_Aspect_Specifications, case
1710         Aspect_Invariant): Do not issue error at this point on illegal
1711         pragma placement, as this is checked later on when analyzing
1712         the corresponding pragma.
1713         * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1714         similar to Error_Pragma_Arg, except the source name of the
1715         aspect/pragma to use in warnings may be equal to parameter
1716         Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1717         message to distinguish source name of pragma/aspect, and whether
1718         the illegality resides in the type being public, or being private
1719         without a public declaration
1720
1721 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1722
1723         * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1724         size check (fd_set is implemented differently on that platform).
1725
1726 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1727
1728         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1729         s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1730         s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1731         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1732         (ATCB_Allocation): New subpackage of
1733         System.Tasking.Primitive_Operations, shared across all targets
1734         with full tasking runtime.
1735         (ATCB_Allocation.New_ATCB): Moved there (from target specific
1736         s-taprop bodies).
1737         (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1738         taking care of establishing a local temporary ATCB if the one
1739         being deallocated is Self, to avoid a reference to the freed
1740         ATCB in Abort_Undefer.
1741
1742 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1743
1744         * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1745         terminated, mark it for deallocation upon termination.
1746         (Terminate_Task): Call Free_Task again if the task is marked
1747         for automatic deallocation upon termination.
1748
1749 2011-09-06  Robert Dewar  <dewar@adacore.com>
1750
1751         * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1752         a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1753         a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1754         a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1755         a-intnam-solaris.ads, a-intnam-tru64.ads,
1756         a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1757         cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1758         * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1759         * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1760         * s-rident.ads: Add new restriction No_Implementation_Identifiers
1761         Add new profile No_Implementation_Extensions
1762         * sem_prag.adb: Implement pragma Implementation_Defined Implement
1763         profile No_Implementation_Extensions
1764         * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1765         Check violation of restriction No_Implementation_Identifiers
1766         * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1767         Add entry for Name_No_Implementation_Extensions
1768
1769 2011-09-06  Robert Dewar  <dewar@adacore.com>
1770
1771         * impunit.ads: Minor reformatting.
1772
1773 2011-09-06  Robert Dewar  <dewar@adacore.com>
1774
1775         * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1776
1777 2011-09-06  Pascal Obry  <obry@adacore.com>
1778
1779         * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1780         types.
1781
1782 2011-09-06  Robert Dewar  <dewar@adacore.com>
1783
1784         * g-socket.adb: Minor reformatting
1785
1786 2011-09-06  Javier Miranda  <miranda@adacore.com>
1787
1788         * ali.adb (Scan_ALI): Add missing support to load references of
1789         entities imported from other languages.
1790         * ali.ads (Xref_Record): Adding new fields to store the language and
1791         name of an imported entity.
1792         * lib-xref.adb (Output_Import_Export_Info): Fix typo
1793         in comment.
1794
1795 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1796
1797         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1798         is allowed on a full type declaration if it is the completion of
1799         a private declarations.
1800         * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1801         aspect is allowed on a full type declaration in the private part
1802         of a package.
1803
1804 2011-09-06  Robert Dewar  <dewar@adacore.com>
1805
1806         * sem_ch8.ads: Minor reformatting
1807
1808 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1809
1810         * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1811         Guard against socket values that are not in [0;FD_SETSIZE[
1812
1813 2011-09-06  Robert Dewar  <dewar@adacore.com>
1814
1815         * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1816         reformatting.
1817
1818 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1819
1820         * s-linux-alpha.ads: Minor reformatting
1821         * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1822         Use sizeof instead of corresponding C defines in s-oscons template.
1823
1824 2011-09-06  Vadim Godunko  <godunko@adacore.com>
1825
1826         * a-convec.ads, a-iteint.ads: Minor reformatting.
1827
1828 2011-09-06  Vincent Celier  <celier@adacore.com>
1829
1830         * projects.texi: Add menus and @node lines.
1831
1832 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1833
1834         * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1835         where the return type is an unconstrained array and the context
1836         is an assignment. Optimize the case when the target of the
1837         assignment is a selected component.
1838
1839 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1840
1841         * s-solita.adb: Update comments.
1842
1843 2011-09-06  Pascal Obry  <obry@adacore.com>
1844
1845         * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1846         s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1847         * s-oscons-tmplt.c: Add support for generating pthread related
1848         types size on GNU/Linux as done for Darwin.
1849         * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1850
1851 2011-09-06  Robert Dewar  <dewar@adacore.com>
1852
1853         * exp_ch6.adb: Fix minor typo.
1854
1855 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1856
1857         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1858         (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1859         (Double_Size_Of): Alphabetized. Update the comment on usage.
1860         (Make_Finalize_Address_Stmts): Update comments and reformat code.
1861         (Nearest_Multiple_Rounded_Up): New routine.
1862         (Size_Of): Update comment on usage. The generated expression now
1863         accounts for alignment gaps by rounding the size of the type to the
1864         nearest multiple rounded up of the type's alignment.
1865
1866 2011-09-06  Robert Dewar  <dewar@adacore.com>
1867
1868         * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1869
1870 2011-09-06  Steve Baird  <baird@adacore.com>
1871
1872         * exp_ch4.adb (Expand_Allocator_Expression): Look through
1873         derived subprograms in checking for presence of an
1874         Extra_Accessibility_Of_Result formal parameter.
1875         * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1876         checking for presence of an Extra_Accessibility_Of_Result formal
1877         parameter.
1878         (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1879         case where the Parameter_Associatiations attribute is already set,
1880         but set to an empty list.
1881         (Needs_Result_Accessibility_Level):
1882         Unconditionally return False. This is a temporary
1883         change, disabling the Extra_Accessibility_Of_Result
1884         mechanism.
1885         (Expand_Simple_Function_Return): Check for
1886         Extra_Accessibility_Of_Result parameter's presence instead of
1887         testing Ada_Version when generating a runtime accessibility
1888         check which makes use of the parameter.
1889
1890 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1891
1892         * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1893         expression in a given case alternative must be attached to the
1894         statement list of the ccrresponding case statement alternative
1895         They cannot be propagated ahead of the case statement, because
1896         the validity of the expression that generated the action may
1897         hold only for that alternative.
1898
1899 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1900
1901         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1902         (Alignment_Of): Remove the code for strict alignment targets.
1903         (Double_Alignment_Of): Removed.
1904         (Double_Size_Of): New routine.
1905         (Make_Finalize_Address_Stmts): Change the
1906         calculation of the dope's size.  Update relevant comments.
1907         (Size_Of): New routine.
1908
1909 2011-09-06  Steve Baird  <baird@adacore.com>
1910
1911         * einfo.ads (Extra_Accessibility): Update associated comment to use
1912         the term "present" correctly ("present" just means that it is not
1913         an error to query the value of the attribute - it does not imply
1914         that the value must be non-null).
1915         (Extra_Constrained): Ditto.
1916         (Is_Visible_Formal): Ditto.
1917         (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1918         (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1919         * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1920         * exp_ch6.adb (Expand_Call): The callee may require an
1921         Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1922         < Ada_2012. This can occur if the callee is exported from a Gnat
1923         runtimes unit. Also improve a comment.
1924
1925 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1926
1927         * exp_ch7.adb: Add with and use clauses for Get_Targ.
1928         (Alignment_Of): Rename formal parameter Some_Typ
1929         to Typ, update related comment. Use the allocator alignment on
1930         strict alignment targets such as SPARC.
1931         (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1932         related comment.
1933
1934 2011-09-06  Gary Dismukes  <dismukes@adacore.com>
1935
1936         * sem_ch9.adb (Check_Interfaces): Test
1937         Is_Limited_Type rather than Is_Limited_Record when checking that
1938         the partial view of a synchronized full view must be limited.
1939
1940 2011-09-06  Emmanuel Briot  <briot@adacore.com>
1941
1942         * g-comlin.adb (Free): Fix memory leak.
1943
1944 2011-09-06  Robert Dewar  <dewar@adacore.com>
1945
1946         * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1947
1948 2011-09-06  Steve Baird  <baird@adacore.com>
1949
1950         * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1951         (Ada2012) cases described in AI05-0234 where the accessibility
1952         level of a function result is "determined by the point of
1953         call", an implicit parameter representing that accessibility
1954         level is passed in. Extra_Accessibilty_Of_Result yields this
1955         additional formal parameter. Extra_Accessibility_Of_Result
1956         is analogous to the existing Extra_Accessibility
1957         function used in the implementation of access parameters.
1958         (Set_Extra_Accessibility_Of_Result): New procedure; sets
1959         Extra_Accessibility_Of_Result attribute.
1960         * einfo.adb (Extra_Accessibility_Of_Result): New function.
1961         (Set_Extra_Accessibility_Of_Result): New procedure.
1962         (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1963         * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1964         an accessibility level literal to Natural; introduce a nested
1965         function, Make_Level_Literal, to do this.
1966         * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1967         determines whether a given function (or access-to-function
1968         type) needs to have an implicitly-declared accessibility-level
1969         parameter added to its profile.
1970         (Add_Extra_Actual_To_Call): Export an existing procedure which was
1971         previously declared in the body of Exp_Ch6.
1972         * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1973         it to exp_ch6.ads.
1974         (Has_Unconstrained_Access_Discriminants): New Function; a
1975         predicate on subtype entities which returns True if the given
1976         subtype is unconstrained and has one or more access discriminants.
1977         (Expand_Call): When expanding a call to a function which takes an
1978         Extra_Accessibility_Of_Result parameter, pass in the appropriate
1979         actual parameter value. In the case of a function call which is
1980         used to initialize an allocator, this may not be possible because
1981         the Etype of the allocator may not have been set yet. In this
1982         case, we defer passing in the parameter and handle it later in
1983         Expand_Allocator_Expression.
1984         (Expand_Simple_Function_Return): When returning from a function which
1985         returns an unconstrained subtype having at least one access
1986         discriminant, generate the accessibility check needed to ensure that
1987         the function result will not outlive any objects designated by its
1988         discriminants.
1989         (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1990         description.
1991         * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1992         is used to initialize an allocator, we may need to pass in "the
1993         accessibility level determined by the point of call" (AI05-0234)
1994         to the function. Expand_Call, where such actual parameters are
1995         usually generated, is too early in this case because the Etype of
1996         the allocator (which is used in determining the level to be passed
1997         in) may not have been set yet when Expand_Call executes. Instead,
1998         we generate code to pass in the appropriate actual parameter
1999         in Expand_Allocator_Expression.
2000         * sem_ch6.adb (Create_Extra_Formals): Create
2001         the new Extra_Accessibility_Of_Result formal if
2002         Needs_Result_Accessibility_Level returns True. This includes the
2003         introduction of a nested procedure, Check_Against_Result_Level.
2004
2005 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2006
2007         * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2008         declaration.
2009
2010 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2011
2012         * s-finmas.adb (Set_Finalize_Address): Explain the reason
2013         for the synchronization. Move the test for null from
2014         s-stposu.Allocate_Any_Controlled to this routine since the check
2015         needs to be protected too.
2016         (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2017         synchronization code.
2018         * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2019         explaining the context in which this routine is used.
2020         * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2021         to s-finmas.Set_Finalize_Address.
2022
2023 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2024
2025         * einfo.ads: Document that itypes have no parent field.
2026
2027 2011-09-05  Robert Dewar  <dewar@adacore.com>
2028
2029         * rtsfind.adb (Check_CRT): Check for overloaded entity
2030         * rtsfind.ads: Document that entities to be found by rtsfind
2031         cannot be overloaded
2032         * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2033         (Lock_Entries_With_Status): New name for Lock_Entries with two
2034         arguments (changed to meet rtsfind no overloading rule).
2035
2036 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2037
2038         * s-finmas.adb (Set_Finalize_Address (Address,
2039         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2040         (Set_Finalize_Address (in out Finalization_Master,
2041         Finalize_Address_Ptr): Add synchronization code.
2042         * s-finmas.ads (Set_Finalize_Address (Address,
2043         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2044         * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2045         Set_Finalize_Address for the heterogeneous case.
2046
2047 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2048
2049         * sem_ch3.adb: Undo previous change, not suitable after all.
2050
2051 2011-09-05  Robert Dewar  <dewar@adacore.com>
2052
2053         * einfo.ads: Minor comment clarification.
2054
2055 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2056
2057         * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2058         no longer needs to search through the entities of the return
2059         statement scope to find the _chain.
2060         * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2061         (Analyze_Block_Statement): Add local variable
2062         Is_BIP_Return_Statement. Add machinery to install all entities
2063         produced by the expansion of the return object declaration.
2064         (Install_Return_Entities): New routine.
2065         * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2066
2067 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2068
2069         * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2070         of subunit is incomplete.
2071         (Analyze_Proper_Body): If parent spec is not available, do not
2072         attempt analysis.
2073
2074 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2075
2076         * sem_disp.adb (Find_Controlling_Arg): Add checks for
2077         interface type conversions, that are expanded into dereferences.
2078
2079 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2080
2081         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2082         Examine the parameter and return profile of a subprogram and swap
2083         any incomplete types coming from a limited context with their
2084         corresponding non-limited views.
2085         (Exchange_Limited_Views): New routine.
2086
2087 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2088
2089         * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2090         of internal entity to the subtype declaration, so that when
2091         entities are subsequently exchanged in a package body, the tree
2092         remains properly formatted for ASIS.
2093
2094 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2095
2096         * g-comlin.adb (Set_Usage): Additional optional argument to set help
2097         message.
2098         (Display_Help): display the user given help message, if available.
2099
2100 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2101
2102         * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2103         is legal if the original node is an identifier that is a
2104         parameterless function call.
2105
2106 2011-09-05  Pascal Obry  <obry@adacore.com>
2107
2108         * prj-nmsc.adb: Minor reformatting.
2109         Add support for standalone aggregate library.
2110         (Check_Stand_Alone_Library): Handle standalone aggregate library.
2111         * projects.texi: Fix documentation for aggregate library projects.
2112
2113 2011-09-05  Robert Dewar  <dewar@adacore.com>
2114
2115         * sem_ch6.adb: Minor reformatting.
2116
2117 2011-09-05  Matthew Gingell  <gingell@adacore.com>
2118
2119         * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2120         stack guard page on PPC Linux. This patch ensures the 64K guard page at
2121         the bottom of the stack is not overwritten.
2122
2123 2011-09-05  Thomas Quinot  <quinot@adacore.com>
2124
2125         * exp_intr.adb, s-tasini.adb: Minor reformatting.
2126
2127 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2128
2129         * sem_ch3.adb (Access_Definition): If an access type declaration
2130         appears in a child unit, the scope of whatever anonymous type
2131         may be generated is the child unit itself.
2132
2133 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2134
2135         * sem_ch6.adb (Analyze_Expression_Function): Do not set
2136         Comes_From_Source on rewritten body.
2137         (Analyze_Subprogram_Body_Helper): Check that the original node for
2138         the body comes from source, when determining whether expansion
2139         of a protected operation is needed.
2140
2141 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2142
2143         * exp_aggr.adb (Replace_Type): If the target of the assignment is
2144         a selected component and the right-hand side is a self-referential
2145         access, the proper prefix of the rewritten attribute is a copy
2146         of the left-hand side, not of its prefix.
2147
2148 2011-09-05  Robert Dewar  <dewar@adacore.com>
2149
2150         * sem_ch5.adb: Minor reformatting.
2151         * sem_ch3.adb: Minor code clean up.
2152
2153 2011-09-05  Jose Ruiz  <ruiz@adacore.com>
2154
2155         * exp_ch9.adb (Make_Initialize_Protection): The fact that
2156         restriction No_Dynamic_Attachment is in effect or not should
2157         not influence the default priority associated to a protected
2158         object. With this change, when the restriction is in effect (as
2159         is the case for the Ravenscar profile) the default priority of
2160         a protected object with an interrupt handler is in the range of
2161         interrupt priorities (Default_Interrupt_Priority) as required
2162         by D.3(10).
2163
2164 2011-09-05  Arnaud Charlet  <charlet@adacore.com>
2165
2166         * a-iteint.ads: Fix header.
2167
2168 2011-09-05  Vincent Celier  <celier@adacore.com>
2169
2170         * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2171         with a directory separator to avoid output such as:
2172           "/path/to/objauto.cgpr" has been deleted.
2173
2174 2011-09-05  Robert Dewar  <dewar@adacore.com>
2175
2176         * sem_ch3.adb: Minor reformatting.
2177
2178 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2179
2180         * sem_ch5.adb: Better error message.
2181
2182 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2183
2184         * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2185         (Expand_Array_Aggregate): Detect a special case of an aggregate
2186         which contains tasks in the context of an unexpanded return
2187         statement of a build-in-place function.
2188         * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2189         (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2190         which contains tasks and expand it now that the original simple
2191         return statement has been rewritten.
2192         * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2193         reformatting. Do not create a chain for an extended return
2194         statement if one is already available.
2195         (Has_Activation_Chain): New routine.
2196
2197 2011-09-05  Marc Sango  <sango@adacore.com>
2198
2199         * sem_ch3.adb (Analyze_Object_Declaration): Remove
2200         the wrong test and add the correct test to detect the violation
2201         of illegal use of unconstrained string type in SPARK mode.
2202
2203 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2204
2205         * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2206         message on an iterator over an array.
2207
2208 2011-09-05  Robert Dewar  <dewar@adacore.com>
2209
2210         * lib-xref-alfa.adb: Minor reformatting.
2211
2212 2011-09-05  Robert Dewar  <dewar@adacore.com>
2213
2214         * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2215         exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2216
2217 2011-09-05  Gary Dismukes  <dismukes@adacore.com>
2218
2219         * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2220
2221 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2222
2223         * lib-xref-alfa.adb: Update comments.
2224
2225 2011-09-05  Thomas Quinot  <quinot@adacore.com>
2226
2227         * sem_res.adb: Minor reformatting
2228
2229 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2230
2231         * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2232         present, create them now.  Needed in case the return type was
2233         a limited view in the function declaration.
2234         (Make_Build_In_Place_Call_In_Allocator): If return type contains
2235         tasks, build the activation chain for it.  Pass a reference to
2236         the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2237         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2238         with build_in_place calls.
2239         * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2240         incomplete, inatialize its Corresponding_Record_Type component.
2241         * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2242         of limited views.
2243
2244 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2245
2246         * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2247         information.
2248
2249 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2250
2251         * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2252         appears within a package specification and the token after "IS"
2253         is not a parenthesis, assume that this is an unparenthesized
2254         expression function, even if the token appears in a line by
2255         itself.
2256         * par.adb: Clarify use of Labl field of scope stack in error
2257         recovery.
2258
2259 2011-09-05  Bob Duff  <duff@adacore.com>
2260
2261         * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2262         conversions instead of normal type conversions in all cases where a
2263         type conversion would be illegal. In particular, use unchecked
2264         conversions when the operand types are private.
2265
2266 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2267
2268         * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2269         objects of task type or protected type.
2270
2271 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2272
2273         * sem_ch6.adb (Analyze_Expression_Function): If the expression
2274         function comes from source, indicate that so does its rewriting,
2275         so it is compatible with any subsequent expansion of the
2276         subprogram body (e.g. when it is a protected operation).
2277         * sem_ch4.adb: minor reformatting
2278
2279 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2280
2281         * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2282         Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2283         may lead to wrong ancestor package in the case of instantiated subunit
2284         bodies. If a subunit is instantiated, follow the chain of instantiations
2285         rather than the stub structure.
2286
2287 2011-09-02  Robert Dewar  <dewar@adacore.com>
2288
2289         * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2290         * gcc-interface/Make-lang.in: Update dependencies.
2291
2292 2011-09-02  Marc Sango  <sango@adacore.com>
2293
2294         * sem_ch3.adb (Analyze_Object_Declaration): Change
2295         comment and add additional check to differentiate constant of
2296         type string from others unconstrained type.
2297
2298 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2299
2300         * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2301         present in incomplete type declarations to refine the error
2302         message the full declaration is in the same unit.
2303         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2304         an incomplete type, set the Premature_Use for additional message.
2305         * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2306         and Premature_Use is set, place additional information at the
2307         point of premature use.
2308
2309 2011-09-02  Bob Duff  <duff@adacore.com>
2310
2311         * sem_ch6.adb: (Check_Post_State): Suppress warning
2312         "postcondition refers only to pre-state" when the expression has not
2313         yet been analyzed, because it causes false alarms. This can happen when
2314         the postcondition contains a quantified expression, because those are
2315         analyzed later. This is a temporary/partial fix.
2316         (Process_Post_Conditions): Minor: change wording of warning.
2317
2318 2011-09-02  Marc Sango  <sango@adacore.com>
2319
2320         * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2321         illegal use of unconstrained string type in SPARK mode.
2322         * sem_res.adb (Analyze_Operator_Symbol): Set the
2323         right place where the string operand of concatenation should be
2324         violate in SPARK mode.
2325
2326 2011-09-02  Robert Dewar  <dewar@adacore.com>
2327
2328         * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2329         exp_ch3.adb: Minor reformatting.
2330
2331 2011-09-02  Vincent Celier  <celier@adacore.com>
2332
2333         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2334         as the compiler driver so Is_Compilable returns True for sources.
2335         * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2336         for the body.
2337
2338 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2339
2340         * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2341         condition, a reference to a controlling formal must be interpreted
2342         as having the class-wide type (or an access to such) so that the
2343         inherited condition can be properly applied to any overriding
2344         operation (see ARM12 6.6.1 (7)).
2345
2346 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2347
2348         * init.c (__gnat_is_vms_v7): Fix case and add prototype
2349         for LIB$GETSYI.
2350
2351 2011-09-02  Javier Miranda  <miranda@adacore.com>
2352
2353         * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2354         initializing expression of a class-wide interface object declaration
2355         if its type is limited.
2356
2357 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2358
2359         * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2360         literals, take into account the type name; the type is *not*
2361         the scope for an enumeration literal.
2362
2363 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2364
2365         * sem_ch6.adb (Check_Overriding_Indicator): add special check
2366         to reject an overriding indicator on a user-defined Adjust
2367         subprogram for a limited controlled type.
2368
2369 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2370
2371         * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2372         for an actual that is a function call returning an unconstrained
2373         limited controlled type.
2374
2375 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2376
2377         * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2378
2379 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2380
2381         * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2382         from "HEAP" to __HEAP Change comment that refers to that variable
2383         * put_alfa.adb: Change comment that refers to that variable
2384
2385 2011-09-02  Robert Dewar  <dewar@adacore.com>
2386
2387         * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2388
2389 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2390
2391         * exp_util.adb (Extract_Renamed_Object): Renamed to
2392         Find_Renamed_Object. This routine has been reimplemented and now uses
2393         tree traversal to locate a renamed object.
2394         (Is_Aliased): Replace call to Extract_Renamed_Object with
2395         Find_Renamed_Object.
2396
2397 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2398
2399         * init.c: (__gnat_is_vms_v7): New function.
2400
2401 2011-09-02  Olivier Hainque  <hainque@adacore.com>
2402
2403         * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2404         that have a misaligned backchain, necessarily bogus.
2405
2406 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2407
2408         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2409         TSS routine Finalize_Address when compiling in Alfa mode.
2410         (Expand_Freeze_Record_Type): Do not create TSS routine
2411         Finalize_Address when compiling in Alfa mode.
2412         * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2413         call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2414         not built.
2415         (Expand_N_Allocator): Do not produce a call to
2416         Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2417         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2418         produce a call to primitive Set_Finalize_Address in Alfa mode because
2419         Finalize_Address is not built.
2420         * exp_ch7.adb (Build_Finalization_Master): Do not create
2421         finalization masters in Afa mode since they are not needed.
2422         (Build_Finalizer): Do not create scope and library-level
2423         finalizers in Alfa mode since they are not needed.
2424         * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2425         "new" and "free" when applied to controlled objects in Alfa mode since
2426         this is not needed.
2427
2428 2011-09-02  Vincent Celier  <celier@adacore.com>
2429
2430         * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2431         only library names with the syntax of Ada identifiers, to avoid errors
2432         when compiling the binder generated files.
2433         * projects.texi: Document restriction on SAL library names
2434
2435 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2436
2437         * a-chtgbo.adb: Minor comment fix.
2438
2439 2011-09-02  Robert Dewar  <dewar@adacore.com>
2440
2441         * lib-xref.adb: Minor reformatting
2442
2443 2011-09-02  Vincent Celier  <celier@adacore.com>
2444
2445         * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2446         gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2447         --version and --help in usage.
2448         * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2449
2450 2011-09-02  Bob Duff  <duff@adacore.com>
2451
2452         * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2453         compilers don't understand it.
2454
2455 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2456
2457         * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2458         underlying subtype rather than its base type on the call to
2459         Build_Record_Or_Elementary_Input_Function, so that any
2460         constraints on a discriminated subtype will be available for
2461         doing the check required by AI05-0192.
2462         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2463         If the prefix subtype of the 'Input attribute is a constrained
2464         discriminated subtype, then check each constrained discriminant value
2465         against the corresponding value read from the stream.
2466
2467 2011-09-02  Yannick Moy  <moy@adacore.com>
2468
2469         * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2470         warnings on suspicious contracts, and enable them with -gnatwa.
2471
2472 2011-09-02  Robert Dewar  <dewar@adacore.com>
2473
2474         * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2475         reformatting.
2476
2477 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2478
2479         * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2480         which ensure that restriction No_Dynamic_Attachment has not been
2481         violated.
2482         (Make_Initialize_Protection): Protected types with attach or
2483         interrupt handlers must not violate restriction No_Dynamic_Attachment.
2484         * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2485         which ensures that restriction No_Dynamic_Attachment has not been
2486         violated.
2487         * sem_attr.adb: (Eval_Attribute): Transform
2488         VAX_Float_Type'First and 'Last into references to
2489         the temporaries which store the corresponding bounds. The
2490         transformation is needed since the back end cannot evaluate
2491         'First and 'Last on VAX.
2492         (Is_VAX_Float): New routine.
2493
2494 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2495
2496         * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2497         generic unit is not intrinsic and has an explicit convention,
2498         the instance inherits it.
2499
2500 2011-09-02  Robert Dewar  <dewar@adacore.com>
2501
2502         * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2503         prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2504
2505 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2506
2507         * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2508         Guard against a prefix that is an N_Has_Entity but has no
2509         associated entity.
2510
2511 2011-09-02  Yannick Moy  <moy@adacore.com>
2512
2513         * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2514         references.
2515
2516 2011-09-02  Yannick Moy  <moy@adacore.com>
2517
2518         * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2519         * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2520         contracts.
2521         * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2522         procedure looking for suspicious postconditions.
2523         * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2524         * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2525         options -gnatw.t and -gnatw.T.
2526
2527 2011-09-02  Pascal Obry  <obry@adacore.com>
2528
2529         * prj.adb: Minor code refactoring. Move check for null project in
2530         Project_Changed.
2531         * projects.texi: Fix minor typos.
2532
2533 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2534
2535         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2536         of iteration is an expression, its value must be captured in a
2537         renaming declaration, so that modification of the elements is
2538         propagated to the original container.
2539
2540 2011-09-02  Pascal Obry  <obry@adacore.com>
2541
2542         * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2543         prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2544         prj-tree.adb: Minor reformatting and style fixes.
2545
2546 2011-09-02  Robert Dewar  <dewar@adacore.com>
2547
2548         * s-rident.ads: Add new restriction No_Implicit_Aliasing
2549         * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2550         No_Implicit_Aliasing
2551         (Analyze_Attribute, case Address): ditto
2552         (Analyze_Attribute, case Unrestricted_Access): ditto
2553         * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2554         No_Implicit_Aliasing restriction.
2555         * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2556
2557 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2558
2559         * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2560         is an unchecked conversion, apply test to its expression.
2561
2562 2011-09-02  Javier Miranda  <miranda@adacore.com>
2563
2564         * sem_ch3.adb (Check_Abstract_Overriding): When
2565         traversing the chain of aliased subprograms avoid reporting a
2566         redundant error on the current entity.
2567
2568 2011-09-02  Sergey Rybin  <rybin@adacore.com>
2569
2570         * gnat_ugn.texi: Minor clean up.
2571
2572 2011-09-02  Bob Duff  <duff@adacore.com>
2573
2574         * s-htable.adb (Set_If_Not_Present): Use renaming
2575         instead of ":=", because the type Key is limited in the generic (even
2576         if not in the instances).
2577
2578 2011-09-02  Robert Dewar  <dewar@adacore.com>
2579
2580         * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2581         g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2582         reformatting.
2583
2584 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2585
2586         * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2587         inherited component with the enclosing derived type. Code reformatting.
2588
2589 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2590
2591         * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2592         return done when overflow checks are enabled, since comparisons against
2593         Lor and Hir should not be done when OK1 is False.
2594
2595 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2596
2597         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2598         Add new formal Master_Exp. When present, add that expression to the
2599         call as an extra actual.
2600         (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2601         Fmaster_Actual and in the case of a BIP call initializing a return
2602         object of an enclosing BIP function set it to a
2603         new reference to the implicit finalization master
2604         formal of the enclosing function. Fmaster_Actual is
2605         then passed to the new formal Master_Exp on the call to
2606         Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2607         initializations of Enclosing_Func to its declaration.
2608
2609 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2610
2611         * csets.ads: Minor reformatting
2612
2613 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2614
2615         * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2616         the full view of a private type coming from an instantiation.
2617         * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2618         loop to iterate over the declarations rather than use the
2619         First_Entity / Next_Entity scheme.
2620
2621 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2622
2623         * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2624         X'range (N) into X'First (N) ..  X'Last (N), do not share the
2625         dimension indicator N, if present. Even though it is a static
2626         constant, its source location may be modified when printing
2627         expanded code under -gnatDL, and node sharing will lead to chaos
2628         in Sprint on large files, by generating a sloc value that does
2629         not correspond to any source file.
2630
2631 2011-09-02  Bob Duff  <duff@adacore.com>
2632
2633         * einfo.adb: (Has_Xref_Entry): Do not call
2634         Implementation_Base_Type. Lib.Xref has been
2635         rewritten to avoid the need for it, and it was costly.
2636         * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2637         functions in support of efficient xref.
2638         * lib-xref-alfa.adb: Misc changes related to Key component of
2639         type Xref_Entry.
2640         * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2641         (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2642         no longer does. This is the one place where it is needed.
2643
2644 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2645
2646         * g-comlin.adb (Getopt): New optional argument Concatenate to have
2647         similar interface as the other Getopt function.
2648
2649 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2650
2651         * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2652         a call to Set_Finalize_Address if there is no allocator available.
2653         * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2654         a case of allocator expansion where the allocator is not expanded but
2655         needs a custom allocate routine. Code reformatting.
2656         (Is_Finalizable_Transient): Remove local variables Has_Rens and
2657         Ren_Obj. Code reformatting.
2658         (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2659         through the use of 'reference.
2660         * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2661         as part of build-in-place expansion. They are intentionally marked as
2662         coming from source, but their parents are not.
2663
2664 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2665
2666         * sem_ch10.adb (Analyze_With_Clause): If the library unit
2667         is the generated subprogram declaration for a child unit body
2668         that acts as spec, use the original body in the with_clause,
2669         to prevent binding errors.
2670
2671 2011-09-02  Vincent Celier  <celier@adacore.com>
2672
2673         * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2674         qualifier /MULTI_UNIT_INDEX=
2675
2676 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2677
2678         * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2679         instead of calling the callback function
2680
2681 2011-09-02  Robert Dewar  <dewar@adacore.com>
2682
2683         * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2684         prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2685
2686 2011-09-02  Vincent Celier  <celier@adacore.com>
2687
2688         * prj-nmsc.adb: (Find_Sources): When the list of sources is
2689         explicitly declared in an extending project, do not warn if a source
2690         for an inherited naming exception is not found.
2691
2692 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2693
2694         * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2695         expansion is inactive.
2696
2697 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2698
2699         * sem_util.adb (Note_Possible_Modification): If the entity
2700         being modified is the renaming generated for an Ada2012 iterator
2701         element, the enclosing container or array is modified as well.
2702
2703 2011-09-02  Jose Ruiz  <ruiz@adacore.com>
2704
2705         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2706         Initialize): Define and initialize the
2707         mutex attributes and condition variable attributes locally.
2708
2709 2011-09-02  Vincent Celier  <celier@adacore.com>
2710
2711         * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2712         exception replaced in an extending project.
2713         (Check_Object): No error when the other source is locally removed.
2714
2715 2011-09-02  Yannick Moy  <moy@adacore.com>
2716
2717         * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2718         unresolved calls.
2719
2720 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
2721
2722         * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2723         run-time files.
2724         * gcc-interface/Make-lang.in: Update dependencies.
2725
2726 2011-09-01  Robert Dewar  <dewar@adacore.com>
2727
2728         * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2729
2730 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2731
2732         * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2733         * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2734         __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2735         specific for systems where their glibc version does not define the
2736         routines to handle dynamically allocated CPU sets.
2737
2738 2011-09-01  Vincent Celier  <celier@adacore.com>
2739
2740         * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2741         prj-env.adb: Implement inheritance of naming exceptions in extending
2742         projects.
2743
2744 2011-09-01  Romain Berrendonner  <berrendo@adacore.com>
2745
2746         * gnatls.adb: Display simple message instead of content of
2747         gnatlic.adl.
2748
2749 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
2750
2751         * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2752         access discriminant and anonymous access component scopes.
2753         (Inherit_Component): Reuse the itype of an access discriminant
2754         or anonymous access component by copying it in order to set the proper
2755         scope. This is done only when the parent and the derived type
2756         are in different scopes.
2757         (Set_Anonymous_Etype): New routine.
2758
2759 2011-09-01  Robert Dewar  <dewar@adacore.com>
2760
2761         * a-convec.adb: Minor reformatting throughout.
2762
2763 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2764
2765         * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2766         __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2767         CPU_ALLOC_SIZE and CPU_FREE linux macros.
2768         (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2769         CPU_SET_S respectively because we are now using dynamically allocated
2770         CPU sets which are more portable across different glibc versions.
2771         * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2772         CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2773         masks dynamically according to the number of processors in the target
2774         platform.
2775         (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2776         respectively, so we need to pass the size of the masks as
2777         parameters.
2778         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2779         created cpu_set_t masks
2780         with the number of processors available in the target platform,
2781         instead of static bit arrays. It enhances portability because
2782         it uses the information from the target platform.
2783         * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2784         are using a restricted run-time library, use the flag
2785         Configurable_Run_Time_Mode instead of Restricted_Profile.
2786
2787 2011-09-01  Vincent Celier  <celier@adacore.com>
2788
2789         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2790         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2791
2792 2011-09-01  Nicolas Roche  <roche@adacore.com>
2793
2794         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2795         on VxWorks in kernel mode.
2796
2797 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2798
2799         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2800         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2801         directly the bit array.
2802         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2803         the linux macros with the same name.
2804         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2805         wrappers around the CPU_ZERO and CPU_SET linux macros.
2806
2807 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
2808
2809         * exp_ch7.adb (Find_Insertion_List): Removed.
2810         (Process_Transient_Objects): Insert the declarations of the hook
2811         access type and the hook object before the associated transient object.
2812
2813 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2814
2815         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2816         package System.Aux_Dec when using restricted run-time libraries which
2817         do not have this package.
2818
2819 2011-09-01  Tristan Gingold  <gingold@adacore.com>
2820
2821         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2822
2823 2011-09-01  Bob Duff  <duff@adacore.com>
2824
2825         * sem_attr.adb (Analyze_Access_Attribute): Do not call
2826         Kill_Current_Values for P'Unrestricted_Access, where P is library level
2827
2828 2011-09-01  Thomas Quinot  <quinot@adacore.com>
2829
2830         * exp_ch5.adb: Minor reformatting
2831         * gnat_ugn.texi: Fix minor typos.
2832         * gcc-interface/Make-lang.in: Update dependencies.
2833
2834 2011-09-01  Robert Dewar  <dewar@adacore.com>
2835
2836         * inline.adb, sem_aggr.adb: Minor reformatting.
2837
2838 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
2839
2840         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2841
2842 2011-09-01  Robert Dewar  <dewar@adacore.com>
2843
2844         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2845
2846 2011-09-01  Bob Duff  <duff@adacore.com>
2847
2848         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2849         body" the same as "in inlined body", because visibility shouldn't
2850         apply there.
2851
2852 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
2853
2854         * inline.adb (Add_Inlined_Body): Refine previous change.
2855
2856 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
2857
2858         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2859         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2860         Test for case where call
2861         initializes an object of a return statement before testing for
2862         a constrained call, to ensure that all such cases get handled
2863         by simply passing on the caller's parameters. Also, in that
2864         case call Needs_BIP_Alloc_Form to determine whether to pass on
2865         the BIP_Alloc_Form parameter of the enclosing function rather
2866         than testing Is_Constrained. Add similar tests for the return
2867         of a BIP call to later processing to ensure consistent handling.
2868         (Needs_BIP_Alloc_Form): New utility function.
2869         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2870         a BIP_Alloc_Form formal with call to new utility function
2871         Needs_BIP_Alloc_Form.
2872
2873 2011-09-01  Pascal Obry  <obry@adacore.com>
2874
2875         * prj-part.adb: Minor reformatting.
2876
2877 2011-09-01  Vincent Celier  <celier@adacore.com>
2878
2879         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2880         half character in the unit name.
2881
2882 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
2883
2884         * exp_ch4.adb: Minor code and comment reformatting.
2885
2886 2011-09-01  Thomas Quinot  <quinot@adacore.com>
2887
2888         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2889         for Is_Limited_Type and Is_Tagged_Type in condition checking
2890         for by-reference type.
2891         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2892         subprograms may have a completion because of a previous
2893         Inline_Always clause, but the enclosing package must be marked
2894         inlined for the subprogram body to become visible to the backend.
2895
2896 2011-09-01  Thomas Quinot  <quinot@adacore.com>
2897
2898         * sem_aux.adb, exp_ch4.adb: Minor reformatting
2899
2900 2011-09-01  Pascal Obry  <obry@adacore.com>
2901
2902         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2903
2904 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
2905
2906         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2907         the formals of a subprogram stub that acts as a spec.
2908
2909 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
2910
2911         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2912         type, declare a renaming for it, not an object declaration.
2913
2914 2011-09-01  Yannick Moy  <moy@adacore.com>
2915
2916         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2917         Ignore_Errors to ignore failures to read ALI files when True.
2918
2919 2011-09-01  Javier Miranda  <miranda@adacore.com>
2920
2921         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2922         constructor calls associated with non-tagged record types.
2923
2924 2011-09-01  Robert Dewar  <dewar@adacore.com>
2925
2926         * g-socthi-vms.adb: Minor reformatting.
2927
2928 2011-09-01  Nicolas Roche  <roche@adacore.com>
2929
2930         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2931         in order to avoid impact of imcompatible changes.
2932         * cstreams.c: Likewise
2933         * cio.c: Likewise
2934         * aux-io.c: Likewise
2935
2936 2011-09-01  Yannick Moy  <moy@adacore.com>
2937
2938         * lib-writ.adb (Write_With_Lines): Always output complete information
2939         on "with" line in Alfa mode, as this is required by formal verification
2940         back-end.
2941
2942 2011-09-01  Tristan Gingold  <gingold@adacore.com>
2943
2944         * g-socthi-vms.adb: Add comments.
2945
2946 2011-09-01  Pascal Obry  <obry@adacore.com>
2947
2948         * prj.ads: Minor reformatting.
2949
2950 2011-09-01  Vincent Celier  <celier@adacore.com>
2951
2952         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2953         exceptions in the config pragmas file.
2954
2955 2011-09-01  Tristan Gingold  <gingold@adacore.com>
2956
2957         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2958
2959 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
2960
2961         * exp_ch7.adb (Find_Insertion_List): New routine.
2962         (Process_Transient_Objects): Add code to handle the abnormal
2963         finalization of a controlled transient associated with a subprogram
2964         call. Since transients are cleaned up right after the associated
2965         context, an exception raised during a subprogram call may bypass the
2966         finalization code.
2967
2968 2011-09-01  Robert Dewar  <dewar@adacore.com>
2969
2970         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2971         aliased.
2972
2973 2011-09-01  Robert Dewar  <dewar@adacore.com>
2974
2975         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2976
2977 2011-09-01  Robert Dewar  <dewar@adacore.com>
2978
2979         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2980
2981 2011-09-01  Thomas Quinot  <quinot@adacore.com>
2982
2983         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2984         GNATRTL_NONTASKING_OBJS.
2985
2986 2011-09-01  Robert Dewar  <dewar@adacore.com>
2987
2988         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2989         possibility of this flag being set for formals in Ada 2012 mode.
2990         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2991         2012.
2992         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2993         mode.
2994         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2995         Ada 2012.
2996         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2997         Ada 2012.
2998
2999 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3000
3001         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3002         insertion node in a tree of nested Expression_With_Actions nodes.
3003         (Process_Transient_Object): In the case where a complex if statement
3004         has been converted into nested Expression_With_Actions nodes, the
3005         "hook" object and the associated access type must be inserted before
3006         the top most Expression_With_Actions.
3007
3008 2011-09-01  Robert Dewar  <dewar@adacore.com>
3009
3010         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3011         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3012
3013 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3014
3015         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3016
3017 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3018
3019         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3020         aspect.
3021         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3022         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3023         in a similar way as we do for the Priority or Dispatching_Domain aspect.
3024         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3025         Dispatching_Domains_Frozen): Move this local data to package
3026         System.Tasking because with the CPU aspect we need to have access
3027         to this data when creating the task in System.Tasking.Stages.Create_Task
3028         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3029         Move these variables from the body of
3030         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3031         we need to have access to this data when creating the task in
3032         System.Tasking.Stages.Create_Task.
3033         * s-taskin.adb (Initialize): Signal the allocation of the environment
3034         task to a CPU, if any, so that we know whether the CPU can be
3035         transferred to a different dispatching domain.
3036         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3037         is being allocated belongs to the dispatching domain where the task
3038         lives. Signal the allocation of the task to a CPU, if any, so that we
3039         know whether the CPU can be transferred to a different dispatching
3040         domain.
3041
3042 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3043
3044         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3045         attributes Same_Storage and Overlaps_Storage.
3046
3047 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3048
3049         * exp_strm.adb: Remove with and use clause for Opt.
3050         (Build_Array_Input_Function): Remove the version-dependent generation
3051         of the return statement. The Ada 2005 tree is now the default.
3052
3053 2011-09-01  Yannick Moy  <moy@adacore.com>
3054
3055         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3056         it is never empty when compiling in Alfa mode.
3057
3058 2011-09-01  Robert Dewar  <dewar@adacore.com>
3059
3060         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3061         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3062         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3063         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3064
3065 2011-09-01  Matthew Heaney  <heaney@adacore.com>
3066
3067         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3068         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3069         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3070         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3071         unbounded queue container.
3072         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3073         bounded queue container.
3074         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3075         unbounded priority queue container.
3076         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3077         bounded priority queue container.
3078
3079 2011-08-31  Pascal Obry  <obry@adacore.com>
3080
3081         * a-direct.adb: Do not try to create an UNC path on Windows.
3082         (Create_Path): Skip leading computer name in UNC path if any.
3083
3084 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3085
3086         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3087         version-dependent generation of the return statement. The Ada 2005 tree
3088         is now the default.
3089
3090 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3091
3092         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3093         types Stream_Element_Offset and Storage_Offset have a different native
3094         type depending on whether the platform is 32 or 64 bits. When
3095         exchanging them, always convert to 64 bits.
3096
3097 2011-08-31  Yannick Moy  <moy@adacore.com>
3098
3099         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3100         --force-alfa to gnat2why.
3101
3102 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3103
3104         * sem_ch12.adb (Save_References): If the node has aspects, save
3105         references within the corresponding expressions in a separate step,
3106         because the aspects are not directly in the tree for the declaration
3107         to which they belong.
3108
3109 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3110
3111         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3112         in CodePeer mode, since representation clauses are partially ignored.
3113         * gcc-interface/Make-lang.in: Update dependencies.
3114
3115 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3116
3117         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3118         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3119         to any dispatching domain.
3120
3121 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3122
3123         * exp_ch4.adb: Minor reformatting.
3124
3125 2011-08-31  Bob Duff  <duff@adacore.com>
3126
3127         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3128         on nodes for which it is not defined.
3129         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3130         parent type.
3131
3132 2011-08-31  Bob Duff  <duff@adacore.com>
3133
3134         * sem_ch3.adb (Process_Full_View): Disable legality check if
3135         In_Instance, to avoid spurious errors.
3136         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3137         if In_Instance, to avoid spurious errors.
3138
3139 2011-08-31  Pascal Obry  <obry@adacore.com>
3140
3141         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3142         directory speparators.
3143         (Compose): Use Dir_Seps to handle both forms.
3144         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3145         changes.
3146         (Extension): Use Dir_Seps to handle both forms.
3147
3148 2011-08-31  Pascal Obry  <obry@adacore.com>
3149
3150         * prj-conf.adb: Minor reformatting.
3151
3152 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3153
3154         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3155         dispatching domain aspect.
3156         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3157         aspect.
3158         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3159         Dispatching_Domain aspect in a similar way as we do for the Priority
3160         aspect.
3161         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3162         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3163         is present.
3164         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3165         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3166         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3167         Dispatching_Domain and add it to the task definition.
3168         (Sig_Flags): Add Pragma_Dispatching_Domain.
3169         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3170         support to find the types Dispatching_Domain and
3171         Dispatching_Domain_Access.
3172         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3173         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3174         query the availability of a pragma Dispatching_Domain.
3175         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3176         the expander to pass the Dispatching_Domain when creating a task.
3177         (Name_Dispatching_Domain): Add this new name for a pragma.
3178         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3179         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3180         task has been allocated at creation time.
3181         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3182         Ravenscar is always null.
3183         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3184         the task has been allocated at creation time.
3185         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3186         a specific dispatching domain.
3187         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3188         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3189         and CPU are specified for the task, and the CPU value is not contained
3190         within the range of processors for the domain.
3191
3192 2011-08-31  Vincent Celier  <celier@adacore.com>
3193
3194         * make.adb (Original_Gcc) : New constant String_Access.
3195         (Gnatmake): For VM targets, do not use VM version of the compiler if
3196         --GCC= has been specified.
3197
3198 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3199
3200         * sem_ch5.adb: Minor reformatting.
3201
3202 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3203
3204         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3205         not reanalyze it.
3206
3207 2011-08-31  Bob Duff  <duff@adacore.com>
3208
3209         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3210         the access type is private; we don't care about privacy in expansion.
3211
3212 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3213
3214         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3215         subcomponents tnat may be limited, because they originate in view
3216         conflicts. If the original aggregate is legal and the actuals are
3217         legal, the aggregate itself is legal.
3218
3219 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3220
3221         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3222         status.
3223
3224 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3225
3226         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3227         errors in B tests.
3228
3229 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3230
3231         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3232         Interrupt_Priority aspects, force the analysis of the aspect expression
3233         (when building the equivalent pragma). Otherwise, its analysis is done
3234         too late, after the task or protected object has been created.
3235         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3236         Analyze_Single_Task_Declaration): Remove the code to move the aspects
3237         to the object declaration because they are needed in the type
3238         declaration.
3239
3240 2011-08-31  Robert Dewar  <dewar@adacore.com>
3241
3242         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3243         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3244         reformatting.
3245
3246 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3247
3248         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3249         if the corresponding type is malformed due to restriction violations.
3250
3251 2011-08-31  Robert Dewar  <dewar@adacore.com>
3252
3253         * s-ransee.ads, s-ransee.adb: Minor reformatting.
3254
3255 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3256
3257         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3258         would cause the generation of Set_Finalize_Address if the target is a
3259         VM and the designated type is not derived from [Limited_]Controlled.
3260
3261 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3262
3263         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3264         subprogram.
3265         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3266         case of a compilation error.
3267
3268 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3269
3270         * init.c (__gnat_error_handler): Standardize the stack overflow or
3271         erroneous memory access message.
3272         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3273         or erroneous memory access message.
3274
3275 2011-08-31  Robert Dewar  <dewar@adacore.com>
3276
3277         * sem_ch4.adb: Minor reformatting.
3278         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3279
3280 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3281
3282         * scos.ads: Minor documentation clarification.
3283         * put_scos.adb: Do not generate SCO unit header line for a unit that
3284         has no SCO lines.
3285
3286 2011-08-31  Robert Dewar  <dewar@adacore.com>
3287
3288         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3289
3290 2011-08-31  Tristan Gingold  <gingold@adacore.com>
3291
3292         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3293         hold variables between these following subprograms.
3294         (Build_Exception_Handler, Build_Object_Declarations,
3295         Build_Raise_Statement): Use the above type as parameter.
3296         Make the above adjustments.
3297         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3298
3299 2011-08-31  Pascal Obry  <obry@adacore.com>
3300
3301         * projects.texi: Minor reformatting.
3302
3303 2011-08-31  Tristan Gingold  <gingold@adacore.com>
3304
3305         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3306         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3307
3308 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3309
3310         * exp_ch5.adb: Minor code cleanup.
3311         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3312         prevent cascaded errors.
3313         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3314         variable of an iterator specification in current scope.
3315         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3316         postconditions on the stack, as they contain no return statements.
3317
3318 2011-08-31  Yannick Moy  <moy@adacore.com>
3319
3320         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3321         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3322         call Qualify_Entity_Names.
3323         (Expand_Alfa): call Qualify_Entity_Names in more cases
3324         * lib-xref-alfa.adb: Take into account system package.
3325         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3326         CodePeer mode in which we are interested in finding bugs even if
3327         compiler cannot compile source.
3328         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3329         deferred constant.
3330
3331 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3332
3333         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3334         denoted by the subtype mark to ensure getting the concurrent type in
3335         the case where the subtype mark denotes a private subtype of a
3336         concurrent type (needed when using -gnatc).
3337         (Process_Subtype): For the processing specific to type kinds, case on
3338         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3339         subtype denotes a private subtype whose base type is nonprivate (needed
3340         for subtypes of private fulfilled by task types when compiling with
3341         -gnatc).
3342
3343 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3344
3345         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3346         late primitives that override interface operations when the full
3347         expander is not active, to avoid blowups in Register_Primitive when
3348         types don't have associated secondary dispatch tables.
3349
3350 2011-08-31  Yannick Moy  <moy@adacore.com>
3351
3352         * alfa_test.adb: Code clean up.
3353
3354 2011-08-31  Marc Sango  <sango@adacore.com>
3355
3356         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3357         by Comes_From_Source (Original_Node (N)) in order to treat also the
3358         nodes which have been rewritten.
3359         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3360         explicit dereference and slice violation in spark mode on the nodes 
3361         coming only from the source code.
3362
3363 2011-08-31  Robert Dewar  <dewar@adacore.com>
3364
3365         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3366         lib-xref-alfa.adb: Minor reformatting.
3367
3368 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3369
3370         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3371
3372 2011-08-31  Javier Miranda  <miranda@adacore.com>
3373
3374         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3375         only for class-wide subprograms conflicting with entities of concurrent
3376         tagged types.
3377
3378 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3379
3380         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3381         node to null value.
3382
3383 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3384
3385         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3386         general description of the routine.
3387
3388 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3389
3390         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3391         doubly-linked lists.
3392
3393 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3394
3395         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3396         check is needed for a left-hand side that is a dereference, and the
3397         base type is private without discriminants (whereas the full type does
3398         have discriminants), an extra retrieval of the underlying type may be
3399         needed in the case where the subtype is a record subtype whose base
3400         type is private. Update comments.
3401
3402 2011-08-31  Javier Miranda  <miranda@adacore.com>
3403
3404         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3405         found check if there is a class-wide subprogram covering the primitive.
3406         
3407 2011-08-31  Yannick Moy  <moy@adacore.com>
3408
3409         * sem_res.adb: Further cases where full expansion test is needed,
3410         rather than expansion test.
3411
3412 2011-08-31  Pascal Obry  <obry@adacore.com>
3413
3414         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3415
3416 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3417
3418         * exp_ch5.adb: Handle iterators over derived container types.
3419
3420 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3421
3422         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3423         (Has_Anonymous_Master): New routine.
3424         (Set_Has_Anonymous_Master): New routine.
3425         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3426         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3427         (Current_Anonymous_Master): New routine.
3428         (Current_Unit_First_Declaration): Removed.
3429         (Current_Unit_Scope): Removed.
3430         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3431         their objects on a per-unit heterogeneous finalization master.
3432
3433 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3434
3435         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3436         array.
3437
3438 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3439
3440         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3441         when not needed.
3442
3443 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3444
3445         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3446         where the actual is an unexpanded call to 'Input.
3447
3448 2011-08-31  Yannick Moy  <moy@adacore.com>
3449
3450         * sem_ch4.adb: Code clean up.
3451
3452 2011-08-31  Yannick Moy  <moy@adacore.com>
3453
3454         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3455
3456 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3457
3458         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3459         and TSS primitive Finalize_Address if finalization is suppressed.
3460         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3461         primitive Finalize_Address if finalization is suppressed.
3462
3463 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3464
3465         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3466         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3467         sure that the underlying task has already been created before trying
3468         to change its affinity.
3469         (Set_CPU): Use the term processor instead of CPU, as we do in
3470         Assign_Task.
3471
3472 2011-08-31  Vincent Celier  <celier@adacore.com>
3473
3474         * prj-attr.adb: New Compiler attribute Source_File_Switches.
3475         * prj-nmsc.adb (Process_Compiler): Process attribute
3476         Source_File_Switches.
3477         * prj.ads (Language_Config): New name list component
3478         Name_Source_File_Switches.
3479         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3480
3481 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3482
3483         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3484         discriminated component of an actual, expand at once to prevent
3485         ouf-of-order references with generated subtypes.
3486
3487 2011-08-31  Yannick Moy  <moy@adacore.com>
3488
3489         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3490         reference to operator in Alfa xrefs.
3491
3492 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3493
3494         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3495         where the parent instance was frozen before the current instance due to
3496         the presence of a source body. Update calls to Insert_After_Last_Decl.
3497         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3498         Update the comment which illustrates the purpose of the routine.
3499         Package instances are now frozen by source bodies which appear after
3500         the instance. This ensures that entities coming from within the
3501         instance are available for use in the said bodies.
3502         (Install_Body): Add code to handle the case where the parent instance
3503         was frozen before the current instance due to the presence of a source
3504         body. Update calls to Insert_After_Last_Decl.
3505
3506 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3507
3508         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3509         access types.
3510         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3511
3512 2011-08-31  Yannick Moy  <moy@adacore.com>
3513
3514         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3515         full-expander test.
3516         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3517         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3518         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3519         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3520         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3521         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3522         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3523         ALFA in Alfa (we dropped acronym).
3524         * einfo.adb (Primitive_Operations): Correctly return list of primitive
3525         operations in a case where it returned previously No_Elist.
3526
3527 2011-08-31  Robert Dewar  <dewar@adacore.com>
3528
3529         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3530         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3531         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3532         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3533         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3534         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3535         reformatting.
3536
3537 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3538
3539         * sem_ch12 (Check_Private_View): Revert previous change.
3540         * sem_res.adb (Conversion_Check): Do not emit the error message if the
3541         conversion is in a generic instance.
3542
3543 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3544
3545         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3546         * a-chtgbo.adb (Free): Allow 0 as index value.
3547
3548 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3549
3550         * a-cborma.adb (Insert): Add comment to explain why no element
3551         assignment.
3552
3553 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3554
3555         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3556         spec discriminant is already a concurrent type, in which case just use
3557         it, otherwise fetch the Corresponding_Concurrent_Type as before.
3558
3559 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3560
3561         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3562         system-linux-mips.ads, system-linux-mipsel.ads,
3563         system-linux-mips64el.ads, system-linux-ppc64.ads,
3564         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3565
3566 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3567
3568         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3569         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3570         (build_unary_op): Likewise.
3571
3572 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3573
3574         * raise-gcc.c: Do not include coretypes.h and tm.h.
3575         (setup_to_install): Remove test for compiler macro.
3576         * targext.c: Document use for the library.
3577         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3578
3579 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3580
3581         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3582         the expression to the nominal type if the latter is a record type with
3583         a variant part and the type of the former is a record type without one.
3584
3585 2011-08-30  Yannick Moy  <moy@adacore.com>
3586
3587         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3588         expansion in Alfa mode.
3589         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3590         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3591         Alfa mode.
3592         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3593         * sem_res.adb: Ditto.
3594         * gcc-interface/Make-lang.in: Update dependencies.
3595
3596 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3597
3598         * g-socket.ads: Minor documentation adjustment.
3599
3600 2011-08-30  Robert Dewar  <dewar@adacore.com>
3601
3602         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3603
3604 2011-08-30  Yannick Moy  <moy@adacore.com>
3605
3606         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3607         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3608         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3609         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3610         Revert change which introduced files for "light"
3611         expansion, to be replaced by a single file for Alfa expansion.
3612
3613 2011-08-30  Robert Dewar  <dewar@adacore.com>
3614
3615         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3616         Minor code reorg/reformatting.
3617
3618 2011-08-30  Yannick Moy  <moy@adacore.com>
3619
3620         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3621         common shorthand for (Expander_Active and not ALFA_Mode) that can be
3622         used for testing full expansion, that is active expansion not in the
3623         reduced mode for Alfa
3624         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3625         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3626         of the verbose (Expander_Active and not ALFA_Mode)
3627
3628 2011-08-30  Tristan Gingold  <gingold@adacore.com>
3629
3630         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3631         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3632         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3633         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3634
3635 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
3636
3637         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3638         access conversions to check that the conversion is a rewritten node,
3639         rather than just having Comes_From_Source set to False, which wasn't
3640         sufficient.
3641
3642 2011-08-30  Robert Dewar  <dewar@adacore.com>
3643
3644         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3645         g-socket.ads: Minor reformatting.
3646
3647 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3648
3649         * sem_util.adb: Minor reformatting.
3650
3651 2011-08-30  Tristan Gingold  <gingold@adacore.com>
3652
3653         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3654         to be compliant with the ABI.
3655
3656 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
3657
3658         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3659         of a designated type when the related access type is an actual in an
3660         instance. This ensures that the full view of designated type is
3661         available when inside the body of the instance.
3662
3663 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3664
3665         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3666         in a position to be modified, a slice is treated like an indexed
3667         component.
3668
3669 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3670
3671         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3672         field tv_sec in struct timeval.
3673
3674 2011-08-30  Yannick Moy  <moy@adacore.com>
3675
3676         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3677         blocks of code doing full expansion, previously only guarded by
3678         Expander_Active, by anding the test that ALFA_Mode is not set
3679
3680 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3681
3682         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3683         add the function to the list of private dependents, for subsequent
3684         legality check on Taft amendment types.
3685         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3686         Private_Dependents, as for other incomplete types.
3687         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3688         Taft-amendment type is used as the return type of a function.
3689
3690 2011-08-30  Javier Miranda  <miranda@adacore.com>
3691
3692         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3693         which emits an error by a call to a new routine which report the error.
3694         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3695         entity does not cover an existing interface.
3696         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3697         code.
3698         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3699         protected procedures or entries whose mode is not conformant.
3700         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3701         an error by a call to a new routine which report the error.
3702
3703 2011-08-30  Robert Dewar  <dewar@adacore.com>
3704
3705         * gnat_rm.texi: Minor change.
3706         * exp_attr_light.adb: Minor reformatting.
3707
3708 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3709
3710         * sem_ch3.adb: Patch inheritance of aspects in
3711         Complete_Private_Subtype, to avoid infinite loop.
3712
3713 2011-08-30  Javier Miranda  <miranda@adacore.com>
3714
3715         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3716         been reported and a subprogram covering an interface primitive is not
3717         found then skip generating the internal entity. Done to avoid crashing
3718         the frontend.
3719         (Check_Abstract_Overriding): Change text of error of wrong formal of
3720         protected subprogram or entry. Done for consistency to emit exactly the
3721         same error reported by Check_Synchronized_Overriding. In addition, the
3722         error is restricted to protected types (bug found working on AI05-0090)
3723
3724 2011-08-30  Yannick Moy  <moy@adacore.com>
3725
3726         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3727         expansion in Alfa mode.
3728         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3729         * exp_light.adb, exp_light.ads: New package defining light expansion.
3730         * expander.adb (Expand): Call light expansion in Alfa mode
3731         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3732         constructs.
3733         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3734         constructs.
3735         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3736         * gnat1drv.adb (Adjust_Global_Switches): Comment
3737
3738 2011-08-30  Yannick Moy  <moy@adacore.com>
3739
3740         * lib-xref-alfa.adb: Minor refactoring.
3741
3742 2011-08-30  Yannick Moy  <moy@adacore.com>
3743
3744         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3745         mode.
3746         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3747         expansion in Alfa mode.
3748         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3749         mode.
3750
3751 2011-08-30  Robert Dewar  <dewar@adacore.com>
3752
3753         * debug_a.adb: Update comment.
3754
3755 2011-08-30  Robert Dewar  <dewar@adacore.com>
3756
3757         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3758         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3759         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3760         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3761
3762 2011-08-30  Robert Dewar  <dewar@adacore.com>
3763
3764         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3765         volatile.
3766
3767 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
3768
3769         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3770         Build_Finalization_Master by supplying an insertion node and enclosing
3771         scope. In its old version, the call did not generate a finalization
3772         master.
3773         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3774         recognize anonymous access-to-controlled components. Rewrite the
3775         machinery which creates finalization masters to service anonymous
3776         access-to-controlled components of a record type. In its current state,
3777         only one heterogeneous master is necessary to handle multiple anonymous
3778         components.
3779         (Freeze_Type): Comment reformatting.
3780         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3781         RE_Unit_Table.
3782         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3783         associates TSS primitive Finalize_Address with either the master itself
3784         or with the internal hash table depending on the mode of operation of
3785         the master.
3786
3787 2011-08-30  Javier Miranda  <miranda@adacore.com>
3788
3789         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3790         interface type then do not generate code to compare this component.
3791         Required since they have no components and their equality operator is
3792         abstract.
3793
3794 2011-08-30  Steve Baird  <baird@adacore.com>
3795
3796         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3797         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3798         returns the (static) accessibility level of the object. Otherwise, the
3799         same as Type_Access_Level.
3800         (Dynamic_Accessibility_Level): New function; given an expression which
3801         could occur as the rhs of an assignment to a saooaaat (i.e., an
3802         expression of an access-to-object type), return the new value for the
3803         saooaaat's associated Extra_Accessibility object.
3804         (Effective_Extra_Accessibility): New function; same as
3805         Einfo.Extra_Accessibility except that object renames are looked through.
3806         * sem_util.adb 
3807         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3808         (Dynamic_Accessibility_Level): New function; see sem_util.ads
3809         description.
3810         (Effective_Extra_Accessibility): New function; see sem_util.ads
3811         description.
3812         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3813         (Extra_Accessibility): Update comments.
3814         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3815         except RM_Size field (which is only for types) is unaffected.
3816         * einfo.adb
3817         (Extra_Accessibility): Expand domain to allow objects, not just formals.
3818         (Set_Extra_Accessibility): Expand domain to allow objects, not just
3819         formals.
3820         (Init_Size): Add assertion that we are not trashing the
3821         Extra_Accessibility attribute of an object.
3822         (Init_Size_Align): Add assertion that we are not trashing the
3823         Extra_Accessibility attribute of an object.
3824         (Init_Object_Size_Align): New procedure; see einfo.ads description.
3825         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3826         differently for the type of a (non-library-level) saooaaat depending
3827         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3828         is queried in this set of changes - everything else (in particular,
3829         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3830         driven off of the setting of the Is_Local_Anonymous_Access attribute.
3831         The special treatment of library-level saooaaats is an optimization,
3832         not required for correctnesss. This is based on the observation that the
3833         Ada2012 rules (static and dynamic) for saooaaats turn out to be
3834         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3835         * exp_ch3.adb
3836         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3837         false for the type of a saooaaat, declare and initialize its
3838         accessibility level object and set the Extra_Accessibility attribute
3839         of the saooaaat to refer to this object.
3840         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3841         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3842         calls to Effective_Extra_Accessibility in order to support
3843         renames of saooaaats.
3844         (Expand_N_Type_Conversion): Add new local function,
3845         Has_Extra_Accessibility, and call it when determining whether an
3846         accessibility check is needed.
3847         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3848         evaluate to True (without raising an exception).
3849         * exp_ch5.adb
3850         (Expand_N_Assignment_Statement): When assigning to an Ada2012
3851         saooaaat, update its associated Extra_Accessibility object (if
3852         it has one). This includes an accessibility check.
3853         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3854         a saooaaat, update its Extra_Accessibility object too (if it
3855         has one).
3856         (Expand_Call): Replace a couple of calls to Type_Access_Level
3857         with calls to Dynamic_Access_Level to handle cases where
3858         passing a literal (any literal) is incorrect.
3859         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3860         checks associated with "Saooaat := Some_Object'Access;"; this must
3861         be rejected if Some_Object is declared in a more nested scope
3862         than Saooaat.
3863         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3864         assignment to a saooaaat even if Is_Local_Anonymous_Access
3865         returns False for its type (indicating a 2012-style saooaaat).
3866         * sem_ch8.adb
3867         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3868         (which is only appropriate for objects, not types) with a call
3869         of Init_Object_Size_Align in order to avoid trashing the
3870         Extra_Accessibility attribute of a rename (the two attributes
3871         share storage).
3872         * sem_res.adb
3873         (Valid_Conversion) Replace six calls to Type_Access_Level with
3874         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3875         Ada2012 non-library-level saooaaat, the former returns library level
3876         while the latter returns the (static) accessibility level of the
3877         saooaaat. A type conversion to the anonymous type of a saooaaat
3878         can only occur as part of an assignment to the saooaaat, so we
3879         know that such a conversion must be in a lhs context, so Deepest
3880         yields the result that we need. If such a conversion could occur,
3881         say, as the operand of an equality operator, then this might not
3882         be right. Also add a test so that static accessibilty checks are
3883         performed for converting to a saooaaat's type even if
3884         Is_Local_Anonymous_Access yields False for the type.
3885
3886 2011-08-30  Javier Miranda  <miranda@adacore.com>
3887
3888         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3889         controls generation of a warning associated with late declaration of
3890         dispatching functions. Required to avoid generating spurious
3891         warnings.
3892
3893 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
3894
3895         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3896         return object has an anonymous access type and the function's type is
3897         a named access type.
3898         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3899         conversions on implicit conversions, since such conversions can occur
3900         for anonymous access cases due to expansion. Issue error for attempt
3901         to rename an anonymous expression as an object of a named access type.
3902         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3903         to indicate whether this function should report errors on invalid
3904         conversions.
3905         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3906         the expression is of an anonymous access type and the expected type is
3907         a named general access type, rewrite the expression as a type
3908         conversion, unless this is an expression of a membership test.
3909         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3910         calling of Error_Msg_N on new formal Report_Errs.
3911         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3912         calling of Error_Msg_NE on new formal Report_Errs.
3913         (Valid_Conversion): Move declaration of this function to the package
3914         spec, to allow calls from membership test processing. For Ada 2012,
3915         enforce legality restrictions on implicit conversions of anonymous
3916         access values to general access types, disallowing such conversions in
3917         cases where the expression has a dynamic accessibility level (access
3918         parameters, stand-alone anonymous access objects, or a component of a
3919         dereference of one of the first two cases).
3920         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3921         in the context of a named general access expected type.
3922         * exp_ch4.adb Add with and use of Exp_Ch2.
3923         (Expand_N_In): Add processing for membership tests applied to
3924         expressions of an anonymous access type. First, Valid_Conversion is
3925         called to check whether the test is statically False, and then the
3926         conversion is expanded to test that the expression's accessibility
3927         level is no deeper than that of the tested type. In the case of
3928         anonymous access-to-tagged types, a tagged membership test is applied
3929         as well.
3930         (Tagged_Membership): Extend to handle access type cases, applying the
3931         test to the designated types.
3932         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3933         accessibility level, and the actual is a 'Access applied to a current
3934         instance, pass the accessibility level of the type of the current
3935         instance rather than applying Object_Access_Level to the prefix. Add a
3936         ??? comment, since this level isn't quite right either (will eventually
3937         need to pass an implicit level parameter to init procs).
3938
3939 2011-08-30  Bob Duff  <duff@adacore.com>
3940
3941         * s-taskin.ads: Minor comment fix.
3942
3943 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3944
3945         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3946         component and the selector is a dispatching operation, check if it is
3947         a prefixed call before rewriting as a parameterless function call.
3948
3949 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
3950
3951         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3952         tsystem.h into $(RTSDIR) instead of rts.
3953
3954 2011-08-29  Robert Dewar  <dewar@adacore.com>
3955
3956         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3957         reformatting.
3958         * gcc-interface/Make-lang.in: Update dependencies.
3959
3960 2011-08-29  Yannick Moy  <moy@adacore.com>
3961
3962         * alfa.ads (Name_Of_Heap_Variable): New constant name.
3963         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3964         table to hold dereferences.
3965         (Add_ALFA_Xrefs): Take into account dereferences as special
3966         reads/writes to the variable "HEAP".
3967         (Enclosing_Subprogram_Or_Package): Move subprogram here.
3968         (Generate_Dereference): New procedure to store a read/write dereferencew
3969         in the table Drefs.
3970         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3971         the special "HEAP" var.
3972         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3973         in ALFA mode.
3974         * sem_util.adb (Note_Possible_Modification): Store write dereference
3975         in ALFA mode.
3976
3977 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
3978
3979         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3980         ensures that the level of the subpool access type is not deeper than
3981         that of the pool object.
3982         * sem_util.adb (Object_Access_Level): Expand to handle defining
3983         identifiers.
3984         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3985         subpool handle name of a rewritten allocator.
3986
3987 2011-08-29  Robert Dewar  <dewar@adacore.com>
3988
3989         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3990
3991 2011-08-29  Thomas Quinot  <quinot@adacore.com>
3992
3993         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3994         values, we generate multiple triples of parameters in the TypeCode.
3995         Bump Choice_Index for each such triple so that a subsequent default
3996         choice is associated with the correct index in the typecode.
3997
3998 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
3999
4000         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4001         container.
4002         (First, Last): Handle properly an iterator over a null container.
4003
4004 2011-08-29  Bob Duff  <duff@adacore.com>
4005
4006         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4007         processing if we run across a node with no Scope. This can happen if
4008         we're with-ing an library-level instance, and that instance got errors
4009         that caused "instantiation abandoned".
4010         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4011         an exception instead of using Assert, so it won't go into an infinite
4012         loop, even when assertions are turned off.
4013
4014 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4015
4016         * a-coorse.adb: Proper handling of empty ordered sets.
4017
4018 2011-08-29  Johannes Kanig  <kanig@adacore.com>
4019
4020         * debug.adb: Add comments.
4021
4022 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4023
4024         * a-except.adb, a-except-2005.adb: Minor comment rewording and
4025         reformatting.
4026
4027 2011-08-29  Yannick Moy  <moy@adacore.com>
4028
4029         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4030         declaration for Itypes in Alfa mode.
4031
4032 2011-08-29  Robert Dewar  <dewar@adacore.com>
4033
4034         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4035         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4036         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4037         reformatting.
4038
4039 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4040
4041         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4042         package spec.
4043         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4044         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4045         while raising PE.
4046
4047 2011-08-29  Robert Dewar  <dewar@adacore.com>
4048
4049         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4050
4051 2011-08-29  Javier Miranda  <miranda@adacore.com>
4052
4053         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4054         renamings of formal subprograms when the actual for a formal type is
4055         class-wide.
4056
4057 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4058
4059         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4060         to Target.
4061
4062 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4063
4064         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4065         components of record type.
4066         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4067         to Target.
4068
4069 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4070
4071         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4072         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4073         container packages.
4074
4075 2011-08-29  Robert Dewar  <dewar@adacore.com>
4076
4077         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4078         reformatting.
4079
4080 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4081
4082         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4083         components of record type.
4084
4085 2011-08-29  Bob Duff  <duff@adacore.com>
4086
4087         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4088         by the termination handler.
4089
4090 2011-08-29  Yannick Moy  <moy@adacore.com>
4091
4092         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4093         created in Alfa mode, instead of inserting artificial declarations of
4094         non-Itypes in the tree.
4095         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4096         know if an Itype has a corresponding declaration, as defined in
4097         itypes.ads.
4098
4099 2011-08-29  Yannick Moy  <moy@adacore.com>
4100
4101         * gnat1drv.adb: Minor rewrite.
4102
4103 2011-08-29  Bob Duff  <duff@adacore.com>
4104
4105         * s-tasuti.adb (Make_Passive): Work around race condition in
4106         Make_Independent, which can cause Wait_Count to be zero. So instead of
4107         asserting that Wait_Count > 0, and then decrementing it, decrement it
4108         only if Wait_Count > 0.
4109         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4110         should be nonnegative, so declare them Natural instead of Integer.
4111
4112 2011-08-29  Robert Dewar  <dewar@adacore.com>
4113
4114         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4115         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4116         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4117         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4118         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4119
4120 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4121
4122         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4123
4124 2011-08-29  Vadim Godunko  <godunko@adacore.com>
4125
4126         * s-parint.ads: Minor comment clarification.
4127
4128 2011-08-29  Vincent Celier  <celier@adacore.com>
4129
4130         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4131         may be used as identifiers.
4132
4133 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4134
4135         * a-coinho.ads: Minor reformating.
4136
4137 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4138
4139         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4140         container of a derived type.
4141
4142 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4143
4144         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4145         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4146
4147 2011-08-29  Pascal Obry  <obry@adacore.com>
4148
4149         * exp_disp.adb: Minor comment fix.
4150         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4151         to avoid warnings when compiling with -Wall.
4152         (Make_Disp_Conditional_Select_Body): Likewise.
4153         (Make_Disp_Timed_Select_Body): Likewise.
4154
4155 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4156
4157         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4158         an entity name, generate reference for it.
4159
4160 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4161
4162         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4163         iterator form.
4164         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4165         the class-wide type.
4166         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4167
4168 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4169
4170         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4171         subtype for an object whose type is an unconstrained union.
4172
4173 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4174
4175         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4176         is allowed in a component definition, by AI95-406.
4177
4178 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4179
4180         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4181
4182 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4183
4184         * a-except-2005.adb: Alphabetize all routines.
4185         (Triggered_By_Abort): New routine.
4186         * a-except-2005.ads (Triggered_By_Abort): New routine.
4187         * a-except.adb Alphabetize all routines.
4188         (Triggered_By_Abort): New routine.
4189         * a-except.ads (Triggered_By_Abort): New routine.
4190         * exp_ch7.adb: Update all comments involving the detection of aborts in
4191         finalization code.
4192         (Build_Object_Declarations): Do not generate code to detect the
4193         presence of an abort at the start of finalization code, use a runtime
4194         routine istead.
4195         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4196         RE_Unit_Table.
4197         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4198         allocate a task on a subpool.
4199         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4200         The flag disables all actions related to the maintenance of
4201         Finalize_Address_Table when subpools are not in use.
4202         (Allocate_Any_Controlled): Signal the machinery that subpools are in
4203         use.
4204         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4205         performs costly task locking when subpools are not in use.
4206
4207 2011-08-29  Yannick Moy  <moy@adacore.com>
4208
4209         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4210         types and dispatching calls in Alfa mode.
4211         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4212         correspondance between body and spec scopes, to reuse utility functions
4213         (Traverse_Declarations_Or_Statements): Protect access to body for stub
4214         by testing the presence of the library unit for the body
4215         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4216         mode the expansion of accept statements is skipped
4217         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4218         the unique entity corresponding to the one returned by
4219         Unique_Defining_Entity applied to the enclosing declaration of the
4220         argument.
4221
4222 2011-08-29  Bob Duff  <duff@adacore.com>
4223
4224         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4225         gdb when x is not a node (it can be a node list, name_id, etc). pp is
4226         an alias for pn. ppp is an alias for pt.
4227
4228 2011-08-29  Javier Miranda  <miranda@adacore.com>
4229
4230         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4231         aggregate to take a consistent decision on the need to convert into
4232         assignments aggregates that initialize constant objects.
4233
4234 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4235
4236         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4237         Build_Allocate_Deallocate_Proc in order to handle allocation of
4238         non-controlled objects on subpools.
4239         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4240         to be end-user visible.
4241         * s-finmas.adb: Add with and use clause for System.HTable.
4242         Add an instantiation of Simple_HTable which provides a mapping between
4243         the address of a controlled object and the corresponding
4244         Finalize_Address used to clean up the object. The table is used when a
4245         master is operating in heterogeneous mode.
4246         (Attach): Explain why the input node is not verified on being already
4247         attached.
4248         (Delete_Finalize_Address): New routine.
4249         (Detach): Add pragma Assert which ensures that a node is already
4250         attached.
4251         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4252         since nodes are no longer removed on traversal. Explain why node
4253         detachment is undesirable in this case.
4254         (Get_Finalize_Address): New routine.
4255         (Hash): New routine.
4256         (Is_Empty_List): Removed.
4257         (pm): Renamed to Print_Master. Add output for discriminant
4258         Is_Homogeneous.
4259         Comment reformatting.
4260         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4261         * s-finmas.ads: Various comments additions / improvements.
4262         Type Finalization_Master has a discriminant which determines the mode of
4263         operation.
4264         (Delete_Finalize_Address): New routine.
4265         (Get_Finalize_Address): New routine.
4266         (pm): Renamed to Print_Master.
4267         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4268         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4269         use clause for System.IO.
4270         (Allocate_Any_Controlled): Add machinery to set TSS primitive
4271         Finalize_Address depending on the mode of allocation and the mode of
4272         the master.
4273         (Deallocate_Any_Controlled): Remove the relation pair object -
4274         Finalize_Address regardless of the master mode. Add comment explaining
4275         the reason.
4276         (Detach): Ensure that fields Prev and Next are null after detachment.
4277         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4278         scheme to check whether the list of subpools is empty. There is no
4279         longer need to store the next subpool or advance the current pointer.
4280         (Is_Empty_List): New routine.
4281         (Print_Pool): New routine.
4282         (Print_Subpool): New routine.
4283         * s-stposu.ads: Various comments additions / improvements.
4284         Field Master of type Root_Subpool is now a heterogeneous collection.
4285         (Print_Pool): New routine.
4286         (Print_Subpool): New routine.
4287
4288 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4289
4290         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4291         forms, using aspects of container types.
4292         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4293         Has_Implicit_Dereference flags, that may be set on the partial view.
4294         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4295         container type with an indexing aspect.
4296         (Analyze_Quantified_Expression): Analyze construct with expansion
4297         disabled, because it will be rewritten as a loop during expansion.
4298         (Try_Container_Indexing): The prefix itself may be a container type
4299         with an indexing aspect, as with a vector of vectors.
4300         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4301         the original doamin of iteration, for name capture.
4302         (Analyze_Iterator_Specification): If the domain is an expression that
4303         needs finalization, create a separate declaration for it.
4304         For an iterator with "of" retrieve default iterator info from aspect of
4305         container type. For "in" iterator, retrieve type of Iterate function.
4306         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4307         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4308         analysis, to prevent spurious errors about late attributes.
4309         * sprint.adb: Handle quantified expression with either loop or iterator
4310         specification.
4311         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4312         iterator.
4313
4314 2011-08-29  Vincent Celier  <celier@adacore.com>
4315
4316         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4317         Binder or Linker of the main project file.
4318
4319 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4320
4321         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4322         unit.
4323
4324 2011-08-29  Yannick Moy  <moy@adacore.com>
4325
4326         * exp_ch9.adb: Partial revert of previous change for Alfa mode
4327
4328 2011-08-29  Yannick Moy  <moy@adacore.com>
4329
4330         * exp_ch11.adb: Minor expansion of comment.
4331
4332 2011-08-29  Yannick Moy  <moy@adacore.com>
4333
4334         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4335
4336 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4337
4338         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4339         interpretation, set the type before resolving the operands, because
4340         legality checks on an exponention operand need to know the type of the
4341         context.
4342
4343 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4344
4345         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4346         cleanups on a master if the instance is within a generic unit.
4347         Complement to the corresponding fix to inline.adb for K520-030.
4348
4349 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4350
4351         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4352         occurrence.
4353         * exp_intr.adb: Minor comment fix.
4354
4355 2011-08-29  Bob Duff  <duff@adacore.com>
4356
4357         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4358         Delay_Required was used as an uninitialized variable.
4359
4360 2011-08-29  Robert Dewar  <dewar@adacore.com>
4361
4362         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4363         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4364         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4365
4366 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4367
4368         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4369         Remove unused variables.
4370
4371 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4372
4373         * sem_res.adb: Remove Build_Explicit_Dereference.
4374         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4375         from sem_res.adb, used in analysis of additional constructs.
4376         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4377         expansion of iterators.
4378         (Is_Object_Reference): Recognize variables rewritten as explicit
4379         dereferences in Ada2012.
4380         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4381         Reversible_Iterator names, for expansion of Ada2012 iterators.
4382         * aspects.ads, aspects.adb (Find_Aspect): Utility.
4383         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4384         linked list container.
4385         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4386         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4387
4388 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4389
4390         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4391         containers.
4392
4393 2011-08-29  Vincent Celier  <celier@adacore.com>
4394
4395         * make.adb (Gnatmake): Get the maximum number of simultaneous
4396         compilation processes after the Builder switches has been scanned, as
4397         there may include -jnn.
4398
4399 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4400
4401         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4402
4403 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4404
4405         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4406         GNAT_DRIVER_COMMAND_LINE to 255.
4407
4408 2011-08-29  Pascal Obry  <obry@adacore.com>
4409
4410         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4411         reformatting and style fix (class attribute casing).
4412
4413 2011-08-29  Yannick Moy  <moy@adacore.com>
4414
4415         * exp_ch11.adb: Yet another case where expansion should be common
4416         between CodePeer and Alfa.
4417
4418 2011-08-29  Yannick Moy  <moy@adacore.com>
4419
4420         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4421
4422 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4423
4424         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4425         incomplete type and its completion match.
4426
4427 2011-08-29  Yannick Moy  <moy@adacore.com>
4428
4429         * exp_ch13.adb: Adjust previous change.
4430
4431 2011-08-29  Robert Dewar  <dewar@adacore.com>
4432
4433         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4434         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4435         Minor reformatting.
4436
4437 2011-08-29  Emmanuel Briot  <briot@adacore.com>
4438
4439         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4440         initialize aggregated projects.
4441
4442 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4443
4444         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4445         depth of candidates to resolve a potentially spurious ambiguity between
4446         two visible subprograms.
4447
4448 2011-08-29  Yannick Moy  <moy@adacore.com>
4449
4450         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4451         Requires/Ensures.
4452         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4453         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4454         Requires/Ensures.
4455
4456 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
4457
4458         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4459         Add comment.
4460
4461 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4462
4463         * sem_res.adb: Minor reformatting.
4464
4465 2011-08-29  Johannes Kanig  <kanig@adacore.com>
4466
4467         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4468         mode.
4469         * gnat1drv.adb (Adjust_Global_Switches): Set
4470         Use_Expressions_With_Actions to False in ALFA mode.
4471         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4472         ALFA mode.
4473
4474 2011-08-29  Yannick Moy  <moy@adacore.com>
4475
4476         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4477         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4478         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4479         tagged types and dispatching calls in Alfa mode.
4480
4481 2011-08-29  Javier Miranda  <miranda@adacore.com>
4482
4483         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4484         we do not report an error on an Empty node.
4485
4486 2011-08-29  Geert Bosch  <bosch@adacore.com>
4487
4488         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4489         a-nlrear.o and a-nurear.o.
4490
4491 2011-08-29  Robert Dewar  <dewar@adacore.com>
4492
4493         * freeze.adb: Minor code reorganization.
4494         Minor reformatting.
4495         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4496         sem_ch6.adb: Minor reformatting
4497
4498 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4499
4500         * s-except.ads, s-except.adb: Provide dummy body.
4501
4502 2011-08-29  Yannick Moy  <moy@adacore.com>
4503
4504         * sem_warn.adb (Within_Postcondition): Take into account the case of
4505         an Ensures component in a Test_Case.
4506
4507 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4508
4509         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4510         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4511         System_Exceptions_Debug
4512         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4513         * a-except.adb: With and use System.Exceptions_Debug instead of
4514         System.Exceptions.
4515         * a-except-2005.adb: Likewise.
4516         * s-assert.adb: Likewise.
4517         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4518         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
4519         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4520         s-excdeb. Update dependencies.
4521         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4522         as these no longer need external libraries.
4523
4524 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4525
4526         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4527         exponentiation operator on universal values in a context that requires
4528         a fixed-point type.
4529
4530 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4531
4532         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
4533         before calling notify_handled_exception.
4534         * a-exextr.adb: Fix comment.
4535
4536 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4537
4538         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4539         Finalize_Address of the access type's finalization master.
4540         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4541         access type's finalization master. Add a guard to prevent
4542         Associated_Storage_Pool from being set on .NET/JVM.
4543         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4544         attribute Finalize_Address of the access type's finalization master.
4545         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4546         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4547         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4548         RE_Unit_Table.
4549         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4550         use clause for System.IO
4551         (Detach): Relax the assertion, to be reinstated later.
4552         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4553         Relax the assertion on Finalize_Address, to be reinstated later.
4554         (Is_Empty_List): New routine.
4555         (pm): New debug routine.
4556         (Set_Finalize_Address): New routine.
4557         * s-finmas.ads (pm): New debug routine.
4558         (Set_Finalize_Address): New routine.
4559         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4560
4561 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4562
4563         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4564         Remove convention C.
4565
4566 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4567
4568         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4569         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4570         (Finalize_TCB): Remove its finalization.
4571         (Initialize): Remove assignment of GET_Exc_Stack_Addr
4572         * s-soflin.adb (NT_Exc_Stack): Remove
4573         (Get_Exc_Stack_Addr_NT): Likewise.
4574         (Get_Exc_Stack_Addr_Soft): Likewise.
4575         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4576         (Get_Exc_Stack_Addr): Likewise.
4577         (Get_Exc_Stack_Addr_Soft): Likewise
4578         * s-taspri-vms.ads (Exc_Stack_T): Remove.
4579         (Exc_Stack_Ptr_T): Likewise.
4580         (Private_Data): Remove Exc_Stack_Ptr component.
4581
4582 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4583
4584         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4585
4586 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4587
4588         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4589
4590 2011-08-29  Geert Bosch  <bosch@adacore.com>
4591
4592         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4593         L2_Norm, Swap_Column): New generic subprograms
4594         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4595         L2_Norm, Swap_Column): Implement new subprograms in order to
4596         eliminate dependency on BLAS and LAPACK libraries in
4597         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4598         version. Forward_Eliminate/Back_Substitute can be used to put a
4599         matrix in row echelon or reduced row echelon form using partial
4600         pivoting.
4601         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4602         Swap_Column): Instantiate from System.Generic_Array_Operations.
4603         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4604         (Sqrt): Local function for simple computation of square root without
4605         adding dependencies on Generic_Elementary_Functions.
4606         (Swap): New subprogram to exchange floating point numbers.
4607         (Inverse): Reimplement using Jordan-Gauss elimination.
4608         (Jacobi): New procedure implementing Jacobi's method for computation
4609         of eigensystems, based on Rutishauser's implementation.
4610         (L2_Norm): Implement directly using the inner product.
4611         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4612         decreasing eigenvalue as required by the Ada RM.
4613         (Swap_Column): New helper procedure for Sort_Eigensystem.
4614         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4615         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4616         Sort_Eigensystems.
4617
4618 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4619
4620         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4621         statements line.
4622
4623 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4624
4625         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4626         than the current node.
4627         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4628         Finalization_Master. The list headers have two fields instead of three.
4629         This should fix alignment issue but subpool allocations are now
4630         unusable. Alphabetize subprograms.
4631         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4632         the size of the header when converting the beginning of the object to
4633         a FM_Node. Set the master's Finalize_Address attribute if not already
4634         set.
4635         (Deallocate_Any_Controlled): Use the offset rather than the size of the
4636         header when converting the beginning of the object to a FM_Node.
4637
4638 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
4639
4640         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4641         reraise when compiling for CodePeer.
4642
4643 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
4644
4645         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4646         now needed by a-convec.adb. Fix warning.
4647
4648 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4649
4650         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4651         processing of TSS routine Finalize_Address when compiling in
4652         CodePeer_Mode.
4653
4654 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4655
4656         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4657         sem_warn.adb: Minor reformatting.
4658
4659 2011-08-29  Emmanuel Briot  <briot@adacore.com>
4660
4661         * prj-conf.adb (Get_Config_Switches): Also collect the list of
4662         languages from aggregated projects.
4663
4664 2011-08-29  Yannick Moy  <moy@adacore.com>
4665
4666         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4667         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4668         Traverse_Package_Declaration, Traverse_Subprogram_Body,
4669         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4670         for stubs are traversed too when parameter is set
4671         (Traverse_All_Compilation_Units): Traverse without going inside stubs
4672         (Traverse_Declarations_Or_Statements): Do the special traversing for
4673         stubs when required.
4674         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4675         return subprogram or package body from stub.
4676         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4677         stubs without prior subprogram decl.
4678
4679 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
4680
4681         * gnat_ugn.texi: Fix typo.
4682
4683 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4684
4685         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4686         which accounts for size vs alignment issues and calculates the size of
4687         the list header.
4688         (Deallocate_Any_Controlled): Ditto.
4689         (Nearest_Multiple_Rounded_Up): New routine.
4690
4691 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4692
4693         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4694         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4695         (Set_Exception_Msg): Ditto.
4696         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
4697         Private_Data.
4698         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4699         Use Save_Occurrence instead of Save_Occurrence_No_Private.
4700         (Raise_With_Msg): Remove Cleanup_Flag.
4701         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4702         Clean_Flag and Private_Data components.
4703
4704 2011-08-29  Yannick Moy  <moy@adacore.com>
4705
4706         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4707         in CodePeer mode.
4708         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4709         of an explicitly declared type, so that the base types of the original
4710         type and this generated type are the same, and a "type" (not a subtype
4711         like previously).
4712         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4713         small" in Alfa mode, like in CodePeer mode.
4714         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4715         clauses in Alfa mode.
4716
4717 2011-08-29  Javier Miranda  <miranda@adacore.com>
4718
4719         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4720         function to the package spec.
4721         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4722         internally generated bodies of null procedures locate the internally
4723         generated spec enforcing mode conformance.
4724         (Is_Interface_Conformant): Ensure that the controlling formal of the
4725         primitives match.
4726
4727 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4728
4729         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4730         reject the pragma if it appears to apply to a formal subprogram.
4731
4732 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4733
4734         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4735         inner expression, to prevent double evaluation.
4736
4737 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4738
4739         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4740         they were unused.
4741         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4742         * a-except-2005.adb (Propagate_Exception): Adjust spec.
4743         (Raise_Current_Excep): Adjust call.
4744         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4745
4746 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4747
4748         * exp_disp.adb: Minor reformatting.
4749
4750 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4751
4752         * a-exexpr.adb (Setup_Exception): Removed.
4753         * a-exexpr-gcc.adb (Setup_Exception): Removed.
4754         * a-except.adb (Exception_Propagation): Removed.
4755         * a-except-2005.adb (Setup_Exception): Removed.
4756         (Reraise): Remove call to Setup_Exception.
4757         (Reraise_Occurrence): Ditto.
4758         (Reraise_Occurrence_Always): Ditto.
4759         (Reraise_Occurrence_No_Defer): Ditto.
4760         (Transfer_Occurrence): Ditto.
4761         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4762         (Set_Exception_Msg): Ditto.
4763
4764 2011-08-29  Robert Dewar  <dewar@adacore.com>
4765
4766         * a-convec.adb, exp_disp.adb: Minor reformatting.
4767
4768 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4769
4770         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4771
4772 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
4773
4774         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4775         Exception_Handlers to No_List instead of Empty_List in the case where
4776         there are no handlers.
4777
4778 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4779
4780         * gcc-interface/gigi.h (enum standard_datatypes): Add
4781         ADT_reraise_zcx_decl
4782         (reraise_zcx_decl): New macro.
4783         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4784         (gigi): Set reraise_zcx_decl.
4785         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4786         (gnat_to_gnu): Handle N_Raise_Statement.
4787
4788 2011-08-29  Robert Dewar  <dewar@adacore.com>
4789
4790         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4791         a-undesu.adb: Minor reformatting.
4792
4793 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4794
4795         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4796         table, accept an unfrozen untagged component if it is an actual for a
4797         formal incomplete type.
4798         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4799         provide new iterator forms over vectors.
4800         Introduce type Iterator in package body to implement operations of
4801         Reversible_Iterator interface.
4802         * a-iteint.ads: Make package pure so it is usable with new container
4803         packages, that are categorized Remote_Types.
4804
4805 2011-08-29  Robert Dewar  <dewar@adacore.com>
4806
4807         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4808
4809 2011-08-29  Bob Duff  <duff@adacore.com>
4810
4811         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4812         of <>, because this is the routine that checks for dimensionality
4813         errors (for example, for a two-dimensional array, (others => <>) should
4814         be (others => (others => <>)).
4815
4816 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4817
4818         * impunit.adb: Add new run-time units.
4819         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4820         s-stposu.ads, s-stposu.adb: Code clean up.
4821         Handle protected class-wide or task class-wide types
4822         Handle C/C++/CIL/Java types.
4823         * s-spsufi.adb, s-spsufi.ads: New files.
4824
4825 2011-08-29  Yannick Moy  <moy@adacore.com>
4826
4827         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4828         library-level subprogram.
4829         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4830         placement.
4831         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4832         component.
4833         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4834         component.
4835         * gnat_rm.texi: Update doc for Test_Case pragma.
4836
4837 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4838
4839         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4840         convention C.
4841         (GCC_Exception_Access): New type.
4842         (Unwind_DeleteException): New imported procedure
4843         (Foreign_Exception): Import it.
4844         (GNAT_GCC_Exception): Simply have the occurrence inside.
4845         (To_GCC_Exception): New function.
4846         (To_GNAT_GCC_Exception): New function.
4847         (GNAT_GCC_Exception_Cleanup): New procedure..
4848         (Propagate_GCC_Exception): New procedure.
4849         (Reraise_GCC_Exception): New procedure.
4850         (Setup_Current_Excep): New procedure.
4851         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4852         (Unwind_RaiseException): Ditto.
4853         (Unwind_ForcedUnwind): Ditto.
4854         (Remove): Removed.
4855         (Begin_Handler): Change type of parameter.
4856         (End_Handler): Ditto. Now delete the exception if still present.
4857         (Setup_Key): Removed.
4858         (Is_Setup_And_Not_Propagated): Removed.
4859         (Set_Setup_And_Not_Propagated): Ditto.
4860         (Clear_Setup_And_Not_Propagated): Ditto.
4861         (Save_Occurrence_And_Private): Ditto.
4862         (EID_For): Add 'not null' constraint on parameter.
4863         (Setup_Exception): Does nothing.
4864         (Propagate_Exception): Simplified.
4865         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4866         re-raise is not expanded anymore.
4867         * s-except.ads (Foreign_Exception): New exception - placeholder for
4868         non Ada exceptions.
4869         * raise-gcc.c (__gnat_setup_current_excep): Declare
4870         (CXX_EXCEPTION_CLASS): Define (not yet used)
4871         (GNAT_EXCEPTION_CLASS): Define.
4872         (is_handled_by): Handle foreign exceptions.
4873         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4874
4875 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
4876
4877         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4878
4879 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4880
4881         * a-synbar-posix.adb: Minor reformatting.
4882
4883 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
4884
4885         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4886         a-exetim-default.ads (Interrupt_Clocks_Supported,
4887         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4888         definitions to be compliant with AI-0171. The target systems do not
4889         support separate account for the execution time of interrupt handlers.
4890
4891 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
4892
4893         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4894         in the barrier to put first the easiest to evaluate (and the one which
4895         will be True more often). More efficient.
4896
4897 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
4898
4899         * s-atocou-x86.adb: Fix constraint in machine code insertion.
4900
4901 2011-08-29  Bob Duff  <duff@adacore.com>
4902
4903         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4904         attributes that are now aspects, as specified by AI05-0229-1.
4905         * sem_ch13.adb (Analyze_Aspect_Specifications,
4906         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4907         pragmas or attribute references, as appropriate.
4908
4909 2011-08-29  Robert Dewar  <dewar@adacore.com>
4910
4911         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4912         a-synbar-posix.ads: Minor reformatting.
4913
4914 2011-08-29  Yannick Moy  <moy@adacore.com>
4915
4916         * snames.ads-tmpl: Add name Force.
4917
4918 2011-08-29  Pascal Obry  <obry@adacore.com>
4919
4920         * prj-nmsc.adb: Minor reformatting.
4921
4922 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
4923
4924         * a-exetim.ads (Interrupt_Clocks_Supported,
4925         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4926         definitions to be compliant with AI-0171.
4927
4928 2011-08-29  Robert Dewar  <dewar@adacore.com>
4929
4930         * a-ngelfu.adb: Add comments.
4931
4932 2011-08-29  Geert Bosch  <bosch@adacore.com>
4933
4934         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4935         the closest machine number to Pi / 2.0.
4936
4937 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
4938
4939         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4940         package Ada.Synchronous_Barriers.
4941         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4942         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4943         default implementation using protected objects and another one
4944         a-synbar-posix using POSIX barriers as the underlying support.
4945         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4946         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4947         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4948         Clean up dependencies.
4949         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4950
4951 2011-08-29  Robert Dewar  <dewar@adacore.com>
4952
4953         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4954         exp_dist.adb: Minor code reorganization.
4955         Minor reformatting.
4956
4957 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4958
4959         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4960         primitive operation must support external streaming if it is not a
4961         controlling access result.
4962
4963 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4964
4965         * sinfo.ads, sem_ch7.adb: Minor reformatting.
4966
4967 2011-08-29  Bob Duff  <duff@adacore.com>
4968
4969         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4970         restriction on allocators, as required by AI05-0013-1.
4971         * restrict.ads: Minor comment fix.
4972
4973 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4974
4975         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4976         (To_Jmpbuf_Address): Ditto
4977         (builtin_longjmp): Ditto
4978
4979 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4980
4981         * sem_res.adb: Minor reformatting.
4982
4983 2011-08-29  Vincent Celier  <celier@adacore.com>
4984
4985         * make.adb (Gnatmake): Move special processing for VM targets after the
4986         call to Get_Target_Parameters.
4987
4988 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4989
4990         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4991
4992 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4993
4994         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4995         where an anonymous access discriminant of a limited designated type
4996         appears in a non-immutably limited discriminated type and issue an
4997         error message. Add local variable Desig_T and replace all occurrences
4998         of Designated_Type.
4999
5000 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5001
5002         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5003         implementation is compliant to RM D.15(15/2) after the modification
5004         imposed by AI05-0094-1 (binding interpretation).
5005
5006 2011-08-29  Robert Dewar  <dewar@adacore.com>
5007
5008         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5009         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5010
5011 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5012
5013         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5014         the scope name, do not report a missing label as a style violation (it
5015         will be diagnosed as an illegality).
5016         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5017         variant records: Get_Enum_Lit_From_Pos already returns a usage
5018         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5019         on Expr in Integer_Literal case so that it can be used by
5020         Build_To_Any_Call.
5021
5022 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5023
5024         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5025         Adjust comment.
5026         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5027         (Build_Abort_Block_Handler): New function to build an Abort_Signal
5028         exception handler.
5029         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5030         Build_Abort_Block_Handler to build the exception handler. Do not
5031         undefer aborts for the Abort_Signal exception handler if back-end
5032         exception mechanism.
5033         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5034         back_end exceptions for all others and abort_signal.
5035         * s-except.ads (ZCX_By_Default): New constant.
5036         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5037         (Raise_Exception_Always): Ditto.
5038         (Raise_From_Signal_Handler): Ditto.
5039         (Raise_With_Location_And_Msg): Ditto.
5040         (Raise_With_Msg): Ditto.
5041         (Reraise): Ditto.
5042         (Reraise_Occurence): Ditto.
5043         (Reraise_Occurrence_Always): Ditto.
5044         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5045         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5046
5047 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5048
5049         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5050
5051 2011-08-29  Robert Dewar  <dewar@adacore.com>
5052
5053         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5054         Minor code reorganization.
5055
5056 2011-08-29  Bob Duff  <duff@adacore.com>
5057
5058         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5059         2012, not just Ada 2005.
5060
5061 2011-08-29  Vincent Celier  <celier@adacore.com>
5062
5063         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5064         with a project file or with gprbuid, if -gnatep= is specified, the
5065         builder may need to be invoked with -x.
5066
5067 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5068
5069         * a-exexpr-gcc.adb: Minor comment fix.
5070
5071 2011-08-29  Robert Dewar  <dewar@adacore.com>
5072
5073         * sem_ch8.adb: Minor reformatting.
5074
5075 2011-08-29  Bob Duff  <duff@adacore.com>
5076
5077         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5078         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5079         treating "some" as unreserved in earlier Ada versions. This is now
5080         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5081         rather than Name_Some, since Tok_Some is now recognized as reserved.
5082         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5083         reserved word.
5084         * scans.ads: Minor comment fixes.
5085         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5086         for other language versions.
5087         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5088         treating "some" as unreserved in earlier Ada versions. This is now
5089         handled in Snames.Is_Keyword_Name.
5090         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5091         Ada 2012.
5092         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5093         unreserved in earlier Ada versions. This is now handled in
5094         Snames.Is_Keyword_Name.
5095         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5096         words as for other language versions.
5097         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5098         Ada 2012, not just Ada 2005.
5099
5100 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5101
5102         * sem_ch13.adb: Additional semantic checks for aspects involved in
5103         iterators.
5104
5105 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5106
5107         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5108         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5109         Container parameter.
5110         (Ancestor_Find): ditto.
5111
5112 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5113
5114         * par-endh.adb: Minor reformatting.
5115
5116 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5117
5118         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5119         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5120         (Adjust_N_CLeanups_For): Remove.
5121         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5122         stack is reached.
5123         (Propgate_Exception): Adjust.
5124         * raise-gcc.c: Add a few static/const.
5125         (Adjust_N_Cleanups_For): Remove declaration.
5126         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5127
5128 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5129
5130         * sem_ch8.adb: Use type of function return when rewriting as object
5131         declaration.
5132
5133 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
5134
5135         * sem_type.adb: Minor reformatting.
5136
5137 2011-08-29  Robert Dewar  <dewar@adacore.com>
5138
5139         * makeutl.adb: Minor reformatting.
5140
5141 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5142
5143         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5144         function call of a limited type, the expansion of the renaming is
5145         complicated by the presence of various temporaries and subtypes that
5146         capture constraints of the renamed object.
5147         Rewrite node as an object declaration, whose expansion is simpler.
5148         Given that the object is limited there is no copy involved and no
5149         performance hit.
5150
5151 2011-08-29  Robert Dewar  <dewar@adacore.com>
5152
5153         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5154         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5155
5156 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5157
5158         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5159         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5160         system-linux-hppa.ads, system-linux-s390.ads,
5161         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5162         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5163         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5164         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5165         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5166         system-solaris-sparc.ads, system-lynxos-x86.ads,
5167         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5168         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5169         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5170         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5171         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5172         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5173         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5174         * opt.ads: Adjust comment.
5175         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5176         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5177         * system.ads: Move GCC_ZCX_Support to obsolete entries.
5178
5179 2011-08-29  Emmanuel Briot  <briot@adacore.com>
5180
5181         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5182         file name is specified on the gnatmake or gprbuild command line, and
5183         before we search for that file in the project.
5184
5185 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5186
5187         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5188         used to determine whether a possible interpretation for an overloadable
5189         entity is declared within the current instantiation and should be
5190         included in the candidate set.
5191
5192 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
5193
5194         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5195
5196 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5197
5198         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5199         access subtype is access_to_subprogram, when applying checks for
5200         RM 3.10.2 (27).
5201
5202 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5203
5204         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5205         for sibling when common parent.
5206
5207 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5208
5209         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5210         "pragma_".
5211
5212 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5213
5214         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5215         for the return type when in ASIS mode.
5216
5217 2011-08-29  Vincent Celier  <celier@adacore.com>
5218
5219         * make.adb (Gnatmake): Get the default search dirs, then the target
5220         parameters after getting the Builder switches, as the Builder switches
5221         may include --RTS= and that could change the default search dirs.
5222
5223 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5224
5225         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5226         Make_Final_Call. Move the processing for class-wide types before the
5227         processing for derivations from [Limited_]Controlled.
5228         (Make_Final_Call): Move the processing for class-wide types before the
5229         processing for derivations from [Limited_]Controlled.
5230         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5231         Add code to account for alignments larger than the list header. Add a
5232         comment illustrating the structure of the allocated object + padding +
5233         header.
5234         (Deallocate_Any_Controlled): Add code to account for alignments larger
5235         than the list header.
5236
5237 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5238
5239         * sinfo.ads, sinfo.adb: New node kind
5240         N_Formal_Incomplete_Type_Definition, related flags.
5241         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5242         Parse formal incomplete types.
5243         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5244         sem_ch12.
5245         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5246         Formal incomplete types do not need completion.
5247         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5248         Validate_Incomplete_Type_Instance): New procedures to handle formal
5249         incomplete types.
5250         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5251         that corresponds to a formal incomplete type.
5252         * sprint.adb: Handle formal incomplete type declarations.
5253         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5254         an insertion point.
5255
5256 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5257
5258         * a-fihema.ads, a-fihema.adb: Unit removed.
5259         * a-undesu.ads, a-undesu.adb: New unit implementing
5260         Ada.Unchecked_Deallocate_Subpool.
5261         * einfo.adb: Remove Associated_Collection from the node usage.
5262         Add Finalization_Master to the node usage.
5263         (Associated_Collection): Removed.
5264         (Finalization_Master): New routine.
5265         (Set_Associated_Collection): Removed.
5266         (Set_Finalization_Master): New routine.
5267         (Write_Field23_Name): Remove Associated_Collection from the output. Add
5268         Finalization_Master to the output.
5269         * einfo.ads: Remove attribute Associated_Collection and its uses in
5270         entities.
5271         Add new attribute Finalization_Master along with its uses in entitites.
5272         (Associated_Collection): Removed along with its pragma import.
5273         (Finalization_Master): New routine along with a pragma import.
5274         (Set_Associated_Collection): Removed along with its pragma import.
5275         (Set_Finalization_Master): New routine along with a pragma import.
5276         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5277         Build_Finalization_Collection with Build_Finalization_Master.
5278         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5279         before the bodies of the predefined routines. Add comment explaining
5280         this. Replace call to Build_Finalization_Collection with
5281         Build_Finalization_Master.
5282         (Freeze_Type): Replace call to Build_Finalization_Collection with
5283         Build_Finalization_Master.
5284         (Make_Finalize_Address_Body): Comment reformatting.
5285         (Make_Predefined_Primitive_Specs): Code reformatting.
5286         (Stream_Operation_OK): Update comment mentioning finalization
5287         collections. Replace RE_Finalization_Collection with
5288         RE_Finalization_Master.
5289         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5290         Associated_Collection with Finalization_Master. Replace call to
5291         Build_Finalization_Collection with Build_Finalization_Master.
5292         (Expand_Allocator_Expression): Replace call to Associated_Collection
5293         with Finalization_Master. Replace call to Set_Associated_Collection with
5294         Set_Finalization_Master. Remove the generation of
5295         Set_Finalize_Address_Ptr.
5296         (Expand_N_Allocator): Replace call to Associated_Collection with
5297         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5298         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5299         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5300         comment on usage. Replace call to Needs_BIP_Collection with
5301         Needs_BIP_Finalization_Master Remplace BIP_Collection with
5302         BIP_Finalization_Master. Update all comments which mention finalization
5303         collections. Replace Associated_Collection with
5304         Finalization_Master. Replace Build_Finalization_Collection with
5305         Build_Finalization_Master.
5306         (BIP_Formal_Suffix): Update BIP_Collection's case.
5307         (Build_Heap_Allocator): Update the related comment. Rename local
5308         variable Collect to Fin_Mas_Id and update its occurrences. Update
5309         comments which mention finalization collections. Replace
5310         Set_Associated_Collection with Set_Finalization_Master.
5311         (Expand_Call): Update the code which detects a special piece of library
5312         code for .NET/JVM.
5313         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5314         Add_Collection_Actual_To_Build_In_Place_Call with
5315         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5316         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5317         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5318         Add_Collection_Actual_To_Build_In_Place_Call with
5319         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5320         (Make_Build_In_Place_Call_In_Assignment): Replace call to
5321         Add_Collection_Actual_To_Build_In_Place_Call with
5322         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5323         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5324         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5325         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5326         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5327         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5328         Replace call to Set_Associated_Collection with Set_Finalization_Master.
5329         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5330         Replace the call to Associated_Collection with Finalization_Master.
5331         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5332         Update the way finalization master names are generated. Update the
5333         retrieval of the correct access type which will carry the pool and
5334         master attributes.
5335         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5336         (Make_Finalize_Address_Body): Abstract types do not need
5337         Finalize_Address. Code reformatting.
5338         (Make_Finalize_Address_Stmts): Update comment on usage.
5339         (Make_Set_Finalize_Address_Ptr_Call): Removed.
5340         (Process_Declarations): Update comments.
5341         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5342         Build_Finalization_Master. Update associated comment.
5343         (Make_Set_Finalize_Address_Ptr_Call): Removed.
5344         * exp_ch13.adb: Update comments which mention finalization collections.
5345         (Expand_N_Free_Statement): Replace the call to Associated_Collection
5346         with Finalization_Master.
5347         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5348         create calls to routines Allocate_Any_Controlled and
5349         Deallocate_Any_Controlled.
5350         (Find_Finalize_Address): New routine.
5351         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5352         comparison.
5353         (Requires_Cleanup_Actions): Update the comment on freeze node
5354         inspection.
5355         * exp_util.ads: Remove comment on generated code for
5356         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5357         is better to simply look in the body.
5358         * freeze.adb (Freeze_All): Update the comment of finalization
5359         collections. Replace the call to Associated_Collection with
5360         Finalization_Master. Replace the call to Build_Finalization_Collection
5361         with Build_Finalization_Master.
5362         * impunit.adb: Add a-undesu and s-stposu to the list of units.
5363         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5364         a-fihema.
5365         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5366         Ada.Finalization. Add processing for children of System.Storage_Pools.
5367         * rtsfind.ads: Remove the naming of second level children of
5368         Ada.Finalization.
5369         Remove Ada_Finalization_Heap_Management from the list of units.
5370         Remove subtype Ada_Finalization_Child.
5371         Remove the following subprogram entities:
5372         
5373            RE_Allocate
5374            RE_Deallocate
5375            RE_Finalization_Collection
5376            RE_Finalization_Collection_Ptr
5377            RE_Set_Finalize_Address_Ptr
5378         
5379         Add the naming of second level children of System.Storage_Pools.
5380         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5381         the list of units.
5382         Add subtype System_Storage_Pools_Child.
5383         Add the following subprogram entities to System.Finalization_Masters:
5384         
5385            RE_Finalization_Master
5386            RE_Finalization_Master_Ptr
5387         
5388         Add the following subprogram entities to System.Storage_Pools.Subpools:
5389         
5390            RE_Allocate_Any_Controlled
5391            RE_Deallocate_Any_Controlled
5392            RE_Root_Storage_Pool_With_Subpools
5393            RE_Root_Subpool
5394            RE_Subpool_Handle
5395         
5396         Move the following subprogram entities from
5397         Ada.Finalization.Heap_Management to System.Finalization_Masters:
5398         
5399            RE_Add_Offset_To_Address
5400            RE_Attach
5401            RE_Base_Pool
5402            RE_Detach
5403         
5404         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5405         Set_Associated_Collection with Set_Finalization_Master.
5406         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5407         BIP_Finalization_Master is created.
5408         * s-finmas.adb: New unit System.Finalization_Masters.
5409         * s-finmas.ads: New unit System.Finalization_Masters.
5410         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5411         * s-stposu.ads, s-stposu.adb: New unit implementing
5412         System.Storage_Pools.Subpools.
5413
5414 2011-08-29  Bob Duff  <duff@adacore.com>
5415
5416         * tbuild.adb: Add assertion.
5417
5418 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5419
5420         * s-pooglo.adb: Minor reformatting.
5421
5422 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5423
5424         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5425         an indexed component of a packed array whose element type is a record
5426         with a representation clause different from that of the right-hand
5427         side, generate a temporary to minimuze the number of bit-field
5428         operations generated.
5429
5430 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5431
5432         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5433         declarations, and thus are likely insertion points for actions.
5434
5435 2011-08-29  Bob Duff  <duff@adacore.com>
5436
5437         * einfo.ads: Minor comment fix.
5438
5439 2011-08-29  Robert Dewar  <dewar@adacore.com>
5440
5441         * frontend.adb, gnat1drv.adb: Minor reformatting.
5442
5443 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5444
5445         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5446         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
5447         space in front of the header.
5448
5449 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5450
5451         * frontend.adb (Frontend): Exit after creating Standard package when
5452         -gnatd.H is present.
5453         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5454         present.
5455
5456 2011-08-29  Robert Dewar  <dewar@adacore.com>
5457
5458         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5459         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5460         snames.ads-tmpl: Minor reformatting.
5461
5462 2011-08-29  Philippe Gil  <gil@adacore.com>
5463
5464         * prj.adb (Reset_Units_In_Table): New procedure.
5465         Reset units to avoid access to freed memory.
5466
5467 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5468
5469         * get_scos.adb: When reading a P statement SCO without a pragma name
5470         (from an older ALI file), ensure that the Pragma_Name component is set
5471         to Unknown_Pragma (not left uninitialized).
5472
5473 2011-08-29  Vincent Celier  <celier@adacore.com>
5474
5475         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5476         modified to compute correctly the object path of a SAL project that is
5477         extending another library project.
5478         (Write_Path_File): New procedure.
5479         * makeutl.ads (Directories): New table moved from Buildgpr
5480         (Get_Directories): New procedure moved from Buildgpr
5481         (Write_Path_File): New procedure
5482         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5483         paths before binding SALs, instead of Set_Ada_Paths.
5484         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5485         Prj.
5486         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5487         (Current_Source_Path_File_Of): New function
5488         (Set_Current_Object_Path_File_Of): New procedure
5489         (Current_Source_Object_File_Of): New function
5490         (Set_Current_Object_Path_File_Of): New procedure
5491         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5492         (Current_Source_Path_File_Of): New function
5493         (Set_Current_Object_Path_File_Of): New procedure
5494         (Current_Source_Object_File_Of): New function
5495         (Set_Current_Object_Path_File_Of): New procedure
5496
5497 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5498
5499         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5500         packed entity, use a bit-field assignment only if there is no change of
5501         representation.
5502
5503 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5504
5505         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5506         Is_RTU instead of using Chars comparisons.
5507
5508 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5509
5510         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5511         temporary object if the actual is constrained, and the discriminants
5512         read from the stream don't match.
5513
5514 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5515
5516         * sem_attr.adb, exp_attr.adb: Add handling of
5517         Attribute_System_Allocator_Alignment
5518         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5519         Attribute_System_Allocator_Alignment.
5520         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5521         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5522         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5523         get_target_system_allocator_alignment.
5524
5525 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5526
5527         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5528         dependencies.
5529
5530 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5531
5532         * exp_ch3.adb (In_Runtime): Fix typo.
5533
5534 2011-08-29  Bob Duff  <duff@adacore.com>
5535
5536         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5537
5538 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5539
5540         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5541         and a separate tag assignment is generated, ensure that the tag
5542         assignment is analyzed.
5543
5544 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5545
5546         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5547         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5548         of statement lists that may contain local declarations.
5549         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5550         duplicate the triggering statements needed for the expansion of this
5551         construct, when the trigger is a dispatching call to a synchronized
5552         primitive.
5553
5554 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5555
5556         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5557         * bindgen.adb: Add comments.
5558         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5559         in CodePeer mode.
5560
5561 2011-08-29  Robert Dewar  <dewar@adacore.com>
5562
5563         * exp_attr.adb: Minor reformatting.
5564         Minor code reorganization and commenting.
5565         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5566         reformatting.
5567
5568 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5569
5570         * get_scos.adb: Ignore chaining indicators not currently supported
5571         by Ada.
5572
5573 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5574
5575         * system.ads: Minor editing.
5576
5577 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5578
5579         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5580         CodePeer mode.
5581         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5582         Attribute_Elab_Subp_Body.
5583         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5584         * sem_util.adb: Update comments.
5585
5586 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5587
5588         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5589         pragma name for each SCO statement corresponding to a pragma.
5590
5591 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5592
5593         * opt.ads: Minor editing.
5594
5595 2011-08-29  Yannick Moy  <moy@adacore.com>
5596
5597         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5598         that only made sense for CodePeer mode.
5599
5600 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5601
5602         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5603         which is no longer used.
5604         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5605         handling of the 64-bit division check.
5606         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5607         division available.
5608         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5609         longer used.
5610
5611 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5612
5613         * get_scos.adb: Minor reformatting.
5614
5615 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5616
5617         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5618         statement list is wrapped in a block, the block is explicitly analyzed
5619         in order to properly redecorate the entities and create a servicing
5620         finalizer.
5621
5622 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5623
5624         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5625         (Set_Zero_Cost_Handling): Remove.
5626
5627 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5628
5629         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5630
5631 2011-08-29  Geert Bosch  <bosch@adacore.com>
5632
5633         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5634         instruction, as the latter may produce -0.0, which is not a valid VAX
5635         F float number.
5636         (Neg_G): Likewise for VAX F float.
5637
5638 2011-08-29  Robert Dewar  <dewar@adacore.com>
5639
5640         * exp_util.adb: Minor reformatting.
5641
5642 2011-08-29  Yannick Moy  <moy@adacore.com>
5643
5644         * sem_ch3.adb: Minor comment update.
5645
5646 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5647
5648         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5649         the operand type.
5650
5651 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5652
5653         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5654         current statement sequence on a generic instantiation or a subprogram
5655         declaration.
5656
5657 2011-08-29  Robert Dewar  <dewar@adacore.com>
5658
5659         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5660         Minor reformatting.
5661
5662 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5663
5664         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5665         Correct the check which involves the freeze node of a controlled or
5666         access-to-controlled type.
5667
5668 2011-08-29  Geert Bosch  <bosch@adacore.com>
5669
5670         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5671         statements.
5672         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5673         Asm statements.
5674
5675 2011-08-29  Yannick Moy  <moy@adacore.com>
5676
5677         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5678         for every index type and component type that is not a subtype_mark.
5679         (Process_Subtype): Set Etype of subtype.
5680
5681 2011-08-29  Robert Dewar  <dewar@adacore.com>
5682
5683         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5684         reorganization.  Minor reformatting.
5685
5686 2011-08-29  Steve Baird  <baird@adacore.com>
5687
5688         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5689         for CodePeer and ALFA modes.
5690
5691 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5692
5693         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5694         that comes from an enclosing scope if it is not the renaming of an
5695         actual, to handle properly a spurious ambiguity in an instance.
5696
5697 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
5698
5699         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5700         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
5701         use it instead of the Esize of the first parameter.
5702         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5703         above change.
5704         <Size>: Likewise.  Call it for composite types on the RM size.
5705
5706 2011-08-29  Yannick Moy  <moy@adacore.com>
5707
5708         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5709         * sem_util.adb (Unique_Name): Correct behaviour for names of
5710         compilation units.
5711
5712 2011-08-29  Yannick Moy  <moy@adacore.com>
5713
5714         * sem_prag.adb (Check_Precondition_Postcondition): In formal
5715         verification mode, analyze pragma expression for correctness, for
5716         pre/post on library-level subprogram, as it is not expanded later.
5717
5718 2011-08-29  Yannick Moy  <moy@adacore.com>
5719
5720         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5721         in formal verification.
5722
5723 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5724
5725         * sem_util.adb: Minor reformatting.
5726         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5727         there's no pragma.
5728         * par_sco.ads, par_sco.adb: Update comments.
5729
5730 2011-08-29  Yannick Moy  <moy@adacore.com>
5731
5732         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5733         associated getter/setter.
5734         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5735
5736 2011-08-29  Vincent Celier  <celier@adacore.com>
5737
5738         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5739         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5740         with declarations for Language_Kind and Dependency_Kind for Ada.
5741         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5742         (Process_Compiler): Take into account the new attributes Dependency_Kind
5743         and Language_Kind.
5744         (Check_Configuration): Check if language kind is unit based, not if the
5745         language name is Ada.
5746         (Process_Exceptions_Unit_Based): Ditto
5747         (Add_Language): Remove default additions of language and dependency kind
5748         * prj.ads: Minor comment change
5749         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5750
5751 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5752
5753         * debug.adb: Update comments.
5754
5755 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
5756
5757         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5758         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5759         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5760         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5761         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5762
5763 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5764
5765         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5766         (GNATLIBCFLAGS_FOR_C): Replace
5767         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5768         (gnatlib-shared-default, gnatlib-shared-dual-win32)
5769         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5770         (gnatlib-sjlj, gnatlib-zcx): Likewise.
5771
5772 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
5773
5774         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5775
5776         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5777
5778         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5779
5780 2011-08-05  Nicolas Roche  <roche@adacore.com>
5781
5782         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5783         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5784         canadian cross.
5785         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5786
5787 2011-08-05  Matthew Heaney  <heaney@adacore.com>
5788
5789         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5790         subprogram bodies declared out-of-order.
5791
5792 2011-08-05  Yannick Moy  <moy@adacore.com>
5793
5794         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5795         entities directly in package Standard, otherwise skip the standard
5796         prefix.
5797
5798 2011-08-05  Robert Dewar  <dewar@adacore.com>
5799
5800         * a-cbmutr.adb: Minor reformatting
5801         (Allocate_Node): refactor node allocation algorithm
5802
5803 2011-08-05  Robert Dewar  <dewar@adacore.com>
5804
5805         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5806         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5807         mode.
5808         (Analyze_Pragma, case Check_Policy): Ditto.
5809         * sem_prag.ads (Check_Disabled): New function
5810         * snames.ads-tmpl: Add Name_Disable.
5811
5812 2011-08-05  Robert Dewar  <dewar@adacore.com>
5813
5814         * gnat_rm.texi: Document implementation-defined policy DISABLE for
5815         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5816
5817 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
5818
5819         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5820         that appears in a generic formal part and applies to a formal
5821         subprogram.
5822
5823 2011-08-05  Robert Dewar  <dewar@adacore.com>
5824
5825         * a-cbmutr.ads: Minor reformatting.
5826
5827 2011-08-05  Matthew Heaney  <heaney@adacore.com>
5828
5829         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5830         to check count, check sign of value instead.
5831         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5832         (Copy_Subtree): allocate copy of source element
5833         (Equal_Subtree): compare elements, not access objects
5834
5835 2011-08-05  Vincent Celier  <celier@adacore.com>
5836
5837         * gnat_ugn.texi: Fix VMS alternative.
5838
5839 2011-08-05  Thomas Quinot  <quinot@adacore.com>
5840
5841         * sem_ch11.adb: Add comment.
5842
5843 2011-08-05  Robert Dewar  <dewar@adacore.com>
5844
5845         * exp_util.adb: Minor comment fix.
5846
5847 2011-08-05  Robert Dewar  <dewar@adacore.com>
5848
5849         * scng.adb (Error_Unterminated_String): Improve flag position when
5850         comma present.
5851
5852 2011-08-05  Matthew Heaney  <heaney@adacore.com>
5853
5854         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5855         tree containers).
5856         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5857         multiway tree containers.
5858
5859 2011-08-05  Robert Dewar  <dewar@adacore.com>
5860
5861         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5862         * stylesw.adb: Implement -gnatyC to control comment spacing
5863         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5864         -gnatyc/C).
5865         * usage.adb: Add line for -gnatyC.
5866
5867 2011-08-05  Robert Dewar  <dewar@adacore.com>
5868
5869         * gnat_ugn.texi: Document -gnatyC.
5870         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5871         synonym for COMMENTS2).
5872
5873 2011-08-05  Robert Dewar  <dewar@adacore.com>
5874
5875         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5876         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5877         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5878         a-comutr.ads, lib-xref.adb: Minor reformatting.
5879
5880 2011-08-05  Robert Dewar  <dewar@adacore.com>
5881
5882         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5883         warning if there is an exception handler present.
5884
5885 2011-08-05  Pascal Obry  <obry@adacore.com>
5886
5887         * a-iteint.ads: Fix copyright year.
5888
5889 2011-08-05  Thomas Quinot  <quinot@adacore.com>
5890
5891         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5892         statement SCO for a USE clause or a representation clause.
5893
5894 2011-08-05  Yannick Moy  <moy@adacore.com>
5895
5896         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5897         between body and spec for stub.
5898         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5899         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5900         pragma precondition or postcondition, for which the enclosing
5901         subprogram or package in the AST is not the desired one, return empty.
5902
5903 2011-08-05  Thomas Quinot  <quinot@adacore.com>
5904
5905         * g-expect.adb: Minor reformatting.
5906
5907 2011-08-05  Bob Duff  <duff@adacore.com>
5908
5909         * a-fihema.adb: Comment out OS_Lib.
5910
5911 2011-08-05  Matthew Heaney  <heaney@adacore.com>
5912
5913         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5914         (unbounded multiway tree containers) and a-iteint.ads.
5915         * a-comutr.ads, a-comutr.adb:
5916         This is the new Ada 2012 unit for unbounded multiway tree containers
5917         * a-cimutr.ads, a-cimutr.adb
5918         This is the new Ada 2012 unit for indefinite multiway tree containers
5919         * a-iteint.ads: New file.
5920
5921 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5922
5923         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
5924
5925 2011-08-05  Bob Duff  <duff@adacore.com>
5926
5927         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5928         subpools.
5929         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5930
5931 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
5932
5933         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5934         general indexing aspects of Ada2012. Called when analyzing indexed
5935         components when other interpretations fail.
5936         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5937         in an expression context where overloading is meaningful. This excludes
5938         the occurrence in an aspect specification (efficiency only).
5939         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5940         related to iterators can be set by an attribute specification, but
5941         cannot be queried.
5942         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5943         Constant_Indexing and Variable_Indexing.
5944         (Check_Indexing_Functions): New procedure to perform legality checks.
5945         Additional semantic checks at end of declarations.
5946
5947 2011-08-05  Sergey Rybin  <rybin@adacore.com>
5948
5949         * tree_io.ads: Update ASIS_Version_Number because of the change of the
5950         order of calling Tree_Write/Tree_Read routines made for aspects.
5951
5952 2011-08-05  Bob Duff  <duff@adacore.com>
5953
5954         * a-fihema.adb (Finalize): Fix race condition.
5955
5956 2011-08-05  Yannick Moy  <moy@adacore.com>
5957
5958         * sem_ch12.adb (Analyze_Package_Instantiation,
5959         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5960         mode.
5961
5962 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
5963
5964         * sem_type.adb (Specific_Type): in an instance, the type-specific
5965         operand of an equality check that involves null may have a private
5966         type. Use full view to determine legality of construct.
5967
5968 2011-08-05  Vincent Celier  <celier@adacore.com>
5969
5970         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5971         delete or close the file when the call to gnatmake was successful.
5972
5973 2011-08-05  Yannick Moy  <moy@adacore.com>
5974
5975         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5976         Global_Discard_Names.
5977
5978 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
5979
5980         * sinfo.ads: comments on use of entity field for aspect specifications.
5981
5982 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
5983
5984         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5985         node is not itself an entity but a selected component, it is a
5986         rewritten parameterless call to an en enclosing synchronized operation,
5987         and this expansion will be performed again in the instance, so there is
5988         no global information to preserve.
5989
5990 2011-08-05  Javier Miranda  <miranda@adacore.com>
5991
5992         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5993         for renamings of predefined primitives.
5994         (In_Predef_Prims_DT): New subprogram.
5995
5996 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
5997
5998         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5999         possible interpretation of name is a reference type, add an
6000         interpretation that is the designated type of the reference
6001         discriminant of that type.
6002         * sem_res.adb (resolve): If the interpretation imposed by context is an
6003         implicit dereference, rewrite the node as the deference of the
6004         reference discriminant.
6005         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6006         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6007         parent type or base type.
6008         * sem_ch4.adb (Process_Indexed_Component,
6009         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6010         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6011         Check for implicit dereference.
6012         (List_Operand_Interps): Indicate when an implicit dereference is
6013         ambiguous.
6014         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6015
6016 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6017
6018         * scos.ads: Update documentation of SCO table. Pragma statements can now
6019         be marked as disabled (using 'p' instead of 'P' as the statement kind).
6020         * par_sco.ads, par_sco.adb: Implement the above change.
6021         (Process_Decisions_Defer): Generate a P decision for the first parameter
6022         of a dyadic pragma Debug.
6023         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6024         necessary.
6025         * put_scos.adb: Code simplification based on above change.
6026
6027 2011-08-05  Robert Dewar  <dewar@adacore.com>
6028
6029         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6030         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6031         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6032         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6033
6034 2011-08-05  Bob Duff  <duff@adacore.com>
6035
6036         * a-stunau.ads, g-spipat.adb: Update comments.
6037
6038 2011-08-05  Bob Duff  <duff@adacore.com>
6039
6040         * a-fihema.ads: Minor comment fix.
6041         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6042         correct.
6043         (Attach, Detach): Remove some unnecessary code.
6044         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6045
6046 2011-08-05  Bob Duff  <duff@adacore.com>
6047
6048         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6049         allocation for Objects component. This simplifies the code somewhat. It
6050         is also a little more efficient in the not-so-unusual case where there
6051         are no controlled objects allocated.
6052         Make Finalization_Started flag atomic.
6053         (Finalize): Avoid unnecessary detachment of items from the list.
6054         (pcol): Minor cleanup.
6055
6056 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6057
6058         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6059         package whose name is the same as that of the generic unit, or its
6060         ultimate prefix.
6061
6062 2011-08-05  Bob Duff  <duff@adacore.com>
6063
6064         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6065         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6066         Minor comment fixes.
6067
6068 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
6069
6070         * make.adb (Linking_Phase): No longer need to set source search path
6071         before calling gnatlink in CodePeer mode.
6072         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6073         gcc in CodePeer mode, since the binder generated file no longer has a
6074         'with Main'.
6075         * switch.ads, switch.adb (Is_Language_Switch): Removed.
6076         * switch-c.adb: Update comment.
6077
6078 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6079
6080         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6081
6082 2011-08-05  Nicolas Roche  <roche@adacore.com>
6083
6084         * gnat_ugn.texi: Fix minor syntax error issue.
6085
6086 2011-08-05  Vincent Celier  <celier@adacore.com>
6087
6088         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6089         delete or close the file when the call to gnatmake returns a non
6090         successful return code.
6091
6092 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6093
6094         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6095         check, indicate that the copy of the original node does not come from
6096         source, to prevent an infinite recursion of the expansion.
6097
6098 2011-08-05  Johannes Kanig  <kanig@adacore.com>
6099
6100         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6101         VC generation for subprogram bodies.
6102
6103 2011-08-05  Yannick Moy  <moy@adacore.com>
6104
6105         * einfo.ads: Typo.
6106         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6107         the base type with the smallest allowed base type.
6108
6109 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6110
6111         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6112         aspects.
6113
6114 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6115
6116         * sem_ch12.ads: minor comment updates.
6117
6118 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6119
6120         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6121         instantiation and a formal package the compiler generates a package
6122         renaming declaration so that the generic name within the declaration
6123         is interpreted as a renaming of the instance. At the end of a formal
6124         package declaration, this renaming must become invisible.
6125
6126 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6127
6128         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6129         comparison and rely on concrete entities instead.
6130
6131 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6132
6133         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6134         and discriminants, to indicate that the type has an access discriminant
6135         that supports implicit dereference.
6136         * snames.ads-tmpl: Add names of aspects and attributes related to
6137         Ada2012 iterators: constant_indexing, default_iterator,
6138         iterator_element, implicit_dereference, variable_indexing.
6139         * aspects.ads, aspects.adb: entries for iterator-related aspects.
6140         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6141         iterator-related aspects.
6142         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6143
6144 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6145
6146         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6147         metrics in gnatmetric to cover new kinds of coupling mentrics.
6148
6149 2011-08-05  Steve Baird  <baird@adacore.com>
6150
6151         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6152         of calling the user-defined main subprogram.
6153         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
6154         is set) Call_Main_Subprogram ahead of, as opposed to
6155         inside of, Main.
6156         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6157         generation of a "with" of the user-defined main subprogram.
6158         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6159         (which is now called from Gen_Main instead).
6160
6161 2011-08-05  Emmanuel Briot  <briot@adacore.com>
6162
6163         * projects.texi: Added reference to the Makefile package.
6164
6165 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6166
6167         * exp_ch7.adb: Minor comment rewording.
6168
6169 2011-08-05  Ed Falis  <falis@adacore.com>
6170
6171         * env.c: Fix comment.
6172
6173 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6174
6175         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6176         character comparison and rely on concrete entities instead.
6177
6178 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6179
6180         * sem_ch3.adb: (Check_Private_Overriding): better error message,
6181         suggested by AI95-0068.
6182
6183 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6184
6185         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6186         the two potential initialization calls. This accounts for any
6187         access-before-elaboration checks which may precede the initialization
6188         calls.
6189         (Next_Suitable_Statement): New routine. Returns the next real statement
6190         after the input node while skipping generated checks.
6191         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6192         with comment on usage.
6193         Do not generate Elaborate_All when the trigger is a finalization call
6194         coming from a type init proc.
6195         (Check_Elab_Call): Propagate the initialization procedure context to
6196         subsequent calls to Check_A_Call.
6197         (Check_Internal_Call_Continue): Propagate the initialization procedure
6198         context to subsequent calls to Check_Elab_Call.
6199         (Is_Finalization_Procedure): New routine. Returns True if the input
6200         entity denotes a [Deep_]Finalize routine.
6201         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6202         along with comment on usage.
6203
6204 2011-08-05  Vadim Godunko  <godunko@adacore.com>
6205
6206         * s-atocou.ads: Add list of supported platforms.
6207
6208 2011-08-05  Yannick Moy  <moy@adacore.com>
6209
6210         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6211
6212         * opt.ads (Disable_ALI_File): new Boolean flag
6213         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6214
6215 2011-08-05  Ed Falis  <falis@adacore.com>
6216
6217         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6218         environ is properly defined.
6219
6220 2011-08-05  Vincent Celier  <celier@adacore.com>
6221
6222         * make.adb (Compilation_Phase): Exit immediately when all objects have
6223         been found up to date, to avoid multiple exit messages.
6224         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6225         same project for languages with no compiler.
6226         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6227         -eI.
6228 2011-08-05  Robert Dewar  <dewar@adacore.com>
6229
6230         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6231         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6232         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6233         s-atocou-builtin.adb: Minor reformatting.
6234
6235 2011-08-05  Yannick Moy  <moy@adacore.com>
6236
6237         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6238         if the node to wrap is a pragma check, this node and enclosed
6239         expression are not expanded, so do not apply any transformations here.
6240         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6241         introducing transient scopes.
6242
6243 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
6244
6245         * adaint.c (__gnat_set_writable, __gnat_set_readable,
6246         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6247         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6248         routine is available, so we use the default implementation of these
6249         functions.
6250         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6251         support for copying attributes on VxWorks 6.
6252
6253 2011-08-05  Yannick Moy  <moy@adacore.com>
6254
6255         * debug.adb: Remove use of -gnatd.D.
6256         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6257         * opt.ads: Simplify variables for ALFA mode, to keep one only
6258         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6259         to ALFA mode.
6260
6261 2011-08-05  Vincent Celier  <celier@adacore.com>
6262
6263         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6264         Builder'Default_Switches.
6265
6266 2011-08-05  Vincent Celier  <celier@adacore.com>
6267
6268         * makeusg.adb: Add lines for --create-map-file switches.
6269
6270 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6271
6272         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6273         profile is incomplete and the full view is available, replace it with
6274         the full view.
6275         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6276         incomplete, freezing the subprogram is delayed until the full view is
6277         frozen.
6278         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6279         fixed-point multiplication operator and the predefined operator is
6280         resolved in favor of the user-defined one.
6281
6282 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6283
6284         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6285         CONST_CAST.
6286
6287 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6288
6289         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6290         whether a type lacks user-defined Read or Write operations, or has a
6291         component that lacks them.
6292         * sem_attr.adb (Check_Stream_Attribute): if restriction
6293         No_Default_Stream_Attributes is active, verify that all subcomponent
6294         types of the target have user-defined stream operations, and report
6295         error otherwise.
6296         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6297         * exp_strm.adb: Build_Elementary_Input_Call,
6298         Build_Elementary_Write_Call): remove checks for restriction
6299         No_Default_Stream_Attributes, now checked in semantics.
6300
6301 2011-08-04  Vincent Celier  <celier@adacore.com>
6302
6303         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6304         switches on the command line, look for all valid --RTS switches in the
6305         Builder switches and for each language use the first runtime name found
6306         to invoke gprconfig.
6307         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6308         command line and there is no auto-configuration.
6309         (Runtime_Name_Set_For): New function.
6310
6311 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6312
6313         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6314         elaborate initialization expression for variable Abort when processing
6315         a package body or a declaration.
6316         (Create_Finalizer): Propagate the package context when creating the
6317         exception-related variables.
6318         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6319         For_Package along with usage comment.
6320
6321 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6322
6323         * gcc-interface/Makefile.in: Clean up targets.
6324         Enable new package for atomic counters and copy-on-write implementation
6325         of unbounded strings on x86 platforms.
6326         * gcc-interface/Make-lang.in: Update dependencies.
6327
6328 2011-08-04  Robert Dewar  <dewar@adacore.com>
6329
6330         * exp_ch7.adb: Minor reformatting.
6331
6332 2011-08-04  Robert Dewar  <dewar@adacore.com>
6333
6334         * exp_strm.adb: Minor reformatting.
6335
6336 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6337
6338         * s-atocou.adb: Replace by dummy version and use on targets where atomic
6339         operations are not supported.
6340         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6341         * s-atocou-x86.adb: New file.
6342         * Makefile.rtl: Add s-atocou.o file
6343
6344 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6345
6346         * make.adb (Compile): Move setting of CodePeer_Mode to ...
6347         (Compilation_Phase): ... here.
6348         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6349
6350 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6351
6352         * Make-generated.in: Fix minor typo in comment.
6353
6354 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6355
6356         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6357         the project path.
6358
6359 2011-08-04  Robert Dewar  <dewar@adacore.com>
6360
6361         * a-coinho.adb: Minor reformatting.
6362
6363 2011-08-04  Robert Dewar  <dewar@adacore.com>
6364
6365         * a-coinho.ads: Minor reformatting.
6366
6367 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6368
6369         * s-atocou.ads, s-atocou.adb: New files.
6370         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6371         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6372         direct use of GCC's atomic builtins and replace them by use of new
6373         atomic counter package.
6374
6375 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6376
6377         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6378
6379 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6380
6381         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6382         with a call to Get_External_Tag.
6383         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6384         subprogram usage. Remove the guard against package declarations and
6385         bodies since Build_Cleanup_Statements is no longer invoked in that
6386         context.
6387         (Build_Components): Initialize Tagged_Type_Stmts when the context
6388         contains at least one library-level tagged type.
6389         (Build_Finalizer): New local variables Has_Tagged_Types and
6390         Tagged_Type_Stmts along with associated comments on usage. Update the
6391         logic to include tagged type processing.
6392         (Create_Finalizer): Insert all library-level tagged type unregistration
6393         code before the jump block circuitry.
6394         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6395         (Expand_N_Package_Declaration): Remove the call to
6396         Build_Cleanup_Statements.
6397         (Process_Tagged_Type_Declaration): New routine. Generate a call to
6398         unregister the external tag of a tagged type.
6399         (Processing_Actions): Reimplemented to handle tagged types.
6400         (Process_Declarations): Detect the declaration of a library-level
6401         tagged type and carry out the appropriate actions.
6402         (Unregister_Tagged_Types): Removed. The machinery has been directly
6403         merged with Build_Finalizer.
6404
6405 2011-08-04  Robert Dewar  <dewar@adacore.com>
6406
6407         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6408         gnatls.adb, exp_ch3.adb: Minor reformatting.
6409
6410 2011-08-04  Marc Sango  <sango@adacore.com>
6411
6412         * sem_attr.adb (Analyze_Attribute): Replace the message
6413         "invisible attribute of}" of the spark restriction violation in
6414         attribute reference by the simple message "invisible attribute of type".
6415         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6416         two insertion characters: '&' and '}'.
6417
6418 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6419
6420         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6421         * a-coinho.ads, a-coinho.adb: New file.
6422         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6423
6424 2011-08-04  Nicolas Roche  <roche@adacore.com>
6425
6426         * alfa_test.adb: Not all ali files are containing alfa information even
6427         if compiled with -gnatd.F. So suppress warning about missing ALFA
6428         information.
6429
6430 2011-08-04  Yannick Moy  <moy@adacore.com>
6431
6432         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6433         scope.
6434         * put_alfa.adb: Check that scope name is not empty.
6435
6436 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6437
6438         * exp_ch3.adb (Stream_Operation_Ok): new predicate
6439         Needs_Elementary_Stream_Operation, to determine whether user-defined
6440         Read and Write attributes are available for the elementary components
6441         of the given type. If only the predefined attributes are available,
6442         then when restriction No_Default_Stream_Attributes is active the
6443         predefined stream attributes for the composite type cannot be created.
6444
6445 2011-08-04  Robert Dewar  <dewar@adacore.com>
6446
6447         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6448         Put routines in alpha order
6449
6450 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
6451
6452         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6453         * gcc-interface/Make-lang.in: Update dependencies.
6454
6455 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6456
6457         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6458         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6459         gnat1why).
6460
6461 2011-08-04  Robert Dewar  <dewar@adacore.com>
6462
6463         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6464         lib-xref-alfa.adb: Minor reformatting.
6465
6466 2011-08-04  Marc Sango  <sango@adacore.com>
6467
6468         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6469         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6470         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6471         mode.
6472
6473 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6474
6475         * bindgen.adb (Gen_Adainit_C): Remove.
6476         (Gen_Adafinal_C): Ditto.
6477         (Gen_Elab_Externals_C): Ditto.
6478         (Gen_Elab_Calls_C): Ditto.
6479         (Gen_Elab_Order_C): Ditto.
6480         (Gen_Elab_Defs_C): Ditto.
6481         (Gen_Finalize_Library_C): Ditto.
6482         (Gen_Finalize_Library_Defs_C): Ditto.
6483         (Gen_Main_C): Ditto.
6484         (Gen_Output_File_C): Ditto.
6485         (Gen_Restrictions_C): Ditto.
6486         (Gen_Versions_C): Ditto.
6487         (Write_Info_Ada_C): Ditto.
6488         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6489         (Gen_Output_File): Do not force Ada_Bind_File anymore.
6490         Always call Gen_Output_File_Ada.
6491         * gnatlink.adb (Begin_Info): Now a constant.
6492         (End_Info): Ditto.
6493         (Ada_Bind_File): Remove
6494         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
6495         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6496         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6497         * opt.ads (Ada_Bind_File): Remove.
6498
6499 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6500
6501         * projects.texi: Document target-specific directory in default project
6502         path for gnatmake.
6503
6504 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6505
6506         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6507         path in all cases .
6508
6509 2011-08-04  Yannick Moy  <moy@adacore.com>
6510
6511         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6512         opt.ads, lib-xref.ads: Code clean up.
6513
6514 2011-08-04  Yannick Moy  <moy@adacore.com>
6515
6516         * gnat_rm.texi: Update description of Test_Case
6517         * gnat_ugn.texi: Typo.
6518
6519 2011-08-04  Ed Falis  <falis@adacore.com>
6520
6521         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6522
6523 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6524
6525         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6526         it is of type Root_Controlled. This action eliminates fields Prev and
6527         Next from type equality.
6528
6529 2011-08-04  Yannick Moy  <moy@adacore.com>
6530
6531         * lib-xref-alfa.adb: Correct typo.
6532
6533 2011-08-04  Matthew Heaney  <heaney@adacore.com>
6534
6535         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6536         component.
6537
6538 2011-08-04  Yannick Moy  <moy@adacore.com>
6539
6540         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6541         (Analyze_Pragma): allow static string expression for name of Test_Case,
6542         instead of simply string literals.
6543         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6544         expressions.
6545
6546 2011-08-04  Vincent Celier  <celier@adacore.com>
6547
6548         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6549         case suffixes to find truncated main sources.
6550
6551 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6552
6553         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6554         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6555         (Compute_Current_Task): Ditto.
6556
6557 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6558
6559         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6560
6561 2011-08-04  Yannick Moy  <moy@adacore.com>
6562
6563         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6564         library-level constant.
6565         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6566         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6567         used as selector of parameter association, in ALFA mode.
6568
6569 2011-08-04  Robert Dewar  <dewar@adacore.com>
6570
6571         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6572         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6573         reformatting.
6574
6575 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6576
6577         * make.adb (Linking_Phase): Set source search path before calling
6578         gnatlink in CodePeer mode.
6579
6580 2011-08-04  Javier Miranda  <miranda@adacore.com>
6581
6582         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6583         Remove code which takes care of building TSDs.
6584         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6585         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6586         the accessibility check in VM targets.
6587         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6588         (Building_Static_DT): Now returns false for VM targets.
6589         (Build_VM_TSDs): Removed.
6590         (Expand_Interface_Conversion): Generate missing runtime check for
6591         conversions to interface types whose target type is unknown at compile
6592         time.
6593         (Make_VM_TSD): Add missing code to disable the generation of calls to
6594         Check_TSD if the tagged type is not defined at library level, or not
6595         has a representation clause specifying its external tag, or -gnatdQ is
6596         active.
6597         * exp_disp.ads (Build_VM_TSDs): Removed.
6598         (Make_VM_TSDs): Spec relocated from exp_disp.adb
6599         * sem_disp.adb (Check_Dispatching_Operation): No code required to
6600         register primitives in the dispatch tables in VM targets.
6601         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6602         initialization of class-wide interface objects in VM targets.
6603         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6604         of Make_DT).
6605
6606 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
6607
6608         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6609         when dotnet-ld cannot be found.
6610
6611 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6612
6613         * bindgen.adb: Simplify significantly generation of binder body file in
6614         CodePeer mode.
6615         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6616         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6617         not expanded).
6618
6619 2011-08-04  Yannick Moy  <moy@adacore.com>
6620
6621         * sem_prag.adb, sem.ads: Code cleanup.
6622
6623 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6624
6625         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6626         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6627         results if possible.
6628         * s-stusta.adb (Print): Adjust after changes in s-stausa.
6629         * gnat_ugn.texi: Update dynamic stack usage section.
6630
6631 2011-08-04  Steve Baird  <baird@adacore.com>
6632
6633         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6634         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6635         contains only a call to the user-defined main subprogram.
6636         (Gen_Main_Ada) - If CodePeer_Mode is set, then
6637         call the "wrapper" subprogram instead of directly
6638         calling the user-defined main subprogram.
6639
6640 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6641
6642         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6643         alternatives of a case statement for controlled objects. Rename local
6644         variable A to Dead_Alt.
6645         (Expand_N_If_Statement): Check the then and else statements of an if
6646         statement for controlled objects. Check the then statements of all
6647         elsif parts of an if statement for controlled objects.
6648         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6649         objects.
6650         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6651         detects a loop associated with the expansion of an array object.
6652         Augment the processing of the loop statements to account for a possible
6653         wrap done by Process_Statements_For_Controlled_Objects.
6654         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6655         statements and abortable part of an asynchronous select for controlled
6656         objects.
6657         (Expand_N_Conditional_Entry_Call): Check the else statements of a
6658         conditional entry call for controlled objects.
6659         (Expand_N_Selective_Accept): Check the alternatives of a selective
6660         accept for controlled objects.
6661         (Expand_N_Timed_Entry_Call): Check the entry call and delay
6662         alternatives of a timed entry call for controlled objects.
6663         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6664         exception handler for controlled objects.
6665         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6666         Add formal parameter Nested_Constructs along with its associated
6667         comment.
6668         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6669         Requires_Cleanup_Actions.
6670         (Process_Statements_For_Controlled_Objects): New routine.
6671         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6672         routine. Inspect a node which contains a non-handled sequence of
6673         statements for controlled objects. If such an object is found, the
6674         statements are wrapped in a block.
6675
6676 2011-08-04  Bob Duff  <duff@adacore.com>
6677
6678         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6679         need to compare with Class_Wide_Type (T2), in order to get at the
6680         original class-wide type node.
6681         * sem_type.ads (Covers): Improve the comment.
6682         * einfo.ads (Class_Wide_Type): Improve the comment.
6683         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6684         the type of the Deref.
6685
6686 2011-08-04  Yannick Moy  <moy@adacore.com>
6687
6688         * gnat_rm.texi: Document that Test_Case pragma can only appear on
6689         separate declarations.
6690         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6691         check identifier of pragma argument.
6692         (Chain_TC): check that no other test case associated to the same entity
6693         share the same name.
6694         (Check_Test_Case): disallow test case inside subprogram body
6695         (Analyze_Pragma): correct call to check identifier and not argument
6696         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6697         function gets name from test case pragma.
6698
6699 2011-08-04  Yannick Moy  <moy@adacore.com>
6700
6701         * gnat_rm.texi: Document new pragma and aspect.
6702         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6703         (No_Duplicates_Allowed): new constant array defining whether duplicates
6704         aspects of each kind can appear on the same declaration.
6705         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6706         field, which points to a node holding the previous Spec_PPC_List.
6707         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6708         through the indirection with Contract.
6709         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6710         * par-prag.adb (Prag): do nothing on Test_Case pragma
6711         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6712         be called directly.
6713         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6714         component Ensures of Test_Case.
6715         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6716         (Analyze_Generic_Subprogram_Declaration,
6717         Analyze_Subprogram_Instantiation,
6718         Analyze_Abstract_Subprogram_Declaration,
6719         Analyze_Subprogram_Body_Helper,
6720         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6721         insert contract in subprogram node at point of definition
6722         * sem_ch13.adb
6723         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6724         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6725         corresponding pragma
6726         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6727         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6728         similar to the analysis of pre/post
6729         (Derive_Subprogram): insert contract in subprogram node at point of
6730         derivation.
6731         * sem_prag.adb, sem_prag.ads
6732         (Check_Arg_Is_String_Literal, Check_Identifier):
6733         new checking procedures to be called in treatment of pragmas
6734         (Check_Test_Case): new procedure to check that a Test_Case aspect or
6735         pragma is well-formed. This does not check currently that 'Result is
6736         used only in the Ensures component of a Test_Case.
6737         (Analyze_Pragma): add case for Test_Case
6738         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6739         components of a Test_Case.
6740         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6741         expressions in the 3rd (and 4th if present) arguments of a Test_Case
6742         pragma, treated as spec expressions.
6743         (Sig_Flags): add value -1 for Test_Case.
6744         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6745         Get_Requires_From_Test_Case_Pragma): getters for both expression
6746         components of a Test_Case.
6747         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6748         indirection between an entry or [generic] subprogram entity and its
6749         pre/post + test-cases.
6750         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6751         get/set for fields of an N_Contract node.
6752         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6753         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6754         names and pragma for Test_Case.
6755         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6756
6757 2011-08-04  Vincent Celier  <celier@adacore.com>
6758
6759         * gnat_ugn.texi: Improve documentation of gnatmake switch
6760         --source-info-file=.
6761
6762 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6763
6764         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6765         type). Initialize Atyp to the appropriate type which is later checked
6766         for completion. Rewrite the assertion associated with private type
6767         completion.
6768
6769 2011-08-04  Ed Falis  <falis@adacore.com>
6770
6771         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6772         initialize the number of CPUs.
6773
6774 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6775
6776         * sem_type.adb (Disambiguate): New subsidiary routine
6777         In_Same_Declaration_List, to implement AI05-0020: a user-defined
6778         equality on an anonymous access type whose designated type is private
6779         does not lead to an ambiguity with the universal access equality
6780         operator in the body or child units of the defining package. The same
6781         is true for a multiplication operator on a private type completed with
6782         a fixed-point-type.
6783
6784 2011-08-04  Javier Miranda  <miranda@adacore.com>
6785
6786         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6787         (Normalize_Scalars_Config): Removed.
6788         * opt.adb
6789         (Register_Opt_Config_Switches): Remove registering config values of
6790         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6791         (Restore_Opt_Config_Switches): Remove code which restores the values of
6792         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6793         Init_Or_Norm_Scalars.
6794         (Save_Opt_Config_Switches): Remove code which saves values of
6795         Init_Or_Norm_Scalars and Normalize_Scalars.
6796         (Set_Opt_Config_Switches): Remove code which restores config values of
6797         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6798         Init_Or_Norm_Scalars.
6799
6800 2011-08-04  Yannick Moy  <moy@adacore.com>
6801
6802         * frontend.adb (Frontend): remove previous patch to avoid full
6803         qualification in ALFA mode.
6804         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6805         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6806         unique name for an entity, which could be used to identify the entity
6807         across compilation units.
6808
6809 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6810
6811         * prj-env.adb
6812         (Initialize_Default_Project_Path): Add target specific directory
6813         ($prefix/$target/lib/gnat) in front of project path in all cases
6814         (making gnatmake's behaviour consistent with gprbuild).
6815         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6816         Pass target name from Sdefault to project subsystem.
6817         * gnatls.adb: Show new target specific default project directory.
6818
6819 2011-08-04  Johannes Kanig  <kanig@adacore.com>
6820
6821         * cstand.adb: Add Information to Identifier in Standard
6822         (Identifer_For): Set Entity to the corresponding entity
6823
6824 2011-08-04  Sergey Rybin  <rybin@adacore.com>
6825
6826         * gnat_ugn.texi: Update doc on gnatcheck.
6827
6828 2011-08-04  Yannick Moy  <moy@adacore.com>
6829
6830         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6831         xrefs in a scope.
6832
6833 2011-08-04  Yannick Moy  <moy@adacore.com>
6834
6835         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6836         performing expansion.
6837         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6838         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6839         it is not called in ALFA mode.
6840
6841 2011-08-04  Emmanuel Briot  <briot@adacore.com>
6842
6843         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6844         after all, so removed.
6845
6846 2011-08-04  Sergey Rybin  <rybin@adacore.com>
6847
6848         * vms_data.ads: Add missing VMS qualifiers.
6849
6850 2011-08-04  Emmanuel Briot  <briot@adacore.com>
6851
6852         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6853         the list of files on the command line after processing it through
6854         Complete_Mains.
6855
6856 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6857
6858         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6859         processing for .NET/JVM. These targets can now benefit from
6860         Raise_From_Controlled_Operation and they share the same processing with
6861         standard targets.
6862         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6863         These targets need transient scopes in order to properly finalize short
6864         lived controlled objects.
6865         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6866          NET/JVM. These targets can now benefit from
6867         Raise_From_Controlled_Operation and they share the same processing with
6868         standard targets.
6869
6870 2011-08-04  Geert Bosch  <bosch@adacore.com>
6871
6872         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6873
6874 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6875
6876         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6877         Expand_Record_Aggregate, to determine whether aggregate must be
6878         expanded into assignments. This is the case if the ancestor part is
6879         private, regarless of the setting of the flag Has_Private_Ancestor.
6880
6881 2011-08-04  Ed Falis  <falis@adacore.com>
6882
6883         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6884
6885 2011-08-04  Bob Duff  <duff@adacore.com>
6886
6887         * sinfo.ads: Fix comment.
6888
6889 2011-08-04  Steve Baird  <baird@adacore.com>
6890
6891         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6892         choose a package name in much the same way as is
6893         done for JGNAT when VM_Target /= No_VM, except that
6894         a slightly more distinctive prefix string is used.
6895
6896 2011-08-04  Emmanuel Briot  <briot@adacore.com>
6897
6898         * makeutl.adb (Complete_Mains): no longer accept unit names on the
6899         gnatmake command line.
6900         This behavior was never documented (and was supported only because of
6901         an early bug in the code). This case might lead to ambiguous cases
6902         (between unit names and truncated base names without suffixes).
6903
6904 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6905
6906         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6907         Remove the external tag of a tagged type from the internal hash table.
6908         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6909         expanded usage of the routine. Strenghten the check for Is_Master. Add
6910         processing for tagged types.
6911         (Build_Finalizer): Create all the necessary lists used in finalizer
6912         creation when the processed context is a package that may contain
6913         tagged types.
6914         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6915         Requires_Cleanup_Actions.
6916         (Expand_N_Package_Body): Package bodies may need clean up code
6917         depending on whether they contain tagged types.
6918         (Expand_N_Package_Declaration): Package declarations may need clean up
6919         code depending on whether they contain tagged types.
6920         (Unregister_Tagged_Types): New routine. Search through a list of
6921         declarations or statements, looking for non-abstract Ada tagged types.
6922         For each such type, generate code to unregister the external tag.
6923         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6924         Requires_Cleanup_Actions.
6925         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6926         through a list of declarations or statements looking for non-abstract
6927         Ada tagged types or controlled objects.
6928         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6929         Requires_Cleanup_Actions.
6930         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6931         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6932         RE_Unit_Table.
6933
6934 2011-08-04  Vincent Celier  <celier@adacore.com>
6935
6936         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6937         has Ada sources, not project Project, because if the root project
6938         Project has no sources of its own, all projects will be deemed without
6939         sources.
6940
6941 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
6942
6943         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6944         of the No_Param_Proc acc-to-subp type used for initialization of
6945         __gnat_finalize_library_objects so that it's declared at library level
6946         rather than nested inside of the adainit routine.
6947
6948 2011-08-04  Javier Miranda  <miranda@adacore.com>
6949
6950         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6951         if the tagged type has a representation clause which specifies its
6952         external tag.
6953
6954 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6955
6956         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6957         Remove previous procedure with that name.
6958         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6959         when appropriate.
6960         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6961         subtype mark, the ancestor cannot have unknown discriminants.
6962         (Resolve_Record_Aggregate): if the type has invisible components
6963         because of a private ancestor, the aggregate is illegal.
6964
6965 2011-08-04  Vincent Celier  <celier@adacore.com>
6966
6967         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6968         account switches -gnat2005, -gnat12 and -gnat2012.
6969
6970 2011-08-04  Bob Duff  <duff@adacore.com>
6971
6972         * s-tasdeb.ads: Minor comment fix.
6973
6974 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6975
6976         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6977         CodePeer mode.
6978         * switch.ads, switch.adb (Is_Language_Switch): New function.
6979
6980 2011-08-04  Vincent Celier  <celier@adacore.com>
6981
6982         * switch-c.adb: Minor comment addition.
6983
6984 2011-08-04  Vincent Celier  <celier@adacore.com>
6985
6986         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6987         ending with '=' is followed by a space (missing file name).
6988
6989 2011-08-04  Pascal Obry  <obry@adacore.com>
6990
6991         * g-regist.ads: Fix size of HKEY on x86_64-windows.
6992
6993 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6994
6995         * sem_ch12.adb (Analyze_Associations): New routine
6996         Check_Overloaded_Formal_Subprogram to reject a formal package when
6997         there is a named association or a box initialisation for an overloaded
6998         formal subprogram of the corresponding generic.
6999
7000 2011-08-04  Yannick Moy  <moy@adacore.com>
7001
7002         * alfa.ads (ALFA_Xref_Record): add component for type of entity
7003         * get_alfa.adb, put_alfa.adb: Read and write new component of
7004         cross-reference.
7005         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7006
7007 2011-08-04  Pascal Obry  <obry@adacore.com>
7008
7009         * urealp.adb: Minor reformatting.
7010
7011 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7012
7013         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7014         Handle the case when Cleanup_Protected_Object returns Empty.
7015
7016 2011-08-04  Yannick Moy  <moy@adacore.com>
7017
7018         * frontend.adb (Frontend): only qualify names in non-ALFA mode
7019
7020 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7021
7022         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7023         call, ignore functions.
7024
7025 2011-08-04  Geert Bosch  <bosch@adacore.com>
7026
7027         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7028         point.
7029
7030 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7031
7032         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7033         as an index for Builder'Switches. This conforms to the documentation.
7034         * make.adb (Insert_Project_Sources): avoid duplicate code
7035
7036 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7037
7038         * makeutl.adb (Complete_Mains): if the user has passed a relative file
7039         name on the command line (for instance "../dummy"), never assume it can
7040         be a unit name.
7041
7042 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7043
7044         * bindgen.adb: Remove code the reference or create the
7045         Break_Start/__gnat_break_start procedure.
7046         * s-stalib.adb (Break_Start): Removed.
7047
7048 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7049
7050         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7051         shared with gprbuild.
7052
7053 2011-08-04  Yannick Moy  <moy@adacore.com>
7054
7055         * par-ch4.adb (P_Primary): preferentially issue an error message about
7056         a missing parenthesis arount a conditional or case expression in Ada
7057         2012 mode, if we detect that the alignment is not correct for a
7058         statement.
7059
7060 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7061
7062         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7063         tag-to-class-wide conversion as needing finalization actions.
7064         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7065         a tag-to-class-wide conversion as needing finalization actions.
7066         (Is_Finalizable_Transient): The result of a tag-to-class-wide
7067         conversion does not need finalization actions.
7068         (Is_Tag_To_CW_Conversion): New routine.
7069         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7070         whether an object is the result of a tag-to-class-wide conversion.
7071
7072 2011-08-04  Yannick Moy  <moy@adacore.com>
7073
7074         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7075         the left-hand-side and right-hand-side of a conjunct are inserted when
7076         translating a pre- or postcondition
7077         * sem_ch6.adb: Correct typo in comment
7078
7079 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7080
7081         * gnat_rm.texi: Ravenscar does not prohibit dependence on
7082         Unchecked_Conversion and Unchecked_Deallocation.
7083
7084 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7085
7086         * make.adb: Minor reformatting.
7087
7088 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7089
7090         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7091         sources in the project and its imported projects, but not in the whole
7092         tree.
7093
7094 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7095
7096         * make.adb: Remove debug trace.
7097
7098 2011-08-04  Vincent Celier  <celier@adacore.com>
7099
7100         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7101         path in canonical form, to be able to compare path names on platforms
7102         such as Windows or Darwin.
7103
7104 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7105
7106         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7107         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7108         * scos.ads: Update documentation accordingly.
7109         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7110         pragmas.
7111
7112 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7113
7114         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7115         attribute only if prefix type is scalar.
7116
7117 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7118
7119         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7120         in gnatmake for specifying mains on the command line that do not belong
7121         to the main project. These mains must currently all belong to the same
7122         project, though.
7123         (Ultimate_Extension_Of): removed, since duplicated
7124         Ultimate_Extending_Project.
7125
7126 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7127
7128         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7129         instead.
7130         (CodePeer_Mode_String): New.
7131         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7132         CodePeer mode.
7133         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7134         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7135         mode, since no useful elaboration subprogram is needed by CodePeer.
7136         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7137         In this mode, compile binder file with -gnatC and do stop after this
7138         step.
7139
7140 2011-08-04  Vincent Celier  <celier@adacore.com>
7141
7142         * exp_ch7.adb: Minor comment fix.
7143
7144 2011-08-04  Robert Dewar  <dewar@adacore.com>
7145
7146         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7147         exp_ch4.adb, makeutl.adb: Minor reformatting.
7148
7149 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7150
7151         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7152         Create several new subprograms to move code out of Make. This makes the
7153         code more readable, removes code duplication, and is a preparation work
7154         for adding support for aggregate projects.
7155
7156 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7157
7158         * s-po32gl.ads, s-po32gl.adb: New files.
7159         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7160         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7161         (Build_Finalization_Collection): Use it.
7162         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7163         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7164         literals.
7165         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7166         * gcc-interface/Make-lang.in: Update dependencies.
7167
7168 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7169
7170         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7171         the command line.
7172
7173 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7174
7175         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7176         command line is not a file name, also check whether it could be a unit
7177         name.
7178
7179 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7180
7181         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7182         the header of the finalization routine.
7183         If the unit has no finalizer but is a body whose spec has one, then
7184         generate the decrement of the elaboration entity only.
7185         If the unit has a finalizer and is a spec, then do not generate the
7186         decrement of the elaboration entity.
7187         (Gen_Finalize_Library_C): Likewise.
7188
7189 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7190
7191         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7192         (Bounds_Size_Expression): Removed.
7193         (Double_Alignment_Of): New subsidiary routine.
7194         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7195         for a hole in the dope vector of unconstrained arrays due to different
7196         index and element alignments.
7197
7198 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7199
7200         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7201         raise program_error because body has not been seen yet.
7202
7203 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7204
7205         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7206         an unresolved name.
7207
7208 2011-08-04  Vincent Celier  <celier@adacore.com>
7209
7210         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7211
7212 2011-08-04  Yannick Moy  <moy@adacore.com>
7213
7214         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7215         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7216
7217 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7218
7219         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7220         instantiation in RCI.
7221
7222 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7223
7224         * make.adb: Share more code with gprbuild
7225
7226 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7227
7228         * projects.texi: Added documentation for the IDE'Gnat project file
7229         attribute.
7230
7231 2011-08-04  Nicolas Roche  <roche@adacore.com>
7232
7233         * gnat_rm.texi: Minor editing.
7234
7235 2011-08-04  Javier Miranda  <miranda@adacore.com>
7236
7237         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7238         and the library case for VM targets.
7239         (Gen_Adainit_Ada): Likewise.
7240
7241 2011-08-04  Robert Dewar  <dewar@adacore.com>
7242
7243         * g-altive.ads: Minor comment updates.
7244         * prj-nmsc.adb: Minor reformatting.
7245
7246 2011-08-04  Javier Miranda  <miranda@adacore.com>
7247
7248         * opt.ads
7249         (Normalize_Scalars_Config): Value of the configuration switch set by
7250         pragma Normalize_Scalars when it appears in the gnat.adc file.
7251         (Normalize_Scalars): New field for record Config_Switches_Type. Used
7252         to save and restore settings of this pragma.
7253         * opt.adb
7254         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7255         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7256
7257 2011-08-04  Vincent Celier  <celier@adacore.com>
7258
7259         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7260
7261 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7262
7263         * makeutl.adb: Minor reformatting.
7264
7265 2011-08-04  Olivier Hainque  <hainque@adacore.com>
7266
7267         * g-altive.ads: Update comments to reflect that only the soft
7268         binding is available today.
7269
7270 2011-08-04  Robert Dewar  <dewar@adacore.com>
7271
7272         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7273         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7274         * gcc-interface/Make-lang.in: Update dependencies.
7275
7276 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7277
7278         * prj-env.adb: Remove local debug traces.
7279
7280 2011-08-04  Yannick Moy  <moy@adacore.com>
7281
7282         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7283         was used instead of Hi_OK, which could cause a read of an uninitialized
7284         value later on. Detected while working on the new warning.
7285         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7286         to local variable.
7287         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7288         in more cases, in order to detect more unreferenced values.
7289         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7290         object for expression, if any.
7291
7292 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7293
7294         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7295         the operand types instead of the Esize.
7296
7297 2011-08-04  Steve Baird  <baird@adacore.com>
7298
7299         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7300         enable CodePeer_Mode.
7301         * bindusg.adb (Display): Add help message describing -P binder switch.
7302         * gnat_ugn.texi: Document -P binder switch.
7303         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7304         user-defined main program directly.
7305         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7306         user-defined main program in the context clause of the package body.
7307
7308 2011-08-04  Yannick Moy  <moy@adacore.com>
7309
7310         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7311         duplicate of Defining_Entity
7312         (Get_Unique_Entity_For_Decl): rename function into
7313         Unique_Defining_Entity
7314         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7315         (Formal_Proof_On): remove synthesized flag
7316         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7317         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7318         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7319         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7320         Annotate (Formal_Proof)
7321
7322 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7323
7324         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7325         source files with non-standard naming schemes, in imported projects
7326
7327 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7328
7329         * makeutl.adb (Complete_Mains): when a multi-unit source file is
7330         specified on the gprbuild command line, we need to compile all units
7331         within that file, not just the first one we find
7332         Fix error message for mains that are not found.
7333
7334 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7335
7336         * sem_ch6.adb: Update comment.
7337         * sem_ch12.adb: Minor reformatting.
7338
7339 2011-08-04  Bob Duff  <duff@adacore.com>
7340
7341         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7342         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7343         race condition whose symptom is to fail to lock Parent. That, in turn,
7344         causes Parent.Awake_Count to be accessed without locking Parent, which
7345         causes another race condition whose symptom is that Parent.Awake_Count
7346         can be off by 1 (either too high or too low). The solution is to lock
7347         Parent unconditionally, and then lock Acceptor, before reading
7348         Acceptor.Terminate_Alternative.
7349
7350 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7351
7352         * debug.adb: Update comment.
7353
7354 2011-08-04  Robert Dewar  <dewar@adacore.com>
7355
7356         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7357         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7358         exp_ch6.adb: Minor reformatting.
7359
7360 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7361
7362         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7363         checks for -gnateE.
7364
7365 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7366
7367         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7368
7369 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7370
7371         * sinfo.ads: Minor reformatting.
7372
7373 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7374
7375         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7376         even if there is no location.
7377
7378 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7379
7380         * sem_res.adb, sem_ch4.adb: move check for restriction
7381         No_Task_Hierarchy to resolve_allocator.
7382
7383 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7384
7385         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7386         This flag of N_Pragma nodes is not used, remove it as well as all of
7387         the associated circuitry.
7388
7389 2011-08-04  Javier Miranda  <miranda@adacore.com>
7390
7391         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7392         runtime check on duplicated externa tags
7393         * debug.adb Document switch -gnatdQ.
7394
7395 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7396
7397         * a-fihema.ads: Minor typo fix.
7398
7399 2011-08-04  Yannick Moy  <moy@adacore.com>
7400
7401         * sem_ch10.adb: Minor comment update.
7402
7403 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7404
7405         * einfo.adb: Update the node field usage to reflect the renaming of
7406         Return_Flag to Return_ Flag_Or_Transient_Decl.
7407         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7408         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7409         (Write_Field15_Name): Change Return_Flag to
7410         Return_Flag_Or_Transient_Decl.
7411         * einfo.ads: Rename node field Return_Flag to
7412         Return_Flag_Or_Transient_Decl. Update the associated comment and all
7413         occurrences in entities.
7414         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7415         associated Inline pragma.
7416         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7417         associated Inline pragma.
7418         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7419         routine.
7420         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7421         Return_Flag and Set_Return_Flag.
7422         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7423         objects generated for controlled transients declared inside an
7424         Exception_With_Actions. Update the calls to Return_Flag.
7425         (Process_Object_Declaration): Add code to add a null guard for hook
7426         objects generated for controlled transients declared inside an
7427         Exception_With_Actions. Update related comment.
7428         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7429         objects generated for controlled transients declared inside an
7430         Exception_With_Actions. Update the calls to Return_Flag.
7431         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7432
7433 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7434
7435         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7436         positional aggregate.
7437
7438 2011-08-04  Vincent Celier  <celier@adacore.com>
7439
7440         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7441         SLOC only for pragmas.
7442
7443 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7444
7445         * projects.texi: Minor typo fix.
7446
7447 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7448
7449         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7450         on case-sensitive file systems.
7451
7452 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7453
7454         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7455         nested in a disabled pragma.
7456         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7457         enclosing pragma, if any, for X decisions.
7458
7459 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7460
7461         * sem_prag.adb: Minor reformatting.
7462
7463 2011-08-04  Vincent Celier  <celier@adacore.com>
7464
7465         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7466         allowed in no run time mode.
7467
7468 2011-08-04  Vincent Celier  <celier@adacore.com>
7469
7470         * make.adb (Check): When -gnatc is used, check for the source file
7471         inside the ALI file with a canonical case file name.
7472
7473 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7474
7475         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7476         overriding the separator.
7477
7478 2011-08-04  Robert Dewar  <dewar@adacore.com>
7479
7480         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7481         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7482
7483 2011-08-04  Robert Dewar  <dewar@adacore.com>
7484
7485         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7486
7487 2011-08-04  Yannick Moy  <moy@adacore.com>
7488
7489         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7490         'Result only appears in postcondition of function.
7491
7492 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7493
7494         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7495         external tag, include the value of the external tag in the exception
7496         message.
7497
7498 2011-08-04  Yannick Moy  <moy@adacore.com>
7499
7500         * sem_attr.adb (Result): modify error message for misplaced 'Result
7501
7502 2011-08-04  Sergey Rybin  <rybin@adacore.com>
7503
7504         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7505         clear that the second argument must be an identifier.
7506
7507 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7508
7509         * exp_ch9.adb (Build_Barrier_Function): When compiling with
7510         -fpreserve-control-flow, insert an IF statement on the barrier
7511         condition to ensure that a conditional branch instruction is generated.
7512
7513 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7514
7515         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7516         (Processing_Flags.Ignore_Missing_With): new flag.
7517
7518 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7519
7520         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7521         Source_List_File on case-insensitive systems where the file is actually
7522         on a case-sensitive file system (NFS,...).
7523
7524 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7525
7526         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7527         function return contains a controlled [extension] aggregate and the
7528         return statement is not part of a handled sequence of statements, wrap
7529         the return in a block. This ensures that all controlled temporaries
7530         generated during aggregate resolution will be picked up by the
7531         finalization machinery.
7532
7533 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7534
7535         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7536         components, freeze type before resolution, to ensure that default
7537         initializations are present for all components.
7538         * sem_res.adb (Resolve_Actuals): the designated object of an
7539         accces-to-constant type is a legal actual in a call to an
7540         initialization procedure.
7541
7542 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7543
7544         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7545         N_Unchecked_Type_Conversion to the possible containers of a renamed
7546         transient variable.
7547
7548 2011-08-04  Yannick Moy  <moy@adacore.com>
7549
7550         * par-ch13.adb (Aspect_Specifications_Present): recognize
7551         "with Identifier'Class =>" as an aspect, so that a meaningful warning
7552         is issued in Strict mode.
7553         * par.adb: Fix typos in comments.
7554
7555 2011-08-04  Yannick Moy  <moy@adacore.com>
7556
7557         * sem_attr.adb (Result): modify error message to take into account Post
7558         aspect when compiling Ada 2012 (or newer) code.
7559
7560 2011-08-04  Nicolas Roche  <roche@adacore.com>
7561
7562         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7563         remove need for GCC exceptions.
7564
7565 2011-08-04  Vincent Celier  <celier@adacore.com>
7566
7567         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7568         project, not the source file name.
7569         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7570         excluded, continue looking. This excluded source will only be returned
7571         if there is no other source with the same base name that is not locally
7572         removed.
7573
7574 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7575
7576         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7577         private and one of the operands is a real literal, use a qualified
7578         expression rather than a conversion which is not meaningful to the
7579         back-end.
7580
7581 2011-08-04  Yannick Moy  <moy@adacore.com>
7582
7583         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7584         corresponding aspect X'Class are allowed, proceed with analysis of the
7585         aspect instead of skipping it.
7586
7587 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7588
7589         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7590         This will allow to have an Ada implementation for the subprogram.
7591
7592 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7593
7594         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7595         completion and aspects are present, apply them to the entity for the
7596         type which is currently the partial view, but which is the one that
7597         will be frozen.
7598         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7599         applies to a partial view, indicate that the full view has predicates
7600         and delayed aspects.
7601         (Replace_Type_Reference): Handle properly predicates that apply to the
7602         full view of a private completion.
7603
7604 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7605
7606         * layout.adb (Layout_Type): For composite types, do not set Esize.
7607         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7608         set Esize.
7609         (Size_Known): Look at the RM size of components instead of the Esize.
7610         (Freeze_Record_Type): Look at the RM size instead of the Esize to
7611         issue warning and activate Implicit_Packing.
7612         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
7613         if the Esize is not known.
7614         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7615         for elementary types only.
7616         (Analyze_Record_Representation_Clause): Look at the RM size instead
7617         of the Esize to issue errors.
7618         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7619         is not known.
7620         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
7621         obsolete block.
7622         Look at the RM size instead of the Esize for types if the latter is
7623         not known.
7624         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7625
7626 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7627
7628         * sem_type.adb: proper handling of equality not involving anonymous
7629         access types.
7630
7631 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7632
7633         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7634         Vis_Decls. When creating a library-level finalizer for a package spec,
7635         both the declaration and body of the finalizer are inserted either in
7636         the visible or private declarations of the package spec.
7637
7638 2011-08-04  Javier Miranda  <miranda@adacore.com>
7639
7640         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7641         use of the full-view of a type when invoking Is_Ancestor.
7642         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7643         the full-view of private parents is requested, then use also the
7644         full-view of the parent of the first derivation.
7645
7646 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7647
7648         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7649         instead of the locally imported procedure.
7650         * s-taprop-mingw.adb (Enter_Task): Ditto.
7651         * s-valrea.adb (Scan_Real): Ditto.
7652         * s-imgrea.adb (Set_Image_Real): Ditto.
7653         * s-flocon.ads: Make the package pure.
7654
7655 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7656
7657         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7658         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7659         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7660         New subprogram, moved here from...
7661         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7662         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7663         rewriting of the last argument into a procedure call statement here...
7664         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7665         instead.
7666
7667 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7668
7669         * par_sco.adb: Minor reformatting.
7670
7671 2011-08-04  Robert Dewar  <dewar@adacore.com>
7672
7673         * erroutc.adb: Minor reformatting.
7674
7675 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7676
7677         * par_sco.adb: Comment update.
7678
7679 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7680
7681         * s-flocon.ads: New file.
7682         * g-flocon.ads: Now a renaming of s-flocon.
7683         * Makefile.rtl: Add s-flocon.o
7684
7685 2011-08-04  Javier Miranda  <miranda@adacore.com>
7686
7687         * exp_strm.adb (Build_Array_Input_Function): if the array type is
7688         constrained, do not attempt to build a subtype of it.
7689
7690 2011-08-04  Yannick Moy  <moy@adacore.com>
7691
7692         * errout.ads Change comments: remove 'R'M as an example where quotes
7693         are needed; add ALFA as another case where quotes are not needed
7694         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7695         case where quotes are not needed.
7696         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7697         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7698         Remove all occurrences of 'A'L'F'A
7699
7700 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7701
7702         * sem_ch13.adb: check legality of invariant pragma.
7703
7704 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7705
7706         * bindgen.adb: Add comments.
7707
7708 2011-08-04  Yannick Moy  <moy@adacore.com>
7709
7710         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7711         synthesized flag.
7712         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7713         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7714
7715 2011-08-04  Robert Dewar  <dewar@adacore.com>
7716
7717         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7718         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7719         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7720
7721 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7722
7723         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7724
7725 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7726
7727         PR ada/47880
7728         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7729         allocated object.
7730
7731 2011-08-04  Robert Dewar  <dewar@adacore.com>
7732
7733         * einfo.ads, exp_ch4.adb: Minor reformatting.
7734
7735 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7736
7737         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7738
7739 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7740
7741         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7742         type in all cases to compute list of primitive operations, because full
7743         view may be an itype that is not attached to the list of declarations.
7744
7745 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7746
7747         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7748         library has already been finalized.
7749         (Gen_Adafinal_C): Likewise.
7750         (Gen_Adainit_Ada): Generate an early return if the library has
7751         already been elaborated.
7752         (Gen_Adainit_C): Likewise.
7753         (Gen_Output_File_Ada): Generate an elaboration flag.
7754         (Gen_Output_File_C): Likewise.
7755
7756 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7757
7758         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7759         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7760         built in the first place.
7761         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7762         for CodePeer because Finalize_Address was not built to begin with.
7763         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7764
7765 2011-08-04  Pascal Obry  <obry@adacore.com>
7766
7767         * adaint.c (__gnat_tmp_name): Use current process id to create temp
7768         filenames, this ensures unicity of filenames across processes.
7769
7770 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7771
7772         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7773         Raise_Controlled to Raise_From_Controlled_Operation. Update the
7774         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7775         Add False as the actual to From_Abort in the generated call to
7776         Raise_From_Controlled_Operation.
7777
7778 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7779
7780         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7781         so that the ali file name can be retrieved from outside of this package.
7782         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7783         doing nothing in the general case, but used to update the object file
7784         timestamp if directly generated by the backend.
7785         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7786         to a later time than the ali file one.
7787
7788 2011-08-04  Yannick Moy  <moy@adacore.com>
7789
7790         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7791         entities whose body contains an Annotate pragma which forces formal
7792         proof on this body.
7793         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7794         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7795         Mark_Non_ALFA_Subprogram to pass in a message and node.
7796         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7797         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7798         surrounding subprogram.
7799         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7800         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7801         as not in ALFA is annotated with Formal_Proof being On, then an error
7802         is issued based on the additional parameters for message and node.
7803         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7804         * gcc-interface/Make-lang.in: Update dependencies.
7805
7806 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7807
7808         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7809         Finalize_Address when CodePeer is enabled.
7810
7811 2011-08-04  Pascal Obry  <obry@adacore.com>
7812
7813         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7814         the latter returns a pointer to a static buffer which is deallocated
7815         at the end of the routine.
7816
7817 2011-08-04  Yannick Moy  <moy@adacore.com>
7818
7819         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7820         after index creation; mark unconstrained base array type generated as
7821         being in/not in ALFA as well
7822         (Make_Index): mark subtype created as in/not in ALFA
7823         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7824         over a loop as in/not in ALFA, depending on its type and form of loop
7825         iteration.
7826
7827 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7828
7829         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7830         directly to False on .NET and JVM.
7831
7832 2011-08-04  Yannick Moy  <moy@adacore.com>
7833
7834         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7835         constraint that subtype must come from source code to be in ALFA, so
7836         that anonymous subtypes can be in ALFA too.
7837
7838 2011-08-04  Yannick Moy  <moy@adacore.com>
7839
7840         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7841         reference for ALFA mode.
7842         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7843         procedure public so as to use it from formal verification back-end.
7844
7845 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7846
7847         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7848         invalid checks of the Parameter, making Remove_Switch not working
7849         correctly.
7850
7851 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7852
7853         * targparm.ads: Update header: no run-time exception is needed on this
7854         file.
7855
7856 2011-08-04  Vincent Celier  <celier@adacore.com>
7857
7858         * a-fihema.adb: Use System.IO instead of GNAT.IO
7859
7860 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7861
7862         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7863         are forbidden in Compiler_Unit mode.
7864
7865 2011-08-04  Robert Dewar  <dewar@adacore.com>
7866
7867         * sem_util.adb: Minor reformatting.
7868
7869 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7870
7871         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7872         library-level finalizers.
7873         (Gen_Finalize_Library_C): Update the import string for library-level
7874         finalizers.
7875         (Gen_Finalize_Library_Defs_C): Update the definition name of a
7876         library-level finalizer.
7877         * exp_ch7.adb: Remove with and use clauses for Stringt.
7878         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7879         Spec_Decl. Add local variable Body_Id. The names of library-level
7880         finalizers are now manually fully qualified and are no longer external.
7881         A single name is now capable of servicing .NET, JVM and non-VM targets.
7882         Pragma Export is no longer required to provide visibility for the name.
7883         (Create_Finalizer_String): Removed.
7884         (New_Finalizer_Name): New routine which mimics New_..._Name.
7885
7886 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7887
7888         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7889         elaboration counter to Standard_Short_Integer.
7890         * sem_util.adb (Build_Elaboration_Entity): Likewise.
7891         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7892         (Gen_Elab_Externals_C): Likewise.
7893
7894 2011-08-04  Ed Falis  <falis@adacore.com>
7895
7896         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7897         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7898         system-vxworks-mips.ads, system-vxworks-x86.ads
7899         (Always_Compatible_Rep): set to False for all VxWorks targets.
7900
7901 2011-08-04  Robert Dewar  <dewar@adacore.com>
7902
7903         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7904         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7905         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7906         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7907         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7908         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7909         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7910         Minor reformatting and code reorganization.
7911
7912 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7913
7914         * projects.texi: Added doc for aggregate projects.
7915
7916 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7917
7918         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7919         Add support for overriding the Project_Path in aggregate projects.
7920
7921 2011-08-04  Robert Dewar  <dewar@adacore.com>
7922
7923         * a-cofove.ads: Minor reformatting.
7924
7925 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7926
7927         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7928         on the generated code.
7929         (Build_Finalize_Statements): Update the comment on the generated code.
7930         (Build_Initialize_Statements): Update the comment on the generated code.
7931         (Build_Object_Declarations): Add local variable Result. The object
7932         declarations are now built in sequence.
7933         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7934         RE_Unit_Table.
7935
7936 2011-08-04  Robert Dewar  <dewar@adacore.com>
7937
7938         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7939
7940 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7941
7942         * einfo.ads (Elaboration_Entity): Document new definition and use.
7943         (Elaboration_Entity_Required): Adjust to above change.
7944         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7945         * exp_ch12.adb: And with and use for Snames.
7946         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7947         * exp_util.adb (Set_Elaboration_Flag): Likewise.
7948         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7949         <Check_Unit_Name>: Deal with N_Expanded_Name.
7950         <Attribute_Elaborated>: Extend to all unit names.
7951         * sem_elab.adb: And with and use for Uintp.
7952         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7953         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7954         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7955         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7956         from Gen_Adainit_Ada.
7957         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7958         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
7959         case, do not call System.Standard_Library.Adafinal; instead call
7960         finalize_library if needed.
7961         (Gen_Adafinal_C): Likewise.
7962         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7963         non-main program case.
7964         (Gen_Adainit_C): Generate a couple of external declarations here.
7965         In the main program case, set SSL.Finalize_Library_Objects.
7966         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7967         (Gen_Elab_Calls_C): Likewise.
7968         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
7969         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
7970         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7971         objects here.
7972         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7973         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
7974         Gen_Adafinal_Ada.
7975         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7976         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
7977         of external declarations.  Call Gen_Finalize_Library_C.
7978
7979 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7980
7981         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7982         Compute_Compilation_Phases): new subprogram.
7983         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7984         The number of mains as well as the various compilation phases that
7985         need to be run are now project tree specific, since various
7986         aggregated trees might have different requirements. In particular,
7987         they do not all require bind or link phases.
7988
7989 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7990
7991         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7992         (Project_Tree_Appdata): New type.
7993         It is now possible to associate application-specific data to a project
7994         tree. In particular, this is used in the gprbuild builder to avoid a
7995         number of global tables and htables, especially now that there can be
7996         several project trees loaded at once because of aggregate projects.
7997         (Debug_Name): new procedure.
7998         * projects.texi: Clarify syntax of "**" for Source_Dirs
7999
8000 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8001
8002         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8003         the "roots" for a main.
8004         (Fill_From_Project): add support for aggregate projects. Main units
8005         in aggregated projects are now automatically added in the list of
8006         files to build (although this fails later on in gprbuild, because
8007         these files are not using the root proejct tree, so this needs
8008         further cleanup)
8009         * gcc-interface/Make-lang.in: Update dependencies.
8010
8011 2011-08-03  Yannick Moy  <moy@adacore.com>
8012
8013         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8014         conditional expression in ALFA.
8015         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8016         expressions as not in ALFA.
8017
8018 2011-08-03  Robert Dewar  <dewar@adacore.com>
8019
8020         * a-cofove.adb: Minor reformatting.
8021
8022 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8023
8024         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8025         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8026         gprbuild sources.
8027         These packages are more logically placed in the Queue package, since
8028         they manipulate the queue. It is also likely that they can be adapted
8029         for gnatmake, thus sharing more code.
8030         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8031         that we could move the above.
8032
8033 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8034
8035         * errutil.adb (Finalize): clean up the list of error messages on exit.
8036         Calling this subprogram multiple times will no longer show duplicate
8037         error messages on stderr.
8038
8039 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8040
8041         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8042         Getopt_Switches when we have already define a command line
8043         configuration.
8044
8045 2011-08-03  Yannick Moy  <moy@adacore.com>
8046
8047         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8048         in ALFA. Instead, they are considered as assertions to prove.
8049         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8050         nodes as not in ALFA. Instead, include conditional expressions in ALFA
8051         if they have no ELSE part, or if they occur in pre- and postconditions,
8052         where the Condition cannot have side-effects in ALFA
8053         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8054         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8055         Instead, include type conversion between scalar types in ALFA.
8056         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8057         if-and-only-if its type is in ALFA.
8058
8059 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8060
8061         * scos.adb, get_scos.adb, put_scos.adb
8062         New code letter for decisions: G (entry guard)
8063         * par_sco.adb
8064         (Traverse_Subprogram_Body): Rename to...
8065         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8066         (Traverse_Protected_Body): New subprogram
8067         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8068         protected bodies and entry bodies.
8069
8070 2011-08-03  Yannick Moy  <moy@adacore.com>
8071
8072         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8073         entities with get/set subprograms, which is set on procedure entities
8074         generated by the compiler for a postcondition.
8075         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8076         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8077         entity for a declaration
8078         (Get_Unique_Entity_For_Decl): new function returning an entity which
8079         represents a declaration, so that matching spec and body have the same
8080         entity.
8081
8082 2011-08-03  Robert Dewar  <dewar@adacore.com>
8083
8084         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8085         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8086
8087 2011-08-03  Yannick Moy  <moy@adacore.com>
8088
8089         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8090         library-level because retriction No_Implicit_Dynamic_Code in the
8091         front-end prevents its definition as a local subprogram
8092         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8093         for reuse in other contexts
8094         (Traverse_Declarations_Or_Statements,
8095         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8096         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8097         procedures take a callback parameter to be called on all declarations
8098         * lib-xref.ads
8099         (Traverse_All_Compilation_Units): new generic function to traverse a
8100         compilation unit and call a callback parameter on all declarations
8101
8102 2011-08-03  Javier Miranda  <miranda@adacore.com>
8103
8104         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8105         in Java since they are always enclosed in a namespace that
8106         differentiates them, and overloaded entities are supported by the VM.
8107
8108 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8109
8110         * checks.adb (Determine_Range): If a computed bound of an operation is
8111         outside the range of the base type of the expression, and overflow
8112         checks are enabled, the result is unknown and cannot be used for any
8113         subsequent constant folding.
8114         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8115         unknown, so is the result of the comparison.
8116
8117 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8118
8119         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8120         From_Abort. When finalization was triggered by an abort, propagate
8121         Standard'Abort_Signal rather than Program_Error.
8122         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8123         From_Abort.
8124         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8125         From_Abort. When finalization was triggered by an abort, propagate
8126         Standard'Abort_Signal rather than Program_Error.
8127         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8128         From_Abort.
8129         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8130         Abort_Id. Update the calls to Build_Object_Declarations and
8131         Build_Raise_Statement to include Abort_Id.
8132         (Build_Adjust_Statements): New local variable Abort_Id. Update the
8133         calls to Build_Object_Declarations and Build_Raise_Statement to include
8134         Abort_Id.
8135         (Build_Finalize_Statements): New local variable Abort_Id. Update the
8136         calls to Build_Object_Declarations and Build_Raise_Statement to include
8137         Abort_Id.
8138         (Build_Components): Create an entity for Abort_Id when exceptions are
8139         allowed on the target.
8140         (Build_Finalizer): New local variable Abort_Id.
8141         (Build_Initialize_Statements): New local variable Abort_Id. Update the
8142         calls to Build_Object_Declarations and Build_Raise_Statement to include
8143         Abort_Id.
8144         (Build_Object_Declarations): Add new formal Abort_Id. Create the
8145         declaration of flag Abort_Id to preserve the original abort status
8146         before finalization code is executed.
8147         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8148         runtime routine Raise_From_Controlled_Operation.
8149         (Create_Finalizer): Update the call to Build_Raise_Statement to include
8150         Abort_Id. Update the call to Build_Object_Declarations to include
8151         Abort_Id. Update the layout of the finalizer body.
8152         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8153         (Process_Transient_Objects): New local variable Abort_Id. Remove the
8154         clunky code to create all flags and objects related to
8155         exception propagation and replace it with a call to
8156         Build_Object_Declarations. Update the call to Build_Raise_Statement to
8157         include Abort_Id.
8158         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8159         Add new formal Abort_Id and associated comment on its use.
8160         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8161         on its use.
8162         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8163         Remove the clunky code to create all flags and objects related to
8164         exception propagation and replace it with a call to
8165         Build_Object_Declarations. Update the call to Build_Raise_Statement.
8166
8167 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
8168
8169         * s-tassta.adb: Fix minor typos.
8170
8171 2011-08-03  Robert Dewar  <dewar@adacore.com>
8172
8173         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8174         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8175
8176 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8177
8178         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8179         to packages. This ensures that the finalizer body will not end up
8180         inside the freeze node.
8181         (Process_Declarations): Add code to detect whether a freeze node has a
8182         nested finalization collection.
8183
8184 2011-08-03  Pascal Obry  <obry@adacore.com>
8185
8186         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8187         (Current_Session): Return a not null access to Session_Type.
8188         (Default_Session): Likewise.
8189
8190 2011-08-03  Robert Dewar  <dewar@adacore.com>
8191
8192         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8193         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8194
8195 2011-08-03  Pascal Obry  <obry@adacore.com>
8196
8197         * g-awk.ads: Minor comment fix.
8198
8199 2011-08-03  Sergey Rybin  <rybin@adacore.com>
8200
8201         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8202         the tree structure related to discriminant constraints.
8203         Original_Discriminant cannot be used any more for computing the
8204         defining name for the reference to a discriminant.
8205
8206 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8207
8208         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8209         function is not visibly tagged, this is not a dispatching call and
8210         therfore is not Tag_Indeterminate, even if the function is marked as
8211         dispatching on result.
8212
8213 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8214
8215         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8216         (Expand_N_Free_Statement): Add a guard to protect against run-times
8217         which do not support controlled types.
8218         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8219         against run-times which do not support controlled types.
8220         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8221         against run-times which do not support controlled types.
8222         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8223         against run-times which do not support controlled types.
8224         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8225         protect against run-times which do not support controlled types.
8226
8227 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
8228
8229         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8230         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8231
8232 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8233
8234         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8235         modified in the source, to prevent spurious warnings when compiling
8236         with -gnatg.
8237
8238 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8239
8240         * a-except-2005.adb: Minor reformatting.
8241
8242 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8243
8244         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8245         is a renaming declaration in the private part of a package, do not emit
8246         a warning that the with_clause could be moved because the renaming may
8247         be used in the body or in a child unit.
8248
8249 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8250
8251         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8252         Propagate the Comes_From_Source attribute from the original return
8253         object to the renaming.
8254
8255 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
8256
8257         * exp_ch7.adb (Build_Raise_Statement): Do not call
8258         Raise_From_Controlled_Operation when this routine is not present in
8259         the run-time library.
8260         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8261         libraries (Ravenscar), tasks are non-terminating, and protected objects
8262         and tasks can only appear at library level, so we do not want
8263         finalization of protected objects nor tasks.
8264         * exp_intr.adb: Minor clarification in comment.
8265         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8266         Gen_Output_File_C): Remove references to finalization of library-level
8267         objects when using restricted run-time libraries.
8268
8269 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8270
8271         * sem_ch3.adb (Build_Discriminant_Constraints): Set
8272         Original_Discriminant only if the parent type is a generic formal.
8273
8274 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8275
8276         * exp_ch13.adb: Add with and use clause for Targparm;
8277         (Expand_N_Free_Statement): Prevent the generation of a custom
8278         Deallocate on .NET/JVM targets since this requires pools and address
8279         arithmetic.
8280         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8281         .NET/JVM targets, attach the newly allocated object to the access
8282         type's finalization collection. Do not generate a call to
8283         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8284         exist in the runtime.
8285         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8286         create a custom Allocate for object that do not require initialization.
8287         Attach a newly allocated object to the access type's finalization
8288         collection on .NET/JVM.
8289         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8290         assignment of controlled types on .NET/JVM. The two hidden pointers
8291         Prev and Next and stored and later restored after the assignment takes
8292         place.
8293         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8294         kludge for .NET/JVM to recognize a particular piece of code coming from
8295         Heap_Management and change the call to Finalize into Deep_Finalize.
8296         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8297         finalization collections on .NET/JVM only for types derived from
8298         Controlled. Separate the association of storage pools with a collection
8299         and only allow it on non-.NET/JVM targets.
8300         (Make_Attach_Call): New routine.
8301         (Make_Detach_Call): New routine.
8302         (Process_Object_Declarations): Suppress the generation of
8303         build-in-place return object clean up code on .NET/JVM since it uses
8304         pools.
8305         * exp_ch7.ads (Make_Attach_Call): New routine.
8306         (Make_Detach_Call): New routine.
8307         * exp_intr.adb Add with and use clause for Targparm.
8308         (Expand_Unc_Deallocation): Detach a controlled object from a collection
8309         on .NET/JVM targets.
8310         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8311         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8312         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8313         names used in finalization.
8314
8315 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8316
8317         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8318         (Attach, Detach): Lock the current task when chaining an object onto a
8319         collection.
8320
8321 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8322
8323         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8324         Rewritten to create the message strings when the exception is not
8325         raised by an abort during finalization.
8326         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8327         Raise_From_Controlled_Operation and update its associated comment.
8328         * a-fihema.ads, a-fihema.adb: New GNAT unit.
8329         Ada.Finalization.Heap_Management provides key functionality
8330         associated with controlled objects on the heap, their creation,
8331         finalization and reclamation. Type Finalization_Collection is
8332         effectively a wrapper which sits ontop of a storage pool and performs
8333         all necessary bookkeeping for all the objects it contains. Each
8334         access-to-controlled or access-to-class-wide type receives a collection
8335         as part of its expansion. The compiler generates buffer code and
8336         invokes Allocate / Deallocate to create and destroy allocated
8337         controlled objects.
8338         * a-finali.adb ("="): Removed.
8339         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8340         fields Prev and Next.
8341         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8342         A library unit with at least one controlled object on the library level
8343         has a special finalizer which is invoked by the binder. To signal this,
8344         ali files carry field PF.
8345         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8346         associated comment on field usage.
8347         * a-tags.adb (Get_RC_Offset): Removed.
8348         (Needs_Finalization): New routine.
8349         * a-tags.ads: Update the structure of the GNAT dispatch tables.
8350         Dispatch tables now carry field Needs_Finalization which provides
8351         runtime indication whether a type is controlled or has controlled
8352         components or both. Remove field RC_Offset.
8353         (Get_RC_Offset): Removed along with its associated pragma Export.
8354         Since tagged types with controlled components no longer carry hidden
8355         field _controller, the special mechanism to retrieve its location is no
8356         longer needed.
8357         (Needs_Finalization): New routine.
8358         * atree.ads, atree.adb (Elist24): New routine.
8359         (Set_Elist24): New routine.
8360         * atree.h: Add a define clause for Elist24.
8361         * bindgen.adb New library-level variable Lib_Final_Built.
8362         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8363         presence of a VM target, the routine generates calls to the proper
8364         library finalization routine.
8365         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8366         targets. Set the correct library finalization routine depending on
8367         whether the library has controlled objects or this is a VM compilation.
8368         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8369         to library-level finalizers of compiled units in reverse order of
8370         elaboration. It also produces exception management code and reraises a
8371         potential exception after all units have been finalized.
8372         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8373         library-level finalizers of compiled units in reverse order of
8374         elaboration.
8375         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8376         definitions of all library-level finalizers available to the compilation
8377         (Gen_Main_Ada): Directly call Adafinal which now contails all target
8378         dependent code.
8379         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8380         System.Standard_Library.Adafinal directly. If the library needs
8381         finalization actions, create the sequence of finalization calls.
8382         (Gen_Output_File_Ada): Alphabetize local variables and constants.
8383         Generate a with clause for System.Soft_Links when compiling for a VM.
8384         Remove the code which imports System.Standard_Library.Adafinal as
8385         Do_Finalize. Generate the library finalization routine.
8386         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8387         If the library needs finalization actions, create all the definitions
8388         of library- level finalizers.
8389         (Has_Finalizer): New routine. Determines whether at least one compiled
8390         unit has a library-level finalizer.
8391         Add type Qualification_Mode.
8392         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8393         * einfo.adb: New usage of field 15 as Return_Flag.
8394         Remove Finalization_Chain_Entity from the usages of field 19.
8395         Remove Associated_Final_Chain from the usages of field 23.
8396         New usage of field 23 as Associated_Collection.
8397         New usage of field 24 as Finalizer.
8398         New usage of flag 252 as Is_Processed_Transient.
8399         (Associated_Final_Chain): Removed.
8400         (Associated_Collection): New routine.
8401         (Finalization_Chain_Entity): Removed.
8402         (Finalizer): New routine.
8403         (Is_Finalizer): New routine.
8404         (Is_Processed_Transient): New routine.
8405         (Return_Flag): New routine.
8406         (Set_Associated_Final_Chain): Removed.
8407         (Set_Associated_Collection): New routine.
8408         (Set_Finalization_Chain_Entity): Removed.
8409         (Set_Finalizer): New routine.
8410         (Set_Is_Processed_Transient): New routine.
8411         (Set_Return_Flag): New routine.
8412         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8413         displayed flags.
8414         (Write_Field8_Name): Alphabetize the output.
8415         (Write_Field11_Name): Alphabetize the output.
8416         (Write_Field12_Name): Alphabetize the output.
8417         (Write_Field13_Name): Alphabetize the output.
8418         (Write_Field14_Name): Alphabetize the output.
8419         (Write_Field15_Name): Alphabetize the output.
8420         (Write_Field16_Name): Alphabetize the output.
8421         (Write_Field17_Name): Alphabetize the output.
8422         (Write_Field18_Name): Alphabetize the output.
8423         (Write_Field19_Name): Alphabetize the output. Remove the output of
8424         Finalization_Chain_Entity.
8425         (Write_Field20_Name): Alphabetize the output.
8426         (Write_Field21_Name): Alphabetize the output.
8427         (Write_Field22_Name): Alphabetize the output.
8428         (Write_Field23_Name): Alphabetize the output. Remove the output of
8429         Associated_Final_Chain. Add output for Associated_Collection.
8430         (Write_Field24_Name): Alphabetize the output.
8431         (Write_Field25_Name): Add output for Finalizer.
8432         (Write_Field26_Name): Alphabetize the output.
8433         (Write_Field27_Name): Alphabetize the output.
8434         (Write_Field28_Name): Alphabetize the output.
8435         * einfo.ads: Add new field description for Associated_Collection and
8436         its uses in nodes.
8437         Remove Associated_Final_Chain and its uses in nodes.
8438         Remove Finalization_Chain_Entity and its uses in nodes.
8439         Add new field description for Finalizer and its uses in nodes.
8440         Add new synthesized attribute Is_Finalizer.
8441         Add new flag description for Is_Processed_Transient and its uses in
8442         nodes.
8443         Add new field description for Return_Flag and its uses in nodes.
8444         (Associated_Final_Chain): Removed along with its pragma Inline.
8445         (Associated_Collection): New routine and pragma Inline.
8446         (Finalization_Chain_Entity): Removed along with its pragma Inline.
8447         (Finalizer): New routine and pragma Inline.
8448         (Is_Finalizer): New routine and pragma Inline.
8449         (Is_Processed_Transient): New routine and pragma Inline.
8450         (Return_Flag): New routine and pragma Inline.
8451         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8452         (Set_Associated_Collection): New routine and pragma Inline.
8453         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8454         (Set_Finalizer): New routine and pragma Inline.
8455         (Set_Is_Processed_Transient): New routine and pragma Inline.
8456         (Set_Return_Flag): New routine and pragma Inline.
8457         * exp_aggr.adb: Alphabetize subprograms.
8458         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8459         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8460         associated comments. Remove local variables External_Final_List and
8461         Attach.
8462         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8463         Ancestor. Remove the retrieval of finalization lists. Update the call to
8464         Make_Adjust_Call.
8465         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8466         lists. Update the call to Late_Expansion.
8467         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8468         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8469         (Gen_Assign): Remove the retrieval of the finalization list used to
8470         build the assignment. Update the calls to Make_Init_Call and
8471         Make_Adjust_Call.
8472         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8473         Remove the mechanism to determine attachment levels and finalization
8474         list retrieval. Remove the processing for coextensions.
8475         (Init_Controller): Removed. Controllers no longer exist.
8476         (Late_Expansion): Remove formals Flist and Obj along with their
8477         associated comments. Update the calls to Build_Record_Aggr_Code and
8478         Build_Array_Aggr_Code.
8479         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8480         (Expand_N_Freeze_Entity): Add special processing for finalizers which
8481         appear in entry bodies, protected subprograms and task bodies.
8482         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8483         * exp_ch3.adb (Add_Final_Chain): Removed.
8484         (Build_Array_Init_Proc): Alphabetize local variables.
8485         (Build_Assignment): Alphabetize local variables. Update the call to
8486         Maked_Adjust_Call.
8487         (Build_Class_Wide_Master): Rename local variables to better reflect
8488         their role.
8489         (Build_Discriminant_Assignments): Code reformatting.
8490         (Build_Init_Call_Thru): Code reformatting.
8491         (Build_Init_Procedure): Code reformatting. Generate a special version
8492         of Deep_Finalize which is capable of finalizing all initialized
8493         components and ignore the rest.
8494         (Build_Init_Statements): Rename local variables to better reflect their
8495         role.
8496         Reimplement the mechanism to include the creation and update of an index
8497         variable called a "counter". It is used as a bookmark for tracing
8498         initialized and non-initialized components.
8499         (Build_Initialization_Call): Remove local variable Controller_Typ.
8500         Alphabetize all local variables. Remove the initialization of the
8501         record controller and update the call to Make_Init_Call.
8502         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8503         New local variable Counter.
8504         (Constrain_Array): Alphabetize.
8505         (Expand_Freeze_Array_Type): Create a collection instead of a
8506         finalization list.
8507         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8508         Finalize_Address which is used in conjunction with allocated controlled
8509         objects.
8510         (Expand_N_Object_Declaration): Remove the creation of a finalization
8511         list for anonymous access types. Update the calls to Make_Init_Call and
8512         Make_Adjust_Call.
8513         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8514         retrieval of finalization lists. Remove the expansion of the record
8515         controller. Create TSS primitive Finalize_Address used in conjunction
8516         with controlled objects on the heap. Create finalization collections
8517         for access-to-controlled record components.
8518         (Expand_Record_Controller): Removed.
8519         (Freeze_Type): Remove the freezing of record controllers. Freezing of
8520         class-wide types now requires additional processing. Create
8521         finalization collections for access-to-controlled types.
8522         (Increment_Counter): New routine.
8523         (Make_Counter): New routine.
8524         (Make_Eq_If): Remove the mention of Name_uController.
8525         (Make_Predefined_Primitive_Specs): There is no longer need to skip
8526         types coming from System.Finalization_Root.
8527         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8528         (Predefined_Primitive_Bodies): There is no longer need to skip types
8529         coming from System.Finalization_Root.
8530         (Stream_Operation_OK): Do not generate stream routines for
8531         type Ada.Finalization.Heap_Management.Finalization_Collection.
8532         * exp_ch3.ads: Alphabetize subprograms.
8533         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8534         Add with and use clause for Lib.
8535         (Complete_Coextension_Finalization): Removed.
8536         (Complete_Controlled_Allocation): New routine. Create a finalization
8537         collection for anonymous access-to-controlled types. Create a custom
8538         Allocate which interfaces with the back end and the machinery in
8539         Heap_Management.
8540         (Expand_Allocator_Expression): Add necessary calls to
8541         Complete_Controlled_Allocation. Remove the retrieval of finalization
8542         lists. Update the calls to Make_Adjust_Call. Generate a call to
8543         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8544         the associated collection.
8545         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8546         Code clean up. Remove the retrieval of finalization lists and
8547         attachment levels.
8548         Update the call to Make_Init_Call. Generate a call to
8549         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8550         the associated collection.
8551         (Get_Allocator_Final_List): Removed. Finalization lists are not
8552         available.
8553         (Suitable_Element): Remove the mention of Name_uController.
8554         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8555         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8556         the left hand side, carry out the assignment and adjust the left hand
8557         side.
8558         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8559         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8560         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8561         BIP_Collection and BIPcollection.
8562         (Build_Heap_Allocator): New routine used to allocate the return object
8563         of a build-in-place function onto a collection.
8564         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8565         (Expand_Call): Do not replace direct calls to Deep routines with their
8566         aliases.
8567         (Expand_N_Extended_Return_Statement): Give all variables shorter names
8568         and update their occurrences. Add a special return flag to monitor the
8569         [ab]normal execution of the function. The flag is set right before the
8570         return statement.
8571         Rewrite the mechanism used to allocate a build-in-place return object
8572         on the heap or on a storage pool.
8573         (Is_Direct_Deep_Call): New routine.
8574         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8575         build-in-place function call instead of a final list. Build a call to
8576         Set_Finalize_Address_Ptr to decorate the associated collection.
8577         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8578         order to name the build-in-place function call's result for later
8579         finalization. Add a collection to a build-in-place function call
8580         instead of a final list.
8581         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8582         build-in-place function call instead of a final list. Remove the code
8583         which moves one final list and transforms it into the actual in a
8584         nested build-in-place call.
8585         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8586         build-in-place function call instead of a final list.
8587         (Move_Final_List): Removed.
8588         (Needs_BIP_Collection): New routine.
8589         (Needs_BIP_Final_List): Removed.
8590         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8591         enumeration type BIP_Formal_Kind.
8592         Update the related comment.
8593         (Needs_BIP_Collection): New routine.
8594         (Needs_BIP_Final_List): Removed.
8595         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8596         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8597         majority of subprograms in this unit. Add Name_Finalize_Address to
8598         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8599         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8600         statements for an array type.
8601         (Build_Adjust_Statements): Create the adjust statements for a record
8602         type.
8603         (Build_Cleanup_Statements): New routine. A procedure which given any
8604         construct containing asynchronous calls, references to _master, or is a
8605         task body, a task allocation or a protected body produces the necessary
8606         runtime calls to clean up these constructs.
8607         (Build_Exception_Handler): New routine.
8608         (Build_Final_List): Removed.
8609         (Build_Finalization_Collection): New routine. A core procedure which
8610         creates a collection to service heap allocated controlled objects
8611         associated with an access-to-controlled type.
8612         (Build_Finalize_Statements): Create the finalization statements for a
8613         record types.
8614         (Build_Finalizer): New routine. A core procedure which given any
8615         construct with declarations and/or statements detects all objects which
8616         need any type of clean up (controlled objects, protected objects) and
8617         generates all necessary code to clean up the said objects in the proper
8618         order.
8619         (Build_Finalizer_Call): New routine.
8620         (Build_Initialize_Statements): Create the initialization statements for
8621         an array type. The generated routine contains code to finalize partially
8622         initialized arrays.
8623         (Build_Object_Declarations): New routine.
8624         (Build_Raise_Statement): New routine.
8625         (Clean_Simple_Protected_Objects): Removed.
8626         (Controller_Component): Removed.
8627         (Enclosing_Function): New routine.
8628         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8629         either declarations or statements or both.
8630         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8631         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8632         package.
8633         (Find_Final_List): Removed.
8634         (Global_Flist_Ref): Removed.
8635         (In_Finalization_Root): Removed.
8636         (Insert_Actions_In_Scope_Around): Determine the range of the transient
8637         scope in terms of tree nodes. Process all transient variables within
8638         that range.
8639         (Make_Adjust_Call): Rewritten. There is no longer an attach call
8640         generated after the adjust.
8641         (Make_Attach_Call): Removed.
8642         (Make_Call): New routine.
8643         (Make_Clean): Removed.
8644         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8645         build routines.
8646         (Make_Deep_Proc): Rewritten to generate the new profile signature used
8647         in Deep routines.
8648         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8649         build routines.
8650         (Make_Final_Call): Modified to simply create a call to either
8651         Deep_Finalize or Finalize.
8652         (Make_Finalize_Address_Body): New routine.
8653         (Make_Finalize_Address_Stmts): New routine. A function which produces
8654         TSS primitive Finalize_Address used in conjunction with heap allocated
8655         controlled objects.
8656         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8657         (Make_Init_Call): Rewritten. There is no longer an attach call
8658         generated after initialization.
8659         (Make_Local_Deep_Finalize): New routine.
8660         (Make_Set_Finalize_Address_Ptr_Call): New routine.
8661         (Make_Transient_Block): Remove the finalization list retrieval and
8662         manipulation.
8663         (Needs_Finalization): Moved to Exp_Util.
8664         (Parent_Field_Type): New routine.
8665         (Preprocess_Components): New routine.
8666         (Process_Transient_Objects): New routine.
8667         (Wrap_HSS_In_Block): New routine.
8668         (Wrap_Transient_Declaration): Remove finalization list management and
8669         controller insertion.
8670         (Wrap_Transient_Expression): Code reformatting.
8671         (Wrap_Transient_Statement): Code reformatting.
8672         * exp_ch7.ads (Build_Final_List): Removed.
8673         (Build_Finalization_Collection): New routine.
8674         (Build_Raise_Statement): New routine.
8675         (Controller_Component): Removed.
8676         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8677         (Find_Final_List): Removed.
8678         (In_Finalization_Root): Removed.
8679         (Is_Simple_Protected_Type): Update related comment.
8680         (Make_Adjust_Call): New parameter profile and associated comments.
8681         (Make_Attach_Call): Removed.
8682         (Make_Final_Call): New parameter profile and associated comments.
8683         (Make_Finalize_Address_Body): New routine.
8684         (Make_Init_Call): New parameter profile and associated comments.
8685         (Make_Local_Deep_Finalize): New routine.
8686         (Make_Set_Finalize_Address_Ptr_Call): New routine.
8687         (Needs_Finalization): Moved to Exp_Util.
8688         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8689         (Expand_N_Protected_Body): Remove the handling of finalization lists.
8690         (Find_Protection_Type): Moved to Exp_Util.
8691         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8692         (Make_DT): Update sequence of dispatch table initialization. Remove the
8693         initialization of field RC_Offset. Add initialization of field Needs_
8694         Finalization.
8695         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8696         Reimplement how an object is first finalized, then deallocated.
8697         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8698         Code reformatting.
8699         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8700         Register TSS_Finalize_Address with type TSS_Names.
8701         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8702         procedure provides the interface between an allocation / deallocation
8703         and the support machinery in Ada.Finalization.Heap_Management.
8704         (Find_Init_Call): Code reformatting.
8705         (Find_Init_Call_In_List): Code reformatting.
8706         (Find_Protection_Type): Moved from Exp_Ch9.
8707         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8708         (Has_Controlled_Coextensions): Removed.
8709         (Has_Controlled_Objects): New routine.
8710         (In_Library_Level_Package_Body): New routine.
8711         (Insert_Action_After): New routine.
8712         (Is_Finalizable_Transient): New routine. This predicate determines
8713         whether an object declaration is one of the many variants of controlled
8714         transients.
8715         (Is_Null_Access_BIP_Func_Call): New routine.
8716         (Is_Non_BIP_Func_Call): New routine.
8717         (Is_Related_To_Func_Return): New routine.
8718         (Needs_Finalization): Moved from Exp_Ch7.
8719         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8720         (Find_Protection_Type): Moved from Exp_Ch9.
8721         (Has_Controlled_Coextensions): Removed.
8722         (Has_Controlled_Objects): New routine.
8723         (In_Library_Level_Package_Body): New routine.
8724         (Insert_Action_After): New routine.
8725         (Is_Finalizable_Transient): New routine.
8726         (Is_Null_Access_BIP_Func_Call): New routine.
8727         (Is_Non_BIP_Func_Call): New routine.
8728         (Is_Related_To_Func_Return): New routine.
8729         (Needs_Finalization): Moved from Exp_ch7.
8730         * expander.adb (Expand): Add a case for N_Free_Statement.
8731         * freeze.adb (Freeze_All): Replace the generation of a finalization
8732         list with a collection for access-to-controlled types.
8733         (Freeze_Entity): Code reformatting.
8734         (Freeze_Record_Type): Remove the freezing of a record controller
8735         component.
8736         (Freeze_Subprogram): Code reformatting.
8737         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8738         finalization list.
8739         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8740         has a library-level finalizer.
8741         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8742         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8743         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8744         files. Add a-fihema to the list of object files.
8745         * par-ch4.adb:
8746         Alphabetize the associations in type Is_Parameterless_Attribute.
8747         * rtsfind.ads: Ada.Finalization_List.Controller and
8748         System.Finalization_Implementation are no longer a GNAT unit.
8749         Update the range of type Ada_Finalization_Child. Remove the following
8750         recoverable entities:
8751
8752            RE_Attach_To_Final_List
8753            RE_Deep_Tag_Attach
8754            RE_Finalize_List
8755            RE_Finalize_One
8756            RE_Finalizable_Ptr_Ptr
8757            RE_Global_Final_List
8758            RE_Limited_Record_Controller
8759            RE_List_Controller
8760            RE_Move_Final_List
8761            RE_Record_Controller
8762            RE_Simple_List_Controller
8763
8764         Add the following recoverable entities:
8765
8766            RE_Add_Offset_To_Address
8767            RE_Allocate
8768            RE_Base_Pool
8769            RE_Deallocate
8770            RE_Exception_Identity
8771            RE_Finalization_Collection
8772            RE_Finalization_Collection_Ptr
8773            RE_Needs_Finalization
8774            RE_Save_Library_Occurrence
8775            RE_Set_Finalize_Address_Ptr
8776            RE_Set_Storage_Pool_Ptr
8777            RE_Storage_Count
8778         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8779         Name_uController.
8780         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8781         (First_Stored_Discriminant): Remove the mention of Name_uController.
8782         * sem_aux.ads: Comment reformatting.
8783         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8784         to redecorate an already existing class-wide type.
8785         (Decorate_Tagged_Type): New parameter profile and associated comment.
8786         Create a "shadow class-wide type" for a shadow entity.
8787         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8788         of the final chain along with the associated comment.
8789         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8790         Full_Desig and set it to the full view of the designated type.
8791         Initialize the finalization collection to empty.
8792         (Build_Derived_Record_Type): Alphabetize local variables. Code
8793         reformatting.
8794         (Collect_Fixed_Components): Remove the mention of Name_uController.
8795         (Create_Constrained_Components): Remove the mention of Name_uController.
8796         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8797         class-wide type of a shadow entity.
8798         (Process_Full_View): Update the machinery which marks type
8799         Limited_Controlled's entity as limited.
8800         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8801         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8802         list, instead make a collection build-in-place formal.
8803         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8804         a designated type in order to establish a match between the renaming
8805         and the renamed entity.
8806         (Find_Selected_Component): Add guard to prevent spurious exceptions
8807         from being raised on .NET/JVM.
8808         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8809         to the list of primitive that need special processing. Update arrays
8810         C_Names and D_Names.
8811         (Replace_Types): Handle class-wide types.
8812         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8813         different parameter profile, look at the first formal.
8814         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8815         use clauses for Exp_Util.
8816         * sem_res.adb: Remove with and use clauses for Elists.
8817         (Propagate_Coextensions): Removed.
8818         (Resolve_Allocator): Do not propagate the list of coextensions from one
8819         allocator to another.
8820         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8821         Deaccessed_T to Desig_Typ.
8822         (Enter_Name): Remove the mention of Name_uController.
8823         (Gather_Components): Remove the mention of Name_uController.
8824         (Incomplete_Or_Private_View): New routine.
8825         (Is_Coextension_Root): Removed.
8826         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8827         * sem_util.ads (Incomplete_Or_Private_View): New routine.
8828         (Is_Coextension_Root): Removed.
8829         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8830         Controlled types are now derived from a null tagged record. Remove
8831         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8832         * sinfo.adb (Coextensions): Removed.
8833         (Set_Coextensions): Removed.
8834         * sinfo.ads: Remove Coextensions from the explanation of node fields
8835         and its uses in nodes.
8836         Update the field usage of N_Allocator.
8837         (Coextensions): Removed along with its pragma Inline.
8838         (Set_Coextensions): Removed along with its pragma Inline.
8839         * snames.ads-tmpl: Remove names
8840
8841           Name_uClean
8842           Name_uController
8843           Name_uFinal_List
8844           Name_uLocal_Final_List
8845           Name_Finalization_Root
8846           Name_Next
8847           Name_Prev
8848
8849         Add names
8850
8851           Name_uFinalizer
8852           Name_Finalize_Address
8853         * s-pooglo.adb (Allocate): Add overriding indicator.
8854         (Deallocate): Add overriding indicator.
8855         (Storage_Size): Add overriding indicator.
8856         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8857         than Finalize_Global_List.
8858         (Null_Finalize_Global_List): Removed.
8859         (Save_Library_Occurrence): New routine.
8860         * s-soflin.ads: Remove variable Finalize_Global_List along with its
8861         initialization. Add variable Finalize_Library_Objects along with its
8862         pragma Export. Add variables Library_Exception and
8863         Library_Exception_Set along with their pragma Export.
8864         (Null_Finalize_Global_List): Removed.
8865         (Save_Library_Occurrence): New routine.
8866         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8867         rather than Finalize_Global_List.
8868         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8869         of the constructed node.
8870
8871 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8872
8873         * link.c: Include "auto-host.h" before system headers.
8874
8875 2011-08-03  Vincent Celier  <celier@adacore.com>
8876
8877         * make.adb (Gnatmake): Add to table Library_Projs only library projects
8878         that are not extended. Do not check if a library project that is
8879         extended should be regenerated. Do not add to table Library_Paths the
8880         libraries that are in extended projects. Link only with libraries that
8881         are in libray projects that are not extended.
8882         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8883         for a library project that is extended.
8884
8885 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
8886
8887         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8888         conforming subprogram renamings that appear to be completions if they
8889         are not fully conformant.
8890         Such renamings are homographs but not completions.
8891         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8892         names in a subprogram renaming that appears in an instance.
8893
8894 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8895
8896         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8897         not immutably limited, build actual subtype from expression to provide
8898         proper bounds to caller.
8899
8900 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
8901
8902         * sem_ch8.adb: Minor comment correction.
8903
8904 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8905
8906         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8907         returning a limited array, use an extended return statement.
8908
8909 2011-08-03  Vincent Celier  <celier@adacore.com>
8910
8911         * make.adb (Initialize): If --subdirs= is used, but no project file is
8912         specified, attempt to create the specify subdir if it does not already
8913         exist and use it as the object directory as if -D had been specified.
8914
8915 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
8916
8917         * s-tpopsp-vms.adb: New file.
8918         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8919         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8920
8921 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8922
8923         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8924         package.
8925
8926 2011-08-03  Yannick Moy  <moy@adacore.com>
8927
8928         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8929         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8930         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8931         detect that an array has static bounds.
8932
8933 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8934
8935         * exp_dist.adb: Minor reformatting.
8936
8937 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
8938
8939         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8940         (ATCB_Key): Removed, not always used.
8941
8942 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8943
8944         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8945         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8946         most remaining global variables.
8947
8948 2011-08-03  Robert Dewar  <dewar@adacore.com>
8949
8950         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8951         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8952         reformatting.
8953
8954 2011-08-03  Javier Miranda  <miranda@adacore.com>
8955
8956         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8957         that must be passed by copy in VM targets.
8958
8959 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8960
8961         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8962         duplicates a similar htable now in the project tree.
8963
8964 2011-08-03  Claire Dross  <dross@adacore.com>
8965
8966         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8967         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8968         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8969         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8970         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8971         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8972         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8973         update.
8974
8975 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
8976
8977         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8978         (ATCB_Key): Removed, not always used.
8979         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8980         s-taprop-posix.adb.
8981         * s-tpopsp-tls.adb: New file.
8982         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8983         x86/x64/ia64/powerpc/sparc Linux.
8984
8985 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
8986
8987         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8988         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8989
8990 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8991
8992         * rtsfind.ads, exp_dist.adb, exp_dist.ads
8993         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8994         Fix type selection for mapping integer types to PolyORB types.
8995
8996 2011-08-03  Bob Duff  <duff@adacore.com>
8997
8998         * sem_ch7.adb: Minor comment clarification.
8999
9000 2011-08-03  Bob Duff  <duff@adacore.com>
9001
9002         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9003         an error analyzing a choice, skip further processing. Further
9004         processing could cause a crash or cascade errors.
9005
9006 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9007
9008         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9009         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9010         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9011         prj-env.ads (Shared_Project_Tree_Data): new type
9012         An aggregate project and its aggregated trees need to share the common
9013         data structures used for lists of strings, packages,... This makes the
9014         code simpler since otherwise we have to pass the root tree (also used
9015         for the configuration file data) in addition to the current project
9016         tree. This also avoids ambiguities as to which tree should be used.
9017         And finally this saves a bit of memory.
9018         (For_Every_Project_Imported): new parameter Tree.
9019         Since aggregated projects are using a different tree, we need to let
9020         the caller know which tree to use to manipulate the returned project.
9021
9022 2011-08-03  Robert Dewar  <dewar@adacore.com>
9023
9024         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9025         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9026         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9027         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9028
9029 2011-08-03  Javier Miranda  <miranda@adacore.com>
9030
9031         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9032         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9033
9034 2011-08-03  Bob Duff  <duff@adacore.com>
9035
9036         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9037         the Base_Type.
9038
9039 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
9040
9041         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9042         g-sehash.ads: Fix typo. Update header.
9043
9044 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9045
9046         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9047         expansion.
9048
9049 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9050
9051         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9052         prefixes of private types along with records, since the selector may be
9053         a discriminant.
9054         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9055         private types along with records, since the selector may be a
9056         discriminant.
9057
9058 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9059
9060         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9061
9062 2011-08-03  Javier Miranda  <miranda@adacore.com>
9063
9064         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9065         Tagged_Type_Expansion.
9066
9067 2011-08-03  Yannick Moy  <moy@adacore.com>
9068
9069         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9070         violation when the argument of concatenation is the name of a
9071         constant.
9072
9073 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9074
9075         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9076         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9077         (Process_Declarative_Items): new parameter Child_Env.
9078
9079 2011-08-03  Yannick Moy  <moy@adacore.com>
9080
9081         * alfa.ads: Update format of ALFA section in ALI file in order to
9082         add a mapping from bodies to specs when both are present.
9083         (ALFA_Scope_Record): Add components for spec file/scope.
9084         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9085         present.
9086         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9087         collected, fill in the spec information when relevant.
9088         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9089         present.
9090
9091 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9092
9093         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9094         code unit to decide whether to add internally generated subprograms.
9095
9096 2011-08-03  Javier Miranda  <miranda@adacore.com>
9097
9098         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9099         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9100         be handled by copy in VM targets.
9101
9102 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9103
9104         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9105         code with Makeutl.Get_Switches.
9106         * prj-tree.adb: Update comment.
9107
9108 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9109
9110         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9111         subprogram with a limited formal that does not support external
9112         streaming.
9113
9114 2011-08-03  Yannick Moy  <moy@adacore.com>
9115
9116         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9117         continuation line
9118         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9119         not from current unit in two phases, because it is not possible to
9120         change the table while iterating over its content.
9121         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9122
9123 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9124
9125         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9126         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9127
9128 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9129
9130         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9131         and the component type is composite, this is ambiguous for predefined
9132         concatenation, but if the node is not overloaded and the entity is a use
9133         -defined function its profile can be used to resolve that aggregate.
9134
9135 2011-08-03  Robert Dewar  <dewar@adacore.com>
9136
9137         * exp_ch4.adb: Minor code cleanup.
9138
9139 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9140
9141         * exp_dist.adb: Do not generate distribution stubs if serious errors
9142         have been diagnosed.
9143
9144 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9145
9146         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9147         the first formal of a primitive operation, go to the base type to
9148         handle properly an access to a derived type with constrained
9149         discriminants.
9150         * sem_type.adb (Disambiguate): an immediately visible operator hides a
9151         user-defined function that is only use-visible.
9152
9153 2011-08-03  Robert Dewar  <dewar@adacore.com>
9154
9155         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9156         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9157         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9158         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9159         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9160         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9161         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9162         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9163
9164 2011-08-03  Robert Dewar  <dewar@adacore.com>
9165
9166         * repinfo.adb (List_Mechanism): Add handling of
9167         Convention_Ada_Pass_By_XXX.
9168         * sem_mech.adb (Set_Mechanism): Ditto.
9169         * sem_prag.adb (Process_Convention): Add entries for
9170         Convention_Ada_Pass_By_XXX.
9171         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9172
9173 2011-08-03  Pascal Obry  <obry@adacore.com>
9174
9175         * makeutl.adb: Minor reformatting.
9176
9177 2011-08-03  Vincent Celier  <celier@adacore.com>
9178
9179         * fname-uf.adb
9180         (Get_File_Name) If the file cannot be found when there are no config
9181         pragmas file and May_Fail is True, return No_File instead of the file
9182         name, to be consistent.
9183
9184 2011-08-03  Pascal Obry  <obry@adacore.com>
9185
9186         * adaint.c (__gnat_is_executable_file_attr): Avoid access
9187         to null pointer.
9188
9189 2011-08-03  Javier Miranda  <miranda@adacore.com>
9190
9191         * sem_ch13.adb
9192         (Same_Representation): In VM targets the representation of arrays with
9193         aliased components differs from arrays with non-aliased components.
9194
9195 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9196
9197         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9198         not systematically lower case attribute indexes that contain no "."
9199         Fix definition of several Naming attributes, which take
9200         a unit name as index and therefore should be case insensitive.
9201         Minor refactoring (reduce length of variable names).
9202
9203 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9204
9205         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9206
9207 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9208
9209         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9210         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9211         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9212         prj-tree.ads (Prj.Tree.Environment): new type.
9213
9214 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9215
9216         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9217         prj-tree.adb, prj-tree.ads (Environment): new type.
9218
9219 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9220
9221         * prj-tree.ads: Remove unused variable.
9222
9223 2011-08-03  Yannick Moy  <moy@adacore.com>
9224
9225         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9226         issuing messages related to SPARK restriction violation.
9227
9228 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9229
9230         * sem_ch6.adb: guard against error nodes in return statements.
9231
9232 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9233
9234         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9235         a warning can only appear on a configuration file, so emit warning
9236         without further checks.
9237
9238 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9239
9240         * s-interr.ads: add overriding keyword.
9241
9242 2011-08-03  Geert Bosch  <bosch@adacore.com>
9243
9244         * exp_attr.adb: Fix minor typo.
9245
9246 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9247
9248         * par-ch4.adb: improve error recovery.
9249
9250 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9251
9252         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9253         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9254         to Errout_Handling.
9255
9256 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9257
9258         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9259         "external" as an attribute name in aggregate projects.
9260
9261 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9262
9263         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9264         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9265         from 0, so we need to adjust.
9266
9267 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9268
9269         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9270         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9271
9272 2011-08-03  Yannick Moy  <moy@adacore.com>
9273
9274         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9275         restriction on overloaded entity if the entity is not an operator.
9276
9277 2011-08-03  Yannick Moy  <moy@adacore.com>
9278
9279         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9280         restrict.ads: Rename remaining Check_Formal_Restriction* into
9281         Check_SPARK_Restriction*.
9282
9283 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9284
9285         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9286         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9287         qualifier.
9288         (Project_Empty): removed
9289         (Empty_Project): new parameter Qualifier
9290         This is used to have fields specific to aggregate projects, cleaner
9291         New field to store the list of aggregated projects.
9292         (Check_Aggregate_Project): removed
9293         (Process_Aggregated_Projects, Free): new subprograms.
9294
9295 2011-08-03  Olivier Hainque  <hainque@adacore.com>
9296
9297         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9298
9299 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9300
9301         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9302         explicit dereference of an unconstrained type, create a constrained
9303         subtype for it, as is done for function calls that return an
9304         unconstrained type.
9305
9306 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9307
9308         * g-pehage.adb (Finalize): Avoid possible double-free.
9309
9310 2011-08-03  Steve Baird  <baird@adacore.com>
9311
9312         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9313         Elab_Spec/Body attrs in CodePeer_Mode.
9314
9315 2011-08-03  Javier Miranda  <miranda@adacore.com>
9316
9317         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9318         low bound is not known at compile time but they have no others choice.
9319         Done because in this case the bounds can be obtained directly from the
9320         aggregate.
9321
9322 2011-08-03  Ed Falis  <falis@adacore.com>
9323
9324         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9325         on VxWorks SMP. Remove unusable constant ANY_CPU.
9326
9327 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9328
9329         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9330         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9331         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9332         Prj.Env.Initialize_Empty): new subprograms
9333         (Get_Env, Find_Project): remove parameter Target_Name.
9334
9335 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9336
9337         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9338         as a condition for the delayed call to Derived_Subprograms done for the
9339         case of the rewriting of a derived type that constrains the
9340         discriminants of its parent type.
9341         Avoids redundant subprogram derivations for private subtype derivations.
9342
9343 2011-08-03  Javier Miranda  <miranda@adacore.com>
9344
9345         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9346         Build_Record_Aggr_Code.
9347         (Build_Record_Aggr_Code): Add missing support to initialize hidden
9348         discriminants in extension aggregates.
9349
9350 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9351
9352         * prj-pp.adb (Print): also output project qualifiers, since in
9353         particular "aggregate" is mandatory in an aggregate project.
9354
9355 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9356
9357         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9358         (Debug_Output): new function.
9359
9360 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9361
9362         * gnat_ugn.texi: Document -Wstack-usage.
9363         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9364
9365 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9366
9367         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9368         have keyword LIMITED.
9369
9370 2011-08-03  Yannick Moy  <moy@adacore.com>
9371
9372         * alfa.adb, alfa.ads, alfa_test.adb: New files.
9373         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9374         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9375         section (does not happen in compiler, only if code directly calls
9376         Scan_ALI).
9377         * get_alfa.adb, get_alfa.ads: New files.
9378         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9379         needed.
9380         * lib-xref-alfa.adb: New file.
9381         * lib-xref.adb, lib-xref.ads
9382         (Xref_Entry): redefine information needed in cross-references for ALFA.
9383         Push ALFA treatments in separated local package.
9384         (Enclosing_Subpragram_Or_Package): treat specially subprogram
9385         identifiers. Return entity of package body instead of spec. Return
9386         Empty for a scope with no location.
9387         (Generate_Reference): adapt to new components for ALFA information.
9388         Remove the need for D references on definitions.
9389         (Is_Local_Reference): moved to ALFA local package
9390         (Output_References): extract subfunction as Extract_Source_Name
9391         (Output_Local_References): remove procedure, replaced by filtering of
9392         cross-references in package ALFA and printing in Put_ALFA.
9393         (Write_Entity_Name): remove procedure
9394         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9395         print exact name of entity as it appears in source file
9396         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9397         * put_alfa.adb, put_alfa.ads: New files.
9398         * xref_lib.adb (Search_Xref): protect read of cross-references against
9399         reading other sections of the ALI file, in gnatxref
9400         (Search): protect read of cross-references against reading other
9401         sections of the ALI file, in gnatfind.
9402         * gcc-interface/Make-lang.in: Update dependencies.
9403
9404 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9405
9406         * sem_ch3.adb: Minor reformatting.
9407
9408 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9409
9410         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9411         raising an exception.
9412
9413 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9414
9415         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9416         type, always use 1 as the lower bound or string, even if lower bound of
9417         context is not static, to handle properly null strings in a non-static
9418         context.
9419
9420 2011-08-03  Bob Duff  <duff@adacore.com>
9421
9422         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9423         always legal on the right-hand side of an assignment statement; there
9424         is always an applicable index constraint in this case. Therefore, the
9425         check for Pkind = N_Assignment_Statement is now unconditional -- it
9426         doesn't depend on whether Is_Constrained (Typ).
9427
9428 2011-08-03  Robert Dewar  <dewar@adacore.com>
9429
9430         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9431
9432 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9433
9434         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9435         for an itype created within a generic unit.
9436
9437 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9438
9439         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9440         suppresses all inlining.
9441
9442 2011-08-03  Robert Dewar  <dewar@adacore.com>
9443
9444         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9445         exp_aggr.adb: Minor reformatting.
9446
9447 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9448
9449         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9450         tagged assignment when discriminant checks are suppressed. This is
9451         useless and extremely costly in terms of static stack usage.
9452
9453 2011-08-03  Bob Duff  <duff@adacore.com>
9454
9455         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9456         of generics, because this leads to the wrong entity in the wrong scope,
9457         causing (e.g.) pragma Export_Procedure to get an error if the entity is
9458         an instance.
9459         (Process_Interface_Name): Follow Alias for instances of generics, to
9460         correct for the above change.
9461
9462 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9463
9464         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9465         is an integer literal it is always safe to replace the reference. In
9466         addition, if the reference appears in the generated code for an object
9467         declaration it is necessary to copy because otherwise the reference
9468         might be to the uninitilized value of the discriminant of the object
9469         itself.
9470
9471 2011-08-03  Pascal Obry  <obry@adacore.com>
9472
9473         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9474         ACL used, in this case we want to check for ending .exe, not .exe
9475         anywhere in the path.
9476
9477 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9478
9479         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9480         the tree structure (semantic decoration of references to record
9481         discriminants).
9482
9483 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9484
9485         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9486         choices of a named array aggregate, bail out when any choices are
9487         marked as Errors_Posted.
9488
9489 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9490
9491         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9492         in which entity is frozen, to handle properly loop variables in
9493         iterators.
9494
9495 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9496
9497         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9498         subtype is not static, compute the upper bound using attributes, to
9499         handle properly index types that are not integer types.
9500
9501 2011-08-03  Bob Duff  <duff@adacore.com>
9502
9503         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9504         Update copyright notice.
9505
9506 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9507
9508         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9509         Original_Discriminant if within an instance.
9510         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9511
9512 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9513
9514         * einfo.ads: Minor reformatting.
9515
9516 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9517
9518         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9519         composite type with an unfrozen subcomponent, in the profile of a
9520         primitive operation.
9521
9522 2011-08-03  Robert Dewar  <dewar@adacore.com>
9523
9524         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9525
9526 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9527
9528         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9529         unconstrained type with discriminants is initialized with an aggregate,
9530         use the constrained subtype of the aggregate as the type of the object,
9531         because it is immutable, and this allows the back-end to generate no
9532         code for the object declaration.
9533
9534 2011-08-03  Robert Dewar  <dewar@adacore.com>
9535
9536         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9537         comparison operand is variable, and turns out to be zero or negative.
9538
9539 2011-08-03  Javier Miranda  <miranda@adacore.com>
9540
9541         * exp_intr.adb
9542         (Expand_Dispatching_Constructor_Call): Disable expansion of
9543         code required for native targets. Done to avoid generating
9544         references to unavailable runtime entities in VM targets.
9545         * exp_ch3.adb
9546         (Expand_N_Object_Declaration): Add missing support to handle
9547         the explicit initialization of class-wide interface objects.
9548         Fix documentation.
9549
9550 2011-08-03  Matthew Heaney  <heaney@adacore.com>
9551
9552         * a-cobove.adb (Merge): Move source onto target, instead of using
9553         Assign.
9554
9555 2011-08-03  Matthew Heaney  <heaney@adacore.com>
9556
9557         * a-cbdlli.adb (Splice): Move source items from first to last.
9558
9559 2011-08-03  Yannick Moy  <moy@adacore.com>
9560
9561         * sem_util.ads: Add comment.
9562
9563 2011-08-03  Javier Miranda  <miranda@adacore.com>
9564
9565         * exp_aggr.adb
9566         (Expand_Record_Aggregate): In VM targets disable the expansion into
9567         assignments of aggregates whose type is not known at compile time.
9568
9569 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9570
9571         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9572         protected entries and task entries, to build the proper renaming
9573         declaration for entry formals, used in debugging.
9574         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9575         parameters in the same way.
9576
9577 2011-08-02  Robert Dewar  <dewar@adacore.com>
9578
9579         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9580         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9581         code reorganization.
9582
9583 2011-08-02  Robert Dewar  <dewar@adacore.com>
9584
9585         * debug.adb: Debug flag d.P to suppress length comparison optimization
9586         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9587         comparison of Length by comparing First/Last instead.
9588
9589 2011-08-02  Matthew Heaney  <heaney@adacore.com>
9590
9591         * a-cobove.ads: Code clean up.
9592
9593 2011-08-02  Vincent Celier  <celier@adacore.com>
9594
9595         * adaint.c (file_names_case_sensitive_cache): New static int.
9596         (__gnat_get_file_names_case_sensitive): Cache the return value in
9597         file_names_case_sensitive_cache at the first invocation, to avoid
9598         multiple calls to getenv.
9599
9600 2011-08-02  Bob Duff  <duff@adacore.com>
9601
9602         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9603
9604 2011-08-02  Yannick Moy  <moy@adacore.com>
9605
9606         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9607         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9608         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9609         indicate that we are in a precondition or postcondition. This is used in
9610         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9611         decide whether to flag the spec or body of the current subprogram as
9612         not in ALFA.
9613
9614 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
9615
9616         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9617         list.
9618         * a-extiin.ads: New file.
9619
9620 2011-08-02  Bob Duff  <duff@adacore.com>
9621
9622         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9623         now raises Name_Error instead of Use_Error in certain cases. The other
9624         parts of this AI were already implemented properly.
9625
9626 2011-08-02  Vincent Celier  <celier@adacore.com>
9627
9628         * link.c: Only import "auto-host.h" when building the gnattools.
9629
9630 2011-08-02  Yannick Moy  <moy@adacore.com>
9631
9632         * sem_util.adb: Inter-unit inlining does not work for a subprogram
9633         which calls a local subprogram, so extract subprogram
9634         from Mark_Non_ALFA_Subprogram_Body.
9635
9636 2011-08-02  Javier Miranda  <miranda@adacore.com>
9637
9638         * exp_ch9.adb
9639         (Extract_Dispatching_Call): If the type of the dispatching object is an
9640         access type then return an explicit dereference in the Object out-mode
9641         parameter.
9642
9643 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9644
9645         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9646         compatibility checks for all indexes of an array subtype, not just the
9647         first. Reset Has_Dynamic_Range_Check on the subtype before each
9648         potential check to ensure that Insert_Range_Checks will not elide any
9649         of the dynamic checks.
9650
9651 2011-08-02  Yannick Moy  <moy@adacore.com>
9652
9653         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9654         SPARK restriction at parsing time.
9655         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9656         directive only if the SPARK restriction is set for this unit.
9657
9658 2011-08-02  Yannick Moy  <moy@adacore.com>
9659
9660         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9661         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9662         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9663         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9664         Mark_Non_ALFA_Subprogram_Body.
9665         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9666         inlined.
9667
9668 2011-08-02  Yannick Moy  <moy@adacore.com>
9669
9670         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9671         might be costly.
9672
9673 2011-08-02  Robert Dewar  <dewar@adacore.com>
9674
9675         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9676         exp_ch3.adb: Minor reformatting.
9677
9678 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9679
9680         * adaint.c (__gnat_locate_exec_on_path): only returns executable
9681         files, not any regular file.
9682         (__gnat_locate_file_with_predicate): new subprogram.
9683
9684 2011-08-02  Yannick Moy  <moy@adacore.com>
9685
9686         * sinfo.adb, sinfo.ads: Restrict the use of flags
9687         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9688         nodes, plus N_Subtype_Declaration for the 2nd one.
9689
9690 2011-08-02  Sergey Rybin  <rybin@adacore.com>
9691
9692         * gnat_rm.texi: Ramification of pragma Eliminate documentation
9693          - fix bugs in the description of Source_Trace;
9694          - get rid of UNIT_NAME;
9695
9696 2011-08-02  Javier Miranda  <miranda@adacore.com>
9697
9698         * exp_ch9.adb
9699         (Build_Dispatching_Requeue): Adding support for VM targets
9700         since we cannot directly reference the Tag entity.
9701         * exp_sel.adb (Build_K): Adding support for VM targets.
9702         (Build_S_Assignment): Adding support for VM targets.
9703         * exp_disp.adb
9704         (Default_Prim_Op_Position): In VM targets do not restrict availability
9705         of predefined interface primitives to compiling in Ada 2005 mode.
9706         (Is_Predefined_Interface_Primitive): In VM targets this service is not
9707         restricted to compiling in Ada 2005 mode.
9708         (Make_VM_TSD): Generate code that declares and initializes the OSD
9709         record. Needed to support dispatching calls through synchronized
9710         interfaces.
9711         * exp_ch3.adb
9712         (Make_Predefined_Primitive_Specs): Enable generation of predefined
9713         primitives associated with synchronized interfaces.
9714         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9715         primitives associated with synchronized interfaces.
9716
9717 2011-08-02  Yannick Moy  <moy@adacore.com>
9718
9719         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9720         statements hidden in SPARK if preceded by the HIDE directive
9721         (Parse_Exception_Handlers): mark each exception handler in a sequence of
9722         exception handlers as hidden in SPARK if preceded by the HIDE directive
9723         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9724         if starting with the HIDE directive
9725         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9726         starting with the HIDE directive; mark the declarations in a private
9727         part as hidden in SPARK if the private part starts with the HIDE
9728         directive
9729         * restrict.adb, restrict.ads
9730         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9731         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9732         argument node belongs to a part which is hidden in SPARK
9733         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9734         parts in SPARK; protect the possibly costly call to
9735         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9736         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9737         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9738         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9739         Tok_SPARK_Hide.
9740         (Scan): recognize special comment starting with '#' and followed by
9741         SPARK keyword "hide" as a HIDE directive.
9742
9743 2011-08-02  Yannick Moy  <moy@adacore.com>
9744
9745         * types.ads, erroutc.ads: Minor reformatting.
9746
9747 2011-08-02  Vincent Celier  <celier@adacore.com>
9748
9749         * link.c: Add response file support for cross platforms.
9750
9751 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9752
9753         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9754         in an association, set parent field of copy before partial analysis.
9755         * sem_res.adb (Resolve_Slice): create reference to itype only when
9756         expansion is enabled.
9757
9758 2011-08-02  Yannick Moy  <moy@adacore.com>
9759
9760         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9761         for new flag denoting which subprogram bodies are in ALFA
9762         * restrict.adb, sem_ch7.adb: Update comment
9763         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9764         sem_ch9.adb, sem_res.adb: Add calls to
9765         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9766         * sem_ch6.adb (Analyze_Function_Return): add calls to
9767         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9768         middle of the body, and extended return.
9769         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9770         False when missing return.
9771         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9772         to True for subprograms whose spec is in ALFA. Remove later on the flag
9773         on the entity used for a subprogram body when there exists a separate
9774         declaration.
9775         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9776         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9777         False, otherwise do nothing.
9778
9779 2011-08-02  Robert Dewar  <dewar@adacore.com>
9780
9781         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9782
9783 2011-08-02  Yannick Moy  <moy@adacore.com>
9784
9785         * sem_ch4.ads: minor formatting.
9786
9787 2011-08-02  Yannick Moy  <moy@adacore.com>
9788
9789         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9790         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9791         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9792         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9793         opt.ads: cleanup of SPARK mode
9794
9795 2011-08-02  Yannick Moy  <moy@adacore.com>
9796
9797         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9798         types.
9799         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9800         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9801         * sem_ch3.adb
9802         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9803         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9804         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9805         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9806         types.
9807         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9808         non-static range.
9809         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9810         functions whose return type is not in ALFA.
9811         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9812         specifications.
9813         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9814         parameter's type is not in ALFA.
9815         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9816         types are in ALFA.
9817
9818 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9819
9820         * sem_ch6 (Analyze_Expression_Function): treat the function as
9821         Inline_Always, and introduce a subprogram declaration for it when it is
9822         not a completion.
9823         * inline.adb (Add_Inlined_Body): recognize bodies that come from
9824         expression functions, so that the back-end can determine whether they
9825         can in fact be inlined.
9826         * sem_util.adb (Is_Expression_Function): predicate to determine whether
9827         a function body comes from an expression function.
9828
9829 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9830
9831         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9832         null exclusions to test Can_Never_Be_Null on the anonymous access types
9833         of the formals rather than testing the formals themselves. Exclude this
9834         check in cases where the Old_Formal is marked as a controlling formal,
9835         to avoid issuing spurious errors for bodies completing dispatching
9836         operations (due to the flag not getting set on controlling access
9837         formals in body specs).
9838         (Find_Corresponding_Spec): When checking full and subtype conformance of
9839         subprogram bodies in instances, pass Designated and E in that order, for
9840         consistency with the expected order of the formals (New_Id followed by
9841         Old_Id).
9842
9843 2011-08-02  Robert Dewar  <dewar@adacore.com>
9844
9845         * sem_ch8.adb: Minor reformatting.
9846
9847 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9848
9849         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9850         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9851         primitive operations of class-wide actuals.
9852
9853 2011-08-02  Javier Miranda  <miranda@adacore.com>
9854
9855         * exp_atag.ads, exp_atag.adb
9856         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9857         since its value is implicitly passed in argument Typ.
9858         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9859         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9860         Build_Common_Dispatching_Select_Statements.
9861
9862 2011-08-02  Robert Dewar  <dewar@adacore.com>
9863
9864         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9865         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9866         Minor reformatting.
9867
9868 2011-08-02  Robert Dewar  <dewar@adacore.com>
9869
9870         * sem_res.adb: Minor reformatting.
9871         * sem_prag.adb: Minor reformatting.
9872
9873 2011-08-02  Javier Miranda  <miranda@adacore.com>
9874
9875         * exp_atag.adb, exp_atags.ads
9876         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9877         by the tagged type Entity. Required to use this routine in the VM
9878         targets since we do not have available the Tag entity in the VM
9879         platforms.
9880         * exp_ch6.adb
9881         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9882         Ada.Tags has not been previously loaded.
9883         * exp_ch7.adb
9884         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9885         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9886         * sem_aux.adb
9887         (Enclosing_Dynamic_Scope): Add missing support to handle the full
9888         view of enclosing scopes. Required to handle enclosing scopes that
9889         are synchronized types whose full view is a task type.
9890         * exp_disp.adb
9891         (Build_VM_TSDs): Minor code improvement to avoid generating and
9892         analyzing lists with empty nodes.
9893         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9894         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9895         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9896         (Make_Disp_Timed_Select_Body): Add support for VM targets.
9897         (Make_Select_Specific_Data_Table): Add support for VM targets.
9898         (Make_VM_TSD): Generate code to initialize the SSD structure of
9899         the TSD.
9900
9901 2011-08-02  Yannick Moy  <moy@adacore.com>
9902
9903         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9904         cross-references section in ALI.
9905         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9906         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9907         Sub).
9908         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9909         subprogram or package entity of a node
9910         (Is_Local_Reference_Type): new function returns True for references
9911         selected in local cross-references.
9912         (Lt): function extracted from Lt in Output_References
9913         (Write_Entity_Name): function extracted from Output_References
9914         (Generate_Definition): generate reference with type 'D' for definition
9915         of objects (object declaration and parameter specification), with
9916         appropriate locations and units, for use in local cross-references.
9917         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9918         references of type 'I' for initialization in object definition.
9919         (Output_References): move part of function Lt and procedure
9920         Write_Entity_Name outside of the body. Ignore references of types 'D'
9921         and 'I' introduced for local cross-references.
9922         (Output_Local_References): new procedure to output the local
9923         cross-references sections.
9924         (Lref_Entity_Status): new array defining whether an entity is a local
9925         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9926         with 'I' type when initialization expression is present.
9927         * get_scos.adb, get_scos.ads: Correct comments and typos
9928
9929 2011-08-02  Javier Miranda  <miranda@adacore.com>
9930
9931         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9932         the JVM target.
9933         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9934         the JVM target.
9935         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9936         TSD support.
9937
9938 2011-08-02  Vincent Celier  <celier@adacore.com>
9939
9940         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9941         (No_Space_Img): New function
9942         (Find_Excluded_Sources): When reading from a file, record the file name
9943         and the line number for each excluded source.
9944         (Mark_Excluded_Sources): When reporting an error, if the excluded
9945         sources were read from a file, include file name and line number in
9946         the error message.
9947
9948 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9949
9950         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9951
9952 2011-08-02  Robert Dewar  <dewar@adacore.com>
9953
9954         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9955
9956 2011-08-02  Javier Miranda  <miranda@adacore.com>
9957
9958         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9959         generation of TSDs to the DOTNET compiler.
9960         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9961         generation of TSDs to the DOTNET compiler.
9962
9963 2011-08-02  Javier Miranda  <miranda@adacore.com>
9964
9965         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9966         record of all the tagged types declared inside library level package
9967         declarations, library level package bodies or library level subprograms.
9968         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9969         associated with a given tagged type.
9970         (Build_VM_TSDs): New subprogram.
9971         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9972         compilation units that are subprograms.
9973         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9974         compilation units that are package bodies.
9975         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9976         units that are a package declaration or a package instantiation.
9977         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9978         reorganization to improve the error generated by the frontend when the
9979         function Ada.Tags.Secondary_Tag is not available.
9980         * rtsfind.ads (RE_Register_TSD): New runtime entity.
9981         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9982
9983 2011-08-02  Javier Miranda  <miranda@adacore.com>
9984
9985         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9986
9987 2011-08-02  Robert Dewar  <dewar@adacore.com>
9988
9989         * s-imenne.ads: Minor reformatting.
9990
9991 2011-08-02  Robert Dewar  <dewar@adacore.com>
9992
9993         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9994         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9995         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9996
9997 2011-08-02  Robert Dewar  <dewar@adacore.com>
9998
9999         * einfo.ads (Materialize_Entity): Document this is only for renamings
10000         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10001         required debug information in the case where we transform the object
10002         declaration into a renaming declaration.
10003         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10004         object
10005         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10006         Materialize_Entity.
10007
10008 2011-08-02  Robert Dewar  <dewar@adacore.com>
10009
10010         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10011         Suppress_Init_Procs.
10012         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10013         Suppress_Initialization/Initialization_Suppressed.
10014         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10015         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10016         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10017         * sem_prag.adb: New processing for pragma Suppress_Initialization.
10018
10019 2011-08-02  Robert Dewar  <dewar@adacore.com>
10020
10021         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10022         Minor reformatting.
10023
10024 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10025
10026         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10027         only have inheritable classwide pre/postconditions.
10028
10029 2011-08-02  Javier Miranda  <miranda@adacore.com>
10030
10031         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10032         * rtsfind.ads (RE_Check_TSD): New runtime entity.
10033         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10034         checks if the external tag of a type is the same as the external tag
10035         of some other declaration.
10036
10037 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10038
10039         * s-taskin.ads: Minor reformatting.
10040
10041 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10042
10043         * g-comlin.adb (Display_Help): swap the order in which it prints the
10044         short help and the general usage.
10045
10046 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10047
10048         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10049         the aspect declarations and attach them to the generic copy for
10050         subsequent analysis.
10051         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10052         declarations of the generic tree to the new subprogram declarations.
10053         * sem_attr.adb (Check_Precondition_Postcondition): recognize
10054         conditions that apply to a subprogram instance.
10055
10056 2011-08-02  Robert Dewar  <dewar@adacore.com>
10057
10058         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10059
10060 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10061
10062         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10063         private type with a tagged full view is not derived in the immediate
10064         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10065
10066 2011-08-02  Robert Dewar  <dewar@adacore.com>
10067
10068         * exp_ch4.adb: Minor reformatting.
10069
10070 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10071
10072         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
10073         Ada2012 iterator, the loop will be rewritten during expansion into a
10074         while loop with a cursor and an element declaration. Do not analyze the
10075         body in this case, because if the container is for indefinite types the
10076         actual subtype of the elements will only be determined when the cursor
10077         declaration is analyzed.
10078
10079 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10080
10081         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10082         size/alignment related attributes in CodePeer_Mode.
10083
10084 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10085
10086         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10087         Prepend_Element, since this can result in the operation getting the
10088         wrong slot in the full type's dispatch table if the full type has
10089         inherited operations. The incomplete type's operation will get added
10090         to the proper position in the full type's primitives
10091         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10092         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10093         dispatching operations, since there are cases where nonprimitive
10094         subprograms can get added to the list of incomplete dependents (such
10095         as subprograms in nested packages).
10096         * sem_ch6.adb (Process_Formals): First, remove test for being in a
10097         private part when determining whether to add a primitive with a
10098         parameter of a tagged incomplete type to the Private_Dependents list.
10099         Such primitives can also occur in the visible part, and should not have
10100         been excluded from being private dependents.
10101         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10102         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10103         list of a Taft-amendment incomplete type is a primitive before issuing
10104         an error that the full type must appear in the same unit. There are
10105         cases where nonprimitives can be in the list (such as subprograms in
10106         nested packages).
10107         * sem_disp.adb (Derives_From): Use correct condition for checking that
10108         a formal's type is derived from the type of the corresponding formal in
10109         the parent subprogram (the condition was completely wrong). Add
10110         checking that was missing for controlling result types being derived
10111         from the result type of the parent operation.
10112
10113 2011-08-02  Yannick Moy  <moy@adacore.com>
10114
10115         * errout.adb (First_Node): minor renaming
10116         * restrict.adb (Check_Formal_Restriction): put restriction warning on
10117         first node.
10118
10119 2011-08-02  Yannick Moy  <moy@adacore.com>
10120
10121         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10122         before accessing operands.
10123         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10124         decide whether an initialization expression respects SPARK rules, as
10125         the plain node is the expanded one. This allows for more valid warnings
10126         to be issued.
10127         * gnat_rm.texi: Minor update.
10128
10129 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10130
10131         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10132         previous change.
10133
10134 2011-08-02  Robert Dewar  <dewar@adacore.com>
10135
10136         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10137
10138 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10139
10140         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10141         loop statements and the element renaming declaration with a block when
10142         the element type is controlled.
10143
10144 2011-08-02  Yannick Moy  <moy@adacore.com>
10145
10146         * sinfo.ads: Minor formatting.
10147
10148 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10149
10150         * sem_aggr.adb (Add_Association): if the association has a box and no
10151         expression, use the Sloc of the aggregate itself for the new
10152         association.
10153         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10154         the Original_Node.
10155
10156 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10157
10158         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10159         When a container is provided via a function call, generate a renaming
10160         of the function result. This avoids the creation of a transient scope
10161         and the premature finalization of the container.
10162         * exp_ch7.adb (Is_Container_Cursor): Removed.
10163         (Wrap_Transient_Declaration): Remove the supression of the finalization
10164         of the list controller when the declaration denotes a container cursor,
10165         it is not needed.
10166
10167 2011-08-02  Yannick Moy  <moy@adacore.com>
10168
10169         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10170         node is from source, instead of the original node being from source.
10171         * sem_aggr.adb
10172         (Resolve_Array_Aggregate): refine the check for a static expression, to
10173         recognize also static ranges
10174         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10175         Array_Type_Declaration): postpone the test for the type being a subtype
10176         mark after the type has been resolved, so that component-selection and
10177         expanded-name are discriminated.
10178         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10179         to distinguish the case of an iteration scheme, so that an error is
10180         issed on a non-static range in SPARK except in an iteration scheme.
10181         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10182         In_Iter_Schm = True.
10183         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10184         user-defined operators so that they are allowed in renaming
10185         * sem_ch8.adb
10186         (Find_Selected_Component): refine the check for prefixing of operators
10187         so that they are allowed in renaming. Move the checks for restrictions
10188         on selector name after analysis discriminated between
10189         component-selection and expanded-name.
10190         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10191         concatenation argument of string type if it is static.
10192         * sem_util.adb, sem_util.ads
10193         (Check_Later_Vs_Basic_Declarations): add a new function
10194         Is_Later_Declarative_Item to decice which declarations are allowed as
10195         later items, in the two different modes Ada 83 and SPARK. In the SPARK
10196         mode, add that renamings are considered as later items.
10197         (Enclosing_Package): new function to return the enclosing package
10198         (Enter_Name): correct the rule for homonyms in SPARK
10199         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10200         from source (result of expansion) to avoid issuing wrong warnings.
10201
10202 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10203
10204         * errout.adb: On anything but an expression First_Node returns its
10205         argument.
10206
10207 2011-08-02  Pascal Obry  <obry@adacore.com>
10208
10209         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10210
10211 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10212
10213         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10214         Set the associated loop as the related expression of internally
10215         generated cursors.
10216         * exp_ch7.adb (Is_Container_Cursor): New routine.
10217         (Wrap_Transient_Declaration): Supress the finalization of the list
10218         controller when the declaration denotes a container cursor.
10219
10220 2011-08-02  Yannick Moy  <moy@adacore.com>
10221
10222         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10223         command line now.
10224         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10225         expression is a simple expression. This check cannot be performed in
10226         the semantics, so just drop it.
10227         (P_Index_Or_Discriminant_Constraint): move check that the index or
10228         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10229         semantics. Other cases were previously checked in the semantics.
10230         * par-ch4.adb (P_Name): move checks that a selector name is not
10231         character literal or an operator symbol to Find_Selected_Component in
10232         the semantics
10233         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10234         declarations are not placed after later declarations in a separate
10235         procedure in Sem_Util (possibly not the best choice?), to be used both
10236         during parsing, for Ada 83 mode, and during semantic analysis, for
10237         SPARK mode.
10238         * par-endh.adb (Check_End): move check that end label is not missing
10239         to Process_End_Label in the semantics
10240         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10241         the special case for SPARK restriction
10242         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10243         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10244         parameter Force to issue the error message even on internal node (used
10245         for generated end label). Call Check_Restriction to check when an error
10246         must be issued. In SPARK mode, issue an error message even if the
10247         restriction is not set.
10248         (Check_Restriction): new procedure with an additional out parameter to
10249         inform the caller that a message has been issued
10250         * sem_aggr.adb: Minor modification of message
10251         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10252         instead of issuing an error message directly
10253         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10254         declarations are not placed after later declarations, by calling
10255         Check_Later_Vs_Basic_Declarations
10256         (Analyze_Subtype_Declaration): move here the check that an index or
10257         discriminant constraint must be a subtype mark. Change the check that
10258         a subtype of String must start at one so that it works on subtype marks.
10259         * sem_ch4.adb (Analyze_Call): move here the check that a named
10260         association cannot follow a positional one in a call
10261         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10262         instead of issuing an error message directly
10263         * sem_ch8.adb (Find_Selected_Component): move here the check that a
10264         selector name is not a character literal or an operator symbol. Move
10265         here the check that the prefix of an expanded name cannot be a
10266         subprogram or a loop statement.
10267         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10268         procedure called from parsing and semantics to check that basic
10269         declarations are not placed after later declarations
10270         (Process_End_Label): move here the check that end label is not missing
10271
10272 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10273
10274         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10275         representation clause in codepeer mode, since it confuses CodePeer and
10276         does not bring useful info.
10277
10278 2011-08-02  Ed Falis  <falis@adacore.com>
10279
10280         * init.c: initialize fp hw on MILS.
10281
10282 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10283
10284         * errout.adb (First_Node): for bodies, return the node itself (small
10285         optimization). For other nodes, do not check source_unit if the node
10286         comes from Standard.
10287
10288 2011-08-02  Robert Dewar  <dewar@adacore.com>
10289
10290         * exp_ch3.adb: Minor comment additions.
10291         * sem_ch13.adb: Minor reformatting.
10292
10293 2011-08-02  Pascal Obry  <obry@adacore.com>
10294
10295         * make.adb, makeutl.adb: Removes some superfluous directory separator.
10296
10297 2011-08-02  Robert Dewar  <dewar@adacore.com>
10298
10299         * sem_attr.adb: Minor reformatting.
10300
10301 2011-08-02  Robert Dewar  <dewar@adacore.com>
10302
10303         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10304         (Has_Default_Component_Value): Removed
10305         * einfo.ads Comment updates
10306         (Has_Default_Aspect): Replaces Has_Default_Value
10307         (Has_Default_Component_Value): Removed
10308         * exp_ch13.adb
10309         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10310         * exp_ch3.adb
10311         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10312         (Get_Simple_Init_Val): Handle Default_Value aspect
10313         (Needs_Simple_Initialization): Handle Default_Value aspect
10314         * exp_ch3.ads: Needs_Simple_Initialization
10315         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10316         * par-prag.adb (Pragma_Default[_Component]Value) Removed
10317         * sem_ch13.adb
10318         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10319         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10320         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10321
10322 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10323
10324         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10325         package containing iteration primitives.
10326         exp_ch5.adb (Expand_Iterator_Loop): ditto.
10327
10328 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10329
10330         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10331         "of", pre-analyze expression in case it is a function call with
10332         finalization actions that must be placed ahead of the loop.
10333         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10334         on an Ada2012 iterator, insert them ahead of the rewritten loop.
10335
10336 2011-08-02  Geert Bosch  <bosch@adacore.com>
10337
10338         * cstand.adb (Create_Float_Types): Only consider C's long double for
10339         Long_Long_Float, in addition to double.
10340
10341 2011-08-02  Robert Dewar  <dewar@adacore.com>
10342
10343         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10344         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10345         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10346         Minor reformatting.
10347
10348 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10349
10350         * sem_attr.adb: handle properly 'Result when it is a prefix of an
10351         indexed component.
10352
10353 2011-08-02  Javier Miranda  <miranda@adacore.com>
10354
10355         * einfo.ads, einfo.adb
10356         (Original_Access_Type): Move this attribute to Node26 since there was
10357         an undocumented use of Node21 in E_Access_Subprogram_Type entities
10358         which causes conflicts and breaks the generation of the .NET compiler.
10359         (Interface_Name): Add missing documentation on JGNAT only uses of
10360         this attribute.
10361
10362 2011-08-02  Geert Bosch  <bosch@adacore.com>
10363
10364         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10365         (Find_Back_End_Float_Type): Likewise
10366         (Create_Back_End_Float_Types): Likewise
10367         (Create_Float_Types): Likewise
10368         (Register_Float_Type): Likewise
10369         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10370         Nlist and split out type selection in new local Find_Base_Type function.
10371         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10372         Nlist
10373         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10374
10375 2011-08-02  Robert Dewar  <dewar@adacore.com>
10376
10377         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10378         alpha order).
10379         * opt.ads: Minor comment change.
10380         * sem_ch12.adb: Minor code reorganization.
10381
10382 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10383
10384         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10385         subtype's list of rep items to the list on the full subtype in the case
10386         where the lists are the same.
10387
10388 2011-08-02  Geert Bosch  <bosch@adacore.com>
10389
10390         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10391         using the one from System.Strings, which also deallocates all strings.
10392
10393 2011-08-02  Geert Bosch  <bosch@adacore.com>
10394
10395         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10396         function.
10397         * gcc-interface/Make-lang.in: Update dependencies.
10398
10399 2011-08-02  Olivier Hainque  <hainque@adacore.com>
10400
10401         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10402         end_locus.
10403
10404 2011-08-02  Javier Miranda  <miranda@adacore.com>
10405
10406         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10407         associated with anonymous access to subprograms.
10408
10409 2011-08-02  Geert Bosch  <bosch@adacore.com>
10410
10411         * opt.ads
10412         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10413         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10414         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10415         (Add_Symbol_Definition): Move to switch-c.adb
10416         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10417         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10418         (Add_Symbol_Definition): Move to switch-c.adb.
10419         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10420         * sem_warn.adb
10421         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10422         Move to warnsw.adb.
10423         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10424         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10425         Move to warnsw.adb.
10426         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10427         (Add_Symbol_Definition): Moved from Prepcomp.
10428         * switch-c.ads: Update copyright notice. Use String_List instead of
10429         Argument_List, removing dependency on System.OS_Lib.
10430
10431 2011-08-02  Yannick Moy  <moy@adacore.com>
10432
10433         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10434         mode on initialization expression which does not respect SPARK
10435         restrictions.
10436         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10437         if the tree referenced by its argument represents an initialization
10438         expression in SPARK, suitable for initializing an object in an object
10439         declaration.
10440
10441 2011-08-02  Javier Miranda  <miranda@adacore.com>
10442
10443         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10444         internally generated access to subprogram with its associated protected
10445         subprogram type.
10446         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10447
10448 2011-08-02  Geert Bosch  <bosch@adacore.com>
10449
10450         * cstand.adb (Register_Float_Type): Print information about type to
10451         register, if the Debug_Flag_Dot_B is set.
10452         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10453         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10454         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10455         with a requested precision of more than Max_Digits digits and no more
10456         than Max_Base_Digits digits, if a range specification is present and the
10457         Predefined_Float_Types list has a suitable type to derive from.
10458         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10459         case of type completion with pragma Import
10460         * sem_prag.adb
10461         (Process_Import_Predefined_Type): Processing to complete a type
10462         with pragma Import. Currently supports floating point types only.
10463         (Set_Convention_From_Pragma): Do nothing without underlying type.
10464         (Process_Convention): Guard against absence of underlying type,
10465         which may happen when importing incomplete types.
10466         (Process_Import_Or_Interface): Handle case of importing predefined
10467         types. Tweak error message.
10468
10469 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10470
10471         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10472         functions to previous change.  Reorganize code slightly.
10473
10474 2011-08-02  Geert Bosch  <bosch@adacore.com>
10475
10476         * back_end.ads (Register_Type_Proc): New call back procedure type for
10477         allowing the back end to provide information about available types.
10478         (Register_Back_End_Types): New procedure to register back end types.
10479         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10480         available types.
10481         * cstand.adb (Back_End_Float_Types): New list for floating point types
10482         supported by the back end.
10483         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10484         (Copy_Float_Type): New procedure to make new copies of predefined types.
10485         (Register_Float_Type): New call back procedure to populate the BEFT list
10486         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10487         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10488         (Create_Float_Types): New procedure to create entities for floating
10489         point types predefined in Standard, and put these and any remaining
10490         BEFTs on the Predefined_Float_Types list.
10491         * stand.ads (Predefined_Float_Types): New list for predefined floating
10492         point types that do not have declarations in package Standard.
10493
10494 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10495
10496         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
10497         entity node for the unit containing the parameter.
10498         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10499         (Add_Inlined_Subprogram): Likewise.
10500         * gcc-interface/Make-lang.in: Update dependencies.
10501
10502 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10503
10504         * s-stusta.adb (Print): Make sure Pos is always initialized to a
10505         suitable value.
10506
10507 2011-08-02  Geert Bosch  <bosch@adacore.com>
10508
10509         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10510
10511 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10512
10513         * sem_type.adb (Covers): Move trivial case to the top and reuse the
10514         computed value of Base_Type.
10515
10516 2011-08-02  Yannick Moy  <moy@adacore.com>
10517
10518         * restrict.adb (Check_Restriction): issue an error for any use of
10519         class-wide, even if the No_Dispatch restriction is not set.
10520         * sem_aggr.adb: Correct typos in comments and messages in formal mode
10521         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10522         when completing a private extension, the type named in the private part
10523         is not the same as that named in the visible part.
10524         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10525         of an inherited primitive operations of a tagged type or type extension
10526         that returns the tagged type.
10527         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10528         function which returns True for an implicit operation inherited by the
10529         derived type declaration for the argument type.
10530         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10531         order.
10532
10533 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10534
10535         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10536         Process_Bounds, to perform analysis with expansion of a range or an
10537         expression that is the iteration scheme for a loop.
10538         (Analyze_Iterator_Specification): If domain of iteration is given by a
10539         function call with a controlled result, as is the case if call returns
10540         a predefined container, ensure that finalization actions are properly
10541         generated.
10542         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10543
10544 2011-08-02  Javier Miranda  <miranda@adacore.com>
10545
10546         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10547         * gcc-interface/Make-lang.in: Update dependencies.
10548
10549 2011-08-02  Javier Miranda  <miranda@adacore.com>
10550
10551         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10552         determine if the analysis is performed using N or Original_Node (N).
10553         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10554         functionality of routine Is_Variable avoids code duplication.
10555         * checks.adb (Determine_Range): Handle temporaries generated by
10556         Remove_Side_Effects.
10557
10558 2011-08-02  Javier Miranda  <miranda@adacore.com>
10559
10560         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10561         expansion of the condition. Required since the previous analysis was
10562         done with expansion disabled (see Resolve_Quantified_Expression) and
10563         hence checks were not inserted and record comparisons have not been
10564         expanded.
10565
10566 2011-08-02  Ed Falis  <falis@adacore.com>
10567
10568         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10569         Update header.
10570
10571 2011-08-02  Bob Duff  <duff@adacore.com>
10572
10573         * opt.ads: Minor comment fix.
10574
10575 2011-08-02  Bob Duff  <duff@adacore.com>
10576
10577         * sem_ch12.adb (Analyze_Package_Instantiation,
10578         Analyze_Subprogram_Instantiation): Turn off style checking while
10579         analyzing an instance. Whatever style checks that apply to the generic
10580         unit should apply, so it makes no sense to apply them in an instance.
10581         This was causing trouble when compiling an instance of a runtime
10582         unit that violates the -gnatyO switch.
10583         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10584         one of the two case statements, causing spurious errors.
10585
10586 2011-08-02  Robert Dewar  <dewar@adacore.com>
10587
10588         * uname.adb: Minor reformatting.
10589         * gnatcmd.adb: Minor reformatting.
10590         * exp_attr.adb: Minor reformatting.
10591
10592 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10593
10594         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10595         No_Dispatching_Calls, do not look for the Assign primitive, because
10596         predefined primitives are not created in this case.
10597
10598 2011-08-02  Bob Duff  <duff@adacore.com>
10599
10600         * stylesw.ads: Minor comment fixes.
10601
10602 2011-08-02  Robert Dewar  <dewar@adacore.com>
10603
10604         * freeze.adb (Add_To_Result): New procedure.
10605
10606 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10607
10608         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10609         time, if the specific run-time routines for handling streams of strings
10610         are not available, use the default mechanism.
10611
10612 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10613
10614         * s-regpat.ads: Fix typo.
10615
10616 2011-08-02  Vincent Celier  <celier@adacore.com>
10617
10618         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10619         not null, call it to create the in memory config project file without
10620         parsing an existing default config project file.
10621
10622 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10623
10624         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10625
10626 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10627
10628         * sem_elim.adb: an abstract subprogram does not need an eliminate
10629         pragma for its descendant to be eliminable.
10630
10631 2011-08-02  Ed Falis  <falis@adacore.com>
10632
10633         * init.c: revert to handling before previous checkin for VxWorks
10634         * s-intman-vxworks.adb: delete unnecessary declarations related to
10635         using Ada interrupt facilities for handling signals.
10636         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10637         * s-intman-vxworks.ads: Import __gnat_install_handler as
10638         Initialize_Interrupts.
10639         * s-taprop-vxworks.adb: Delete Signal_Mask.
10640         (Abort_Handler): change construction of mask to unblock exception
10641         signals.
10642
10643 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10644
10645         * a-except-2005.adb (Raise_From_Signal_Handler): Call
10646         Debug_Raise_Exception before propagation starts.
10647
10648 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10649
10650         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10651         to Restriction_Check_Required.
10652         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10653         * sem_res.adb (Resolve_Call): Likewise.
10654         * sem_attr.adb (Check_Stream_Attribute): Likewise.
10655
10656 2011-08-02  Bob Duff  <duff@adacore.com>
10657
10658         * stylesw.ads: Update comment.
10659         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10660         * errout.ads: Remove obsolete comment.
10661
10662 2011-08-02  Javier Miranda  <miranda@adacore.com>
10663
10664         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10665         (Set_Is_Safe_To_Reevaluate): new procedure.
10666         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10667         assignment is allowed on safe-to-reevaluate variables.
10668         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10669         temporary created to remove side effects in expressions that use
10670         the secondary stack as safe-to-reevaluate.
10671         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10672         variables that are not true constants.
10673
10674 2011-08-02  Robert Dewar  <dewar@adacore.com>
10675
10676         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10677         sem_res.adb, sem_ch6.adb: Minor reformatting.
10678
10679 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10680
10681         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10682
10683 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10684
10685         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10686         not set Overridden_Operation if subprogram is an initialization
10687         procedure.
10688
10689 2011-08-02  Yannick Moy  <moy@adacore.com>
10690
10691         * par-ch6.adb: Correct obsolete name in comments
10692         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10693         which takes two message arguments (existing function takes one), with
10694         second message used for continuation.
10695         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10696         block statements that originate from a source block statement, not
10697         generated block statements
10698         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10699         symmetry with procedure case
10700         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10701         function to issue an error in formal mode if a package specification
10702         contains more than one tagged type or type extension.
10703         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10704         parameters matching formals of tagged types are objects (or ancestor
10705         type conversions of objects), not general expressions. Issue an error
10706         on view conversions that are not involving ancestor conversion of an
10707         extended type.
10708         (Resolve_Type_Conversion): in formal mode, issue an error on the
10709         operand of an ancestor type conversion which is not an object
10710         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10711         procedure so that it works also for actuals of function calls
10712         (Is_Actual_Tagged_Parameter): new function which determines if its
10713         argument is an actual parameter of a formal of tagged type in a
10714         subprogram call
10715         (Is_SPARK_Object_Reference): new function which determines if the tree
10716         referenced by its argument represents an object in SPARK
10717
10718 2011-08-02  Robert Dewar  <dewar@adacore.com>
10719
10720         * sem_ch3.adb: Minor reformatting
10721         Minor comment addition
10722         Minor error msg text change
10723
10724 2011-08-02  Javier Miranda  <miranda@adacore.com>
10725
10726         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10727         function. Used to be more precise when we generate a variable plus one
10728         assignment to remove side effects in the evaluation of the Bound
10729         expressions.
10730         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10731         of the bound expression to force its re-analysis and thus expand the
10732         associated transient scope (if required). Code cleanup replacing the
10733         previous code that declared the constant entity by an invocation to
10734         routine Force_Evaluation which centralizes this work in the frontend.
10735
10736 2011-08-02  Robert Dewar  <dewar@adacore.com>
10737
10738         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10739         (Base_Type): Now uses improved Is_Base_Type function
10740         * einfo.ads (Base_Type): Inline this function
10741
10742 2011-08-02  Robert Dewar  <dewar@adacore.com>
10743
10744         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10745         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10746
10747 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10748
10749         * gcc-interface/Make-lang.in: Update dependencies.
10750         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10751         targets.
10752
10753 2011-08-02  Yannick Moy  <moy@adacore.com>
10754
10755         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10756         non-simple expression used in delta constraint
10757         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10758         index constraint which is not a subtype mark
10759         * par.adb: With and use Restrict
10760         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10761         mode on component type which is not a subtype mark and default
10762         expression on component
10763         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10764         of string which does not have a lower index bound equal to 1
10765         (Array_Type_Declaration): issue an error in formal mode on index or
10766         component type which is not a subtype mark, and on aliased keyword on
10767         component
10768         (Derived_Type_Declaration): issue an error in formal mode on interface,
10769         limited or abstract type
10770         (Record_Type_Declaration): issue an error in formal mode on interface
10771         (Record_Type_Definition): issue an error in formal mode on tagged types
10772         and type extensions not declared in the specification of a library unit
10773         package; on null non-tagged record; on variant part
10774
10775 2011-08-02  Vincent Celier  <celier@adacore.com>
10776
10777         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10778         not declared for qualified library project when Library_Name is not
10779         declared, but Library_Dir is.
10780
10781 2011-08-02  Robert Dewar  <dewar@adacore.com>
10782
10783         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10784         pragmas (affects aspects [Component_]Default_Value
10785         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10786         component type for the resolution
10787
10788 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10789
10790         * einfo.adb (Base_Type): Tune implementation for speed.
10791
10792 2011-08-02  Robert Dewar  <dewar@adacore.com>
10793
10794         * freeze.adb: Minor reformatting.
10795
10796 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10797
10798         * scos.ads: Update comments.
10799
10800 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10801
10802         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10803         base type, because the parent may be a subtype of a private type whose
10804         convention is established in a private part.
10805
10806 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10807
10808         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10809         statement in a block when the expansion of the return expression has
10810         created a finalization chain.
10811         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10812         with the parent node.
10813         Add N_Extended_Return_Statement to handle the case where a transient
10814         object declaration appears in the Return_Object_Declarations list of
10815         an extended return statement.
10816
10817 2011-08-02  Matthew Gingell  <gingell@adacore.com>
10818
10819         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10820         unused parameter 'name'.
10821
10822 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10823
10824         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10825         inherited operation, check whether its alias, which is the source
10826         operastion that it renames, has been marked eliminated.
10827
10828 2011-08-02  Javier Miranda  <miranda@adacore.com>
10829
10830         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10831         in-mode parameter whose type is an access type since it can be used to
10832         modify its designated object. Enforce code that handles as safe an
10833         access type that is not access-to-constant but it is the result of a
10834         previous removal of side-effects.
10835         (Remove_Side_Effects): Minor code reorganization of cases which require
10836         no action. Done to incorporate documentation on new cases uncovered
10837         working in this ticket: no action needed if this routine was invoked
10838         too early and the nodes are not yet decorated.
10839         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10840         to routine Remove_Side_Effects by calls to Force_Evaluation since they
10841         were issued with actuals that are implicitly provided by
10842         Force_Evaluation.
10843
10844 2011-08-02  Robert Dewar  <dewar@adacore.com>
10845
10846         * sem_ch3.adb, sem_res.adb: Minor reformatting.
10847
10848 2011-08-02  Yannick Moy  <moy@adacore.com>
10849
10850         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10851         to issue an error in formal mode on attribute not supported in this mode
10852         (Analyze_Attribute): issue errors on standard attributes not supported
10853         in formal mode.
10854         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10855         comment, and issue error in formal mode on modulus which is not a power
10856         of 2.
10857         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10858         range.
10859         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10860         subtype mark.
10861         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10862         operator on modular type (except 'not').
10863
10864 2011-08-02  Robert Dewar  <dewar@adacore.com>
10865
10866         * gnat_rm.texi: Minor reformatting.
10867
10868 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10869
10870         * s-osinte-linux.ads: Minor comment update and reformatting.
10871         * i-cexten.ads: Make this unit pure, as for its parent.
10872         Will allow its usage in more contexts if needed.
10873
10874 2011-08-02  Robert Dewar  <dewar@adacore.com>
10875
10876         * s-utf_32.ads: Minor comment fix.
10877
10878 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10879
10880         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10881         operation of a tagged synchronized type, handle the case where the
10882         controlling argument is overloaded.
10883
10884 2011-08-02  Yannick Moy  <moy@adacore.com>
10885
10886         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10887         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10888         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10889         SPARK mode and formal verification mode on processing SPARK restriction
10890         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10891         requiring consistency checking.
10892
10893 2011-08-02  Robert Dewar  <dewar@adacore.com>
10894
10895         * sem_res.adb: Minor reformatting.
10896
10897 2011-08-02  Robert Dewar  <dewar@adacore.com>
10898
10899         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10900         a-cforse.ads: Remove unneeded with of Ada.Containers
10901         Remove commented out pragma Inline's
10902         Move specifications of new subprograms to the actual specs
10903
10904 2011-08-02  Yannick Moy  <moy@adacore.com>
10905
10906         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10907         a-cforse.ads: Update comments.
10908
10909 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10910
10911         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10912
10913 2011-08-02  Robert Dewar  <dewar@adacore.com>
10914
10915         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10916         a-cforse.ads, a-cofove.ads: Minor reformatting.
10917
10918 2011-08-02  Claire Dross  <dross@adacore.com>
10919
10920         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10921         a-cofove.ads: Add comments.
10922
10923 2011-08-02  Yannick Moy  <moy@adacore.com>
10924
10925         * gnat_rm.texi: Document formal containers.
10926
10927 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10928
10929         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10930         are empty sections.
10931
10932 2011-08-02  Robert Dewar  <dewar@adacore.com>
10933
10934         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10935         reformatting.
10936
10937 2011-08-02  Robert Dewar  <dewar@adacore.com>
10938
10939         * aspects.adb: New aspects Default_Value and Default_Component_Value
10940         New format of Aspect_Names table checks for omitted entries
10941         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10942         handling of boolean aspects for derived types.
10943         New aspects Default_Value and Default_Component_Value
10944         New format of Aspect_Names table checks for omitted entries
10945         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10946         (Has_Default_Value): New flag
10947         (Has_Default_Component_Value): New flag
10948         (Has_Default_Value): New flag
10949         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10950         table.
10951         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10952         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10953         Default_Value and Default_Component_Value
10954         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10955         New aspects Default_Value and Default_Component_Value
10956         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10957         * sprint.adb: Print N_Aspect_Specification node when called from gdb
10958
10959 2011-08-02  Vincent Celier  <celier@adacore.com>
10960
10961         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10962         inherit library kind.
10963
10964 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10965
10966         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10967         Minor reformatting.
10968
10969 2011-08-02  Robert Dewar  <dewar@adacore.com>
10970
10971         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10972
10973 2011-08-02  Yannick Moy  <moy@adacore.com>
10974
10975         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10976
10977 2011-08-02  Robert Dewar  <dewar@adacore.com>
10978
10979         * impunit.adb: Add comment.
10980
10981 2011-08-02  Yannick Moy  <moy@adacore.com>
10982
10983         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10984         qualification of aggregates in formal mode
10985         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10986         another aggregate
10987         (Resolve_Aggregate): complete the test that an aggregate is adequately
10988         qualified in formal mode
10989
10990 2011-08-02  Pascal Obry  <obry@adacore.com>
10991
10992         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10993         * mlib-prj.adb: Supress warning when compiling binder generated file.
10994         (Build_Library): Supress all warnings when compiling the binder
10995         generated file.
10996
10997 2011-08-02  Yannick Moy  <moy@adacore.com>
10998
10999         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11000         from here...
11001         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11002         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11003         Add with/use clauses to make Check_Formal_Restriction visible
11004
11005 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11006
11007         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11008         in-parameters when type of the generic formal is private in the generic
11009         spec and non-private in the body.
11010
11011 2011-08-02  Claire Dross  <dross@adacore.com>
11012
11013         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11014         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11015         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11016         * impunit.adb, Makefile.rtl: Take new files into account.
11017
11018 2011-08-02  Robert Dewar  <dewar@adacore.com>
11019
11020         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11021         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11022
11023 2011-08-02  Yannick Moy  <moy@adacore.com>
11024
11025         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11026         formal mode
11027         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11028         matching static array bounds, taking into account the special case of
11029         string literals
11030         * sem_ch3.adb: Typo in comment.
11031
11032 2011-08-02  Yannick Moy  <moy@adacore.com>
11033
11034         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11035         which issues an error in formal mode if its argument node is originally
11036         from source
11037         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11038         has a discriminant specification so that it does not include the case
11039         of derived types
11040         (Derived_Type_Declaration): move here the test that a derived type has a
11041         discriminant specification
11042         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11043         first element of a component association before accessing its choices
11044         (presence of component association is not enough)
11045         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11046         declaration is a library item before accessing the next element in a
11047         list, as library items are not member of lists
11048         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11049         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11050         Check_Formal_Restriction whenever possible.
11051
11052 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11053
11054         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11055         reference when needed.
11056
11057 2011-08-02  Bob Duff  <duff@adacore.com>
11058
11059         * gnat_ugn.texi: Fix typo.
11060
11061 2011-08-02  Vincent Celier  <celier@adacore.com>
11062
11063         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11064         archive file name. Do not use the full path name of archives for Open
11065         VMS.
11066
11067 2011-08-02  Robert Dewar  <dewar@adacore.com>
11068
11069         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11070         Analyze_Aspect_Specifications
11071         * sem_ch13.adb
11072         (Analyze_Aspect_Specifications): New handling for boolean aspects
11073         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11074         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11075         sequence for Analyze_Aspect_Specifications
11076         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11077         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11078
11079 2011-08-02  Robert Dewar  <dewar@adacore.com>
11080
11081         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11082         aspects, since these no longer exist.
11083
11084 2011-08-02  Robert Dewar  <dewar@adacore.com>
11085
11086         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11087         semicolon, do not try to see if there are aspects following it.
11088         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11089         aspect spec.
11090
11091 2011-08-02  Robert Dewar  <dewar@adacore.com>
11092
11093         * sem_ch8.adb, aspects.ads: Minor reformatting.
11094
11095 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11096
11097         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11098         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11099         extracted from...
11100         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
11101
11102 2011-08-02  Yannick Moy  <moy@adacore.com>
11103
11104         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11105         mode on subprogram declaration outside of package specification, unless
11106         it is followed by a pragma Import
11107         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11108         Access_Type_Declaration): issue error in formal mode on access type
11109         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11110         incomplete type
11111         (Analyze_Object_Declaration): issue error in formal mode on object
11112         declaration which does not respect SPARK restrictions
11113         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11114         declaration which does not respect SPARK restrictions
11115         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11116         error in formal mode on digits or delta constraint
11117         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11118         decimal fixed point type
11119         (Derived_Type_Declaration): issue error in formal mode on derived type
11120         other than type extensions of tagged record types
11121         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11122         with check on access definition
11123         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11124         mode on protected definition.
11125         (Analyze_Task_Definition): issue error in formal mode on task definition
11126
11127 2011-08-02  Robert Dewar  <dewar@adacore.com>
11128
11129         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11130
11131 2011-08-02  Javier Miranda  <miranda@adacore.com>
11132
11133         * sem_ch6.adb (Can_Override_Operator): New function.
11134         (Verify_Overriding_Indicator): Add missing code to check overriding
11135         indicator in operators. Fixes regression.
11136         (Check_Overriding_Indicator): Minor reformating after replacing the
11137         code that evaluates if the subprogram can override an operator by
11138         invocations to the above new function.
11139         * einfo.adb
11140         (Write_Field26_Name): Add missing code to ensure that, following
11141         the documentation in einfo.ads, this field is not shown as attribute
11142         "Static_Initialization" on non-dispatching functions.
11143
11144 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11145
11146         * sem_res.adb (Resolve_Call): A call to
11147         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11148         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11149         i.e., when the second parameter is of type Time_Span.
11150
11151 2011-08-02  Vincent Celier  <celier@adacore.com>
11152
11153         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11154         with an archive instead of -L<library dir> -l<library name>.
11155
11156 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11157
11158         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11159         mark the base types In_Use in addition to making the operations
11160         use_visible.
11161
11162 2011-08-02  Ed Falis  <falis@adacore.com>
11163
11164         * init.c: add and setup __gnat_signal_mask for the exception signals
11165         * s-inmaop-vxworks.adb: new file.
11166         * s-intman-vxworks.adb: remove unnecessary initializations and
11167         simplify remaining
11168         * s-intman-vxworks.ads: remove unnecessary variable
11169         * s-taprop-vxworks.adb: simplify signal initialization
11170
11171 2011-08-02  Robert Dewar  <dewar@adacore.com>
11172
11173         * sem_ch8.adb: Minor code reorganization, comment updates.
11174
11175 2011-08-02  Robert Dewar  <dewar@adacore.com>
11176
11177         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11178         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11179         here from Sem_Res.
11180         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11181         (Matching_Static_Array_Bounds): Moved here from Sem_Res
11182
11183 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11184
11185         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11186         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11187         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11188         use_type_clauses, to handle more efficiently use_type and use_all_type
11189         constructs.
11190         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11191         Ada2012 Use_All_Type clause.
11192         (Use_Class_Wide_Operations): new procedure.
11193
11194 2011-08-02  Robert Dewar  <dewar@adacore.com>
11195
11196         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11197         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11198         expression to expression function.
11199
11200 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11201
11202         * sem_ch4.adb: transform simple Ada2012 membership into equality only
11203         if types are compatible.
11204
11205 2011-08-02  Yannick Moy  <moy@adacore.com>
11206
11207         * sem_res.adb (Matching_Static_Array_Bounds): new function which
11208         returns True if its argument array types have same dimension and same
11209         static bounds at each index.
11210         (Resolve_Actuals): issue an error in formal mode on actuals passed as
11211         OUT or IN OUT paramaters which are not view conversions in SPARK.
11212         (Resolve_Arithmetic_Op): issue an error in formal mode on
11213         multiplication or division with operands of fixed point types which are
11214         not qualified or explicitly converted.
11215         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11216         Boolean or array type (except String) operands.
11217         (Resolve_Equality_Op): issue an error in formal mode on equality
11218         operators for array types other than String with non-matching static
11219         bounds.
11220         (Resolve_Logical_Op): issue an error in formal mode on logical operators
11221         for array types with non-matching static bounds. Factorize the code in
11222         Matching_Static_Array_Bounds.
11223         (Resolve_Qualified_Expression): issue an error in formal mode on
11224         qualified expressions for array types with non-matching static bounds.
11225         (Resolve_Type_Conversion): issue an error in formal mode on type
11226         conversion for array types with non-matching static bounds
11227
11228 2011-08-02  Robert Dewar  <dewar@adacore.com>
11229
11230         * par-ch10.adb: Minor code reorganization (use Nkind_In).
11231
11232 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11233
11234         * par-ch9.adb: save location of entry for proper error message.
11235
11236 2011-08-02  Javier Miranda  <miranda@adacore.com>
11237
11238         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11239         (Use_Full_View) which permits this routine to climb through the
11240         ancestors using the full-view of private parents.
11241         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11242         Use_Full_View to true in calls to Is_Ancestor.
11243         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11244         true in call to Is_Ancestor.
11245         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11246         Use_Full_View to true in call to Is_Ancestor.
11247         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11248         call to Is_Ancestor.
11249         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11250         Use_Full_View to true in calls to Is_Ancestor.
11251         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11252         Make_Select_Specific_Data_Table, Register_Primitive,
11253         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11254         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11255         to true in call to Is_Ancestor.
11256         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11257         Use_Full_View to true in calls to Is_Ancestor.
11258         * exp_cg.adb
11259         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11260         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11261
11262 2011-08-02  Robert Dewar  <dewar@adacore.com>
11263
11264         * gnat_rm.texi: Minor reformatting.
11265         * sem_prag.adb: Minor reformatting.
11266
11267 2011-08-02  Tristan Gingold  <gingold@adacore.com>
11268
11269         * vms_data.ads: Add VMS qualifier for -gnateP.
11270
11271 2011-08-02  Robert Dewar  <dewar@adacore.com>
11272
11273         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11274         * par-ch7.adb (P_Package): Proper placement of aspects for package
11275         decl/instantiation.
11276         * par-endh.adb (Check_End): Ad Is_Sloc parameter
11277         (End_Statements): Add Is_Sloc parameterr
11278         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11279         (Check_End): Ad Is_Sloc parameter
11280         (End_Statements): Add Is_Sloc parameterr
11281
11282 2011-08-02  Vincent Celier  <celier@adacore.com>
11283
11284         * ug_words: Add VMS qualifier equivalent to -gnateP:
11285         /SYMBOL_PREPROCESSING.
11286
11287 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11288
11289         * gnat-style.texi: For hexadecimal numeric literals the typical
11290         grouping of digits is 4 to represent 2 bytes.
11291         A procedure spec which is split into several lines is indented two
11292         characters.
11293
11294 2011-08-02  Yannick Moy  <moy@adacore.com>
11295
11296         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11297         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11298         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11299         properly qualified
11300         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11301         choice in array aggregate
11302         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11303         mark as ancestor
11304         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11305         positional and named aggregate for record, or others in record
11306         aggregate, or multiple choice in record aggregate
11307         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11308         array operands to logical operations AND, OR and XOR do not have the
11309         same static lower and higher bounds
11310         * sem_ch5.adb, sinfo.ads: Correct typos in comments
11311
11312 2011-08-01  Robert Dewar  <dewar@adacore.com>
11313
11314         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11315         Replaces Last_Source_Node_In_Sequence.
11316         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11317         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11318         parens and blank in string (this was inconsistently implemented).
11319         * errout.ads
11320         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11321         blank in string (this was inconsistently implemented).
11322         * gnat1drv.adb
11323         (Set_Global_Switches): Set formal mode switches appropriately
11324         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11325         * par-prag.adb
11326         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11327         call Set_Error_Msg_Lang to set "spark" as language name.
11328         * par.adb: Remove unnecessary call to set formal language for errout
11329         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11330         appropriately and call Set_Error_Msg_Lang to set "spark" as language
11331         name.
11332         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11333         calls to it, moved after resolution so that types are known
11334         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11335         result of concatenation is not of type String
11336         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11337         concatenation is not properly restricted
11338         * gnat_rm.texi: Add doc on pragma Spark_95.
11339         * gcc-interface/Makefile.in: Remove obsolete target pairs for
11340         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11341         * gcc-interface/Make-lang.in: Update dependencies.
11342
11343 2011-08-01  Javier Miranda  <miranda@adacore.com>
11344
11345         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11346         condition that detects if the overridden operation must replace an
11347         existing entity.
11348
11349 2011-08-01  Javier Miranda  <miranda@adacore.com>
11350
11351         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11352         code declarations inserted by Insert_Actions in each alternative of the
11353         N_Case_Expression node.
11354
11355 2011-08-01  Robert Dewar  <dewar@adacore.com>
11356
11357         * sem_ch6.adb: Minor code reorganization.
11358         * sem_util.adb: Minor reformatting.
11359
11360 2011-08-01  Pascal Obry  <obry@adacore.com>
11361
11362         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11363         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11364
11365 2011-08-01  Yannick Moy  <moy@adacore.com>
11366
11367         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11368         literal or operator symbol which is prefixed
11369         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11370         mode on access attributes.
11371         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11372         that concatenation operands are properly restricted in formal mode
11373         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11374         Analyze_Concatenation_Operand. Issue an error in formal mode if the
11375         result of the concatenation has a type different from String.
11376         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11377         Analyze_Quantified_Expression, Analyze_Slice,
11378         Analyze_Null): issue an error in formal mode on unsupported constructs
11379         * sem_ch5.adb
11380         (Analyze_Block_Statement): only issue error on source block statement
11381         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11382         function which returns the last node in a list of nodes for which
11383         Comes_From_Source returns True, if any
11384         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11385         Last_Source_Node_In_Sequence
11386         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11387         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11388         mode on unsupported constructs
11389         * sem_ch9.adb Do not return after issuing error in formal mode, as the
11390         rest of the actions may be needed later on since the error is marked as
11391         not serious.
11392         * sinfo.ads: Typos in comments.
11393
11394 2011-08-01  Pascal Obry  <obry@adacore.com>
11395
11396         * projects.texi: Minor editing.
11397
11398 2011-08-01  Yannick Moy  <moy@adacore.com>
11399
11400         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11401         insertion character ~~
11402         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11403         (Set_Error_Msg_Lang): new procedure which fixes the language for use
11404         with insertion character ~~
11405         (Set_Msg_Text): treat insertion character ~~
11406         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11407         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11408         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11409         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11410         errors related to the formal language restriction not serious
11411         (insertion character |).
11412         * par.adb (Par): set formal language for error messages if needed
11413         * sem_ch6.adb (Check_Missing_Return): take into account possible
11414         generated statements at the end of the function
11415         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11416         enumeration value to define a new pragma SPARK_95
11417         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11418         SPARK_Version): new type and variables to store the SPARK version
11419         (none by default).
11420         (SPARK_Mode): return True when SPARK_Version is set
11421         * par-prag.adb: Correct indentation
11422         (Prag): take Pragma_SPARK_95 into account
11423         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11424         into account.
11425
11426 2011-08-01  Robert Dewar  <dewar@adacore.com>
11427
11428         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11429         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11430         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11431
11432 2011-08-01  Pascal Obry  <obry@adacore.com>
11433
11434         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11435         Target_Name to Get_Path call.
11436         (Parse_Single_Project): Likewise.
11437         (Post_Parse_Context_Clause): Likewise.
11438         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11439         Call Initialise_Project_Path with the proper Target_Name.
11440         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11441         search path.
11442         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11443         with the proper Target_Name.
11444         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11445         Part.Parse routine.
11446         (Parse_Project_And_Apply_Config): Likewise.
11447         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11448         This is fine as this part of the code is supporting only native
11449         compilation.
11450         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11451         is fine as this part of the code is supporting only native compilation.
11452
11453 2011-08-01  Yannick Moy  <moy@adacore.com>
11454
11455         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11456         of homonym, unless the homonym is one of the cases allowed in SPARK
11457         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11458         package declaration occurring after a body.
11459
11460 2011-08-01  Robert Dewar  <dewar@adacore.com>
11461
11462         * checks.adb, exp_ch4.adb: Minor reformatting.
11463
11464 2011-08-01  Javier Miranda  <miranda@adacore.com>
11465
11466         * einfo.ads (Access_Disp_Table): Fix documentation.
11467         (Dispatch_Table_Wrappers): Fix documentation.
11468
11469 2011-08-01  Pascal Obry  <obry@adacore.com>
11470
11471         * prj-env.adb, prj-env.ads: Minor reformatting.
11472
11473 2011-08-01  Yannick Moy  <moy@adacore.com>
11474
11475         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11476         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11477         procedures out of these packages.
11478         * errout.ads, errout.adb
11479         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11480         procedures in of this package
11481         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11482         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11483         on misplaced later vs initial declarations, like in Ada 83
11484         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11485         formal mode on attribute of private type whose full type declaration
11486         is not visible
11487         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11488         package declaration inside a package specification
11489         (Analyze_Full_Type_Declaration): issue error in formal mode on
11490         controlled type or discriminant type
11491         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11492         user-defined operator means that it should come from the source
11493         (New_Overloaded_Entity): issue error in formal mode on overloaded
11494         entity.
11495         * sem_ch6.ads, sem_ch13.ads: typos in comments.
11496
11497 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11498
11499         * atree.adb: Minor reformatting.
11500         * checks.adb: Minor reformatting.
11501
11502 2011-08-01  Vincent Celier  <celier@adacore.com>
11503
11504         * s-parame-vms-ia64.ads: Fix typo in comment
11505         Minor reformatting
11506         * s-parame-vms-restrict.ads: Removed, unused.
11507
11508 2011-08-01  Javier Miranda  <miranda@adacore.com>
11509
11510         * exp_ch3.adb
11511         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11512         * sem_ch3.adb
11513         (Constrain_Index): Remove side effects in the evaluation of the bounds.
11514         * sem_ch3.ads, sem_ch3.adb
11515         (Is_Constant_Bound): New extended version of the subprogram that was
11516         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11517         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11518         * sem_aux.ads (Constant_Value): Fix typo in comment.
11519         * checks.adb (Generate_Index_Checks): New implementation which, for
11520         array objects with constant bounds, generates the runtime check
11521         referencing the bounds of the array type. For other cases this routine
11522         provides its previous behavior obtaining such values from the array
11523         object.
11524         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11525         parent type.
11526         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11527         we cannot have semantic interpretations of the new node.
11528
11529 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11530
11531         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11532         expressions.
11533
11534 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11535
11536         * sem_ch8.adb: Minor code editing.
11537         * s-vxwext.adb: Remove trailing space.
11538         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11539         consistency with other files.
11540
11541 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11542
11543         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11544
11545 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11546
11547         * par-ch10.adb: reject parameterized expressions as compilation unit.
11548         * sem_ch4.adb: handle properly conditional expression with overloaded
11549         then_clause and no else_clause.
11550
11551 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11552
11553         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11554         like done by System.Aux_DEC.
11555         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11556
11557 2011-08-01  Yannick Moy  <moy@adacore.com>
11558
11559         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11560         missing label at end of declaration (subprogram or package)
11561         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11562         of positional and named parameter association
11563         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11564         Error_Msg_SP which adds a prefix to the error message giving the name
11565         of the formal language analyzed
11566         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11567         access result type in subprogram, unconstrained array as result type,.
11568         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11569         procedure
11570         * sem_ch8.adb: Code clean up.
11571
11572 2011-08-01  Javier Miranda  <miranda@adacore.com>
11573
11574         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11575         * einfo.ads (Access_Disp_Table): Fix documentation.
11576         (Dispatch_Table_Wrappers): Fix documentation.
11577         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11578         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11579         to enforce the documentation of this attribute.
11580         (Set_Is_Interface): Cleanup the assertion.
11581         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11582         the Underlying_Type entity before reading attribute Access_Disp_Table.
11583         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11584         Locate the Underlying_Type before reading attribute Access_Disp_Table.
11585         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11586         the Underlying_Type entity before reading attribute Access_Disp_Table.
11587         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11588         Locate the Underlying_Type entity before reading attribute
11589         Access_Disp_Table.
11590
11591 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11592
11593         * s-poosiz.ads: Additional overriding indicators.
11594
11595 2011-08-01  Yannick Moy  <moy@adacore.com>
11596
11597         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11598         formal mode.
11599         (Analyze_Iteration_Scheme): issue error in formal mode when loop
11600         parameter specification does not include a subtype mark.
11601         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11602         formal mode on abstract subprogram.
11603         (Analyze_Subprogram_Specification): issue error in formal mode on
11604         user-defined operator.
11605         (Process_Formals): issue error in formal mode on access parameter and
11606         default expression.
11607         * sem_ch9.adb (Analyze_Abort_Statement,
11608         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11609         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11610         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11611         Analyze_Requeue, Analyze_Selective_Accept,
11612         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11613         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11614         issue error in formal mode on user-defined raise statement.
11615
11616 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11617
11618         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11619         declaration being hidden when overriding an implicit inherited
11620         subprogram.
11621         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11622         (-gnats), do not complain about a source file that contains only a
11623         pragma No_Body.
11624
11625 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11626
11627         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11628         variable if already set.
11629
11630 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11631
11632         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11633         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11634         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11635         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11636         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11637         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11638         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11639         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11640         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11641         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11642         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11643         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11644         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11645         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11646         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11647         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11648         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11649         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11650         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11651         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11652         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11653         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11654         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11655         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11656         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11657         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11658         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11659         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11660         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11661         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11662         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11663         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11664         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11665         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11666         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11667         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11668         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11669         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11670         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11671         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11672         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11673         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11674         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11675         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11676         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11677         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11678         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11679         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11680         s-osinte-mingw.ads: Update to GPLv3 run-time license.
11681         Use GNAT instead of GNARL.
11682
11683 2011-08-01  Bob Duff  <duff@adacore.com>
11684
11685         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11686         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11687         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11688         reformatting.
11689
11690 2011-08-01  Yannick Moy  <moy@adacore.com>
11691
11692         * debug.adb (d.D) reverve flag for the SPARK mode
11693         (d.E) reverve flag for SPARK generation mode
11694         (d.F) reverve flag for Why generation mode
11695         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11696         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
11697         functions which return True when the corresponding modes are set
11698         (Formal_Language): return "spark" or "alfa" when in formal verification
11699         mode.
11700         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11701         Error_Msg to prefix the error message with a tag giving the formal
11702         language
11703         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11704         message with a tag giving the formal language
11705         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11706         block statement
11707         (Analyze_Case_Statement): issue error in formal mode on case statement
11708         with a single "others" case alternative
11709         (Analyze_Exit_Statement): issue errors in formal mode on exit
11710         statements which do not respect SPARK restrictions
11711         (Analyze_Goto_Statement): issue error in formal mode on goto statement
11712         (Check_Unreachable_Code): always issue an error (not a warning) in
11713         formal mode on unreachable code (concerns both code after an infinite
11714         loop and after an unconditional jump, both not allowed in SPARK)
11715         * sem_ch6.adb (Analyze_Return_Statement): add call to
11716         Set_Return_Present for a procedure containing a return statement
11717         (already done for functions in Analyze_Function_Return)
11718         (Analyze_Function_Return): issue error in formal mode on extended
11719         return or if return is not last statement in function
11720         (Check_Missing_Return): issue error in formal mode if function does
11721         not end with return or if procedure contains a return
11722         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11723         function to detect if there is an inner scope of its parameter S which
11724         is a loop.
11725
11726 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11727
11728         * sem_ch6.ads: Minor reformatting.
11729
11730 2011-08-01  Javier Miranda  <miranda@adacore.com>
11731
11732         * sem_util.adb (Abstract_Interface_List): Complete condition when
11733         processing private type declarations to avoid reading unavailable
11734         attribute.
11735         (Is_Synchronized_Tagged_Type): Complete condition when processing
11736         private extension declaration nodes to avoid reading unavailable
11737         attribute.
11738
11739 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11740
11741         * sem_ch3.adb: Minor reformatting.
11742
11743 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11744
11745         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11746         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11747         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11748         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11749         for VMS, instead parametrize the common implementation with
11750         System.Parameters declarations.
11751
11752 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
11753
11754         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11755
11756 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11757
11758         * seh_init.c: Fix SEH handler installation on win64.
11759
11760 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11761
11762         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11763         double analysis of an anonymous access to subprogram, because it can
11764         lead to improper sharing of profiles and a back-end crash.
11765
11766 2011-08-01  Robert Dewar  <dewar@adacore.com>
11767
11768         * make.adb, sem_ch4.adb: Minor reformatting.
11769         * gcc-interface/Make-lang.in: Update dependencies.
11770         * sem_util.adb, exp_ch5.adb: Minor reformatting.
11771
11772 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11773
11774         * gnat_rm.texi: Fix definition of Long_Integer.
11775
11776 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11777
11778         * exp_aggr.adb: check limit size of static aggregate unconditionally,
11779         to prevent storage exhaustion.
11780         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11781         finalized is a function body, insert the cleanup code before the final
11782         return statement, to prevent spurious warnings.
11783         * s-pooglo.ads: add overriding indicator.
11784
11785 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11786
11787         * sem_ch4.adb (Operator_Check): improve error message when both a
11788         with_clause and a use_clause are needed to make operator usage legal.
11789         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11790         determine whether a compilation unit is visible within an other,
11791         either through a with_clause in the current unit, or a with_clause in
11792         its library unit or one one of its parents.
11793
11794 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11795
11796         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11797         over an arbitrary expression of an array or container type.
11798         * lib-xref.adb: clarify comment.
11799
11800 2011-08-01  Bob Duff  <duff@adacore.com>
11801
11802         * einfo.ads: Minor reformatting.
11803         * debug.adb: Minor comment improvement.
11804
11805 2011-08-01  Javier Miranda  <miranda@adacore.com>
11806
11807         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11808         consider hidden subprograms as valid candidates.
11809
11810 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11811
11812         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11813
11814 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
11815
11816         * gnat_ugn.texi: Fix typo.
11817
11818 2011-08-01  Robert Dewar  <dewar@adacore.com>
11819
11820         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11821         lib-xref.adb: Minor reformatting
11822
11823 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11824
11825         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11826         when to generate a call to Move_Final_List.
11827         (Has_Controlled_Parts): Remove this function.
11828
11829 2011-08-01  Geert Bosch  <bosch@adacore.com>
11830
11831         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11832         "," in choice list.
11833
11834 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11835
11836         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11837         explicit raise of a predefined exception as Comes_From_Source if the
11838         original N_Raise_Statement comes from source.
11839
11840 2011-08-01  Robert Dewar  <dewar@adacore.com>
11841
11842         * sinfo.ads: Add comment.
11843         * sem_ch6.adb: Minor reformatting.
11844
11845 2011-08-01  Robert Dewar  <dewar@adacore.com>
11846
11847         * freeze.adb (Freeze_Entity): Refine check for bad component size
11848         clause to avoid rejecting confirming clause when atomic/aliased present.
11849
11850 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11851
11852         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11853         better determine whether an entity reference is a write.
11854         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11855         subcomponent.
11856         * lib-xref.adb (Output_References): Do no suppress a read reference at
11857         the same location as an immediately preceeding modify-reference, to
11858         handle properly in-out actuals.
11859
11860 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11861
11862         * env.c (__gnat_setenv) [VMS]: Refine previous change.
11863
11864 2011-08-01  Quentin Ochem  <ochem@adacore.com>
11865
11866         * i-cstrin.adb (New_String): Changed implementation, now uses only the
11867         heap to compute the result.
11868
11869 2011-08-01  Robert Dewar  <dewar@adacore.com>
11870
11871         * atree.ads: Minor reformatting.
11872
11873 2011-08-01  Emmanuel Briot  <briot@adacore.com>
11874
11875         * g-expect.adb (Get_Command_Output): Fix memory leak.
11876
11877 2011-08-01  Geert Bosch  <bosch@adacore.com>
11878
11879         * cstand.adb (P_Float_Type): New procedure to print the definition of
11880         predefined fpt types.
11881         (P_Mixed_Name): New procedure to print a name using mixed case
11882         (Print_Standard): Use P_Float_Type for printing floating point types
11883         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11884         precision IEEE float.
11885
11886 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11887
11888         * sem_ch3.adb: Minor reformatting.
11889
11890 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11891
11892         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11893         the completion of a generic function, insert the new body rather than
11894         rewriting the original.
11895
11896 2011-08-01  Yannick Moy  <moy@adacore.com>
11897
11898         * sinfo.ads, errout.ads: Typos in comments.
11899
11900 2011-08-01  Robert Dewar  <dewar@adacore.com>
11901
11902         * par-endh.adb: Minor reformatting.
11903
11904 2011-08-01  Robert Dewar  <dewar@adacore.com>
11905
11906         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11907         (Pre_Post_Aspects): New subtype.
11908         * par-ch12.adb (P_Generic): New syntax for aspects in packages
11909         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11910         * par-ch7.adb (P_Package): Remove Decl parameter
11911         (P_Package): Handle new syntax for aspects (before IS)
11912         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11913         new aspect syntax
11914         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11915         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11916         (P_Package): Remove Decl parameter
11917         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11918         aspects
11919         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11920         specs
11921         * sem_util.ads, sem_util.adb (Static_Boolean): New function
11922         * sinfo.ads: Document new syntax for aspects in packages etc.
11923         * sprint.adb: Handle new syntax of aspects before IS in package
11924
11925 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11926
11927         * atree.ads: Minor reformatting.
11928         * sem_prag.adb: Minor reformatting.
11929
11930 2011-08-01  Robert Dewar  <dewar@adacore.com>
11931
11932         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11933         case expr alternative.
11934
11935 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11936
11937         * sem_ch12.adb: Fix typo.
11938
11939 2011-08-01  Geert Bosch  <bosch@adacore.com>
11940
11941         * sem_prag.adb (Check_No_Link_Name): New procedure.
11942         (Process_Import_Or_Interface): Use Check_No_Link_Name.
11943         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11944         instead of Standard_Long_Long_Float_Size global. Preparation for
11945         eventual removal of per type constants.
11946         * exp_util.ads (Get_Stream_Size): New function returning the stream
11947         size value of subtype E.
11948         * exp_util.adb (Get_Stream_Size): Implement new function.
11949         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11950         function.
11951         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11952         * einfo.adb:
11953         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11954
11955 2011-08-01  Geert Bosch  <bosch@adacore.com>
11956
11957         * cstand.adb: Fix comments.
11958         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11959         count of arguments.
11960
11961 2011-08-01  Robert Dewar  <dewar@adacore.com>
11962
11963         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11964
11965 2011-08-01  Geert Bosch  <bosch@adacore.com>
11966
11967         * atree.ads: Fix comment.
11968
11969 2011-08-01  Robert Dewar  <dewar@adacore.com>
11970
11971         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11972         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11973         * par.adb: Add with for Namet.Sp.
11974         * par-tchk.adb: Minor reformatting.
11975
11976 2011-08-01  Vincent Celier  <celier@adacore.com>
11977
11978         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11979         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11980         of the init procedure of a SAL.
11981         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11982         New procedure.
11983
11984 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11985
11986         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11987         reformatting.
11988
11989 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11990
11991         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11992
11993 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11994
11995         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11996         conformant with its spec (return True only for types that have
11997         an overriding Initialize primitive operation that prevents them from
11998         having preelaborable initialization).
11999         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12000         initialization for controlled types in Ada 2005 or later mode.
12001
12002 2011-08-01  Robert Dewar  <dewar@adacore.com>
12003
12004         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12005         Postcondition.
12006         (Same_Aspect): New function.
12007         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12008         Type_Invariant, Precondition, Postcondition.
12009         * snames.ads-tmpl: Add Name_Type_Invariant.
12010
12011 2011-08-01  Robert Dewar  <dewar@adacore.com>
12012
12013         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12014         here.
12015         (Freeze_All_Ent): Fix error in handling inherited aspects.
12016         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12017         already analyzed, but don't skip entire processing of a declaration,
12018         that's wrong in some cases of declarations being rewritten.
12019         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12020         Don't delay for integer, string literals
12021         Treat predicates in usual manner for delay, remove special case code,
12022         not needed.
12023         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12024         (Build_Predicate_Function): Update saved expression in aspect
12025         (Build_Invariant_Procedure): Update saved expression in aspect
12026         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12027         of replacement of discriminant references if the reference is simple.
12028
12029 2011-08-01  Robert Dewar  <dewar@adacore.com>
12030
12031         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12032         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12033         Static_Predicate and Dynamic_Predicate.
12034         (Build_Predicate_Function): Add processing for Static_Predicate
12035         and Dynamic_Predicate.
12036         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12037         (From_Static_Predicate): New flag
12038         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12039
12040 2011-08-01  Robert Dewar  <dewar@adacore.com>
12041
12042         * usage.adb: Documentation cleanup for Ada version modes in usage.
12043         * expander.adb: Minor reformatting.
12044
12045 2011-08-01  Robert Dewar  <dewar@adacore.com>
12046
12047         * atree.ads: Minor comment fix.
12048         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12049         a-witeio.ads, sem_prag.adb: Minor reformatting.
12050
12051 2011-08-01  Doug Rupp  <rupp@adacore.com>
12052
12053         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12054         pointers. Use descrip.h header file for convenience. Add some
12055         comments.
12056
12057 2011-08-01  Robert Dewar  <dewar@adacore.com>
12058
12059         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12060         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12061         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12062         New procedure.
12063         (Check_Aspect_At_End_Of_Declarations): New procedure
12064         (Analye_Aspect_Specification): Minor changes for above procedures
12065         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12066         specification node as well.
12067
12068 2011-08-01  Pascal Obry  <obry@adacore.com>
12069
12070         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12071         Windows files. Use GetFilesAttributes() in this case to check for file
12072         existence instead of returning with an error code.
12073
12074 2011-08-01  Vincent Celier  <celier@adacore.com>
12075
12076         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12077         High is above Source length.
12078
12079 2011-08-01  Robert Dewar  <dewar@adacore.com>
12080
12081         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12082
12083 2011-08-01  Robert Dewar  <dewar@adacore.com>
12084
12085         * aspects.ads (Boolean_Aspects): New subtype.
12086         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12087         for derived types in cases where the parent type and derived type have
12088         aspects.
12089         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12090         with aspects when parent type also has aspects.
12091         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12092         boolean expression at this point).
12093         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12094         accordance with final decision on the Ada 2012 feature.
12095         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12096
12097 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12098
12099         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12100
12101 2011-08-01  Pascal Obry  <obry@adacore.com>
12102
12103         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12104         Fix Replace_Slice when High is above current string size.
12105         (Replace_Slice): Fix DL computation when High is above current
12106         string length.
12107
12108 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
12109
12110         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12111
12112 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12113
12114         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12115         of node.
12116
12117 2011-08-01  Pascal Obry  <obry@adacore.com>
12118
12119         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12120         reformatting.
12121
12122 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12123
12124         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12125         access to protected subprograms in generic bodies.
12126         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12127         protected type, indicate that the convention of the subprogram is
12128         Convention_Protected, because it may be used in subsequent declarations
12129         within the protected declaration.
12130
12131 2011-08-01  Vincent Celier  <celier@adacore.com>
12132
12133         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12134         and "final" procedures when the name of the library is "ada", to avoid
12135         duplicate symbols "adainit" and "adafinal" in executables.
12136
12137 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12138
12139         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12140         quantified expression that appears within a postcondition and uses the
12141         Ada2012 'Result attribute.
12142
12143 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12144
12145         * init.c (__gnat_error_handler): Cast reason to int.
12146         (__gnat_install_handler): Explain sa_sigaction use.
12147
12148 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12149
12150         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12151         subprogram has copy-in copy-out parameters, try to promote the mode of
12152         the return type if it is passed in registers.
12153
12154 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12155
12156         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12157         left operand as addressable.
12158
12159 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12160
12161         * gcc-interface/gigi.h (build_function_stub): Remove.
12162         (build_return_expr): Likewise.
12163         (convert_vms_descriptor): Declare.
12164         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12165         (build_function_stub): Move to...
12166         * gcc-interface/utils2.c (build_return_expr): Move to...
12167         * gcc-interface/trans.c (build_function_stub): ...here.
12168         (build_return_expr): ...here.
12169         (Subprogram_Body_to_gnu): Add local variable for language_function.
12170         Disconnect the parameter attributes cache, if any, once done with it.
12171         Call end_subprog_body only after setting the end_locus.
12172         Build the stub associated with the function, if any, at the very end.
12173         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12174         variables and streamline control flow.
12175
12176 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
12177
12178         PR ada/49819
12179         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12180         g-trasym-dwarf.adb.
12181
12182 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12183
12184         PR bootstrap/49794
12185         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12186         Assign to act.sa_sigaction.
12187         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12188         current->return_address to char * before arithmetic.
12189
12190 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12191
12192         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12193         Correct argument types.
12194         Extract code from reason.
12195         (__gnat_install_handler): Assign to act.sa_sigaction.
12196
12197 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
12198
12199         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12200         (GNAT1_OBJS): ...here.
12201
12202 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
12203
12204         PR ada/48711
12205         * g-socthi-mingw.adb (Fill): Fix formatting.
12206
12207         * gcc-interface/gigi.h: Move around comment.
12208
12209 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
12210
12211         PR ada/46350
12212         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12213
12214 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
12215
12216         PR ada/48711
12217         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12218
12219 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12220
12221         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12222         range comparison if Pmode is SImode.
12223
12224 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
12225             Eric Botcazou  <ebotcazou@adacore.com>
12226
12227         * adadecode.c: Wrap up in extern "C" block.
12228         * adadecode.h: Likewise.
12229         * adaint.c: Likewise.  Remove 'const' keyword.
12230         * adaint.h: Likewise.
12231         * argv.c: Likewise.
12232         * atree.h: Likewise.
12233         * cio.c: Likewise.
12234         * cstreams.c: Likewise.
12235         * env.c: Likewise.
12236         * exit.c: Likewise.
12237         * fe.h: Likewise.
12238         * final.c: Likewise.
12239         * init.c: Likewise.
12240         * initialize.c: Likewise.
12241         * link.c: Likewise.
12242         * namet.h: Likewise.
12243         * nlists.h: Likewise.
12244         * raise.c: Likewise.
12245         * raise.h: Likewise.
12246         * repinfo.h: Likewise.
12247         * seh_init.c: Likewise.
12248         * targext.c: Likewise.
12249         * tracebak.c: Likewise.
12250         * uintp.h: Likewise.
12251         * urealp.h: Likewise.
12252         * xeinfo.adb: Wrap up generated C code in extern "C" block.
12253         * xsinfo.adb: Likewise.
12254         * xsnamest.adb: Likewise.
12255         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12256         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12257         * gcc-interface/misc.c: Likewise.
12258         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12259         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
12260         ada/targext.o here...
12261         (GNAT_ADA_OBJS): ...and not here.
12262         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12263         (GNATBIND_OBJS): Reorder.
12264
12265 2011-07-07  Richard Henderson  <rth@redhat.com>
12266
12267         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12268         dwarf2out_frame_init.
12269
12270 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
12271
12272         * gcc-interface/misc.c (gnat_init): Tweak previous change.
12273
12274 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12275
12276         PR target/39150
12277         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12278
12279 2011-07-06  Richard Guenther  <rguenther@suse.de>
12280
12281         * gcc-interface/misc.c (gnat_init): Merge calls to
12282         build_common_tree_nodes and build_common_tree_nodes_2.
12283         Re-initialize boolean_false_node.
12284
12285 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
12286             Olivier Hainque  <hainque@adacore.com>
12287             Nicolas Setton  <setton@adacore.com>
12288
12289         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12290         the type according to the ARTIFICIAL_P parameter.
12291         (create_type_decl): Likewise.
12292         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12293
12294 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
12295
12296         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12297         (gnatbind): Likewise.
12298
12299 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12300
12301         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12302
12303 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12304
12305         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12306         local variable throughout.  Remove useless call to Base_Type.
12307         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12308         Take it also into account for the volatileness of the field.  Set the
12309         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
12310
12311 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12312
12313         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12314         on a dereference built for a by-ref object if it has an address clause.
12315
12316 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12317
12318         * einfo.ads (Address_Taken): Document use for the second argument of
12319         Asm_Input and Asm_Output attributes.
12320         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12321         argument is an entity name, then set Address_Taken on it.
12322         <Attribute_Asm_Output>: Likewise.
12323         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12324         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12325         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12326         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12327
12328 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
12329
12330         PR middle-end/46500
12331         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12332
12333 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
12334
12335         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12336         (ada/utils.o): Update dependencies.
12337         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12338         ../../../libcpp/libcpp.a.
12339         * gcc-interface/utils.c: Include common/common-target.h.
12340         (process_attributes): Use targetm_common.have_named_sections.
12341
12342 2011-06-07  Richard Guenther  <rguenther@suse.de>
12343
12344         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12345         set_sizetype.
12346
12347 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12348
12349         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12350         TREE_THIS_NOTRAP flag.
12351
12352 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12353
12354         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12355         Fix thinko.
12356
12357 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12358
12359         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12360         constants whose full view has discriminants specially.
12361
12362 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12363
12364         * gcc-interface/utils.c: Include diagnostic.h.
12365         (gnat_write_global_declarations): Output debug information for all
12366         global type declarations before finalizing the compilation unit.
12367         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12368
12369 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
12370
12371         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12372
12373 2011-05-25  Kai Tietz  <ktietz@redhat.com>
12374
12375         * adaint.c (__gnat_to_canonical_file_list_next): Use array
12376         initialization instead of const/none-const pointer assignment.
12377
12378 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
12379
12380         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12381         $(EXTRA_GNAT1_OBJS).
12382         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12383         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12384         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12385         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12386         libcommon-target.a instead of prefix.o.
12387
12388 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
12389
12390         PR ada/49097
12391         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12392
12393 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
12394
12395         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12396         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12397         instead of version.o.
12398
12399 2011-05-18  Kai Tietz  <ktietz@redhat.com>
12400
12401         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12402         boolean_false_node instead of integer_zero_node.
12403         (convert_with_check): Likewise.
12404         * gcc-interface/decl.c (choices_to_gnu): Likewise.
12405
12406 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
12407
12408         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12409         type of the parameter is an unconstrained array, convert the actual to
12410         the type of the formal in the In Out and Out cases as well.
12411
12412 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12413
12414         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12415         call build_function_type_array or build_varargs_function_type_array
12416         instead.
12417         (create_subprog_type): Don't call build_function_type; call
12418         build_function_type_vec instead.
12419
12420 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12421
12422         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12423         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12424         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12425
12426 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
12427
12428         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12429
12430         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12431         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12432
12433 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12434
12435         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12436
12437 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12438
12439         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12440         instead of accessing TYPE_ARG_TYPES directly.
12441         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12442
12443 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12444
12445         PR ada/48844
12446         * gcc-interface/gigi.h (get_variant_part): Declare.
12447         * gcc-interface/decl.c (get_variant_part): Make global.
12448         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12449         types have the same constant size, are record types and T1 has a
12450         variant part while T2 doesn't.
12451
12452 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12453
12454         * gcc-interface/utils.c (begin_subprog_body): Do not call
12455         get_pending_sizes.
12456         (end_subprog_body): Likewise.
12457
12458 2011-05-04  Richard Guenther  <rguenther@suse.de>
12459
12460         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12461         int_const_binop.
12462         (pos_to_constructor): Likewise.
12463
12464 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
12465             Eric Botcazou  <ebotcazou@adacore.com>
12466
12467         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12468         of build_function_type.  Adjust calls to...
12469         (build_raise_check): ...this.  Do not take a void_tree parameter.
12470         Call build_function_type_list instead of build_function_type.
12471         Fix head comment and swap couple of conditional blocks.
12472
12473 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
12474
12475         * gnatvsn.ads (Library_Version): Bump to 4.7.
12476         (Current_Year): Bump to 2011.
12477
12478 2011-04-29  Michael Matz  <matz@suse.de>
12479
12480         * gcc-interface/misc.c (gnat_handle_option): Set
12481         warn_maybe_uninitialized.
12482
12483 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
12484
12485         * gnat_ugn.texi (Complexity Metrics Control): Update link to
12486         the Watson/McCabe paper.
12487
12488 2011-04-23  Jim Meyering  <meyering@redhat.com>
12489
12490         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12491
12492 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12493
12494         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12495         onto the new type.
12496
12497 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12498
12499         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12500         parameter.
12501         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
12502         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12503         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12504         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12505         <all>: Do not set flags on the reused DECL node coming from an alias.
12506         Set DECL_IGNORED_P on the DECL node built for subprograms if they
12507         don't need debug info here...
12508         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12509         (gigi): Adjust calls to create_subprog_decl.
12510         (build_raise_check): Likewise.
12511         (establish_gnat_vms_condition_handler): Likewise.
12512         (Compilation_Unit_to_gnu): Likewise.
12513         (gnat_to_gnu): Likewise.
12514
12515 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
12516
12517         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12518         (NO_REORDER_ADAFLAGS): New variable.
12519         (EXTRA_GNATTOOLS): Always define.
12520         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12521         Clean up and adjust list of files compiled with special options.
12522         * gcc-interface/Make-lang.in: Likewise.
12523         (ada/decl.o): Cosmetical change.
12524         (ada/misc.o): Remove dependency on $(PLUGIN_H).
12525
12526 2011-04-20  Jim Meyering  <meyering@redhat.com>
12527
12528         * initialize.c (__gnat_initialize): Remove useless if-before-free.
12529
12530 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12531
12532         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12533         $(CFLAGS) on the link line.
12534
12535 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12536
12537         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12538         padded type built for the return type if it is unconstrained.
12539
12540 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
12541
12542         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12543
12544 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
12545
12546         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12547         before calling TREE_CHAIN.
12548         * gcc-interface/misc.c (gnat_init_ts): New function.
12549         (LANG_HOOKS_INIT_TS): Define.
12550
12551 2011-04-12  Martin Jambor  <mjambor@suse.cz>
12552
12553         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12554         instead of cgraph_node.
12555
12556 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12557
12558         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12559         alignment on fields of the RETURN type built for the Copy-In Copy-Out
12560         mechanism.
12561
12562 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12563
12564         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12565         of aggregate types that contain a placeholder.
12566
12567 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
12568
12569         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12570         TYPE_ARG_TYPES.
12571         (handle_type_generic_attribute): Likewise.
12572
12573 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
12574
12575         PR ada/47163
12576         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12577
12578 2011-04-04  Kai Tietz  <ktietz@redhat.com>
12579
12580         PR ada/47163
12581         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12582         to flag value.
12583
12584 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12585
12586         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12587         type case, do not strip a padding type around the array type.
12588
12589 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12590
12591         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12592         types.
12593
12594 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12595
12596         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12597         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12598         code for -feliminate-unused-debug-types.
12599         (gnat_post_options): Likewise.
12600
12601 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12602
12603         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12604         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12605         distinct copy.
12606
12607 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12608
12609         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12610         DECL_ARTIFICIAL flag on enumeration types.
12611
12612 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12613
12614         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12615         fat pointer types artificial unconditionally.
12616         <E_Array_Subtype>: Attach the base array type as a parallel type if it
12617         isn't artificial.
12618
12619 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12620
12621         * gcc-interface/gigi.h (get_dummy_type): Declare.
12622         (build_dummy_unc_pointer_types): Likewise.
12623         (finish_fat_pointer_type): Likewise.
12624         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12625         fat pointer type has been built, complete it in place.
12626         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12627         and thin pointers.  Remove useless variable.
12628         (finish_fat_pointer_type): Make global and move to...
12629         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12630         (get_dummy_type): New function.
12631         (build_dummy_unc_pointer_types): Likewise.
12632         (gnat_pushdecl): Propage the name to the anonymous variants only.
12633         (update_pointer_to): Only adjust the pointer types in the unconstrained
12634         array case.
12635
12636 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12637
12638         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12639         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12640         if this is a Taft amendment type and the full declaration is available.
12641         * gcc-interface/trans.c (process_type): Likewise.
12642         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12643         (process_freeze_entity): Likewise.
12644         * gcc-interface/utils.c (dummy_global): New static variable.
12645         (gnat_write_global_declarations): If there are types declared as used
12646         at the global level, insert them in the global hash table.
12647
12648 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12649
12650         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12651         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12652         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12653         copy.
12654         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
12655         flag of the type accordingly.
12656         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12657
12658 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12659
12660         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12661         finalizing types when updating the pointers to the designated type.
12662         <all>: Finalize the deferred types even if we didn't defer processing
12663         of incomplete types in this invocation.
12664
12665 2011-04-01  Olivier Hainque  <hainque@adacore.com>
12666             Nicolas Setton  <setton@adacore.com>
12667             Eric Botcazou  <ebotcazou@adacore.com>
12668
12669         * gcc-interface/misc.c (gnat_descriptive_type): New function.
12670         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12671
12672 2011-03-28  Kai Tietz  <ktietz@redhat.com>
12673
12674         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12675         Windows targets.
12676         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12677         * system-mingw.ads (System): Change ZCX_By_Default default to True.
12678
12679         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12680
12681 2011-03-28  Tristan Gingold  <gingold@adacore.com>
12682
12683         PR ada/44431
12684         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12685         Use ada output of gnatbind.
12686         (ada/b_gnatb.adb): Ditto.
12687         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12688         (ada.mostlyclean, ada.stage1)
12689         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12690         (ada.stagefeedback): Adjust.
12691         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12692         Use ada output of gnatbind.
12693         (b_gnatm.adb): Ditto.
12694         (b_gnatl.o, b_gnatm.o): New rules.
12695
12696 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12697
12698         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12699         for the padded type built to support a specified size or alignment.
12700
12701 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12702
12703         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12704         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12705         unconditionally to the end of the unit when the designated type is
12706         limited_with'ed.
12707         <all>: Rename local variable.  Attempt to un-defer types only and do it
12708         for limited_with'ed types as well.
12709         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
12710         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12711         consistently and remove redundant call to finalize_from_with_types.
12712
12713 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12714
12715         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12716         subprograms without a previous spec declared in the same unit.
12717         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12718         subprograms at the end of the unit instead of at the beginning.
12719         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12720         isn't public for the special handling of non-inline functions nested
12721         inside inline external functions.
12722
12723 2011-03-25  Jeff Law  <law@redhat.com>
12724
12725         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12726
12727 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12728
12729         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12730         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12731         to compute Set_Size_Depends_On_Discriminant.
12732         (Layout_Type): Call it on array types in back-end layout mode.
12733         * sem_util.adb (Requires_Transient_Scope): Return true for array
12734         types only if the size depends on the value of discriminants.
12735         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12736         type if the RHS is a call to a function that returns an unconstrained
12737         type with default discriminant.
12738
12739 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12740
12741         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12742         non-conversion to the nominal result type at the end.
12743
12744 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12745
12746         * gcc-interface/trans.c (create_temporary): New function taken from...
12747         (create_init_temporary): ...here.  Call it.
12748         (call_to_gnu): Create the temporary for the return value early, if any.
12749         Create it for a function with copy-in/copy-out parameters if there is
12750         no target; in other cases of copy-in/copy-out, use another temporary.
12751         Push the new binding level lazily.  Add and rename local variables.
12752
12753 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12754
12755         * gcc-interface/decl.c (validate_size): Improve comments and tweak
12756         error message.
12757         (set_rm_size): Likewise.
12758
12759 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12760
12761         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12762         for the padded type built in order to support a specified alignment.
12763         Fix incorrect formatting.
12764
12765 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12766
12767         PR bootstrap/48216
12768         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12769
12770 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12771
12772         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12773         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12774         to the end of the list.  Adjust recursive call.  Rename local variable.
12775         If REORDER is true, reorder components of the record type.
12776         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12777         components_to_record and adjust the parameter list.
12778
12779 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12780
12781         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12782         disabled, use the variable for bounds of loop iteration scheme.
12783
12784 2011-03-21  Kai Tietz  <ktietz@redhat.com>
12785
12786         PR target/12171
12787         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12788
12789 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12790
12791         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12792         out whether the expression is read-only.  Short-circuit placeholder
12793         case and rename a couple of local variables.
12794
12795 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12796
12797         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12798         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12799         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12800         (convert): Deal with conversions from a smaller form type specially.
12801
12802 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
12803
12804         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12805         its argument, except for the special -I- switch.
12806
12807 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
12808
12809         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12810         "Ada Issues".
12811
12812 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
12813
12814         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12815
12816 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
12817
12818         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12819         GNAT_FORMAL.
12820         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12821         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
12822         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
12823         Do not generate the check directly, instead instantiate the template
12824         check present in the descriptor.
12825         (make_descriptor_field): Move around.
12826         (build_vms_descriptor32): Build a template check in the POINTER field.
12827         (build_vms_descriptor): Remove useless suffixes.
12828         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12829
12830 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
12831
12832         PR bootstrap/47467
12833         * targext.c: Include target files if IN_RTS is defined.
12834
12835 2011-01-26  Richard Guenther  <rguenther@suse.de>
12836
12837         PR bootstrap/47467
12838         * targext.c: Include config.h.
12839         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12840         dependency.
12841
12842 2011-01-04  Pascal Obry  <obry@adacore.com>
12843             Eric Botcazou  <ebotcazou@adacore.com>
12844
12845         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12846
12847 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12848
12849         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12850         end-of-case on the end label and its associated gotos, if any.
12851
12852 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12853
12854         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12855         expressions of the parameter cache within the statement group of
12856         the CICO mechanism.
12857
12858 2011-01-04  Olivier Hainque  <hainque@adacore.com>
12859             Eric Botcazou  <ebotcazou@adacore.com>
12860
12861         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12862         (set_end_locus_from_node): New function.
12863         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12864         make and the function end_locus.
12865         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12866         for the elaboration subprogram.
12867         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12868         set the end_locus of the expression as well.
12869
12870 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12871
12872         PR ada/47131
12873         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12874         variables that are referenced in exception handlers volatile.
12875
12876
12877 \f
12878 Copyright (C) 2011 Free Software Foundation, Inc.
12879
12880 Copying and distribution of this file, with or without modification,
12881 are permitted in any medium without royalty provided the copyright
12882 notice and this notice are preserved.
12883
12884         * gnat_rm.texi: Ramification of pragma Eliminate documentation
12885          - fix bugs in the description of Source_Trace;
12886          - get rid of UNIT_NAME;
12887
12888 2011-08-02  Javier Miranda  <miranda@adacore.com>
12889
12890         * exp_ch9.adb
12891         (Build_Dispatching_Requeue): Adding support for VM targets
12892         since we cannot directly reference the Tag entity.
12893         * exp_sel.adb (Build_K): Adding support for VM targets.
12894         (Build_S_Assignment): Adding support for VM targets.
12895         * exp_disp.adb
12896         (Default_Prim_Op_Position): In VM targets do not restrict availability
12897         of predefined interface primitives to compiling in Ada 2005 mode.
12898         (Is_Predefined_Interface_Primitive): In VM targets this service is not
12899         restricted to compiling in Ada 2005 mode.
12900         (Make_VM_TSD): Generate code that declares and initializes the OSD
12901         record. Needed to support dispatching calls through synchronized
12902         interfaces.
12903         * exp_ch3.adb
12904         (Make_Predefined_Primitive_Specs): Enable generation of predefined
12905         primitives associated with synchronized interfaces.
12906         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12907         primitives associated with synchronized interfaces.
12908
12909 2011-08-02  Yannick Moy  <moy@adacore.com>
12910
12911         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12912         statements hidden in SPARK if preceded by the HIDE directive
12913         (Parse_Exception_Handlers): mark each exception handler in a sequence of
12914         exception handlers as hidden in SPARK if preceded by the HIDE directive
12915         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12916         if starting with the HIDE directive
12917         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12918         starting with the HIDE directive; mark the declarations in a private
12919         part as hidden in SPARK if the private part starts with the HIDE
12920         directive
12921         * restrict.adb, restrict.ads
12922         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12923         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12924         argument node belongs to a part which is hidden in SPARK
12925         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12926         parts in SPARK; protect the possibly costly call to
12927         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12928         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12929         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12930         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12931         Tok_SPARK_Hide.
12932         (Scan): recognize special comment starting with '#' and followed by
12933         SPARK keyword "hide" as a HIDE directive.
12934
12935 2011-08-02  Yannick Moy  <moy@adacore.com>
12936
12937         * types.ads, erroutc.ads: Minor reformatting.
12938
12939 2011-08-02  Vincent Celier  <celier@adacore.com>
12940
12941         * link.c: Add response file support for cross platforms.
12942
12943 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12944
12945         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12946         in an association, set parent field of copy before partial analysis.
12947         * sem_res.adb (Resolve_Slice): create reference to itype only when
12948         expansion is enabled.
12949
12950 2011-08-02  Yannick Moy  <moy@adacore.com>
12951
12952         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12953         for new flag denoting which subprogram bodies are in ALFA
12954         * restrict.adb, sem_ch7.adb: Update comment
12955         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12956         sem_ch9.adb, sem_res.adb: Add calls to
12957         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12958         * sem_ch6.adb (Analyze_Function_Return): add calls to
12959         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12960         middle of the body, and extended return.
12961         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12962         False when missing return.
12963         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12964         to True for subprograms whose spec is in ALFA. Remove later on the flag
12965         on the entity used for a subprogram body when there exists a separate
12966         declaration.
12967         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12968         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12969         False, otherwise do nothing.
12970
12971 2011-08-02  Robert Dewar  <dewar@adacore.com>
12972
12973         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12974
12975 2011-08-02  Yannick Moy  <moy@adacore.com>
12976
12977         * sem_ch4.ads: minor formatting.
12978
12979 2011-08-02  Yannick Moy  <moy@adacore.com>
12980
12981         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12982         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12983         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12984         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12985         opt.ads: cleanup of SPARK mode
12986
12987 2011-08-02  Yannick Moy  <moy@adacore.com>
12988
12989         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12990         types.
12991         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12992         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12993         * sem_ch3.adb
12994         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12995         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12996         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12997         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12998         types.
12999         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13000         non-static range.
13001         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13002         functions whose return type is not in ALFA.
13003         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13004         specifications.
13005         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13006         parameter's type is not in ALFA.
13007         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13008         types are in ALFA.
13009
13010 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13011
13012         * sem_ch6 (Analyze_Expression_Function): treat the function as
13013         Inline_Always, and introduce a subprogram declaration for it when it is
13014         not a completion.
13015         * inline.adb (Add_Inlined_Body): recognize bodies that come from
13016         expression functions, so that the back-end can determine whether they
13017         can in fact be inlined.
13018         * sem_util.adb (Is_Expression_Function): predicate to determine whether
13019         a function body comes from an expression function.
13020
13021 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13022
13023         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13024         null exclusions to test Can_Never_Be_Null on the anonymous access types
13025         of the formals rather than testing the formals themselves. Exclude this
13026         check in cases where the Old_Formal is marked as a controlling formal,
13027         to avoid issuing spurious errors for bodies completing dispatching
13028         operations (due to the flag not getting set on controlling access
13029         formals in body specs).
13030         (Find_Corresponding_Spec): When checking full and subtype conformance of
13031         subprogram bodies in instances, pass Designated and E in that order, for
13032         consistency with the expected order of the formals (New_Id followed by
13033         Old_Id).
13034
13035 2011-08-02  Robert Dewar  <dewar@adacore.com>
13036
13037         * sem_ch8.adb: Minor reformatting.
13038
13039 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13040
13041         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13042         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13043         primitive operations of class-wide actuals.
13044
13045 2011-08-02  Javier Miranda  <miranda@adacore.com>
13046
13047         * exp_atag.ads, exp_atag.adb
13048         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13049         since its value is implicitly passed in argument Typ.
13050         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13051         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13052         Build_Common_Dispatching_Select_Statements.
13053
13054 2011-08-02  Robert Dewar  <dewar@adacore.com>
13055
13056         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13057         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13058         Minor reformatting.
13059
13060 2011-08-02  Robert Dewar  <dewar@adacore.com>
13061
13062         * sem_res.adb: Minor reformatting.
13063         * sem_prag.adb: Minor reformatting.
13064
13065 2011-08-02  Javier Miranda  <miranda@adacore.com>
13066
13067         * exp_atag.adb, exp_atags.ads
13068         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13069         by the tagged type Entity. Required to use this routine in the VM
13070         targets since we do not have available the Tag entity in the VM
13071         platforms.
13072         * exp_ch6.adb
13073         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13074         Ada.Tags has not been previously loaded.
13075         * exp_ch7.adb
13076         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13077         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13078         * sem_aux.adb
13079         (Enclosing_Dynamic_Scope): Add missing support to handle the full
13080         view of enclosing scopes. Required to handle enclosing scopes that
13081         are synchronized types whose full view is a task type.
13082         * exp_disp.adb
13083         (Build_VM_TSDs): Minor code improvement to avoid generating and
13084         analyzing lists with empty nodes.
13085         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13086         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13087         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13088         (Make_Disp_Timed_Select_Body): Add support for VM targets.
13089         (Make_Select_Specific_Data_Table): Add support for VM targets.
13090         (Make_VM_TSD): Generate code to initialize the SSD structure of
13091         the TSD.
13092
13093 2011-08-02  Yannick Moy  <moy@adacore.com>
13094
13095         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13096         cross-references section in ALI.
13097         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13098         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13099         Sub).
13100         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13101         subprogram or package entity of a node
13102         (Is_Local_Reference_Type): new function returns True for references
13103         selected in local cross-references.
13104         (Lt): function extracted from Lt in Output_References
13105         (Write_Entity_Name): function extracted from Output_References
13106         (Generate_Definition): generate reference with type 'D' for definition
13107         of objects (object declaration and parameter specification), with
13108         appropriate locations and units, for use in local cross-references.
13109         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13110         references of type 'I' for initialization in object definition.
13111         (Output_References): move part of function Lt and procedure
13112         Write_Entity_Name outside of the body. Ignore references of types 'D'
13113         and 'I' introduced for local cross-references.
13114         (Output_Local_References): new procedure to output the local
13115         cross-references sections.
13116         (Lref_Entity_Status): new array defining whether an entity is a local
13117         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13118         with 'I' type when initialization expression is present.
13119         * get_scos.adb, get_scos.ads: Correct comments and typos
13120
13121 2011-08-02  Javier Miranda  <miranda@adacore.com>
13122
13123         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13124         the JVM target.
13125         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13126         the JVM target.
13127         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13128         TSD support.
13129
13130 2011-08-02  Vincent Celier  <celier@adacore.com>
13131
13132         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13133         (No_Space_Img): New function
13134         (Find_Excluded_Sources): When reading from a file, record the file name
13135         and the line number for each excluded source.
13136         (Mark_Excluded_Sources): When reporting an error, if the excluded
13137         sources were read from a file, include file name and line number in
13138         the error message.
13139
13140 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13141
13142         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13143
13144 2011-08-02  Robert Dewar  <dewar@adacore.com>
13145
13146         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13147
13148 2011-08-02  Javier Miranda  <miranda@adacore.com>
13149
13150         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13151         generation of TSDs to the DOTNET compiler.
13152         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13153         generation of TSDs to the DOTNET compiler.
13154
13155 2011-08-02  Javier Miranda  <miranda@adacore.com>
13156
13157         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13158         record of all the tagged types declared inside library level package
13159         declarations, library level package bodies or library level subprograms.
13160         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13161         associated with a given tagged type.
13162         (Build_VM_TSDs): New subprogram.
13163         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13164         compilation units that are subprograms.
13165         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13166         compilation units that are package bodies.
13167         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13168         units that are a package declaration or a package instantiation.
13169         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13170         reorganization to improve the error generated by the frontend when the
13171         function Ada.Tags.Secondary_Tag is not available.
13172         * rtsfind.ads (RE_Register_TSD): New runtime entity.
13173         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13174
13175 2011-08-02  Javier Miranda  <miranda@adacore.com>
13176
13177         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13178
13179 2011-08-02  Robert Dewar  <dewar@adacore.com>
13180
13181         * s-imenne.ads: Minor reformatting.
13182
13183 2011-08-02  Robert Dewar  <dewar@adacore.com>
13184
13185         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13186         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13187         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13188
13189 2011-08-02  Robert Dewar  <dewar@adacore.com>
13190
13191         * einfo.ads (Materialize_Entity): Document this is only for renamings
13192         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13193         required debug information in the case where we transform the object
13194         declaration into a renaming declaration.
13195         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13196         object
13197         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13198         Materialize_Entity.
13199
13200 2011-08-02  Robert Dewar  <dewar@adacore.com>
13201
13202         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13203         Suppress_Init_Procs.
13204         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13205         Suppress_Initialization/Initialization_Suppressed.
13206         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13207         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13208         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13209         * sem_prag.adb: New processing for pragma Suppress_Initialization.
13210
13211 2011-08-02  Robert Dewar  <dewar@adacore.com>
13212
13213         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13214         Minor reformatting.
13215
13216 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13217
13218         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13219         only have inheritable classwide pre/postconditions.
13220
13221 2011-08-02  Javier Miranda  <miranda@adacore.com>
13222
13223         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13224         * rtsfind.ads (RE_Check_TSD): New runtime entity.
13225         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13226         checks if the external tag of a type is the same as the external tag
13227         of some other declaration.
13228
13229 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13230
13231         * s-taskin.ads: Minor reformatting.
13232
13233 2011-08-02  Emmanuel Briot  <briot@adacore.com>
13234
13235         * g-comlin.adb (Display_Help): swap the order in which it prints the
13236         short help and the general usage.
13237
13238 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13239
13240         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13241         the aspect declarations and attach them to the generic copy for
13242         subsequent analysis.
13243         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13244         declarations of the generic tree to the new subprogram declarations.
13245         * sem_attr.adb (Check_Precondition_Postcondition): recognize
13246         conditions that apply to a subprogram instance.
13247
13248 2011-08-02  Robert Dewar  <dewar@adacore.com>
13249
13250         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13251
13252 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13253
13254         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13255         private type with a tagged full view is not derived in the immediate
13256         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13257
13258 2011-08-02  Robert Dewar  <dewar@adacore.com>
13259
13260         * exp_ch4.adb: Minor reformatting.
13261
13262 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13263
13264         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
13265         Ada2012 iterator, the loop will be rewritten during expansion into a
13266         while loop with a cursor and an element declaration. Do not analyze the
13267         body in this case, because if the container is for indefinite types the
13268         actual subtype of the elements will only be determined when the cursor
13269         declaration is analyzed.
13270
13271 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13272
13273         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13274         size/alignment related attributes in CodePeer_Mode.
13275
13276 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13277
13278         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13279         Prepend_Element, since this can result in the operation getting the
13280         wrong slot in the full type's dispatch table if the full type has
13281         inherited operations. The incomplete type's operation will get added
13282         to the proper position in the full type's primitives
13283         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13284         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13285         dispatching operations, since there are cases where nonprimitive
13286         subprograms can get added to the list of incomplete dependents (such
13287         as subprograms in nested packages).
13288         * sem_ch6.adb (Process_Formals): First, remove test for being in a
13289         private part when determining whether to add a primitive with a
13290         parameter of a tagged incomplete type to the Private_Dependents list.
13291         Such primitives can also occur in the visible part, and should not have
13292         been excluded from being private dependents.
13293         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13294         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13295         list of a Taft-amendment incomplete type is a primitive before issuing
13296         an error that the full type must appear in the same unit. There are
13297         cases where nonprimitives can be in the list (such as subprograms in
13298         nested packages).
13299         * sem_disp.adb (Derives_From): Use correct condition for checking that
13300         a formal's type is derived from the type of the corresponding formal in
13301         the parent subprogram (the condition was completely wrong). Add
13302         checking that was missing for controlling result types being derived
13303         from the result type of the parent operation.
13304
13305 2011-08-02  Yannick Moy  <moy@adacore.com>
13306
13307         * errout.adb (First_Node): minor renaming
13308         * restrict.adb (Check_Formal_Restriction): put restriction warning on
13309         first node.
13310
13311 2011-08-02  Yannick Moy  <moy@adacore.com>
13312
13313         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13314         before accessing operands.
13315         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13316         decide whether an initialization expression respects SPARK rules, as
13317         the plain node is the expanded one. This allows for more valid warnings
13318         to be issued.
13319         * gnat_rm.texi: Minor update.
13320
13321 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13322
13323         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13324         previous change.
13325
13326 2011-08-02  Robert Dewar  <dewar@adacore.com>
13327
13328         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13329
13330 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13331
13332         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13333         loop statements and the element renaming declaration with a block when
13334         the element type is controlled.
13335
13336 2011-08-02  Yannick Moy  <moy@adacore.com>
13337
13338         * sinfo.ads: Minor formatting.
13339
13340 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13341
13342         * sem_aggr.adb (Add_Association): if the association has a box and no
13343         expression, use the Sloc of the aggregate itself for the new
13344         association.
13345         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13346         the Original_Node.
13347
13348 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13349
13350         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13351         When a container is provided via a function call, generate a renaming
13352         of the function result. This avoids the creation of a transient scope
13353         and the premature finalization of the container.
13354         * exp_ch7.adb (Is_Container_Cursor): Removed.
13355         (Wrap_Transient_Declaration): Remove the supression of the finalization
13356         of the list controller when the declaration denotes a container cursor,
13357         it is not needed.
13358
13359 2011-08-02  Yannick Moy  <moy@adacore.com>
13360
13361         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13362         node is from source, instead of the original node being from source.
13363         * sem_aggr.adb
13364         (Resolve_Array_Aggregate): refine the check for a static expression, to
13365         recognize also static ranges
13366         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13367         Array_Type_Declaration): postpone the test for the type being a subtype
13368         mark after the type has been resolved, so that component-selection and
13369         expanded-name are discriminated.
13370         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13371         to distinguish the case of an iteration scheme, so that an error is
13372         issed on a non-static range in SPARK except in an iteration scheme.
13373         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13374         In_Iter_Schm = True.
13375         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13376         user-defined operators so that they are allowed in renaming
13377         * sem_ch8.adb
13378         (Find_Selected_Component): refine the check for prefixing of operators
13379         so that they are allowed in renaming. Move the checks for restrictions
13380         on selector name after analysis discriminated between
13381         component-selection and expanded-name.
13382         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13383         concatenation argument of string type if it is static.
13384         * sem_util.adb, sem_util.ads
13385         (Check_Later_Vs_Basic_Declarations): add a new function
13386         Is_Later_Declarative_Item to decice which declarations are allowed as
13387         later items, in the two different modes Ada 83 and SPARK. In the SPARK
13388         mode, add that renamings are considered as later items.
13389         (Enclosing_Package): new function to return the enclosing package
13390         (Enter_Name): correct the rule for homonyms in SPARK
13391         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13392         from source (result of expansion) to avoid issuing wrong warnings.
13393
13394 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13395
13396         * errout.adb: On anything but an expression First_Node returns its
13397         argument.
13398
13399 2011-08-02  Pascal Obry  <obry@adacore.com>
13400
13401         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13402
13403 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13404
13405         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13406         Set the associated loop as the related expression of internally
13407         generated cursors.
13408         * exp_ch7.adb (Is_Container_Cursor): New routine.
13409         (Wrap_Transient_Declaration): Supress the finalization of the list
13410         controller when the declaration denotes a container cursor.
13411
13412 2011-08-02  Yannick Moy  <moy@adacore.com>
13413
13414         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13415         command line now.
13416         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13417         expression is a simple expression. This check cannot be performed in
13418         the semantics, so just drop it.
13419         (P_Index_Or_Discriminant_Constraint): move check that the index or
13420         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13421         semantics. Other cases were previously checked in the semantics.
13422         * par-ch4.adb (P_Name): move checks that a selector name is not
13423         character literal or an operator symbol to Find_Selected_Component in
13424         the semantics
13425         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13426         declarations are not placed after later declarations in a separate
13427         procedure in Sem_Util (possibly not the best choice?), to be used both
13428         during parsing, for Ada 83 mode, and during semantic analysis, for
13429         SPARK mode.
13430         * par-endh.adb (Check_End): move check that end label is not missing
13431         to Process_End_Label in the semantics
13432         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13433         the special case for SPARK restriction
13434         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13435         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13436         parameter Force to issue the error message even on internal node (used
13437         for generated end label). Call Check_Restriction to check when an error
13438         must be issued. In SPARK mode, issue an error message even if the
13439         restriction is not set.
13440         (Check_Restriction): new procedure with an additional out parameter to
13441         inform the caller that a message has been issued
13442         * sem_aggr.adb: Minor modification of message
13443         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13444         instead of issuing an error message directly
13445         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13446         declarations are not placed after later declarations, by calling
13447         Check_Later_Vs_Basic_Declarations
13448         (Analyze_Subtype_Declaration): move here the check that an index or
13449         discriminant constraint must be a subtype mark. Change the check that
13450         a subtype of String must start at one so that it works on subtype marks.
13451         * sem_ch4.adb (Analyze_Call): move here the check that a named
13452         association cannot follow a positional one in a call
13453         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13454         instead of issuing an error message directly
13455         * sem_ch8.adb (Find_Selected_Component): move here the check that a
13456         selector name is not a character literal or an operator symbol. Move
13457         here the check that the prefix of an expanded name cannot be a
13458         subprogram or a loop statement.
13459         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13460         procedure called from parsing and semantics to check that basic
13461         declarations are not placed after later declarations
13462         (Process_End_Label): move here the check that end label is not missing
13463
13464 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13465
13466         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13467         representation clause in codepeer mode, since it confuses CodePeer and
13468         does not bring useful info.
13469
13470 2011-08-02  Ed Falis  <falis@adacore.com>
13471
13472         * init.c: initialize fp hw on MILS.
13473
13474 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13475
13476         * errout.adb (First_Node): for bodies, return the node itself (small
13477         optimization). For other nodes, do not check source_unit if the node
13478         comes from Standard.
13479
13480 2011-08-02  Robert Dewar  <dewar@adacore.com>
13481
13482         * exp_ch3.adb: Minor comment additions.
13483         * sem_ch13.adb: Minor reformatting.
13484
13485 2011-08-02  Pascal Obry  <obry@adacore.com>
13486
13487         * make.adb, makeutl.adb: Removes some superfluous directory separator.
13488
13489 2011-08-02  Robert Dewar  <dewar@adacore.com>
13490
13491         * sem_attr.adb: Minor reformatting.
13492
13493 2011-08-02  Robert Dewar  <dewar@adacore.com>
13494
13495         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13496         (Has_Default_Component_Value): Removed
13497         * einfo.ads Comment updates
13498         (Has_Default_Aspect): Replaces Has_Default_Value
13499         (Has_Default_Component_Value): Removed
13500         * exp_ch13.adb
13501         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13502         * exp_ch3.adb
13503         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13504         (Get_Simple_Init_Val): Handle Default_Value aspect
13505         (Needs_Simple_Initialization): Handle Default_Value aspect
13506         * exp_ch3.ads: Needs_Simple_Initialization
13507         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13508         * par-prag.adb (Pragma_Default[_Component]Value) Removed
13509         * sem_ch13.adb
13510         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13511         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13512         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13513
13514 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13515
13516         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13517         package containing iteration primitives.
13518         exp_ch5.adb (Expand_Iterator_Loop): ditto.
13519
13520 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13521
13522         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13523         "of", pre-analyze expression in case it is a function call with
13524         finalization actions that must be placed ahead of the loop.
13525         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13526         on an Ada2012 iterator, insert them ahead of the rewritten loop.
13527
13528 2011-08-02  Geert Bosch  <bosch@adacore.com>
13529
13530         * cstand.adb (Create_Float_Types): Only consider C's long double for
13531         Long_Long_Float, in addition to double.
13532
13533 2011-08-02  Robert Dewar  <dewar@adacore.com>
13534
13535         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13536         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13537         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13538         Minor reformatting.
13539
13540 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13541
13542         * sem_attr.adb: handle properly 'Result when it is a prefix of an
13543         indexed component.
13544
13545 2011-08-02  Javier Miranda  <miranda@adacore.com>
13546
13547         * einfo.ads, einfo.adb
13548         (Original_Access_Type): Move this attribute to Node26 since there was
13549         an undocumented use of Node21 in E_Access_Subprogram_Type entities
13550         which causes conflicts and breaks the generation of the .NET compiler.
13551         (Interface_Name): Add missing documentation on JGNAT only uses of
13552         this attribute.
13553
13554 2011-08-02  Geert Bosch  <bosch@adacore.com>
13555
13556         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13557         (Find_Back_End_Float_Type): Likewise
13558         (Create_Back_End_Float_Types): Likewise
13559         (Create_Float_Types): Likewise
13560         (Register_Float_Type): Likewise
13561         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13562         Nlist and split out type selection in new local Find_Base_Type function.
13563         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13564         Nlist
13565         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13566
13567 2011-08-02  Robert Dewar  <dewar@adacore.com>
13568
13569         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13570         alpha order).
13571         * opt.ads: Minor comment change.
13572         * sem_ch12.adb: Minor code reorganization.
13573
13574 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13575
13576         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13577         subtype's list of rep items to the list on the full subtype in the case
13578         where the lists are the same.
13579
13580 2011-08-02  Geert Bosch  <bosch@adacore.com>
13581
13582         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13583         using the one from System.Strings, which also deallocates all strings.
13584
13585 2011-08-02  Geert Bosch  <bosch@adacore.com>
13586
13587         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13588         function.
13589         * gcc-interface/Make-lang.in: Update dependencies.
13590
13591 2011-08-02  Olivier Hainque  <hainque@adacore.com>
13592
13593         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13594         end_locus.
13595
13596 2011-08-02  Javier Miranda  <miranda@adacore.com>
13597
13598         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13599         associated with anonymous access to subprograms.
13600
13601 2011-08-02  Geert Bosch  <bosch@adacore.com>
13602
13603         * opt.ads
13604         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13605         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13606         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13607         (Add_Symbol_Definition): Move to switch-c.adb
13608         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13609         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13610         (Add_Symbol_Definition): Move to switch-c.adb.
13611         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13612         * sem_warn.adb
13613         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13614         Move to warnsw.adb.
13615         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13616         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13617         Move to warnsw.adb.
13618         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13619         (Add_Symbol_Definition): Moved from Prepcomp.
13620         * switch-c.ads: Update copyright notice. Use String_List instead of
13621         Argument_List, removing dependency on System.OS_Lib.
13622
13623 2011-08-02  Yannick Moy  <moy@adacore.com>
13624
13625         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13626         mode on initialization expression which does not respect SPARK
13627         restrictions.
13628         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13629         if the tree referenced by its argument represents an initialization
13630         expression in SPARK, suitable for initializing an object in an object
13631         declaration.
13632
13633 2011-08-02  Javier Miranda  <miranda@adacore.com>
13634
13635         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13636         internally generated access to subprogram with its associated protected
13637         subprogram type.
13638         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13639
13640 2011-08-02  Geert Bosch  <bosch@adacore.com>
13641
13642         * cstand.adb (Register_Float_Type): Print information about type to
13643         register, if the Debug_Flag_Dot_B is set.
13644         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13645         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13646         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13647         with a requested precision of more than Max_Digits digits and no more
13648         than Max_Base_Digits digits, if a range specification is present and the
13649         Predefined_Float_Types list has a suitable type to derive from.
13650         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13651         case of type completion with pragma Import
13652         * sem_prag.adb
13653         (Process_Import_Predefined_Type): Processing to complete a type
13654         with pragma Import. Currently supports floating point types only.
13655         (Set_Convention_From_Pragma): Do nothing without underlying type.
13656         (Process_Convention): Guard against absence of underlying type,
13657         which may happen when importing incomplete types.
13658         (Process_Import_Or_Interface): Handle case of importing predefined
13659         types. Tweak error message.
13660
13661 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13662
13663         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13664         functions to previous change.  Reorganize code slightly.
13665
13666 2011-08-02  Geert Bosch  <bosch@adacore.com>
13667
13668         * back_end.ads (Register_Type_Proc): New call back procedure type for
13669         allowing the back end to provide information about available types.
13670         (Register_Back_End_Types): New procedure to register back end types.
13671         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13672         available types.
13673         * cstand.adb (Back_End_Float_Types): New list for floating point types
13674         supported by the back end.
13675         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13676         (Copy_Float_Type): New procedure to make new copies of predefined types.
13677         (Register_Float_Type): New call back procedure to populate the BEFT list
13678         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13679         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13680         (Create_Float_Types): New procedure to create entities for floating
13681         point types predefined in Standard, and put these and any remaining
13682         BEFTs on the Predefined_Float_Types list.
13683         * stand.ads (Predefined_Float_Types): New list for predefined floating
13684         point types that do not have declarations in package Standard.
13685
13686 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13687
13688         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
13689         entity node for the unit containing the parameter.
13690         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13691         (Add_Inlined_Subprogram): Likewise.
13692         * gcc-interface/Make-lang.in: Update dependencies.
13693
13694 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13695
13696         * s-stusta.adb (Print): Make sure Pos is always initialized to a
13697         suitable value.
13698
13699 2011-08-02  Geert Bosch  <bosch@adacore.com>
13700
13701         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13702
13703 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13704
13705         * sem_type.adb (Covers): Move trivial case to the top and reuse the
13706         computed value of Base_Type.
13707
13708 2011-08-02  Yannick Moy  <moy@adacore.com>
13709
13710         * restrict.adb (Check_Restriction): issue an error for any use of
13711         class-wide, even if the No_Dispatch restriction is not set.
13712         * sem_aggr.adb: Correct typos in comments and messages in formal mode
13713         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13714         when completing a private extension, the type named in the private part
13715         is not the same as that named in the visible part.
13716         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13717         of an inherited primitive operations of a tagged type or type extension
13718         that returns the tagged type.
13719         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13720         function which returns True for an implicit operation inherited by the
13721         derived type declaration for the argument type.
13722         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13723         order.
13724
13725 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13726
13727         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13728         Process_Bounds, to perform analysis with expansion of a range or an
13729         expression that is the iteration scheme for a loop.
13730         (Analyze_Iterator_Specification): If domain of iteration is given by a
13731         function call with a controlled result, as is the case if call returns
13732         a predefined container, ensure that finalization actions are properly
13733         generated.
13734         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13735
13736 2011-08-02  Javier Miranda  <miranda@adacore.com>
13737
13738         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13739         * gcc-interface/Make-lang.in: Update dependencies.
13740
13741 2011-08-02  Javier Miranda  <miranda@adacore.com>
13742
13743         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13744         determine if the analysis is performed using N or Original_Node (N).
13745         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13746         functionality of routine Is_Variable avoids code duplication.
13747         * checks.adb (Determine_Range): Handle temporaries generated by
13748         Remove_Side_Effects.
13749
13750 2011-08-02  Javier Miranda  <miranda@adacore.com>
13751
13752         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13753         expansion of the condition. Required since the previous analysis was
13754         done with expansion disabled (see Resolve_Quantified_Expression) and
13755         hence checks were not inserted and record comparisons have not been
13756         expanded.
13757
13758 2011-08-02  Ed Falis  <falis@adacore.com>
13759
13760         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13761         Update header.
13762
13763 2011-08-02  Bob Duff  <duff@adacore.com>
13764
13765         * opt.ads: Minor comment fix.
13766
13767 2011-08-02  Bob Duff  <duff@adacore.com>
13768
13769         * sem_ch12.adb (Analyze_Package_Instantiation,
13770         Analyze_Subprogram_Instantiation): Turn off style checking while
13771         analyzing an instance. Whatever style checks that apply to the generic
13772         unit should apply, so it makes no sense to apply them in an instance.
13773         This was causing trouble when compiling an instance of a runtime
13774         unit that violates the -gnatyO switch.
13775         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13776         one of the two case statements, causing spurious errors.
13777
13778 2011-08-02  Robert Dewar  <dewar@adacore.com>
13779
13780         * uname.adb: Minor reformatting.
13781         * gnatcmd.adb: Minor reformatting.
13782         * exp_attr.adb: Minor reformatting.
13783
13784 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13785
13786         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13787         No_Dispatching_Calls, do not look for the Assign primitive, because
13788         predefined primitives are not created in this case.
13789
13790 2011-08-02  Bob Duff  <duff@adacore.com>
13791
13792         * stylesw.ads: Minor comment fixes.
13793
13794 2011-08-02  Robert Dewar  <dewar@adacore.com>
13795
13796         * freeze.adb (Add_To_Result): New procedure.
13797
13798 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
13799
13800         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13801         time, if the specific run-time routines for handling streams of strings
13802         are not available, use the default mechanism.
13803
13804 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13805
13806         * s-regpat.ads: Fix typo.
13807
13808 2011-08-02  Vincent Celier  <celier@adacore.com>
13809
13810         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13811         not null, call it to create the in memory config project file without
13812         parsing an existing default config project file.
13813
13814 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13815
13816         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13817
13818 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13819
13820         * sem_elim.adb: an abstract subprogram does not need an eliminate
13821         pragma for its descendant to be eliminable.
13822
13823 2011-08-02  Ed Falis  <falis@adacore.com>
13824
13825         * init.c: revert to handling before previous checkin for VxWorks
13826         * s-intman-vxworks.adb: delete unnecessary declarations related to
13827         using Ada interrupt facilities for handling signals.
13828         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13829         * s-intman-vxworks.ads: Import __gnat_install_handler as
13830         Initialize_Interrupts.
13831         * s-taprop-vxworks.adb: Delete Signal_Mask.
13832         (Abort_Handler): change construction of mask to unblock exception
13833         signals.
13834
13835 2011-08-02  Jerome Guitton  <guitton@adacore.com>
13836
13837         * a-except-2005.adb (Raise_From_Signal_Handler): Call
13838         Debug_Raise_Exception before propagation starts.
13839
13840 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13841
13842         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13843         to Restriction_Check_Required.
13844         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13845         * sem_res.adb (Resolve_Call): Likewise.
13846         * sem_attr.adb (Check_Stream_Attribute): Likewise.
13847
13848 2011-08-02  Bob Duff  <duff@adacore.com>
13849
13850         * stylesw.ads: Update comment.
13851         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13852         * errout.ads: Remove obsolete comment.
13853
13854 2011-08-02  Javier Miranda  <miranda@adacore.com>
13855
13856         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13857         (Set_Is_Safe_To_Reevaluate): new procedure.
13858         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13859         assignment is allowed on safe-to-reevaluate variables.
13860         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13861         temporary created to remove side effects in expressions that use
13862         the secondary stack as safe-to-reevaluate.
13863         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13864         variables that are not true constants.
13865
13866 2011-08-02  Robert Dewar  <dewar@adacore.com>
13867
13868         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13869         sem_res.adb, sem_ch6.adb: Minor reformatting.
13870
13871 2011-08-02  Jerome Guitton  <guitton@adacore.com>
13872
13873         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13874
13875 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13876
13877         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13878         not set Overridden_Operation if subprogram is an initialization
13879         procedure.
13880
13881 2011-08-02  Yannick Moy  <moy@adacore.com>
13882
13883         * par-ch6.adb: Correct obsolete name in comments
13884         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13885         which takes two message arguments (existing function takes one), with
13886         second message used for continuation.
13887         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13888         block statements that originate from a source block statement, not
13889         generated block statements
13890         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13891         symmetry with procedure case
13892         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13893         function to issue an error in formal mode if a package specification
13894         contains more than one tagged type or type extension.
13895         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13896         parameters matching formals of tagged types are objects (or ancestor
13897         type conversions of objects), not general expressions. Issue an error
13898         on view conversions that are not involving ancestor conversion of an
13899         extended type.
13900         (Resolve_Type_Conversion): in formal mode, issue an error on the
13901         operand of an ancestor type conversion which is not an object
13902         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13903         procedure so that it works also for actuals of function calls
13904         (Is_Actual_Tagged_Parameter): new function which determines if its
13905         argument is an actual parameter of a formal of tagged type in a
13906         subprogram call
13907         (Is_SPARK_Object_Reference): new function which determines if the tree
13908         referenced by its argument represents an object in SPARK
13909
13910 2011-08-02  Robert Dewar  <dewar@adacore.com>
13911
13912         * sem_ch3.adb: Minor reformatting
13913         Minor comment addition
13914         Minor error msg text change
13915
13916 2011-08-02  Javier Miranda  <miranda@adacore.com>
13917
13918         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13919         function. Used to be more precise when we generate a variable plus one
13920         assignment to remove side effects in the evaluation of the Bound
13921         expressions.
13922         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13923         of the bound expression to force its re-analysis and thus expand the
13924         associated transient scope (if required). Code cleanup replacing the
13925         previous code that declared the constant entity by an invocation to
13926         routine Force_Evaluation which centralizes this work in the frontend.
13927
13928 2011-08-02  Robert Dewar  <dewar@adacore.com>
13929
13930         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13931         (Base_Type): Now uses improved Is_Base_Type function
13932         * einfo.ads (Base_Type): Inline this function
13933
13934 2011-08-02  Robert Dewar  <dewar@adacore.com>
13935
13936         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13937         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13938
13939 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13940
13941         * gcc-interface/Make-lang.in: Update dependencies.
13942         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13943         targets.
13944
13945 2011-08-02  Yannick Moy  <moy@adacore.com>
13946
13947         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13948         non-simple expression used in delta constraint
13949         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13950         index constraint which is not a subtype mark
13951         * par.adb: With and use Restrict
13952         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13953         mode on component type which is not a subtype mark and default
13954         expression on component
13955         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13956         of string which does not have a lower index bound equal to 1
13957         (Array_Type_Declaration): issue an error in formal mode on index or
13958         component type which is not a subtype mark, and on aliased keyword on
13959         component
13960         (Derived_Type_Declaration): issue an error in formal mode on interface,
13961         limited or abstract type
13962         (Record_Type_Declaration): issue an error in formal mode on interface
13963         (Record_Type_Definition): issue an error in formal mode on tagged types
13964         and type extensions not declared in the specification of a library unit
13965         package; on null non-tagged record; on variant part
13966
13967 2011-08-02  Vincent Celier  <celier@adacore.com>
13968
13969         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13970         not declared for qualified library project when Library_Name is not
13971         declared, but Library_Dir is.
13972
13973 2011-08-02  Robert Dewar  <dewar@adacore.com>
13974
13975         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13976         pragmas (affects aspects [Component_]Default_Value
13977         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13978         component type for the resolution
13979
13980 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13981
13982         * einfo.adb (Base_Type): Tune implementation for speed.
13983
13984 2011-08-02  Robert Dewar  <dewar@adacore.com>
13985
13986         * freeze.adb: Minor reformatting.
13987
13988 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13989
13990         * scos.ads: Update comments.
13991
13992 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13993
13994         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13995         base type, because the parent may be a subtype of a private type whose
13996         convention is established in a private part.
13997
13998 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13999
14000         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14001         statement in a block when the expansion of the return expression has
14002         created a finalization chain.
14003         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14004         with the parent node.
14005         Add N_Extended_Return_Statement to handle the case where a transient
14006         object declaration appears in the Return_Object_Declarations list of
14007         an extended return statement.
14008
14009 2011-08-02  Matthew Gingell  <gingell@adacore.com>
14010
14011         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14012         unused parameter 'name'.
14013
14014 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14015
14016         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14017         inherited operation, check whether its alias, which is the source
14018         operastion that it renames, has been marked eliminated.
14019
14020 2011-08-02  Javier Miranda  <miranda@adacore.com>
14021
14022         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14023         in-mode parameter whose type is an access type since it can be used to
14024         modify its designated object. Enforce code that handles as safe an
14025         access type that is not access-to-constant but it is the result of a
14026         previous removal of side-effects.
14027         (Remove_Side_Effects): Minor code reorganization of cases which require
14028         no action. Done to incorporate documentation on new cases uncovered
14029         working in this ticket: no action needed if this routine was invoked
14030         too early and the nodes are not yet decorated.
14031         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14032         to routine Remove_Side_Effects by calls to Force_Evaluation since they
14033         were issued with actuals that are implicitly provided by
14034         Force_Evaluation.
14035
14036 2011-08-02  Robert Dewar  <dewar@adacore.com>
14037
14038         * sem_ch3.adb, sem_res.adb: Minor reformatting.
14039
14040 2011-08-02  Yannick Moy  <moy@adacore.com>
14041
14042         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14043         to issue an error in formal mode on attribute not supported in this mode
14044         (Analyze_Attribute): issue errors on standard attributes not supported
14045         in formal mode.
14046         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14047         comment, and issue error in formal mode on modulus which is not a power
14048         of 2.
14049         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14050         range.
14051         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14052         subtype mark.
14053         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14054         operator on modular type (except 'not').
14055
14056 2011-08-02  Robert Dewar  <dewar@adacore.com>
14057
14058         * gnat_rm.texi: Minor reformatting.
14059
14060 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14061
14062         * s-osinte-linux.ads: Minor comment update and reformatting.
14063         * i-cexten.ads: Make this unit pure, as for its parent.
14064         Will allow its usage in more contexts if needed.
14065
14066 2011-08-02  Robert Dewar  <dewar@adacore.com>
14067
14068         * s-utf_32.ads: Minor comment fix.
14069
14070 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14071
14072         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14073         operation of a tagged synchronized type, handle the case where the
14074         controlling argument is overloaded.
14075
14076 2011-08-02  Yannick Moy  <moy@adacore.com>
14077
14078         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14079         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14080         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14081         SPARK mode and formal verification mode on processing SPARK restriction
14082         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14083         requiring consistency checking.
14084
14085 2011-08-02  Robert Dewar  <dewar@adacore.com>
14086
14087         * sem_res.adb: Minor reformatting.
14088
14089 2011-08-02  Robert Dewar  <dewar@adacore.com>
14090
14091         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14092         a-cforse.ads: Remove unneeded with of Ada.Containers
14093         Remove commented out pragma Inline's
14094         Move specifications of new subprograms to the actual specs
14095
14096 2011-08-02  Yannick Moy  <moy@adacore.com>
14097
14098         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14099         a-cforse.ads: Update comments.
14100
14101 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14102
14103         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14104
14105 2011-08-02  Robert Dewar  <dewar@adacore.com>
14106
14107         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14108         a-cforse.ads, a-cofove.ads: Minor reformatting.
14109
14110 2011-08-02  Claire Dross  <dross@adacore.com>
14111
14112         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14113         a-cofove.ads: Add comments.
14114
14115 2011-08-02  Yannick Moy  <moy@adacore.com>
14116
14117         * gnat_rm.texi: Document formal containers.
14118
14119 2011-08-02  Emmanuel Briot  <briot@adacore.com>
14120
14121         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14122         are empty sections.
14123
14124 2011-08-02  Robert Dewar  <dewar@adacore.com>
14125
14126         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14127         reformatting.
14128
14129 2011-08-02  Robert Dewar  <dewar@adacore.com>
14130
14131         * aspects.adb: New aspects Default_Value and Default_Component_Value
14132         New format of Aspect_Names table checks for omitted entries
14133         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14134         handling of boolean aspects for derived types.
14135         New aspects Default_Value and Default_Component_Value
14136         New format of Aspect_Names table checks for omitted entries
14137         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14138         (Has_Default_Value): New flag
14139         (Has_Default_Component_Value): New flag
14140         (Has_Default_Value): New flag
14141         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14142         table.
14143         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14144         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14145         Default_Value and Default_Component_Value
14146         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14147         New aspects Default_Value and Default_Component_Value
14148         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14149         * sprint.adb: Print N_Aspect_Specification node when called from gdb
14150
14151 2011-08-02  Vincent Celier  <celier@adacore.com>
14152
14153         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14154         inherit library kind.
14155
14156 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14157
14158         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14159         Minor reformatting.
14160
14161 2011-08-02  Robert Dewar  <dewar@adacore.com>
14162
14163         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14164
14165 2011-08-02  Yannick Moy  <moy@adacore.com>
14166
14167         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14168
14169 2011-08-02  Robert Dewar  <dewar@adacore.com>
14170
14171         * impunit.adb: Add comment.
14172
14173 2011-08-02  Yannick Moy  <moy@adacore.com>
14174
14175         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14176         qualification of aggregates in formal mode
14177         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14178         another aggregate
14179         (Resolve_Aggregate): complete the test that an aggregate is adequately
14180         qualified in formal mode
14181
14182 2011-08-02  Pascal Obry  <obry@adacore.com>
14183
14184         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14185         * mlib-prj.adb: Supress warning when compiling binder generated file.
14186         (Build_Library): Supress all warnings when compiling the binder
14187         generated file.
14188
14189 2011-08-02  Yannick Moy  <moy@adacore.com>
14190
14191         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14192         from here...
14193         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14194         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14195         Add with/use clauses to make Check_Formal_Restriction visible
14196
14197 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14198
14199         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14200         in-parameters when type of the generic formal is private in the generic
14201         spec and non-private in the body.
14202
14203 2011-08-02  Claire Dross  <dross@adacore.com>
14204
14205         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14206         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14207         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14208         * impunit.adb, Makefile.rtl: Take new files into account.
14209
14210 2011-08-02  Robert Dewar  <dewar@adacore.com>
14211
14212         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14213         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14214
14215 2011-08-02  Yannick Moy  <moy@adacore.com>
14216
14217         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14218         formal mode
14219         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14220         matching static array bounds, taking into account the special case of
14221         string literals
14222         * sem_ch3.adb: Typo in comment.
14223
14224 2011-08-02  Yannick Moy  <moy@adacore.com>
14225
14226         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14227         which issues an error in formal mode if its argument node is originally
14228         from source
14229         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14230         has a discriminant specification so that it does not include the case
14231         of derived types
14232         (Derived_Type_Declaration): move here the test that a derived type has a
14233         discriminant specification
14234         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14235         first element of a component association before accessing its choices
14236         (presence of component association is not enough)
14237         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14238         declaration is a library item before accessing the next element in a
14239         list, as library items are not member of lists
14240         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14241         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14242         Check_Formal_Restriction whenever possible.
14243
14244 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14245
14246         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14247         reference when needed.
14248
14249 2011-08-02  Bob Duff  <duff@adacore.com>
14250
14251         * gnat_ugn.texi: Fix typo.
14252
14253 2011-08-02  Vincent Celier  <celier@adacore.com>
14254
14255         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14256         archive file name. Do not use the full path name of archives for Open
14257         VMS.
14258
14259 2011-08-02  Robert Dewar  <dewar@adacore.com>
14260
14261         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14262         Analyze_Aspect_Specifications
14263         * sem_ch13.adb
14264         (Analyze_Aspect_Specifications): New handling for boolean aspects
14265         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14266         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14267         sequence for Analyze_Aspect_Specifications
14268         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14269         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14270
14271 2011-08-02  Robert Dewar  <dewar@adacore.com>
14272
14273         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14274         aspects, since these no longer exist.
14275
14276 2011-08-02  Robert Dewar  <dewar@adacore.com>
14277
14278         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14279         semicolon, do not try to see if there are aspects following it.
14280         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14281         aspect spec.
14282
14283 2011-08-02  Robert Dewar  <dewar@adacore.com>
14284
14285         * sem_ch8.adb, aspects.ads: Minor reformatting.
14286
14287 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14288
14289         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14290         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14291         extracted from...
14292         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
14293
14294 2011-08-02  Yannick Moy  <moy@adacore.com>
14295
14296         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14297         mode on subprogram declaration outside of package specification, unless
14298         it is followed by a pragma Import
14299         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14300         Access_Type_Declaration): issue error in formal mode on access type
14301         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14302         incomplete type
14303         (Analyze_Object_Declaration): issue error in formal mode on object
14304         declaration which does not respect SPARK restrictions
14305         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14306         declaration which does not respect SPARK restrictions
14307         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14308         error in formal mode on digits or delta constraint
14309         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14310         decimal fixed point type
14311         (Derived_Type_Declaration): issue error in formal mode on derived type
14312         other than type extensions of tagged record types
14313         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14314         with check on access definition
14315         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14316         mode on protected definition.
14317         (Analyze_Task_Definition): issue error in formal mode on task definition
14318
14319 2011-08-02  Robert Dewar  <dewar@adacore.com>
14320
14321         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14322
14323 2011-08-02  Javier Miranda  <miranda@adacore.com>
14324
14325         * sem_ch6.adb (Can_Override_Operator): New function.
14326         (Verify_Overriding_Indicator): Add missing code to check overriding
14327         indicator in operators. Fixes regression.
14328         (Check_Overriding_Indicator): Minor reformating after replacing the
14329         code that evaluates if the subprogram can override an operator by
14330         invocations to the above new function.
14331         * einfo.adb
14332         (Write_Field26_Name): Add missing code to ensure that, following
14333         the documentation in einfo.ads, this field is not shown as attribute
14334         "Static_Initialization" on non-dispatching functions.
14335
14336 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14337
14338         * sem_res.adb (Resolve_Call): A call to
14339         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14340         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14341         i.e., when the second parameter is of type Time_Span.
14342
14343 2011-08-02  Vincent Celier  <celier@adacore.com>
14344
14345         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14346         with an archive instead of -L<library dir> -l<library name>.
14347
14348 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14349
14350         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14351         mark the base types In_Use in addition to making the operations
14352         use_visible.
14353
14354 2011-08-02  Ed Falis  <falis@adacore.com>
14355
14356         * init.c: add and setup __gnat_signal_mask for the exception signals
14357         * s-inmaop-vxworks.adb: new file.
14358         * s-intman-vxworks.adb: remove unnecessary initializations and
14359         simplify remaining
14360         * s-intman-vxworks.ads: remove unnecessary variable
14361         * s-taprop-vxworks.adb: simplify signal initialization
14362
14363 2011-08-02  Robert Dewar  <dewar@adacore.com>
14364
14365         * sem_ch8.adb: Minor code reorganization, comment updates.
14366
14367 2011-08-02  Robert Dewar  <dewar@adacore.com>
14368
14369         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14370         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14371         here from Sem_Res.
14372         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14373         (Matching_Static_Array_Bounds): Moved here from Sem_Res
14374
14375 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14376
14377         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14378         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14379         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14380         use_type_clauses, to handle more efficiently use_type and use_all_type
14381         constructs.
14382         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14383         Ada2012 Use_All_Type clause.
14384         (Use_Class_Wide_Operations): new procedure.
14385
14386 2011-08-02  Robert Dewar  <dewar@adacore.com>
14387
14388         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14389         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14390         expression to expression function.
14391
14392 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14393
14394         * sem_ch4.adb: transform simple Ada2012 membership into equality only
14395         if types are compatible.
14396
14397 2011-08-02  Yannick Moy  <moy@adacore.com>
14398
14399         * sem_res.adb (Matching_Static_Array_Bounds): new function which
14400         returns True if its argument array types have same dimension and same
14401         static bounds at each index.
14402         (Resolve_Actuals): issue an error in formal mode on actuals passed as
14403         OUT or IN OUT paramaters which are not view conversions in SPARK.
14404         (Resolve_Arithmetic_Op): issue an error in formal mode on
14405         multiplication or division with operands of fixed point types which are
14406         not qualified or explicitly converted.
14407         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14408         Boolean or array type (except String) operands.
14409         (Resolve_Equality_Op): issue an error in formal mode on equality
14410         operators for array types other than String with non-matching static
14411         bounds.
14412         (Resolve_Logical_Op): issue an error in formal mode on logical operators
14413         for array types with non-matching static bounds. Factorize the code in
14414         Matching_Static_Array_Bounds.
14415         (Resolve_Qualified_Expression): issue an error in formal mode on
14416         qualified expressions for array types with non-matching static bounds.
14417         (Resolve_Type_Conversion): issue an error in formal mode on type
14418         conversion for array types with non-matching static bounds
14419
14420 2011-08-02  Robert Dewar  <dewar@adacore.com>
14421
14422         * par-ch10.adb: Minor code reorganization (use Nkind_In).
14423
14424 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14425
14426         * par-ch9.adb: save location of entry for proper error message.
14427
14428 2011-08-02  Javier Miranda  <miranda@adacore.com>
14429
14430         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14431         (Use_Full_View) which permits this routine to climb through the
14432         ancestors using the full-view of private parents.
14433         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14434         Use_Full_View to true in calls to Is_Ancestor.
14435         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14436         true in call to Is_Ancestor.
14437         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14438         Use_Full_View to true in call to Is_Ancestor.
14439         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14440         call to Is_Ancestor.
14441         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14442         Use_Full_View to true in calls to Is_Ancestor.
14443         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14444         Make_Select_Specific_Data_Table, Register_Primitive,
14445         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14446         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14447         to true in call to Is_Ancestor.
14448         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14449         Use_Full_View to true in calls to Is_Ancestor.
14450         * exp_cg.adb
14451         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14452         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14453
14454 2011-08-02  Robert Dewar  <dewar@adacore.com>
14455
14456         * gnat_rm.texi: Minor reformatting.
14457         * sem_prag.adb: Minor reformatting.
14458
14459 2011-08-02  Tristan Gingold  <gingold@adacore.com>
14460
14461         * vms_data.ads: Add VMS qualifier for -gnateP.
14462
14463 2011-08-02  Robert Dewar  <dewar@adacore.com>
14464
14465         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14466         * par-ch7.adb (P_Package): Proper placement of aspects for package
14467         decl/instantiation.
14468         * par-endh.adb (Check_End): Ad Is_Sloc parameter
14469         (End_Statements): Add Is_Sloc parameterr
14470         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14471         (Check_End): Ad Is_Sloc parameter
14472         (End_Statements): Add Is_Sloc parameterr
14473
14474 2011-08-02  Vincent Celier  <celier@adacore.com>
14475
14476         * ug_words: Add VMS qualifier equivalent to -gnateP:
14477         /SYMBOL_PREPROCESSING.
14478
14479 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14480
14481         * gnat-style.texi: For hexadecimal numeric literals the typical
14482         grouping of digits is 4 to represent 2 bytes.
14483         A procedure spec which is split into several lines is indented two
14484         characters.
14485
14486 2011-08-02  Yannick Moy  <moy@adacore.com>
14487
14488         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14489         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14490         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14491         properly qualified
14492         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14493         choice in array aggregate
14494         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14495         mark as ancestor
14496         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14497         positional and named aggregate for record, or others in record
14498         aggregate, or multiple choice in record aggregate
14499         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14500         array operands to logical operations AND, OR and XOR do not have the
14501         same static lower and higher bounds
14502         * sem_ch5.adb, sinfo.ads: Correct typos in comments
14503
14504 2011-08-01  Robert Dewar  <dewar@adacore.com>
14505
14506         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14507         Replaces Last_Source_Node_In_Sequence.
14508         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14509         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14510         parens and blank in string (this was inconsistently implemented).
14511         * errout.ads
14512         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14513         blank in string (this was inconsistently implemented).
14514         * gnat1drv.adb
14515         (Set_Global_Switches): Set formal mode switches appropriately
14516         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14517         * par-prag.adb
14518         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14519         call Set_Error_Msg_Lang to set "spark" as language name.
14520         * par.adb: Remove unnecessary call to set formal language for errout
14521         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14522         appropriately and call Set_Error_Msg_Lang to set "spark" as language
14523         name.
14524         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14525         calls to it, moved after resolution so that types are known
14526         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14527         result of concatenation is not of type String
14528         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14529         concatenation is not properly restricted
14530         * gnat_rm.texi: Add doc on pragma Spark_95.
14531         * gcc-interface/Makefile.in: Remove obsolete target pairs for
14532         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14533         * gcc-interface/Make-lang.in: Update dependencies.
14534
14535 2011-08-01  Javier Miranda  <miranda@adacore.com>
14536
14537         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14538         condition that detects if the overridden operation must replace an
14539         existing entity.
14540
14541 2011-08-01  Javier Miranda  <miranda@adacore.com>
14542
14543         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14544         code declarations inserted by Insert_Actions in each alternative of the
14545         N_Case_Expression node.
14546
14547 2011-08-01  Robert Dewar  <dewar@adacore.com>
14548
14549         * sem_ch6.adb: Minor code reorganization.
14550         * sem_util.adb: Minor reformatting.
14551
14552 2011-08-01  Pascal Obry  <obry@adacore.com>
14553
14554         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14555         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14556
14557 2011-08-01  Yannick Moy  <moy@adacore.com>
14558
14559         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14560         literal or operator symbol which is prefixed
14561         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14562         mode on access attributes.
14563         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14564         that concatenation operands are properly restricted in formal mode
14565         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14566         Analyze_Concatenation_Operand. Issue an error in formal mode if the
14567         result of the concatenation has a type different from String.
14568         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14569         Analyze_Quantified_Expression, Analyze_Slice,
14570         Analyze_Null): issue an error in formal mode on unsupported constructs
14571         * sem_ch5.adb
14572         (Analyze_Block_Statement): only issue error on source block statement
14573         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14574         function which returns the last node in a list of nodes for which
14575         Comes_From_Source returns True, if any
14576         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14577         Last_Source_Node_In_Sequence
14578         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14579         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14580         mode on unsupported constructs
14581         * sem_ch9.adb Do not return after issuing error in formal mode, as the
14582         rest of the actions may be needed later on since the error is marked as
14583         not serious.
14584         * sinfo.ads: Typos in comments.
14585
14586 2011-08-01  Pascal Obry  <obry@adacore.com>
14587
14588         * projects.texi: Minor editing.
14589
14590 2011-08-01  Yannick Moy  <moy@adacore.com>
14591
14592         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14593         insertion character ~~
14594         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14595         (Set_Error_Msg_Lang): new procedure which fixes the language for use
14596         with insertion character ~~
14597         (Set_Msg_Text): treat insertion character ~~
14598         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14599         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14600         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14601         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14602         errors related to the formal language restriction not serious
14603         (insertion character |).
14604         * par.adb (Par): set formal language for error messages if needed
14605         * sem_ch6.adb (Check_Missing_Return): take into account possible
14606         generated statements at the end of the function
14607         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14608         enumeration value to define a new pragma SPARK_95
14609         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14610         SPARK_Version): new type and variables to store the SPARK version
14611         (none by default).
14612         (SPARK_Mode): return True when SPARK_Version is set
14613         * par-prag.adb: Correct indentation
14614         (Prag): take Pragma_SPARK_95 into account
14615         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14616         into account.
14617
14618 2011-08-01  Robert Dewar  <dewar@adacore.com>
14619
14620         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14621         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14622         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14623
14624 2011-08-01  Pascal Obry  <obry@adacore.com>
14625
14626         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14627         Target_Name to Get_Path call.
14628         (Parse_Single_Project): Likewise.
14629         (Post_Parse_Context_Clause): Likewise.
14630         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14631         Call Initialise_Project_Path with the proper Target_Name.
14632         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14633         search path.
14634         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14635         with the proper Target_Name.
14636         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14637         Part.Parse routine.
14638         (Parse_Project_And_Apply_Config): Likewise.
14639         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14640         This is fine as this part of the code is supporting only native
14641         compilation.
14642         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14643         is fine as this part of the code is supporting only native compilation.
14644
14645 2011-08-01  Yannick Moy  <moy@adacore.com>
14646
14647         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14648         of homonym, unless the homonym is one of the cases allowed in SPARK
14649         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14650         package declaration occurring after a body.
14651
14652 2011-08-01  Robert Dewar  <dewar@adacore.com>
14653
14654         * checks.adb, exp_ch4.adb: Minor reformatting.
14655
14656 2011-08-01  Javier Miranda  <miranda@adacore.com>
14657
14658         * einfo.ads (Access_Disp_Table): Fix documentation.
14659         (Dispatch_Table_Wrappers): Fix documentation.
14660
14661 2011-08-01  Pascal Obry  <obry@adacore.com>
14662
14663         * prj-env.adb, prj-env.ads: Minor reformatting.
14664
14665 2011-08-01  Yannick Moy  <moy@adacore.com>
14666
14667         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14668         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14669         procedures out of these packages.
14670         * errout.ads, errout.adb
14671         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14672         procedures in of this package
14673         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14674         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14675         on misplaced later vs initial declarations, like in Ada 83
14676         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14677         formal mode on attribute of private type whose full type declaration
14678         is not visible
14679         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14680         package declaration inside a package specification
14681         (Analyze_Full_Type_Declaration): issue error in formal mode on
14682         controlled type or discriminant type
14683         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14684         user-defined operator means that it should come from the source
14685         (New_Overloaded_Entity): issue error in formal mode on overloaded
14686         entity.
14687         * sem_ch6.ads, sem_ch13.ads: typos in comments.
14688
14689 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14690
14691         * atree.adb: Minor reformatting.
14692         * checks.adb: Minor reformatting.
14693
14694 2011-08-01  Vincent Celier  <celier@adacore.com>
14695
14696         * s-parame-vms-ia64.ads: Fix typo in comment
14697         Minor reformatting
14698         * s-parame-vms-restrict.ads: Removed, unused.
14699
14700 2011-08-01  Javier Miranda  <miranda@adacore.com>
14701
14702         * exp_ch3.adb
14703         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14704         * sem_ch3.adb
14705         (Constrain_Index): Remove side effects in the evaluation of the bounds.
14706         * sem_ch3.ads, sem_ch3.adb
14707         (Is_Constant_Bound): New extended version of the subprogram that was
14708         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14709         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14710         * sem_aux.ads (Constant_Value): Fix typo in comment.
14711         * checks.adb (Generate_Index_Checks): New implementation which, for
14712         array objects with constant bounds, generates the runtime check
14713         referencing the bounds of the array type. For other cases this routine
14714         provides its previous behavior obtaining such values from the array
14715         object.
14716         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14717         parent type.
14718         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14719         we cannot have semantic interpretations of the new node.
14720
14721 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14722
14723         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14724         expressions.
14725
14726 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
14727
14728         * sem_ch8.adb: Minor code editing.
14729         * s-vxwext.adb: Remove trailing space.
14730         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14731         consistency with other files.
14732
14733 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14734
14735         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14736
14737 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14738
14739         * par-ch10.adb: reject parameterized expressions as compilation unit.
14740         * sem_ch4.adb: handle properly conditional expression with overloaded
14741         then_clause and no else_clause.
14742
14743 2011-08-01  Tristan Gingold  <gingold@adacore.com>
14744
14745         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14746         like done by System.Aux_DEC.
14747         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14748
14749 2011-08-01  Yannick Moy  <moy@adacore.com>
14750
14751         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14752         missing label at end of declaration (subprogram or package)
14753         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14754         of positional and named parameter association
14755         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14756         Error_Msg_SP which adds a prefix to the error message giving the name
14757         of the formal language analyzed
14758         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14759         access result type in subprogram, unconstrained array as result type,.
14760         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14761         procedure
14762         * sem_ch8.adb: Code clean up.
14763
14764 2011-08-01  Javier Miranda  <miranda@adacore.com>
14765
14766         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14767         * einfo.ads (Access_Disp_Table): Fix documentation.
14768         (Dispatch_Table_Wrappers): Fix documentation.
14769         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14770         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14771         to enforce the documentation of this attribute.
14772         (Set_Is_Interface): Cleanup the assertion.
14773         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14774         the Underlying_Type entity before reading attribute Access_Disp_Table.
14775         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14776         Locate the Underlying_Type before reading attribute Access_Disp_Table.
14777         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14778         the Underlying_Type entity before reading attribute Access_Disp_Table.
14779         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14780         Locate the Underlying_Type entity before reading attribute
14781         Access_Disp_Table.
14782
14783 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14784
14785         * s-poosiz.ads: Additional overriding indicators.
14786
14787 2011-08-01  Yannick Moy  <moy@adacore.com>
14788
14789         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14790         formal mode.
14791         (Analyze_Iteration_Scheme): issue error in formal mode when loop
14792         parameter specification does not include a subtype mark.
14793         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14794         formal mode on abstract subprogram.
14795         (Analyze_Subprogram_Specification): issue error in formal mode on
14796         user-defined operator.
14797         (Process_Formals): issue error in formal mode on access parameter and
14798         default expression.
14799         * sem_ch9.adb (Analyze_Abort_Statement,
14800         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14801         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14802         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14803         Analyze_Requeue, Analyze_Selective_Accept,
14804         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14805         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14806         issue error in formal mode on user-defined raise statement.
14807
14808 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14809
14810         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14811         declaration being hidden when overriding an implicit inherited
14812         subprogram.
14813         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14814         (-gnats), do not complain about a source file that contains only a
14815         pragma No_Body.
14816
14817 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14818
14819         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14820         variable if already set.
14821
14822 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
14823
14824         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14825         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14826         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14827         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14828         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14829         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14830         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14831         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14832         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14833         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14834         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14835         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14836         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14837         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14838         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14839         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14840         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14841         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14842         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14843         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14844         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14845         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14846         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14847         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14848         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14849         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14850         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14851         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14852         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14853         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14854         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14855         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14856         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14857         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14858         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14859         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14860         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14861         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14862         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14863         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14864         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14865         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14866         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14867         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14868         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14869         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14870         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14871         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14872         s-osinte-mingw.ads: Update to GPLv3 run-time license.
14873         Use GNAT instead of GNARL.
14874
14875 2011-08-01  Bob Duff  <duff@adacore.com>
14876
14877         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14878         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14879         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14880         reformatting.
14881
14882 2011-08-01  Yannick Moy  <moy@adacore.com>
14883
14884         * debug.adb (d.D) reverve flag for the SPARK mode
14885         (d.E) reverve flag for SPARK generation mode
14886         (d.F) reverve flag for Why generation mode
14887         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14888         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
14889         functions which return True when the corresponding modes are set
14890         (Formal_Language): return "spark" or "alfa" when in formal verification
14891         mode.
14892         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14893         Error_Msg to prefix the error message with a tag giving the formal
14894         language
14895         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14896         message with a tag giving the formal language
14897         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14898         block statement
14899         (Analyze_Case_Statement): issue error in formal mode on case statement
14900         with a single "others" case alternative
14901         (Analyze_Exit_Statement): issue errors in formal mode on exit
14902         statements which do not respect SPARK restrictions
14903         (Analyze_Goto_Statement): issue error in formal mode on goto statement
14904         (Check_Unreachable_Code): always issue an error (not a warning) in
14905         formal mode on unreachable code (concerns both code after an infinite
14906         loop and after an unconditional jump, both not allowed in SPARK)
14907         * sem_ch6.adb (Analyze_Return_Statement): add call to
14908         Set_Return_Present for a procedure containing a return statement
14909         (already done for functions in Analyze_Function_Return)
14910         (Analyze_Function_Return): issue error in formal mode on extended
14911         return or if return is not last statement in function
14912         (Check_Missing_Return): issue error in formal mode if function does
14913         not end with return or if procedure contains a return
14914         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14915         function to detect if there is an inner scope of its parameter S which
14916         is a loop.
14917
14918 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14919
14920         * sem_ch6.ads: Minor reformatting.
14921
14922 2011-08-01  Javier Miranda  <miranda@adacore.com>
14923
14924         * sem_util.adb (Abstract_Interface_List): Complete condition when
14925         processing private type declarations to avoid reading unavailable
14926         attribute.
14927         (Is_Synchronized_Tagged_Type): Complete condition when processing
14928         private extension declaration nodes to avoid reading unavailable
14929         attribute.
14930
14931 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14932
14933         * sem_ch3.adb: Minor reformatting.
14934
14935 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14936
14937         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14938         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14939         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14940         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14941         for VMS, instead parametrize the common implementation with
14942         System.Parameters declarations.
14943
14944 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
14945
14946         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14947
14948 2011-08-01  Tristan Gingold  <gingold@adacore.com>
14949
14950         * seh_init.c: Fix SEH handler installation on win64.
14951
14952 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14953
14954         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14955         double analysis of an anonymous access to subprogram, because it can
14956         lead to improper sharing of profiles and a back-end crash.
14957
14958 2011-08-01  Robert Dewar  <dewar@adacore.com>
14959
14960         * make.adb, sem_ch4.adb: Minor reformatting.
14961         * gcc-interface/Make-lang.in: Update dependencies.
14962         * sem_util.adb, exp_ch5.adb: Minor reformatting.
14963
14964 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
14965
14966         * gnat_rm.texi: Fix definition of Long_Integer.
14967
14968 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14969
14970         * exp_aggr.adb: check limit size of static aggregate unconditionally,
14971         to prevent storage exhaustion.
14972         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14973         finalized is a function body, insert the cleanup code before the final
14974         return statement, to prevent spurious warnings.
14975         * s-pooglo.ads: add overriding indicator.
14976
14977 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14978
14979         * sem_ch4.adb (Operator_Check): improve error message when both a
14980         with_clause and a use_clause are needed to make operator usage legal.
14981         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14982         determine whether a compilation unit is visible within an other,
14983         either through a with_clause in the current unit, or a with_clause in
14984         its library unit or one one of its parents.
14985
14986 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14987
14988         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14989         over an arbitrary expression of an array or container type.
14990         * lib-xref.adb: clarify comment.
14991
14992 2011-08-01  Bob Duff  <duff@adacore.com>
14993
14994         * einfo.ads: Minor reformatting.
14995         * debug.adb: Minor comment improvement.
14996
14997 2011-08-01  Javier Miranda  <miranda@adacore.com>
14998
14999         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15000         consider hidden subprograms as valid candidates.
15001
15002 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15003
15004         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15005
15006 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
15007
15008         * gnat_ugn.texi: Fix typo.
15009
15010 2011-08-01  Robert Dewar  <dewar@adacore.com>
15011
15012         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15013         lib-xref.adb: Minor reformatting
15014
15015 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
15016
15017         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15018         when to generate a call to Move_Final_List.
15019         (Has_Controlled_Parts): Remove this function.
15020
15021 2011-08-01  Geert Bosch  <bosch@adacore.com>
15022
15023         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15024         "," in choice list.
15025
15026 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15027
15028         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15029         explicit raise of a predefined exception as Comes_From_Source if the
15030         original N_Raise_Statement comes from source.
15031
15032 2011-08-01  Robert Dewar  <dewar@adacore.com>
15033
15034         * sinfo.ads: Add comment.
15035         * sem_ch6.adb: Minor reformatting.
15036
15037 2011-08-01  Robert Dewar  <dewar@adacore.com>
15038
15039         * freeze.adb (Freeze_Entity): Refine check for bad component size
15040         clause to avoid rejecting confirming clause when atomic/aliased present.
15041
15042 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15043
15044         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15045         better determine whether an entity reference is a write.
15046         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15047         subcomponent.
15048         * lib-xref.adb (Output_References): Do no suppress a read reference at
15049         the same location as an immediately preceeding modify-reference, to
15050         handle properly in-out actuals.
15051
15052 2011-08-01  Tristan Gingold  <gingold@adacore.com>
15053
15054         * env.c (__gnat_setenv) [VMS]: Refine previous change.
15055
15056 2011-08-01  Quentin Ochem  <ochem@adacore.com>
15057
15058         * i-cstrin.adb (New_String): Changed implementation, now uses only the
15059         heap to compute the result.
15060
15061 2011-08-01  Robert Dewar  <dewar@adacore.com>
15062
15063         * atree.ads: Minor reformatting.
15064
15065 2011-08-01  Emmanuel Briot  <briot@adacore.com>
15066
15067         * g-expect.adb (Get_Command_Output): Fix memory leak.
15068
15069 2011-08-01  Geert Bosch  <bosch@adacore.com>
15070
15071         * cstand.adb (P_Float_Type): New procedure to print the definition of
15072         predefined fpt types.
15073         (P_Mixed_Name): New procedure to print a name using mixed case
15074         (Print_Standard): Use P_Float_Type for printing floating point types
15075         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15076         precision IEEE float.
15077
15078 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15079
15080         * sem_ch3.adb: Minor reformatting.
15081
15082 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15083
15084         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15085         the completion of a generic function, insert the new body rather than
15086         rewriting the original.
15087
15088 2011-08-01  Yannick Moy  <moy@adacore.com>
15089
15090         * sinfo.ads, errout.ads: Typos in comments.
15091
15092 2011-08-01  Robert Dewar  <dewar@adacore.com>
15093
15094         * par-endh.adb: Minor reformatting.
15095
15096 2011-08-01  Robert Dewar  <dewar@adacore.com>
15097
15098         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15099         (Pre_Post_Aspects): New subtype.
15100         * par-ch12.adb (P_Generic): New syntax for aspects in packages
15101         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15102         * par-ch7.adb (P_Package): Remove Decl parameter
15103         (P_Package): Handle new syntax for aspects (before IS)
15104         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15105         new aspect syntax
15106         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15107         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15108         (P_Package): Remove Decl parameter
15109         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15110         aspects
15111         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15112         specs
15113         * sem_util.ads, sem_util.adb (Static_Boolean): New function
15114         * sinfo.ads: Document new syntax for aspects in packages etc.
15115         * sprint.adb: Handle new syntax of aspects before IS in package
15116
15117 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15118
15119         * atree.ads: Minor reformatting.
15120         * sem_prag.adb: Minor reformatting.
15121
15122 2011-08-01  Robert Dewar  <dewar@adacore.com>
15123
15124         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15125         case expr alternative.
15126
15127 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15128
15129         * sem_ch12.adb: Fix typo.
15130
15131 2011-08-01  Geert Bosch  <bosch@adacore.com>
15132
15133         * sem_prag.adb (Check_No_Link_Name): New procedure.
15134         (Process_Import_Or_Interface): Use Check_No_Link_Name.
15135         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15136         instead of Standard_Long_Long_Float_Size global. Preparation for
15137         eventual removal of per type constants.
15138         * exp_util.ads (Get_Stream_Size): New function returning the stream
15139         size value of subtype E.
15140         * exp_util.adb (Get_Stream_Size): Implement new function.
15141         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15142         function.
15143         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15144         * einfo.adb:
15145         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15146
15147 2011-08-01  Geert Bosch  <bosch@adacore.com>
15148
15149         * cstand.adb: Fix comments.
15150         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15151         count of arguments.
15152
15153 2011-08-01  Robert Dewar  <dewar@adacore.com>
15154
15155         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15156
15157 2011-08-01  Geert Bosch  <bosch@adacore.com>
15158
15159         * atree.ads: Fix comment.
15160
15161 2011-08-01  Robert Dewar  <dewar@adacore.com>
15162
15163         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15164         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15165         * par.adb: Add with for Namet.Sp.
15166         * par-tchk.adb: Minor reformatting.
15167
15168 2011-08-01  Vincent Celier  <celier@adacore.com>
15169
15170         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15171         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15172         of the init procedure of a SAL.
15173         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15174         New procedure.
15175
15176 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15177
15178         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15179         reformatting.
15180
15181 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15182
15183         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15184
15185 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15186
15187         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15188         conformant with its spec (return True only for types that have
15189         an overriding Initialize primitive operation that prevents them from
15190         having preelaborable initialization).
15191         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15192         initialization for controlled types in Ada 2005 or later mode.
15193
15194 2011-08-01  Robert Dewar  <dewar@adacore.com>
15195
15196         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15197         Postcondition.
15198         (Same_Aspect): New function.
15199         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15200         Type_Invariant, Precondition, Postcondition.
15201         * snames.ads-tmpl: Add Name_Type_Invariant.
15202
15203 2011-08-01  Robert Dewar  <dewar@adacore.com>
15204
15205         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15206         here.
15207         (Freeze_All_Ent): Fix error in handling inherited aspects.
15208         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15209         already analyzed, but don't skip entire processing of a declaration,
15210         that's wrong in some cases of declarations being rewritten.
15211         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15212         Don't delay for integer, string literals
15213         Treat predicates in usual manner for delay, remove special case code,
15214         not needed.
15215         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15216         (Build_Predicate_Function): Update saved expression in aspect
15217         (Build_Invariant_Procedure): Update saved expression in aspect
15218         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15219         of replacement of discriminant references if the reference is simple.
15220
15221 2011-08-01  Robert Dewar  <dewar@adacore.com>
15222
15223         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15224         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15225         Static_Predicate and Dynamic_Predicate.
15226         (Build_Predicate_Function): Add processing for Static_Predicate
15227         and Dynamic_Predicate.
15228         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15229         (From_Static_Predicate): New flag
15230         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15231
15232 2011-08-01  Robert Dewar  <dewar@adacore.com>
15233
15234         * usage.adb: Documentation cleanup for Ada version modes in usage.
15235         * expander.adb: Minor reformatting.
15236
15237 2011-08-01  Robert Dewar  <dewar@adacore.com>
15238
15239         * atree.ads: Minor comment fix.
15240         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15241         a-witeio.ads, sem_prag.adb: Minor reformatting.
15242
15243 2011-08-01  Doug Rupp  <rupp@adacore.com>
15244
15245         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15246         pointers. Use descrip.h header file for convenience. Add some
15247         comments.
15248
15249 2011-08-01  Robert Dewar  <dewar@adacore.com>
15250
15251         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15252         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15253         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15254         New procedure.
15255         (Check_Aspect_At_End_Of_Declarations): New procedure
15256         (Analye_Aspect_Specification): Minor changes for above procedures
15257         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15258         specification node as well.
15259
15260 2011-08-01  Pascal Obry  <obry@adacore.com>
15261
15262         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15263         Windows files. Use GetFilesAttributes() in this case to check for file
15264         existence instead of returning with an error code.
15265
15266 2011-08-01  Vincent Celier  <celier@adacore.com>
15267
15268         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15269         High is above Source length.
15270
15271 2011-08-01  Robert Dewar  <dewar@adacore.com>
15272
15273         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15274
15275 2011-08-01  Robert Dewar  <dewar@adacore.com>
15276
15277         * aspects.ads (Boolean_Aspects): New subtype.
15278         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15279         for derived types in cases where the parent type and derived type have
15280         aspects.
15281         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15282         with aspects when parent type also has aspects.
15283         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15284         boolean expression at this point).
15285         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15286         accordance with final decision on the Ada 2012 feature.
15287         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15288
15289 2011-08-01  Matthew Heaney  <heaney@adacore.com>
15290
15291         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15292
15293 2011-08-01  Pascal Obry  <obry@adacore.com>
15294
15295         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15296         Fix Replace_Slice when High is above current string size.
15297         (Replace_Slice): Fix DL computation when High is above current
15298         string length.
15299
15300 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
15301
15302         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15303
15304 2011-08-01  Matthew Heaney  <heaney@adacore.com>
15305
15306         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15307         of node.
15308
15309 2011-08-01  Pascal Obry  <obry@adacore.com>
15310
15311         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15312         reformatting.
15313
15314 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15315
15316         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15317         access to protected subprograms in generic bodies.
15318         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15319         protected type, indicate that the convention of the subprogram is
15320         Convention_Protected, because it may be used in subsequent declarations
15321         within the protected declaration.
15322
15323 2011-08-01  Vincent Celier  <celier@adacore.com>
15324
15325         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15326         and "final" procedures when the name of the library is "ada", to avoid
15327         duplicate symbols "adainit" and "adafinal" in executables.
15328
15329 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15330
15331         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15332         quantified expression that appears within a postcondition and uses the
15333         Ada2012 'Result attribute.
15334
15335 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15336
15337         * init.c (__gnat_error_handler): Cast reason to int.
15338         (__gnat_install_handler): Explain sa_sigaction use.
15339
15340 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15341
15342         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15343         subprogram has copy-in copy-out parameters, try to promote the mode of
15344         the return type if it is passed in registers.
15345
15346 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15347
15348         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15349         left operand as addressable.
15350
15351 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15352
15353         * gcc-interface/gigi.h (build_function_stub): Remove.
15354         (build_return_expr): Likewise.
15355         (convert_vms_descriptor): Declare.
15356         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15357         (build_function_stub): Move to...
15358         * gcc-interface/utils2.c (build_return_expr): Move to...
15359         * gcc-interface/trans.c (build_function_stub): ...here.
15360         (build_return_expr): ...here.
15361         (Subprogram_Body_to_gnu): Add local variable for language_function.
15362         Disconnect the parameter attributes cache, if any, once done with it.
15363         Call end_subprog_body only after setting the end_locus.
15364         Build the stub associated with the function, if any, at the very end.
15365         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15366         variables and streamline control flow.
15367
15368 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
15369
15370         PR ada/49819
15371         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15372         g-trasym-dwarf.adb.
15373
15374 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15375
15376         PR bootstrap/49794
15377         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15378         Assign to act.sa_sigaction.
15379         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15380         current->return_address to char * before arithmetic.
15381
15382 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15383
15384         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15385         Correct argument types.
15386         Extract code from reason.
15387         (__gnat_install_handler): Assign to act.sa_sigaction.
15388
15389 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
15390
15391         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15392         (GNAT1_OBJS): ...here.
15393
15394 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
15395
15396         PR ada/48711
15397         * g-socthi-mingw.adb (Fill): Fix formatting.
15398
15399         * gcc-interface/gigi.h: Move around comment.
15400
15401 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
15402
15403         PR ada/46350
15404         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15405
15406 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
15407
15408         PR ada/48711
15409         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15410
15411 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
15412
15413         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15414         range comparison if Pmode is SImode.
15415
15416 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
15417             Eric Botcazou  <ebotcazou@adacore.com>
15418
15419         * adadecode.c: Wrap up in extern "C" block.
15420         * adadecode.h: Likewise.
15421         * adaint.c: Likewise.  Remove 'const' keyword.
15422         * adaint.h: Likewise.
15423         * argv.c: Likewise.
15424         * atree.h: Likewise.
15425         * cio.c: Likewise.
15426         * cstreams.c: Likewise.
15427         * env.c: Likewise.
15428         * exit.c: Likewise.
15429         * fe.h: Likewise.
15430         * final.c: Likewise.
15431         * init.c: Likewise.
15432         * initialize.c: Likewise.
15433         * link.c: Likewise.
15434         * namet.h: Likewise.
15435         * nlists.h: Likewise.
15436         * raise.c: Likewise.
15437         * raise.h: Likewise.
15438         * repinfo.h: Likewise.
15439         * seh_init.c: Likewise.
15440         * targext.c: Likewise.
15441         * tracebak.c: Likewise.
15442         * uintp.h: Likewise.
15443         * urealp.h: Likewise.
15444         * xeinfo.adb: Wrap up generated C code in extern "C" block.
15445         * xsinfo.adb: Likewise.
15446         * xsnamest.adb: Likewise.
15447         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15448         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15449         * gcc-interface/misc.c: Likewise.
15450         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15451         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
15452         ada/targext.o here...
15453         (GNAT_ADA_OBJS): ...and not here.
15454         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15455         (GNATBIND_OBJS): Reorder.
15456
15457 2011-07-07  Richard Henderson  <rth@redhat.com>
15458
15459         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15460         dwarf2out_frame_init.
15461
15462 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
15463
15464         * gcc-interface/misc.c (gnat_init): Tweak previous change.
15465
15466 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15467
15468         PR target/39150
15469         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15470
15471 2011-07-06  Richard Guenther  <rguenther@suse.de>
15472
15473         * gcc-interface/misc.c (gnat_init): Merge calls to
15474         build_common_tree_nodes and build_common_tree_nodes_2.
15475         Re-initialize boolean_false_node.
15476
15477 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
15478             Olivier Hainque  <hainque@adacore.com>
15479             Nicolas Setton  <setton@adacore.com>
15480
15481         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15482         the type according to the ARTIFICIAL_P parameter.
15483         (create_type_decl): Likewise.
15484         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15485
15486 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
15487
15488         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15489         (gnatbind): Likewise.
15490
15491 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15492
15493         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15494
15495 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15496
15497         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15498         local variable throughout.  Remove useless call to Base_Type.
15499         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15500         Take it also into account for the volatileness of the field.  Set the
15501         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
15502
15503 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15504
15505         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15506         on a dereference built for a by-ref object if it has an address clause.
15507
15508 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15509
15510         * einfo.ads (Address_Taken): Document use for the second argument of
15511         Asm_Input and Asm_Output attributes.
15512         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15513         argument is an entity name, then set Address_Taken on it.
15514         <Attribute_Asm_Output>: Likewise.
15515         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15516         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15517         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15518         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15519
15520 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
15521
15522         PR middle-end/46500
15523         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15524
15525 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
15526
15527         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15528         (ada/utils.o): Update dependencies.
15529         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15530         ../../../libcpp/libcpp.a.
15531         * gcc-interface/utils.c: Include common/common-target.h.
15532         (process_attributes): Use targetm_common.have_named_sections.
15533
15534 2011-06-07  Richard Guenther  <rguenther@suse.de>
15535
15536         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15537         set_sizetype.
15538
15539 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15540
15541         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15542         TREE_THIS_NOTRAP flag.
15543
15544 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15545
15546         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15547         Fix thinko.
15548
15549 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15550
15551         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15552         constants whose full view has discriminants specially.
15553
15554 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15555
15556         * gcc-interface/utils.c: Include diagnostic.h.
15557         (gnat_write_global_declarations): Output debug information for all
15558         global type declarations before finalizing the compilation unit.
15559         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15560
15561 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
15562
15563         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15564
15565 2011-05-25  Kai Tietz  <ktietz@redhat.com>
15566
15567         * adaint.c (__gnat_to_canonical_file_list_next): Use array
15568         initialization instead of const/none-const pointer assignment.
15569
15570 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
15571
15572         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15573         $(EXTRA_GNAT1_OBJS).
15574         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15575         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15576         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15577         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15578         libcommon-target.a instead of prefix.o.
15579
15580 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
15581
15582         PR ada/49097
15583         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15584
15585 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
15586
15587         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15588         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15589         instead of version.o.
15590
15591 2011-05-18  Kai Tietz  <ktietz@redhat.com>
15592
15593         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15594         boolean_false_node instead of integer_zero_node.
15595         (convert_with_check): Likewise.
15596         * gcc-interface/decl.c (choices_to_gnu): Likewise.
15597
15598 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
15599
15600         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15601         type of the parameter is an unconstrained array, convert the actual to
15602         the type of the formal in the In Out and Out cases as well.
15603
15604 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
15605
15606         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15607         call build_function_type_array or build_varargs_function_type_array
15608         instead.
15609         (create_subprog_type): Don't call build_function_type; call
15610         build_function_type_vec instead.
15611
15612 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
15613
15614         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15615         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15616         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15617
15618 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
15619
15620         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15621
15622         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15623         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15624
15625 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
15626
15627         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15628
15629 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
15630
15631         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15632         instead of accessing TYPE_ARG_TYPES directly.
15633         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15634
15635 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
15636
15637         PR ada/48844
15638         * gcc-interface/gigi.h (get_variant_part): Declare.
15639         * gcc-interface/decl.c (get_variant_part): Make global.
15640         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15641         types have the same constant size, are record types and T1 has a
15642         variant part while T2 doesn't.
15643
15644 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
15645
15646         * gcc-interface/utils.c (begin_subprog_body): Do not call
15647         get_pending_sizes.
15648         (end_subprog_body): Likewise.
15649
15650 2011-05-04  Richard Guenther  <rguenther@suse.de>
15651
15652         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15653         int_const_binop.
15654         (pos_to_constructor): Likewise.
15655
15656 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
15657             Eric Botcazou  <ebotcazou@adacore.com>
15658
15659         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15660         of build_function_type.  Adjust calls to...
15661         (build_raise_check): ...this.  Do not take a void_tree parameter.
15662         Call build_function_type_list instead of build_function_type.
15663         Fix head comment and swap couple of conditional blocks.
15664
15665 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
15666
15667         * gnatvsn.ads (Library_Version): Bump to 4.7.
15668         (Current_Year): Bump to 2011.
15669
15670 2011-04-29  Michael Matz  <matz@suse.de>
15671
15672         * gcc-interface/misc.c (gnat_handle_option): Set
15673         warn_maybe_uninitialized.
15674
15675 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
15676
15677         * gnat_ugn.texi (Complexity Metrics Control): Update link to
15678         the Watson/McCabe paper.
15679
15680 2011-04-23  Jim Meyering  <meyering@redhat.com>
15681
15682         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15683
15684 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
15685
15686         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15687         onto the new type.
15688
15689 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
15690
15691         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15692         parameter.
15693         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
15694         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15695         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15696         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15697         <all>: Do not set flags on the reused DECL node coming from an alias.
15698         Set DECL_IGNORED_P on the DECL node built for subprograms if they
15699         don't need debug info here...
15700         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15701         (gigi): Adjust calls to create_subprog_decl.
15702         (build_raise_check): Likewise.
15703         (establish_gnat_vms_condition_handler): Likewise.
15704         (Compilation_Unit_to_gnu): Likewise.
15705         (gnat_to_gnu): Likewise.
15706
15707 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
15708
15709         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15710         (NO_REORDER_ADAFLAGS): New variable.
15711         (EXTRA_GNATTOOLS): Always define.
15712         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15713         Clean up and adjust list of files compiled with special options.
15714         * gcc-interface/Make-lang.in: Likewise.
15715         (ada/decl.o): Cosmetical change.
15716         (ada/misc.o): Remove dependency on $(PLUGIN_H).
15717
15718 2011-04-20  Jim Meyering  <meyering@redhat.com>
15719
15720         * initialize.c (__gnat_initialize): Remove useless if-before-free.
15721
15722 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
15723
15724         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15725         $(CFLAGS) on the link line.
15726
15727 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
15728
15729         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15730         padded type built for the return type if it is unconstrained.
15731
15732 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
15733
15734         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15735
15736 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
15737
15738         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15739         before calling TREE_CHAIN.
15740         * gcc-interface/misc.c (gnat_init_ts): New function.
15741         (LANG_HOOKS_INIT_TS): Define.
15742
15743 2011-04-12  Martin Jambor  <mjambor@suse.cz>
15744
15745         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15746         instead of cgraph_node.
15747
15748 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
15749
15750         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15751         alignment on fields of the RETURN type built for the Copy-In Copy-Out
15752         mechanism.
15753
15754 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
15755
15756         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15757         of aggregate types that contain a placeholder.
15758
15759 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
15760
15761         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15762         TYPE_ARG_TYPES.
15763         (handle_type_generic_attribute): Likewise.
15764
15765 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
15766
15767         PR ada/47163
15768         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15769
15770 2011-04-04  Kai Tietz  <ktietz@redhat.com>
15771
15772         PR ada/47163
15773         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15774         to flag value.
15775
15776 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15777
15778         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15779         type case, do not strip a padding type around the array type.
15780
15781 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15782
15783         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15784         types.
15785
15786 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15787
15788         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15789         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15790         code for -feliminate-unused-debug-types.
15791         (gnat_post_options): Likewise.
15792
15793 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15794
15795         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15796         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15797         distinct copy.
15798
15799 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15800
15801         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15802         DECL_ARTIFICIAL flag on enumeration types.
15803
15804 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15805
15806         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15807         fat pointer types artificial unconditionally.
15808         <E_Array_Subtype>: Attach the base array type as a parallel type if it
15809         isn't artificial.
15810
15811 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15812
15813         * gcc-interface/gigi.h (get_dummy_type): Declare.
15814         (build_dummy_unc_pointer_types): Likewise.
15815         (finish_fat_pointer_type): Likewise.
15816         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15817         fat pointer type has been built, complete it in place.
15818         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15819         and thin pointers.  Remove useless variable.
15820         (finish_fat_pointer_type): Make global and move to...
15821         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15822         (get_dummy_type): New function.
15823         (build_dummy_unc_pointer_types): Likewise.
15824         (gnat_pushdecl): Propage the name to the anonymous variants only.
15825         (update_pointer_to): Only adjust the pointer types in the unconstrained
15826         array case.
15827
15828 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15829
15830         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15831         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15832         if this is a Taft amendment type and the full declaration is available.
15833         * gcc-interface/trans.c (process_type): Likewise.
15834         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15835         (process_freeze_entity): Likewise.
15836         * gcc-interface/utils.c (dummy_global): New static variable.
15837         (gnat_write_global_declarations): If there are types declared as used
15838         at the global level, insert them in the global hash table.
15839
15840 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15841
15842         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15843         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15844         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15845         copy.
15846         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
15847         flag of the type accordingly.
15848         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15849
15850 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15851
15852         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15853         finalizing types when updating the pointers to the designated type.
15854         <all>: Finalize the deferred types even if we didn't defer processing
15855         of incomplete types in this invocation.
15856
15857 2011-04-01  Olivier Hainque  <hainque@adacore.com>
15858             Nicolas Setton  <setton@adacore.com>
15859             Eric Botcazou  <ebotcazou@adacore.com>
15860
15861         * gcc-interface/misc.c (gnat_descriptive_type): New function.
15862         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15863
15864 2011-03-28  Kai Tietz  <ktietz@redhat.com>
15865
15866         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15867         Windows targets.
15868         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15869         * system-mingw.ads (System): Change ZCX_By_Default default to True.
15870
15871         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15872
15873 2011-03-28  Tristan Gingold  <gingold@adacore.com>
15874
15875         PR ada/44431
15876         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15877         Use ada output of gnatbind.
15878         (ada/b_gnatb.adb): Ditto.
15879         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15880         (ada.mostlyclean, ada.stage1)
15881         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15882         (ada.stagefeedback): Adjust.
15883         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15884         Use ada output of gnatbind.
15885         (b_gnatm.adb): Ditto.
15886         (b_gnatl.o, b_gnatm.o): New rules.
15887
15888 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
15889
15890         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15891         for the padded type built to support a specified size or alignment.
15892
15893 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
15894
15895         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15896         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15897         unconditionally to the end of the unit when the designated type is
15898         limited_with'ed.
15899         <all>: Rename local variable.  Attempt to un-defer types only and do it
15900         for limited_with'ed types as well.
15901         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
15902         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15903         consistently and remove redundant call to finalize_from_with_types.
15904
15905 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
15906
15907         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15908         subprograms without a previous spec declared in the same unit.
15909         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15910         subprograms at the end of the unit instead of at the beginning.
15911         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15912         isn't public for the special handling of non-inline functions nested
15913         inside inline external functions.
15914
15915 2011-03-25  Jeff Law  <law@redhat.com>
15916
15917         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
15918
15919 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
15920
15921         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15922         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15923         to compute Set_Size_Depends_On_Discriminant.
15924         (Layout_Type): Call it on array types in back-end layout mode.
15925         * sem_util.adb (Requires_Transient_Scope): Return true for array
15926         types only if the size depends on the value of discriminants.
15927         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15928         type if the RHS is a call to a function that returns an unconstrained
15929         type with default discriminant.
15930
15931 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
15932
15933         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15934         non-conversion to the nominal result type at the end.
15935
15936 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
15937
15938         * gcc-interface/trans.c (create_temporary): New function taken from...
15939         (create_init_temporary): ...here.  Call it.
15940         (call_to_gnu): Create the temporary for the return value early, if any.
15941         Create it for a function with copy-in/copy-out parameters if there is
15942         no target; in other cases of copy-in/copy-out, use another temporary.
15943         Push the new binding level lazily.  Add and rename local variables.
15944
15945 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
15946
15947         * gcc-interface/decl.c (validate_size): Improve comments and tweak
15948         error message.
15949         (set_rm_size): Likewise.
15950
15951 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
15952
15953         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15954         for the padded type built in order to support a specified alignment.
15955         Fix incorrect formatting.
15956
15957 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
15958
15959         PR bootstrap/48216
15960         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15961
15962 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
15963
15964         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15965         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15966         to the end of the list.  Adjust recursive call.  Rename local variable.
15967         If REORDER is true, reorder components of the record type.
15968         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15969         components_to_record and adjust the parameter list.
15970
15971 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
15972
15973         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15974         disabled, use the variable for bounds of loop iteration scheme.
15975
15976 2011-03-21  Kai Tietz  <ktietz@redhat.com>
15977
15978         PR target/12171
15979         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15980
15981 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
15982
15983         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15984         out whether the expression is read-only.  Short-circuit placeholder
15985         case and rename a couple of local variables.
15986
15987 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
15988
15989         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15990         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15991         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15992         (convert): Deal with conversions from a smaller form type specially.
15993
15994 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
15995
15996         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15997         its argument, except for the special -I- switch.
15998
15999 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
16000
16001         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16002         "Ada Issues".
16003
16004 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
16005
16006         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16007
16008 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
16009
16010         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16011         GNAT_FORMAL.
16012         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16013         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
16014         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
16015         Do not generate the check directly, instead instantiate the template
16016         check present in the descriptor.
16017         (make_descriptor_field): Move around.
16018         (build_vms_descriptor32): Build a template check in the POINTER field.
16019         (build_vms_descriptor): Remove useless suffixes.
16020         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16021
16022 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
16023
16024         PR bootstrap/47467
16025         * targext.c: Include target files if IN_RTS is defined.
16026
16027 2011-01-26  Richard Guenther  <rguenther@suse.de>
16028
16029         PR bootstrap/47467
16030         * targext.c: Include config.h.
16031         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16032         dependency.
16033
16034 2011-01-04  Pascal Obry  <obry@adacore.com>
16035             Eric Botcazou  <ebotcazou@adacore.com>
16036
16037         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16038
16039 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16040
16041         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16042         end-of-case on the end label and its associated gotos, if any.
16043
16044 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16045
16046         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16047         expressions of the parameter cache within the statement group of
16048         the CICO mechanism.
16049
16050 2011-01-04  Olivier Hainque  <hainque@adacore.com>
16051             Eric Botcazou  <ebotcazou@adacore.com>
16052
16053         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16054         (set_end_locus_from_node): New function.
16055         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16056         make and the function end_locus.
16057         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16058         for the elaboration subprogram.
16059         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16060         set the end_locus of the expression as well.
16061
16062 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16063
16064         PR ada/47131
16065         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16066         variables that are referenced in exception handlers volatile.
16067
16068
16069 \f
16070 Copyright (C) 2011 Free Software Foundation, Inc.
16071
16072 Copying and distribution of this file, with or without modification,
16073 are permitted in any medium without royalty provided the copyright
16074 notice and this notice are preserved.