OSDN Git Service

2011-12-12 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-12-12  Robert Dewar  <dewar@adacore.com>
2
3         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting.
4
5 2011-12-12  Steve Baird  <baird@adacore.com>
6
7         * sem_ch3.adb (Check_Completion): Improve a comment.
8
9 2011-12-12  Tristan Gingold  <gingold@adacore.com>
10
11         * cstand.adb: Minor comment fix.
12
13 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
14
15         * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC
16         flag of elements to compute that of the constructor.
17
18 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
19
20         * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier
21         on references built for parameters which aren't specifically by-ref.
22
23 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
24
25         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
26         alignment set on a renaming, assert that the renamed object is aligned
27         enough as to make it possible to honor it.
28
29 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
30
31         * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
32
33 2011-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
34
35         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
36         Correctly detect cygwin, which no longer has the '32' suffix, and use
37         appropriate implementations of the sockets and memory packages.
38         * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
39         setmode/_setmode for MinGW and Cygwin, respectively.
40         (__gnat_set_binary_mode [windows targets]): Use the above, and enable
41         the windows version for Cygwin as well as MinGW.
42         (__gnat_set_text_mode [windows targets]): Likewise.
43         (__gnat_ttyname [windows targets]): Provide a Cygwin implementation
44         in addition to the MinGW version.
45         (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
46         (__gnat_get_stack_bounds): Likewise.
47
48 2011-12-05  Bob Duff  <duff@adacore.com>
49
50         * sem_ch4.adb: Minor comment fix.
51
52 2011-12-05  Robert Dewar  <dewar@adacore.com>
53
54         * gnat_ugn.texi: Add documentation for -gnatw.e.
55
56 2011-12-05  Bob Duff  <duff@adacore.com>
57
58         * treepr.adb (pn): Print something useful for
59         Elmt_Ids. Add Write_Eol to 'when others' case, so the output
60         will be seen immediately in gdb.
61
62 2011-12-05  Ed Schonberg  <schonberg@adacore.com>
63
64         * lib-writ.adb (Output_Main_Program_Line): A generic subprogram
65         is never a main program.
66
67 2011-12-05  Thomas Quinot  <quinot@adacore.com>
68
69         * par_sco.adb: Various minor adjustments to dominance markers
70         generation.
71
72 2011-12-05  Ed Schonberg  <schonberg@adacore.com>
73
74         * sem_ch6.adb (Analyze_Expression_Function): If the function is
75         a completion, generate a body reference for its defining entity,
76         before rewriting the node as a body.
77         * sem_util.adb (Defining_Entity): Add entry for expression
78         function.
79
80 2011-12-05  Bob Duff  <duff@adacore.com>
81
82         * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
83         to the Comes_From_Source check, to deal properly with the case
84         of indirect inheritance of "=".
85
86 2011-12-05  Thomas Quinot  <quinot@adacore.com>
87
88         PR ada/51307
89         * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
90         not a macro.
91
92 2011-12-05  Thomas Quinot  <quinot@adacore.com>
93
94         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
95         information in SCOs.
96
97 2011-12-02  Eric Botcazou  <ebotcazou@adacore.com>
98             Thomas Quinot <quinot@adacore.com>
99
100         * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
101         (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
102         Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
103         which allows the file to be installed in adainclude.
104         * gcc-interface/Make-lang.in: Update dependencies.
105
106 2011-12-02  Javier Miranda  <miranda@adacore.com>
107
108         * sem_ch3.adb (Constrain_Access): Undo previous
109         patch for this routine. Required since the RM rule 3.7.1(7/3)
110         applies to all access types.
111
112 2011-12-02  Bob Duff  <duff@adacore.com>
113
114         * sem_ch6.adb: Minor comment fix.
115
116 2011-12-02  Joel Sherrill <joel.sherrill@oarcorp.com>
117
118         * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
119         for consistency with other ports.
120         * s-osinte-rtems.adb: Add body for dummy implementation of
121         pthread_rwlockattr_setkind_np().
122         * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
123         * terminals.c: Add __rtems__ conditionals to account for differences
124         in termios implementation.
125
126 2011-12-02  Robert Dewar  <dewar@adacore.com>
127
128         * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
129         a-cbmutr.ads: Minor reformatting.
130
131 2011-12-02  Hristian Kirtchev  <kirtchev@adacore.com>
132
133         * exp_dbug.adb: Comment reformatting.
134         (Get_External_Name): Use Reset_Buffers to reset the contents of
135         Name_Buffer and Homonym_Numbers.
136         (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
137         Homonym_Numbers before creating a new qualified name for a particular
138         entity.
139         (Reset_Buffers): New routine.
140
141 2011-12-02  Matthew Heaney  <heaney@adacore.com>
142
143         * a-cbmutr.ads (No_Node): Moved declaration from body to spec
144         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
145         from Root_Iterator.
146         (Child_Iterator): Derives from Root_Iterator.
147         (Finalize): Implemented as an override operation for Root_Iterator.
148         (First): Return value depends on Subtree component.
149         (Last): Component was renamed from Parent to Subtree.
150         (Next): Checks parameter value, and uses simplified loop.
151         (Iterate): Forwards to Iterate_Subtree.
152         (Iterate_Children): Component was renamed from Parent to Subtree.
153         (Iterate_Subtree): Checks parameter value
154
155 2011-12-02  Robert Dewar  <dewar@adacore.com>
156
157         * usage.adb: Add lines for -gnatw.n and -gnatw.N
158         (atomic sync info msgs).
159
160 2011-12-02  Steve Baird  <baird@adacore.com>
161
162         * sem_ch3.adb (Check_Completion): An Ada 2012
163         generic formal type doesn't require a completion.
164
165 2011-12-02  Eric Botcazou  <ebotcazou@adacore.com>
166
167         * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
168         packed array type if it is to be set on the array type used to
169         represent it.
170
171 2011-12-02  Robert Dewar  <dewar@adacore.com>
172
173         * gnat_rm.texi: Eliminate confusing use of type name.
174
175 2011-12-02  Thomas Quinot  <quinot@adacore.com>
176
177         * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
178         body that acts as spec, do not create a shallow copy of the context
179         clause for the synthetized spec (instead, use the same list as
180         in the body).
181
182 2011-12-02  Bob Duff  <duff@adacore.com>
183
184         * gnat_ugn.texi: Clarify usage of -p binder switch.
185
186 2011-12-02  Javier Miranda  <miranda@adacore.com>
187
188         * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
189         (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
190         (In_Generic_Body): Moved to sem_aux.
191         (Unit_Declaration_Node): Moved to sem_aux.
192         * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
193         documentation.
194         * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
195         rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
196         exp_ch13.adb: Add with-clause on Sem_Aux.
197
198 2011-12-02  Yannick Moy  <moy@adacore.com>
199
200         * sem_util.adb (Unique_Name): Reach through Unique_Entity to
201         get the name of the entity.
202         (Unique_Entity): Correct case for subprogram stubs.
203
204 2011-12-02  Yannick Moy  <moy@adacore.com>
205
206         * sem_ch3.adb (Check_Initialization): Do not emit warning on
207         initialization of limited type object in Alfa mode.
208
209 2011-12-02  Robert Dewar  <dewar@adacore.com>
210
211         * sinfo.ads: Minor reformatting.
212         * gnat_ugn.texi: Fix confusion in use of term "type name".
213
214 2011-12-02  Robert Dewar  <dewar@adacore.com>
215
216         * sem_ch6.adb: Minor change in error message.
217
218 2011-12-02  Robert Dewar  <dewar@adacore.com>
219
220         * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
221         reformatting.
222
223 2011-12-02  Javier Miranda  <miranda@adacore.com>
224
225         * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
226         static check of the rule of general access types whose designated
227         type has discriminants.
228         * sem_util.ads, sem_util.adb
229         (Effectively_Has_Constrained_Partial_View): New subprogram.
230         (In_Generic_Body): New subprogram.
231         * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
232         * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
233         subprogram In_Generic_Body.
234         * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
235         sem_ch4.adb: In addition, this patch replaces the occurrences of
236         Has_Constrained_Partial_View by
237         Effectively_Has_Constrained_Partial_View.
238
239 2011-12-02  Matthew Heaney  <heaney@adacore.com>
240
241         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
242         Position component.
243         (Finalize): Remove unnecessary access check.
244         (First): Forward to First_Child.
245         (Last): Forward to Last_Child.
246         (Iterate): Check preconditions for parent node parameter.
247         (Next): Forward to Next_Sibling.
248         (Previous): Forward to Previous_Sibling.
249
250 2011-12-02  Robert Dewar  <dewar@adacore.com>
251
252         * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
253         a-coormu.adb, a-convec.adb: Minor reformatting.
254
255 2011-12-02  Matthew Heaney  <heaney@adacore.com>
256
257         * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
258         * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
259         Iterator type.
260         (Finalize): Decrement busy counter.
261         (First, Last): Cursor return value depends on iterator node value.
262         (Iterate): Use start position as iterator node value.
263         (Next, Previous): Forward to corresponding cursor-based operation.
264
265 2011-12-02  Robert Dewar  <dewar@adacore.com>
266
267         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
268         a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
269         a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
270         a-ciorma.adb, a-cobove.adb: Minor reformatting.
271
272 2011-12-01  Jakub Jelinek  <jakub@redhat.com>
273
274         PR bootstrap/51201
275         * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
276
277 2011-11-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
278
279         * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
280
281 2011-11-23  Thomas Quinot  <quinot@adacore.com>
282
283         * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
284         only on platforms where this is required, as determined by
285         s-oscons.h.
286
287 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
288
289         * sem_ch9.adb: No check on entry index if error on index.
290
291 2011-11-23  Gary Dismukes  <dismukes@adacore.com>
292
293         * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
294         return statements nested inside an extended_return_statement.
295         * gcc-interface/Make-lang.in: Update dependencies.
296         * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
297
298 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
299
300         * freeze.adb (Freeze_All_Ent): An incomplete type is not
301         frozen by a subprogram body that does not come from source.
302
303 2011-11-23  Pascal Obry  <obry@adacore.com>
304
305         * s-oscons-tmplt.c: Add PTY_Library constant. It contains
306         the library for pseudo terminal support.
307         * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
308         pragma.
309
310 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
311
312         * sem_ch9.adb: No check on entry family index if generic.
313
314 2011-11-23  Thomas Quinot  <quinot@adacore.com>
315
316         * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
317         s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
318         s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
319         System.OS_Constants from shared spec of
320         System.Tasking.Primitive_Operations to the specific body variants
321         that really require this dependency.
322
323 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
324
325         * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
326         If the declaration has aspects, analyze them so they can be
327         properly rejected.
328
329 2011-11-23  Hristian Kirtchev  <kirtchev@adacore.com>
330
331         * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
332         a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
333         a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
334         a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
335         Add with and use clause for Ada.Finalization. Type
336         Iterator and Child_Iterator are now derived from Limited_Controlled.
337         (Finalize): New routine.
338         (Iterate): Add a renaming of counter Busy and
339         increment it. Update the return aggregate.
340         (Iterate_Children): Add a renaming of
341         counter Busy and increment it. Update the return aggregate.
342         (Iterate_Subtree): Add a renaming of counter Busy and increment
343         it. Update the return aggregate.
344         * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
345         type.
346         * a-cihama.ads: Type Map_Access is now a general access type.
347         * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
348         associated with the tree.
349         * a-cohama.ads: Type Map_Access is now a general access type.
350         * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
351         access type.
352         * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
353         to wrap the loop as this is done at an earlier step, during
354         analysis. The declarations of the iterator and the cursor use
355         the usual Insert_Action mechanism when added into the tree.
356         * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
357         Loop_Statement and replace all respective uses by N. Add local
358         constant Loc. Preanalyze the loop iterator to discover whether
359         it is a container iterator and if it is, wrap the loop in a
360         block. This ensures that any controlled temporaries produced
361         by the iteration scheme share the same lifetime of the loop.
362         (Is_Container_Iterator): New routine.
363         (Is_Wrapped_In_Block): New routine.
364         (Pre_Analyze_Range): Move spec and body to the library level.
365
366 2011-11-23  Sergey Rybin  <rybin@adacore.com frybin>
367
368         * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
369         that controls casing of type and subtype names.
370
371 2011-11-23  Yannick Moy  <moy@adacore.com>
372
373         * sem_ch3.adb: Minor addition of comments.
374
375 2011-11-23  Thomas Quinot  <quinot@adacore.com>
376
377         * prj-part.adb (Extension_Withs): New global variable,
378         contains the head of the list of WITH clauses from the EXTENDS
379         ALL projects for which virtual packages are being created.
380         (Look_For_Virtual_Projects_For): When recursing through
381         an EXTENDS ALL, add the WITH clauses of the extending
382         project to Extension_Withs.  When adding a project to the
383         Virtual_Hash, record the associated Extension_Withs list.
384         (Create_Virtual_Extending_Project): Add a copy of the appropriate
385         Extension_Withs to the virtual project.
386
387 2011-11-23  Thomas Quinot  <quinot@adacore.com>
388
389         * mlib-tgt-specific-vxworks.adb: Minor reformatting.
390
391 2011-11-23  Thomas Quinot  <quinot@adacore.com>
392
393         * Make-generated.in (Sdefault.Target_Name): Set to
394         $(target_noncanonical) instead of $(target) for consistency.
395
396 2011-11-23  Matthew Heaney  <heaney@adacore.com>
397
398         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
399         Iterator type as limited (First, Last): Cursor return value
400         depends on iterator node value (Iterate): Use start position as
401         iterator node value (Next, Previous): Forward to corresponding
402         cursor-based operation.
403
404 2011-11-23  Matthew Heaney  <heaney@adacore.com>
405
406         * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
407         Renamed from Ordered_Set_Iterator_Interfaces.
408         * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
409         Iterator type as limited (First, Last): Cursor return value
410         depends on iterator node value (Iterate): Use start position as
411         iterator node value (Next, Previous): Forward to corresponding
412         cursor-based operation.
413         * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
414         * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
415         node component (First, Next): Forward call to corresponding
416         cursor-based operation (Iterate): Representation of iterator no
417         longer has node component
418
419 2011-11-23  Hristian Kirtchev  <kirtchev@adacore.com>
420
421         * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
422         dereference has a proper type before the side effect removal
423         mechanism kicks in.
424         * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
425         where the base type of the subtype is a private itype created
426         to act as the partial view of a constrained record type. This
427         scenario manifests with equivalent class-wide types for records
428         with unknown discriminants.
429
430 2011-11-23  Jerome Guitton  <guitton@adacore.com>
431
432         * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
433
434 2011-11-23  Thomas Quinot  <quinot@adacore.com>
435
436         * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
437         reformatting/reorganization.
438
439 2011-11-23  Thomas Quinot  <quinot@adacore.com>
440
441         * g-htable.ads: Remove old comments.
442
443 2011-11-23  Thomas Quinot  <quinot@adacore.com>
444
445         * exp_imgv.adb: Minor reformatting.
446
447 2011-11-23  Robert Dewar  <dewar@adacore.com>
448
449         * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
450         family bounds out of range.
451
452 2011-11-23  Matthew Heaney  <heaney@adacore.com>
453
454         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
455         type as limited, and remove node component.
456         (First, Next): Forward call to corresponding cursor-based operation.
457         (Iterate): Representation of iterator no longer has node component.
458
459 2011-11-23  Yannick Moy  <moy@adacore.com>
460
461         * exp_util.adb: Revert previous change to remove side-effects in Alfa
462         mode, which is not the correct thing to do for renamings.
463
464 2011-11-23  Thomas Quinot  <quinot@adacore.com>
465
466         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
467         s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
468         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
469         s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
470         s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
471         s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
472         s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
473         s-taprop-posix.adb: Remove hard-coded clock ids;
474         instead, generate them in System.OS_Constants.
475         (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
476         id of the clock providing Ada.Real_Time.Monotonic_Clock.
477         * thread.c: New file.
478         (__gnat_pthread_condattr_setup): New function. For platforms where
479         CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
480         variable attribute.
481
482 2011-11-23  Yannick Moy  <moy@adacore.com>
483
484         * sem_ch3.adb: Restore the use of Expander_Active instead of
485         Full_Expander_Active, so that the evaluation is forced in Alfa
486         mode too. Otherwise, we end up with an unexpected insertion in a
487         place where it is not supposed to happen, on default parameters
488         of a call.
489
490 2011-11-23  Thomas Quinot  <quinot@adacore.com>
491
492         * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
493         for Pretty_Print, for use from within gdb.
494
495 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
496
497         * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
498         and the cursor declarations in a block, so that the loop variable
499         is local to the construct.
500
501 2011-11-23  Matthew Heaney  <heaney@adacore.com>
502
503         * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
504         type Reversible_Iterator'Class.
505         * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
506         Declare type as limited.
507         (First, Last): Return value depends on iterator's start node value.
508         (Next, Previous): Call corresponding Cursor-based operation.
509         (Iterate): Indicate whether complete or partial iteration
510
511 2011-11-23  Robert Dewar  <dewar@adacore.com>
512
513         * errout.adb: Minor reformattin (Finalize): Take templates into
514         account for warning suppression.
515         * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
516         * erroutc.adb: Minor reformatting (Finalize): Take generic
517         templates into account for warning suppress.
518         * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
519         * sem_prag.adb: Minor reformatting (Analyze_Pragma,
520         case Warnings): Provide Used parameter in call to
521         Set_Specific_Warnings_Off (to deal with generic template case).
522
523 2011-11-23  Pascal Obry  <obry@adacore.com>
524
525         * sem_prag.adb (Process_Convention): Better error message for
526         stdcall convention on dispatching calls.
527
528 2011-11-23  Gary Dismukes  <dismukes@adacore.com>
529
530         * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
531
532 2011-11-23  Javier Miranda  <miranda@adacore.com>
533
534         * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
535         implicit type conversion when the returned object is allocated
536         in the secondary stack and the type of the returned object is
537         an interface. Done to force generation of displacement of the
538         "this" pointer.
539
540 2011-11-23  Pascal Obry  <obry@adacore.com>
541
542         * impunit.adb: Add g-exptty and g-tty units.
543
544 2011-11-23  Robert Dewar  <dewar@adacore.com>
545
546         * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
547
548 2011-11-23  Robert Dewar  <dewar@adacore.com>
549
550         * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
551         reformatting.
552
553 2011-11-23  Yannick Moy  <moy@adacore.com>
554
555         * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
556         line of precondition/ postcondition/invariant.
557
558 2011-11-23  Pascal Obry  <obry@adacore.com>
559
560         * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
561         terminals.c: New files.
562         Makefile.rtl: Add these new files.
563         * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
564         * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
565         * gcc-interface/Make-lang.in: Update dependencies.
566
567 2011-11-21  Robert Dewar  <dewar@adacore.com>
568
569         * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
570         * sem_attr.adb (Eval_Attribute, case Width): Ditto.
571
572 2011-11-21  Thomas Quinot  <quinot@adacore.com>
573
574         * sinfo.ads: Minor reformatting.
575
576 2011-11-21  Yannick Moy  <moy@adacore.com>
577
578         * exp_util.adb: Minor reformatting. Update comments.
579
580 2011-11-21  Robert Dewar  <dewar@adacore.com>
581
582         * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
583         sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
584         sem_ch6.adb: Minor reformatting.
585
586 2011-11-21  Arnaud Charlet  <charlet@adacore.com>
587
588         * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
589         Unrestricted_Access to deal with fact that we properly detect the
590         error if Access is used.
591         * gcc-interface/Make-lang.in: Update dependencies.
592
593 2011-11-21  Yannick Moy  <moy@adacore.com>
594
595         * exp_prag.adb (Expand_Pragma_Check): Place error on first character
596         of expression.
597         * sem_res.adb (Resolve_Short_Circuit): Place error on first
598         character of expression.
599
600 2011-11-21  Yannick Moy  <moy@adacore.com>
601
602         * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
603
604 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
605
606         * exp_attr.adb (Expand_N_Attribute_Reference, case
607         Max_Size_In_Storage_Elements): Account for the size of the
608         hidden list header which precedes controlled objects allocated
609         on the heap.
610         * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
611         tables.
612         * sinfo.adb (Header_Size_Added): New routine.
613         (Set_Header_Size_Added): New routine.
614         * sinfo.ads: Add flag Controlled_Header_Added along with
615         associated comment.
616         (Header_Size_Added): New inlined routine.
617         (Set_Header_Size_Added): New inlined routine.
618         * s-stposu.adb (Allocate_Any_Controlled): Use
619         Header_Size_With_Padding to calculate the proper
620         size of the header.
621         (Deallocate_Any_Controlled): Use
622         Header_Size_With_Padding to calculate the proper size
623         of the header.  (Header_Size_With_Padding): New routine.
624         (Nearest_Multiple_Rounded_Up): Removed along with its uses.
625         * s-stposu.ads (Header_Size_With_Padding): New routine.
626
627 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
628
629         * aspects.adb: Aspect specifications are allowed on renaming
630         declarations
631         * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
632         subprogram renaming declaration
633
634 2011-11-21  Tristan Gingold  <gingold@adacore.com>
635
636         * env.c: Remove unused declaration.
637
638 2011-11-21  Pascal Obry  <obry@adacore.com>
639
640         * s-os_lib.ads: Minor style fix.
641
642 2011-11-21  Pascal Obry  <obry@adacore.com>
643
644         * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
645         identical, do nothing on Windows XP.
646
647 2011-11-21  Yannick Moy  <moy@adacore.com>
648
649         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
650         Use Full_Expander_Active instead of Expander_Active to control
651         the forced evaluation of expressions for the sake of generating
652         checks.
653
654 2011-11-21  Thomas Quinot  <quinot@adacore.com>
655
656         * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
657
658 2011-11-21  Tristan Gingold  <gingold@adacore.com>
659
660         * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
661         mode_read_binary, mode_write_binary, mode_append_binary,
662         mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
663         mode_read_binary_plus, mode_write_binary_plus,
664         mode_append_binary_plus): Remove unused declarations.
665
666 2011-11-21  Yannick Moy  <moy@adacore.com>
667
668         * gnat_rm.texi: Minor rewording.
669
670 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
671
672         * exp_imgv.adb (Expand_Width_Attribute): Emit
673         an error message rather than a warning when pragma Discard_Names
674         prevents the computation of 'Width. Do not emit an error through
675         the use of RE_Null.
676
677 2011-11-21  Javier Miranda  <miranda@adacore.com>
678
679         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
680         implicit type conversion when the type of the allocator is an
681         interface. Done to force generation of displacement of the "this"
682         pointer when required.
683
684 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
685
686         * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
687         functions, and is set when the expression is a completion of a
688         previous declaration.
689         * sem_ch6.adb (Analyze_Expression_Function): To determine properly
690         whether an expression function completes a previous declaration,
691         use Find_Corresponding_Spec, as when analyzing a subprogram body.
692
693 2011-11-21  Steve Baird  <baird@adacore.com>
694
695         * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
696         (Type_Access_Level): Improve comment.
697
698 2011-11-21  Eric Botcazou  <ebotcazou@adacore.com>
699
700         * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
701         means of -iquote unconditionally.
702
703 2011-11-21  Robert Dewar  <dewar@adacore.com>
704
705         * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
706         reformatting.
707
708 2011-11-21  Arnaud Charlet  <charlet@adacore.com>
709
710         * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
711         to deal with fact that we properly detect the error if Access
712         is used.
713
714 2011-11-21  Steve Baird  <baird@adacore.com>
715
716         * sem_util.ads: Update comment describing function
717         Deepest_Access_Level.
718         * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
719         generic formal type.
720         (Type_Access_Level): Return library level
721         for a generic formal type.
722         * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
723         calls with calls to Deepest_Type_Access_Level.
724         * sem_ch3.adb (Analyze_Component_Declaration): replace a
725         Type_Access_Level call with a call to Deepest_Type_Access_Level.
726         * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
727         Replace three Type_Access_Level calls with calls to
728         Deepest_Type_Access_Level.
729         (Resolve_Allocator): Replace a Type_Access_Level call with a call to
730         Deepest_Type_Access_Level.
731         (Valid_Conversion.Valid_Array_Conversion): Replace a
732         Type_Access_Level call with a call to Deepest_Type_Access_Level.
733
734 2011-11-21  Robert Dewar  <dewar@adacore.com>
735
736         * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
737
738 2011-11-21  Robert Dewar  <dewar@adacore.com>
739
740         * sinput.ads: Minor comment fix.
741
742 2011-11-21  Robert Dewar  <dewar@adacore.com>
743
744         * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
745         Last_Bit, Position): Handle 2005 case.
746
747 2011-11-21  Robert Dewar  <dewar@adacore.com>
748
749         * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
750         to deal with fact that we properly detect the error if Access
751         is used.
752         (Increment): Same fix.
753         * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
754         to deal with fact that we properly detect the error if Access
755         is used.
756         * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
757         volatile if the B component is volatile. This affects the check
758         for passing such a by reference volatile actual to a non-volatile
759         formal (which should be illegal)
760
761 2011-11-21  Robert Dewar  <dewar@adacore.com>
762
763         * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
764         size and alignment for foreign convention enumeration types.
765         * layout.adb (Set_Elem_Alignment): Redo setting of alignment
766         when size is set.
767
768 2011-11-21  Yannick Moy  <moy@adacore.com>
769
770         * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
771         Apply_Discriminant_Check, Apply_Divide_Check,
772         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
773         Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
774         Selected_Range_Checks): Replace reference to Expander_Active
775         with reference to Full_Expander_Active, so that expansion of
776         checks is not performed in Alfa mode
777
778 2011-11-21  Tristan Gingold  <gingold@adacore.com>
779
780         * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
781         fact that we properly detect the error if Access is used.
782
783 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
784
785         * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
786
787 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
788
789         * exp_imgv.adb: Add with and use clause for Errout.
790         (Expand_Width_Attribute): Emit a warning when in
791         configurable run-time mode to provide a better diagnostic message.
792
793 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
794
795         * s-finmas.adb (Finalize): Add comment concerning double finalization.
796
797 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
798
799         * sem_ch3.adb (Access_Definition): If the access definition
800         is itself the return type of an access to function definition
801         which is ultimately the return type of an access to subprogram
802         declaration, its scope is the enclosing scope of the ultimate
803         access to subprogram.
804
805 2011-11-21  Steve Baird  <baird@adacore.com>
806
807         * sem_res.adb (Valid_Conversion): If a conversion was legal
808         in the body of a generic, then the corresponding conversion is
809         legal in the expanded body of an instance of the generic.
810
811 2011-11-21  Robert Dewar  <dewar@adacore.com>
812
813         * sem_ch3.adb: Minor reformatting.
814
815 2011-11-21  Robert Dewar  <dewar@adacore.com>
816
817         * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
818         line terminator.
819         * sinput.ads: Add section on Handling of Source Line Terminators.
820         * types.ads (Line_Terminator): Adjust comments.
821
822 2011-11-21  Robert Dewar  <dewar@adacore.com>
823
824         * frontend.adb (Frontend): Capture restrictions from config files
825         * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
826         information
827         * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
828         references. This was noticed during debugging, but it is not
829         known if it causes real bugs.
830         * restrict.ads, restrict.adb: New routines to save/set/restore
831         non-partition-wide restrictions.
832         * s-rident.ads: Comment changes for new handling of
833         No_Elaboration_Code
834         * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
835         * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
836         attempt to save/restore non-partition-wide restrictions (now
837         this work is all done in Sem).
838         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
839         Special handling for restriction No_Elaboration_Code.
840
841 2011-11-21  Robert Dewar  <dewar@adacore.com>
842
843         * gnat_ugn.texi: Document new handling of restrictions pragmas.
844
845 2011-11-21  Pascal Obry  <obry@adacore.com>
846
847         * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
848         attribute as not needed.
849
850 2011-11-21  Robert Dewar  <dewar@adacore.com>
851
852         * sem_prag.adb: Minor reformatting.
853
854 2011-11-21  Pascal Obry  <obry@adacore.com>
855
856         * gnat_rm.texi: Document restriction for stdcall convention on
857         dispatching calls.
858
859 2011-11-21  Pascal Obry  <obry@adacore.com>
860
861         * sem_prag.adb (Process_Convention): A dispatching call cannot
862         have a stdcall calling convention.
863
864 2011-11-21  Pascal Obry  <obry@adacore.com>
865
866         * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
867         mutex attribute as not needed.
868         (Initialize_TCB): Likewise.
869         (Initialize): Likewise.
870
871 2011-11-21  Robert Dewar  <dewar@adacore.com>
872
873         * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
874         (Process_PPCs): Invariants only apply to public subprograms.
875
876 2011-11-21  Robert Dewar  <dewar@adacore.com>
877
878         * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
879         restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
880
881 2011-11-21  Robert Dewar  <dewar@adacore.com>
882
883         * a-finali.ads: Use pragma Pure_12 for this unit
884         * aspects.adb: Add aspect Pure_12
885         * aspects.ads: Add aspect Pure_12
886         * opt.ads: Add note on Pure_12
887         * par-prag.adb: Add dummy entry for Pure_12
888         * sem_prag.adb: Implement Pure_12 pragma
889         * snames.ads-tmpl: Add Entry for Pure_12
890
891 2011-11-21  Sergey Rybin  <rybin@adacore.com frybin>
892
893         * vms_data.ads: Add qualifiers for new gnatpp options
894         '--call_threshold' and '--par_threshold".
895         * gnat_ugn.texi: Add description for new gnatpp options
896         '--call_threshold' and '--par_threshold".
897
898 2011-11-21  Robert Dewar  <dewar@adacore.com>
899
900         * lib.ads: Minor reformatting.
901
902 2011-11-21  Robert Dewar  <dewar@adacore.com>
903
904         * lib-load.ads: Add comment.
905
906 2011-11-21  Gary Dismukes  <dismukes@adacore.com>
907
908         * sem_elab.adb: Minor reformatting
909
910 2011-11-21  Robert Dewar  <dewar@adacore.com>
911
912         * exp_ch6.adb: Minor reformatting.
913
914 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
915
916         * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
917         subprogram of the formal package is covered by an others
918         association with a box initialization, no check is needed
919         against the actual in the instantiation of the formal package.
920
921 2011-11-21  Robert Dewar  <dewar@adacore.com>
922
923         * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
924         elab warning from within precondition/postcondition etc.
925
926 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
927
928         * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
929         with out parameters may generate assignments to force constraint
930         checks. These checks must be properly placed in the code after the
931         declaration or statement that contains the call.
932
933 2011-11-21  Fedor Rybin  <frybin@adacore.com>
934
935         * gnat_ugn.texi: Adding info on current gnattest limitations an
936         support of -X option.
937
938 2011-11-21  Robert Dewar  <dewar@adacore.com>
939
940         * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
941
942 2011-11-20  Robert Dewar  <dewar@adacore.com>
943
944         * exp_ch6.adb, exp_util.adb: Minor reformatting
945
946 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
947
948         * sinfo.ads (Reference): Document that it is OK to set
949         Is_Known_Non_Null on a temporary initialized to a N_Reference
950         node.
951
952 2011-11-20  Matthew Heaney  <heaney@adacore.com>
953
954         * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
955         for Source list.
956
957 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
958
959         * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
960         Declare NEW_EXPR local variable and attach the
961         temporary to it.  Set Is_Known_Non_Null on the temporary.
962         (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
963         * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
964         the temporary created to hold the 'Reference of the expression,
965         if any.
966         * checks.adb (Install_Null_Excluding_Check): Bail out for the
967         Get_Current_Excep.all.all idiom generated by the expander.
968
969 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
970
971         * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
972         (f_gnat_ret): New macro.
973         (struct nrv_data): Add GNAT_RET.
974         (finalize_nrv_unc_r): New helper function.
975         (finalize_nrv): Add GNAT_RET parameter.  Copy it into DATA.  If the
976         function returns unconstrained, use finalize_nrv_unc_r as callback.
977         (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
978         RET_OBJ is non-null.
979         (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
980         (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
981         if optimization is enabled, record candidates for the Named Return
982         Value optimization.
983
984 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
985
986         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
987         (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
988         test.  Tweak default case.
989         <N_Goto_Statement>: Use better formatting.
990         * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
991         MODIFY_EXPR to initialize the storage.
992         (build_allocator): Likewise.
993
994 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
995
996         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
997         call to components_to_record.
998         (components_to_record): Add FIRST_FREE_POS parameter.  For the variant
999         part, reuse enclosing union even if there is a representation clause
1000         on the Unchecked_Union.  If there is a variant part, compute the new
1001         first free position, if any.  Adjust call to self.  Use a single field
1002         directly only if it hasn't got a representation clause or is placed at
1003         offset zero.  Create the variant part at offset 0 if all the fields
1004         down to this level have a rep clause.  Do not chain the variant part
1005         immediately and adjust downstream.
1006         Do not test ALL_REP before moving the fields without rep clause to the
1007         previous level.  Call create_rep_part to create the REP part and force
1008         a minimum size on it if necessary.  Do not chain it immediately.
1009         Create a fake REP part if there are fields without rep clause that need
1010         to be laid out starting from FIRST_FREE_POS.
1011         At the end, chain the REP part and then the variant part.
1012         (create_rep_part): New function.
1013         (get_rep_part): Minor tweak.
1014         * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
1015
1016 2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
1017
1018         PR target/50678
1019         * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
1020         bug filed as radar #10302855 from __gnat_error_handler to...
1021         (__gnat_adjust_context_for_raise) [Darwin]: ...here.  New function.
1022         (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
1023
1024 2011-11-18  Tristan Gingold  <gingold@adacore.com>
1025             Iain Sandoe  <iains@gcc.gnu.org>
1026
1027         PR target/49992
1028         * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
1029         * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
1030
1031 2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
1032
1033         * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
1034         s-oscons.ads.
1035         (OSCONS_CPP, OSCONS_EXTRACT): New.
1036         (./bldtools/oscons/xoscons): New target.
1037         ($(RTSDIR)/s-oscons.ads): Likewise.
1038         (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
1039         * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
1040         * Make-generated.in: Remove machinery to generate xoscons and
1041         ada/s-oscons.ads.
1042
1043 2011-11-10  Eric Botcazou  <ebotcazou@adacore.com>
1044
1045         * fe.h (Serious_Errors_Detected): New macro.
1046         * gcc-interface/gigi.h (build_atomic_load): Declare.
1047         (build_atomic_store): Likewise.
1048         * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
1049         (call_to_gnu): Add ATOMIC_SYNC parameter.  Use local variable.
1050         Build an atomic load for an In or In Out parameter if needed.
1051         Build an atomic store for the assignment of an Out parameter if needed.
1052         Build an atomic store to the target if ATOMIC_SYNC is true.
1053         (present_in_lhs_or_actual_p): New predicate.
1054         (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
1055         <N_Explicit_Dereference>: Likewise.
1056         <N_Indexed_Component>: Likewise.
1057         <N_Selected_Component>: Likewise.
1058         <N_Assignment_Statement>: Adjust call to call_to_gnu.
1059         Build an atomic store to the LHS if needed.
1060         <N_Function_Call>:  Adjust call to call_to_gnu.
1061         * gcc-interface/utils2.c: Include toplev.h.
1062         (resolve_atomic_size): New static function.
1063         (build_atomic_load): New function.
1064         (build_atomic_store): Likewise.
1065         * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
1066
1067 2011-11-07  Olivier Hainque  <hainque@adacore.com>
1068
1069         * sigtramp-ppcvxw.c: Add general comments.
1070         (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
1071         rules for r2 to r13, plus CTR and XER.
1072         (CFA_REG): New, register number used to hold the local CFA.
1073         (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
1074         Make that 15, not 14, with documentation.
1075         (TCR): Undef before definition, preventing conflict with reg number in
1076         VxWorks headers.
1077
1078 2011-11-07  Robert Dewar  <dewar@adacore.com>
1079
1080         * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1081         aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1082         * gcc-interface/Make-lang.in: Update dependencies.
1083
1084 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1085
1086         * exp_ch6.adb: A tagged type is a legal actual for an aliased
1087         formal.
1088
1089 2011-11-07  Pascal Obry  <obry@adacore.com>
1090
1091         * g-socket.adb, g-socket.ads: Minor reformatting.
1092
1093 2011-11-07  Robert Dewar  <dewar@adacore.com>
1094
1095         * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1096
1097 2011-11-07  Robert Dewar  <dewar@adacore.com>
1098
1099         * gnat_ugn.texi: Add discussion of default mode handling of
1100         source representation with no -gnatW option given, in particular
1101         noting that NEL (next line) is not recognized in this context.
1102
1103 2011-11-07  Yannick Moy  <moy@adacore.com>
1104
1105         * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1106         generate a reference for a modification even when the modification
1107         does not come from source.
1108
1109 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1110
1111         * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1112         use the indexing attributes rather than the Element function,
1113         to obtain variable references.
1114         * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1115         Find_Aspect rather than iterating over representation
1116         items. Improve error message.
1117         * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1118         of Reference functions.
1119
1120 2011-11-07  Yannick Moy  <moy@adacore.com>
1121
1122         * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1123         body that has a corresponding parameter on the subprogram
1124         declaration, define the unique entity as being the declaration
1125         one.
1126
1127 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1128
1129         * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1130         return type of a function is the class-wide type of an incomplete
1131         type T, T can be a Taft-amendment type and does not have to be
1132         completed in the current private part.
1133
1134 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1135
1136         * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1137         that are inherited by default, and apply to the class-wide type
1138         as well.
1139         * aspects.adb (Find_Aspect): If the entity is class-wide and the
1140         aspect is inherited, use the aspect of the specific type.
1141
1142 2011-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
1143
1144         * exp_alfa.adb: Remove with and use clause for
1145         Exp_Ch8. Add with and use clause for Exp_Util.
1146         Remove local constant Disable_Processing_Of_Renamings.
1147         (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1148         object renamings has been reenabled.
1149         (Expand_Possible_Renaming):
1150         The expansion of identifier and expanded names has been
1151         reenabled. Perform the substitutions only for entities that
1152         denote an object.
1153         * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1154         * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1155         (Remove_Side_Effects): Alphabetize local variables. Add a guard
1156         to avoid the infinite expansion of an expression in Alfa mode. Add
1157         processing for function calls in Alfa mode.
1158         * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1159
1160 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1161
1162         * freeze.adb (Freeze_Entity): If the entity is an access to
1163         subprogram whose designated type is itself a subprogram type,
1164         its own return type must be decorated with size information.
1165
1166 2011-11-04  Arnaud Charlet  <charlet@adacore.com>
1167
1168         * gcc-interface/Make-lang.in: Update dependencies.
1169
1170 2011-11-04  Robert Dewar  <dewar@adacore.com>
1171
1172         * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1173         Avoid junk semicolon after argument of machine code Asm operand.
1174
1175 2011-11-04  Robert Dewar  <dewar@adacore.com>
1176
1177         * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1178         CodePeer mode or if restriction No_Exception_Handlers is present.
1179         * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1180         nodes in CodePeer mode or if restriction No_Exception_Handlers
1181         is present.
1182
1183 2011-11-04  Robert Dewar  <dewar@adacore.com>
1184
1185         * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1186
1187 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1188
1189         * sem_ch6.adb (Analyze_Subprogram_Specification): The
1190         specification is legal if it is a function that returns an
1191         abstract type, if it comes from an attribute renaming of a stream
1192         attribute of an abstract type.
1193
1194 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1195
1196         * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1197         components, check whether recursively check whether the prefix
1198         denotes an unaligned object.
1199
1200 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1201
1202         * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1203         the pragma is legal if it is an expanded name that denotes a
1204         procedure that be can called without parameters.
1205
1206 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1207
1208         * gnat_ugn.texi (Performance Considerations) <Vectorization
1209         of loops>: New sub-section.  <Other Optimization Switches>:
1210         Minor tweak.
1211
1212 2011-11-04  Robert Dewar  <dewar@adacore.com>
1213
1214         * gnat_rm.texi: Minor reformatting.
1215
1216 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1217
1218         * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1219         when Target and Source denote same non-empty object
1220         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1221
1222 2011-11-04  Robert Dewar  <dewar@adacore.com>
1223
1224         * exp_attr.adb: Minor reformatting.
1225
1226 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1227
1228         * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1229         discriminant assignment within an initialization proc if the
1230         record is an unchecked union, as it can only come from the
1231         initialization of an unchecked union component.
1232
1233 2011-11-04  Robert Dewar  <dewar@adacore.com>
1234
1235         * gnat_ugn.texi: Minor reformatting.
1236
1237 2011-11-04  Robert Dewar  <dewar@adacore.com>
1238
1239         * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1240         warning message.
1241
1242 2011-11-04  Robert Dewar  <dewar@adacore.com>
1243
1244         * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1245         var Save_Space).
1246
1247 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1248
1249         * exp_alfa.adb: Add local constant
1250         Disable_Processing_Of_Renamings;
1251         (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1252         the name evaluation of object renamings for now.
1253         (Expand_Potential_Renaming): Do not perform the substitution
1254         for now.
1255         * exp_util.adb (Remove_Side_Effects): Remove processing for
1256         functions with side effects in Alfa mode.
1257
1258 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1259
1260         * bindgen.adb (Gen_Elab_Calls): In the case
1261         of the AAMP target, set elaboration entities to 1 rather than
1262         incrementing.
1263
1264 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1265
1266         * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1267         proper entities on the ancestors of a child unit that appear
1268         in a limited_with clause, follow the unit links because the
1269         units are not analyzed and scope information is incomplete.
1270
1271 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1272
1273         * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1274         setting the Atomic_Sync_Required flag to detect one more case.
1275         * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1276         setting the Atomic_Sync_Required flag to exclude more cases,
1277         depending on the parent of the node to be examined.
1278
1279 2011-11-04  Bob Duff  <duff@adacore.com>
1280
1281         * g-excact.adb: Minor: use named notation.
1282
1283 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1284
1285         * sem_ch5.adb: Improve error messages for illegal iterators.
1286
1287 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1288
1289         * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1290         Sem_Util.
1291         (Expand_Alfa): Alphabetize cases on first choice. Add
1292         processing for object renaming declarations, identifiers and
1293         expanded names.
1294         (Expand_Alfa_N_In): Remove useless return.
1295         (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1296         (Expand_Potential_Renaming): New routine.
1297         * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1298         (Expand_N_Object_Declaration): Alphabetize local variables. Move
1299         Evaluate_Name out to the top level.
1300         * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1301         * exp_util.adb (Remove_Side_Effects): Add processing for
1302         functions with side effects in Alfa mode.
1303
1304 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1305
1306         * gnat_rm.texi: Add entries for
1307         restrictions No_Relative_Delay, No_Requeue_Statements and
1308         No_Stream_Optimizations.
1309
1310 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1311
1312         * sem_ch4.adb: Set type of entity in prefixed call, for
1313         completeness in a generic context.
1314
1315 2011-11-04  Yannick Moy  <moy@adacore.com>
1316
1317         * sem_prag.adb: Minor refactoring (renaming of a parameter).
1318
1319 2011-11-04  Robert Dewar  <dewar@adacore.com>
1320
1321         * atree.ads: Minor reformatting.
1322
1323 2011-11-04  Robert Dewar  <dewar@adacore.com>
1324
1325         * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1326         and -gnatd.e here
1327         * exp_ch2.adb (Expand_Entity_Reference): Use
1328         Activate_Atomic_Synchronization
1329         * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1330         Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1331         Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1332         Use Activate_Atomic_Synchronization
1333         * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1334         procedure.
1335         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1336         N_Selected_Component node
1337
1338 2011-11-04  Robert Dewar  <dewar@adacore.com>
1339
1340         * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1341
1342 2011-11-04  Yannick Moy  <moy@adacore.com>
1343
1344         * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1345         * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1346         In ASIS mode, no splitting of aspects between conjuncts.
1347         (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1348         expressions refer to the original aspect expressions through
1349         the Original_Node link. This is used in semantic analysis for
1350         ASIS mode, so that the original expression also gets analyzed.
1351         * sem_prag.adb (Preanalyze_TC_Args,
1352         Check_Precondition_Postcondition,
1353         Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1354         generated from a source aspect, also analyze the original aspect
1355         expression.
1356         (Check_Expr_Is_Static_Expression): New procedure
1357         similar to existing procedure Check_Arg_Is_Static_Expression,
1358         except called on expression inside pragma.
1359
1360 2011-11-04  Tristan Gingold  <gingold@adacore.com>
1361
1362         * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1363         Find_Project.Try_Path_Name.
1364         (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1365
1366 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1367
1368         * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1369
1370 2011-11-04  Pascal Obry  <obry@adacore.com>
1371
1372         * projects.texi: Add short description for qualifiers aggregate
1373         and aggregate library.
1374
1375 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1376
1377         * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1378         * a-cgaaso.adb: Replaced implementation with instantiation
1379         of Generic_Sort.
1380         * a-cogeso.ad[sb] This is the new Ada 2012 unit
1381         Ada.Containers.Generic_Sort
1382
1383 2011-11-04  Robert Dewar  <dewar@adacore.com>
1384
1385         * exp_ch2.adb (Expand_Entity_Reference): Do not set
1386         Atomic_Sync_Required for the case of a prefix of an attribute.
1387         * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1388         atomic synchronization
1389         (Expand_N_Indexed_Component): Ditto.
1390         (Expand_B_Selected_Component): Ditto.
1391         * sem_prag.adb (Process_Suppress_Unsuppress):
1392         Disable/Enable_Atomic_Synchronization can now occur for array
1393         types with pragma Atomic_Components.
1394         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1395         N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1396
1397 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1398
1399         * gnat_ugn.texi: Editorial corrections for gnattest section.
1400
1401 2011-11-04  Robert Dewar  <dewar@adacore.com>
1402
1403         * sem_prag.adb: Minor reformatting.
1404         * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1405         "***") usage.
1406         * exp_ch2.adb (Expand_Entity_Reference): Only set
1407         Atomic_Sync_Required on entities that are variables. Doesn't
1408         make any sense on anything else.
1409
1410 2011-11-04  Robert Dewar  <dewar@adacore.com>
1411
1412         * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1413         atomic sync to type case.
1414         * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1415         apply to types.
1416
1417 2011-11-04  Robert Dewar  <dewar@adacore.com>
1418
1419         * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1420         for call vs assign.
1421         * gcc-interface/Make-lang.in: Update dependencies.
1422
1423 2011-11-04  Robert Dewar  <dewar@adacore.com>
1424
1425         * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1426         compile time.
1427
1428 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1429
1430         * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1431         * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1432         a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1433         * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1434         a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1435         a-sulcin.ad[sb]: New files.
1436
1437 2011-11-04  Geert Bosch  <bosch@adacore.com>
1438
1439         * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1440         s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1441         i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
1442         s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
1443         * gcc-interface/Makefile.in: Remove libgnala and related objects.
1444
1445 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1446
1447         * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
1448         a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
1449         a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
1450         a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
1451         added to package.
1452
1453 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1454
1455         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
1456         that the type of the parameters isn't dummy in type_annotate_only mode.
1457
1458 2011-11-04  Robert Dewar  <dewar@adacore.com>
1459
1460         * sem_ch12.adb: Minor reformatting
1461
1462 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1463
1464         * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
1465         initialize elaboration entities to zero when specs are processed.
1466
1467 2011-10-28  Iain Sandoe  <iains@gcc.gnu.org>
1468             Eric Botcazou  <ebotcazou@adacore.com>
1469
1470         PR target/50678
1471         * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
1472         bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
1473
1474 2011-10-28  Eric Botcazou  <ebotcazou@adacore.com>
1475
1476         PR ada/50842
1477         * gcc-interface/Makefile.in (SYMDEPS): Delete.
1478         (LIBICONV): New variable.
1479         (LIBICONV_DEP): Likewise.
1480         (LIBS): Add $(LIBICONV).
1481         (LIBDEPS): Add $(LIBICONV_DEP).
1482         (EXTRA_GNATTOOLS_OBJS): Merge into...
1483         (TOOLS_LIBS): ...this.  Add $(LIBICONV).
1484
1485 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
1486
1487         * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
1488         variable.  Always create the elaboration variable, if any, as constant.
1489
1490 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
1491
1492         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
1493         make a packable type for fields of union types as well.
1494         <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
1495         (gnat_to_gnu_component_type): Try to make a packable type for fields
1496         of union types as well.
1497         (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
1498         (maybe_pad_type): Try to make a packable type for fields of union types
1499         as well.
1500         (gnat_to_gnu_field): Likewise.
1501         (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
1502         (set_rm_size): Likewise.
1503         (rm_size): Likewise.
1504         * gcc-interface/misc.c (gnat_type_max_size): Likewise.
1505         * gcc-interface/trans.c (add_decl_expr): Likewise.
1506         * gcc-interface/utils.c (finish_record_type): Likewise.
1507         * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
1508
1509 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
1510
1511         * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
1512         declared as atomic.  Move around conditionally executed code.
1513
1514 2011-10-24  Robert Dewar  <dewar@adacore.com>
1515
1516         * sem.adb (Initialize): Fix bug that blew up if called a second time.
1517
1518 2011-10-24  Robert Dewar  <dewar@adacore.com>
1519
1520         * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
1521         tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
1522
1523 2011-10-24  Robert Dewar  <dewar@adacore.com>
1524
1525         * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
1526         name in error msg.
1527
1528 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
1529
1530         * gnat_rm.texi: Add an entry for restriction No_Finalization.
1531
1532 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
1533
1534         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
1535         current instance is within the one that contains the generic,
1536         the freeze node for the current one must appear in the current
1537         declarative part. Ditto if the current instance is within another
1538         package instance. In both of these cases the freeze node of the
1539         previous instance is not relevant.
1540
1541 2011-10-24  Gary Dismukes  <dismukes@adacore.com>
1542
1543         * switch-m.adb (Normalize_Compiler_Switches): Add recognition
1544         of AAMP-specific switches -univ and -aamp_target.
1545
1546 2011-10-24  Robert Dewar  <dewar@adacore.com>
1547
1548         * a-tienau.adb (Put): Deal properly with limited line length.
1549
1550 2011-10-24  Robert Dewar  <dewar@adacore.com>
1551
1552         * sem_warn.adb, sem_ch12.adb: Minor reformatting.
1553
1554 2011-10-24  Tristan Gingold  <gingold@adacore.com>
1555
1556         * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
1557         on AIX.
1558
1559 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
1560
1561         * sem_ch12.adb (Earlier): make available globally. If both
1562         nodes have the same sloc, the freeze node that does not come
1563         from source is the later one.
1564         (True_Parent): Make available globally.
1565         (Previous_Instance): Subsidiary of
1566         Insert_Freeze_Node_For_Instance, to check whether the generic
1567         parent of the current instance is declared within a previous
1568         instance in the same unit or declarative  part, in which case the
1569         freeze nodes of both instances must appear in order to prevent
1570         elaboration problems in gigi.
1571         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
1572         freeze point, and the freeze node of a preceding instantiation
1573         must be inserted before it.
1574
1575 2011-10-24  Robert Dewar  <dewar@adacore.com>
1576
1577         * checks.ads, checks.adb: Add handling of Synchronization_Check
1578         * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
1579         atomic sync).
1580         * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
1581         flag Minor code reorganization.
1582         * opt.ads (Warn_On_Atomic_Synchronization): New switch.
1583         * par-prag.adb: Add dummy entries for pragma
1584         Disable/Enable_Atomic_Synchronization.
1585         * sem_prag.adb (Process_Suppress_Unsuppress): Handle
1586         case of Atomic_Synchronization specially (not suppressed
1587         by All_Checks, cannot be set from Source).
1588         (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
1589         * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
1590         * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
1591         entry for pragma Disable/Enable_Atomic_Synchronization
1592         * switch-c.adb: The -gnatp switch does not disable
1593         Atomic_Synchronization Add -gnatep switch to disable
1594         Atomic_Synchronization.
1595         * types.ads: Add entry for Synchronization_Check
1596         * usage.adb: Add line for -gnated switch
1597         * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
1598
1599 2011-10-24  Geert Bosch  <bosch@adacore.com>
1600
1601         * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
1602         at Integer'First.
1603
1604 2011-10-24  Robert Dewar  <dewar@adacore.com>
1605
1606         * sem_ch12.adb, s-gearop.adb: Minor reformatting.
1607
1608 2011-10-24  Robert Dewar  <dewar@adacore.com>
1609
1610         * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
1611         * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
1612
1613 2011-10-24  Emmanuel Briot  <briot@adacore.com>
1614
1615         * prj-proc.adb (Process_Expression_Variable_Decl): No special
1616         handling for Project_Path unless it is an attribute.
1617
1618 2011-10-24  Javier Miranda  <miranda@adacore.com>
1619
1620         * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
1621         (Install_Hidden_Primitives): New subprogram.
1622         (Restore_Hidden_Primitives): New subprogram.
1623         (Analyze_Formal_Package_Declaration,
1624         Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
1625         Invoke Check_Hidden_Primitives after every call to
1626         Analyze_Associations, and invoke Restore_Hidden_Primitives to
1627         restore their visibility after processing the instantiation.
1628         (Instantiate_Package_Body): Install visible primitives before
1629         analyzing the instantiation and uninstall them to restore their
1630         visibility when the instantiation has been analyzed.
1631         * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
1632         (Remove_Suffix): New subprogram
1633         * sem_ch3.adb (Derive_Subprogram): When handling
1634         a derived subprogram for the instantiation of a formal derived
1635         tagged type, inherit the dispatching attributes from the actual
1636         subprogram (not from the parent type).
1637
1638 2011-10-24  Vasiliy Fofanov  <fofanov@adacore.com>
1639
1640         * gnat_ugn.texi: Document explicit use of XDECGNAT library.
1641
1642 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
1643
1644         * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
1645         update its uses.
1646         (Build_Discriminant_Assignments): Add local variable D_Loc and update
1647         its uses.
1648         (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
1649         Var_Loc and update their uses.
1650         (Build_Record_Init_Proc): Code reformatting.
1651         (Increment_Counter): Add formal parameter Loc.
1652         (Make_Counter): Add formal parameter Loc.
1653
1654 2011-10-24  Eric Botcazou  <ebotcazou@adacore.com>
1655
1656         * sem_disp.adb (Covers_Some_Interface): Fix typo.
1657
1658 2011-10-24  Matthew Heaney  <heaney@adacore.com>
1659
1660         * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
1661         of predicate.
1662
1663 2011-10-24  Yannick Moy  <moy@adacore.com>
1664
1665         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
1666         Translate arguments in positional notation into pragma argument
1667         association arguments for the generated pragma.
1668
1669 2011-10-24  Arnaud Charlet  <charlet@adacore.com>
1670
1671         * exp_ch5.adb: Fix minor typo.
1672
1673 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
1674
1675         * sem_ch3.adb (Is_Visible_Component): Refine predicate for
1676         the case of a component reference in an instance body, when the
1677         enclosing type is private.
1678
1679 2011-10-24  Sergey Rybin  <rybin@adacore.com frybin>
1680
1681         * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
1682         driver for getting the project support into gnatelim section.
1683
1684 2011-10-24  Robert Dewar  <dewar@adacore.com>
1685
1686         * gnat_rm.texi: Minor correction to documentation on address clause.
1687
1688 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
1689
1690         * s-finmas.adb (Attach): Synchronize and call the unprotected version.
1691         (Attach_Unprotected): New routine.
1692         (Delete_Finalize_Address): Removed.
1693         (Delete_Finalize_Address_Unprotected): New routine.
1694         (Detach): Synchronize and call the unprotected version.
1695         (Detach_Unprotected): Remove locking.
1696         (Finalize): Add various comment on synchronization. Lock the critical
1697         region and call the unprotected versions of routines.
1698         (Finalize_Address): Removed.
1699         (Finalize_Address_Unprotected): New routine.
1700         (Set_Finalize_Address): Synchronize and call
1701         the unprotected version.
1702         (Set_Finalize_Address_Unprotected): New routine.
1703         (Set_Heterogeneous_Finalize_Address): Removed.
1704         (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
1705         (Set_Is_Heterogeneous): Add comment on synchronization and
1706         locking.
1707         * s-finmas.ads: Flag Finalization_Started is no longer atomic
1708         because synchronization uses task locking / unlocking.
1709         (Attach): Add comment on usage.
1710         (Attach_Unprotected): New routine.
1711         (Delete_Finalize_Address): Renamed to
1712         Delete_Finalize_Address_Unprotected.
1713         (Detach): Add comment on usage.
1714         (Detach_Unprotected): New routine.
1715         (Finalize_Address): Renamed to Finalize_Address_Unprotected.
1716         (Set_Finalize_Address): Add comment on usage.
1717         (Set_Finalize_Address_Unprotected): New routine.
1718         (Set_Heterogeneous_Finalize_Address): Renamed to
1719         Set_Heterogeneous_Finalize_Address_Unprotected.
1720         * s-stposu.adb (Allocate_Any_Controlled): Add local variable
1721         Allocation_Locked. Add various comments on synchronization. Lock
1722         the critical region and call the unprotected version of
1723         routines.
1724         (Deallocate_Any_Controlled): Add various comments on
1725         synchronization. Lock the critical region and call the unprotected
1726         version of routines.
1727
1728 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
1729
1730         * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
1731         are universal and must carry the corresponding type.
1732         * sem_eval.adb (Check_Non_Static_Context): If the type of the
1733         expression is universal real, as may be the case for a fixed point
1734         expression with constant operands in the context of a conversion,
1735         there is nothing to check.
1736         * s-finmas.adb: Minor reformatting
1737
1738 2011-10-23  Eric Botcazou  <ebotcazou@adacore.com>
1739
1740         * gcc-interface/decl.c (create_concat_name): Add explicit cast.
1741
1742 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1743
1744         * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
1745         TRACE): Reintroduce.
1746         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
1747         ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
1748
1749 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1750
1751         * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
1752         (unchecked_conversion_nop): Use it.
1753         (gnat_to_gnu): Likewise.
1754
1755 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1756
1757         * back_end.adb (Call_Back_End): Pass the maximum logical line number
1758         instead of the maximum physical line number to gigi.
1759         * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
1760
1761 2011-10-16  Tom Tromey  <tromey@redhat.com>
1762             Dodji Seketeli  <dodji@redhat.com>
1763
1764         * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
1765         public ordinary map interface.
1766
1767 2011-10-16  Tristan Gingold  <gingold@adacore.com>
1768
1769         * link.c (_AIX): Add support for GNU ld.
1770
1771 2011-10-16  Fedor Rybin  <frybin@adacore.com>
1772
1773         * gnat_ugn.texi: Fixing gnattest example names in the doc.
1774         Adding explanation to additional tests usage.
1775
1776 2011-10-16  Robert Dewar  <dewar@adacore.com>
1777
1778         * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
1779
1780 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
1781
1782         * a-convec.adb: Fix minor inconsistencies.
1783
1784 2011-10-16  Matthew Heaney  <heaney@adacore.com>
1785
1786         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
1787         Implementation): Specify pragma Implementation_Defined.
1788
1789 2011-10-15  Nicolas Roche  <roche@adacore.com>
1790
1791         * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
1792         either rtp-smp or ravenscar-cert-rtp runtimes.
1793
1794 2011-10-15  Bob Duff  <duff@adacore.com>
1795
1796         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1797         Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
1798         is available.
1799         (Expand_N_Extended_Return_Statement): Do not create a renaming of the
1800         build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
1801         available.
1802         (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
1803         pool only if RE_Root_Storage_Pool_Ptr is available.
1804         (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
1805         pool actual unless RE_Root_Storage_Pool_Ptr is available.
1806         * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
1807         formal only if RE_Root_Storage_Pool_Ptr is available.
1808
1809 2011-10-15  Matthew Heaney  <heaney@adacore.com>
1810
1811         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
1812         type): Specify Priority aspect for protected type.
1813
1814 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
1815
1816         * exp_disp.adb (Check_Premature_Freezing): If an untagged type
1817         is a generic actual, it is a subtype of a type that was frozen
1818         by the instantiation, and even if not marked frozen it does not
1819         affect the construction of the dispatch table.
1820
1821 2011-10-14  Robert Dewar  <dewar@adacore.com>
1822
1823         * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
1824         reformatting.
1825         * s-rident.ads: Add missing Compiler_Unit pragma.
1826
1827 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
1828
1829         * sem_res.adb: Minor reformatting.
1830
1831 2011-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1832
1833         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1834         Code and comment reformatting. Use BIP_Task_Master
1835         when creating a _master.
1836         (BIP_Formal_Suffix): Code reformatting. Correct the case for
1837         BIP_Task_Master.
1838         (Make_Build_In_Place_Call_In_Object_Declaration): Use
1839         BIP_Task_Master when creating a reference to the enclosing
1840         function's _master formal.
1841         (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
1842         to the _master.
1843         * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
1844         (Needs_BIP_Finalization_Master): Alphabetized.
1845         * sem_ch6.adb (Create_Extra_Formals): Update the usage of
1846         BIP_Task_Master.
1847
1848 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
1849
1850         * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
1851         reject an aliased keyword on the object declaration of an extended
1852         return statement. In older versions of the language indicate
1853         that this is illegal in the standard.
1854
1855 2011-10-14  Pascal Obry  <obry@adacore.com>
1856
1857         * sem_util.adb, sem_ch4.adb: Minor reformatting.
1858
1859 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
1860
1861         * sem_ch13.adb: Recognize properly procedure calls that are
1862         transformed into code statements.
1863
1864 2011-10-14  Vincent Celier  <celier@adacore.com>
1865
1866         * projects.texi: Minor fix in project example.
1867
1868 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
1869
1870         * sem_util.adb: Return objects are aliased if their type is
1871         immutably limited as per AI05-0053.
1872
1873 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
1874
1875         * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
1876         expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
1877         Short_Circuit_And_Or expansion code (moved to sem_res).
1878         * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
1879         "and" and "or" operators as short-circuit "and then" and "or
1880         else", when pragma Short_Circuit_And_Or is active.
1881
1882 2011-10-13  Robert Dewar  <dewar@adacore.com>
1883
1884         * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
1885         sem_ch6.adb, exp_ch3.adb: Minor reformatting.
1886
1887 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
1888
1889         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
1890
1891 2011-10-13  Jerome Guitton  <guitton@adacore.com>
1892
1893         * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
1894
1895 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1896
1897         * a-convec.ads (Cursor): Minor reformatting.
1898         * a-convec.adb (Next): Fix minor inconsistencies.
1899         (Previous): Likewise.
1900
1901 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1902
1903         * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
1904         New predicate to determine whether some operations on an array
1905         type are available when the full view of its component may differ
1906         from the view of the point of the array declaration.
1907         * sem_ch4.adb (Find_Equality_Types): Use
1908         Available_Full_View_Of_Component.
1909         * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
1910
1911 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1912
1913         * sem_ch9.adb: Analyze aspects while discriminants of protected
1914         type are visible.
1915
1916 2011-10-13  Geert Bosch  <bosch@adacore.com>
1917
1918         * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
1919         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
1920         longer depend on an external library.
1921         * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
1922         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
1923         Update dependencies.
1924         * gcc-interface/Make-lang.in: Update dependencies. 
1925
1926 2011-10-13  Cyrille Comar  <comar@adacore.com>
1927
1928         * gnat_ugn.texi: Minor editing.
1929
1930 2011-10-13  Vincent Celier  <celier@adacore.com>
1931
1932         * projects.texi: Add documentation on packages and attributes
1933         that are inherited from a project being extended into the
1934         extended project.
1935
1936 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
1937
1938         * exp_ch3.adb (Build_Master): Rewritten.
1939         (Expand_N_Full_Type_Declaration): Reformat the declarative
1940         region. Update the call to Build_Master_Renaming.
1941         (Expand_Previous_Access_Type): Rewritten.
1942         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1943         Add local constant Result_Subt and update related usage.
1944         (Expand_N_Extended_Return_Statement): Add local constant
1945         Result_Subt and update related usage.
1946         * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
1947         new context detection mechanism.
1948         (Build_Class_Wide_Master):
1949         Use Insert_Action to add the renaming into the tree.
1950         (Build_Master_Entity): Rewritten to use the new context detection
1951         mechanism.
1952         (Build_Master_Renaming): Add formal parameter Ins_Nod
1953         and related usage. Use Insert_Action to add the renaming into the
1954         tree.
1955         (Find_Enclosing_Context): New subsidiary routine. Rather
1956         than relying on enclosing scopes, this routine looks at the
1957         tree structure to figure out the proper context for a _master
1958         or a _chain. This approach eliminates the issues with transient
1959         scopes which have not been converted into blocks.
1960         * exp_ch9.ads (Build_Master_Entity): Change parameter profile
1961         to better reflect the new usage. Update the related comment.
1962         (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
1963         the comment on usage.
1964         * sem_ch3.adb (Access_Definition): Update the calls to
1965         Build_Master_Entity and Build_Master_Renaming.
1966         * sem_ch6.adb (Create_Extra_Formals): Add local variable
1967         Full_Subt. Code reformatting.
1968         * sem_util.adb (Is_Iterator): Alphabetized.
1969         (Is_LHS): Alphabetized.
1970         (Is_Limited_Class_Wide_Type): New routine.
1971         * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
1972
1973 2011-10-13  Geert Bosch  <bosch@adacore.com>
1974
1975         * a-ngrear.adb (Solve): Make generic and move to
1976         System.Generic_Array_Operations.
1977         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1978         New generic solvers to  compute a vector resp. matrix Y such
1979         that A * Y = X, approximately.
1980         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1981         Implement using Forward_Eliminate and Back_Substitute
1982         * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
1983         on BLAS and LAPACK.
1984         * a-ngcoar.ads ("abs"): Fix return type to be real.
1985
1986 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1987
1988         PR ada/50589
1989         * s-linux-alpha.ads: Do not "with" Interfaces.C.
1990         * s-linux-sparc.ads: Likewise.
1991
1992 2011-10-13  Geert Bosch  <bosch@adacore.com>
1993
1994         * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
1995         returning a Real.
1996         * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
1997         and use formal.
1998         * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
1999         new profile.
2000
2001 2011-10-13  Geert Bosch  <bosch@adacore.com>
2002
2003         * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
2004         move to System.Generic_Array_Operations.
2005
2006 2011-10-13  Geert Bosch  <bosch@adacore.com>
2007
2008         * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2009         * s-gearop.ads (L2_Norm): Change profile to be suitable for
2010         Complex_Vector
2011         * s-gearop.adb (L2_Norm): Reimplement using direct definition,
2012         not inner product
2013
2014 2011-10-13  Robert Dewar  <dewar@adacore.com>
2015
2016         * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
2017         prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
2018         sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
2019         par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
2020         par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
2021         exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
2022
2023 2011-10-13  Geert Bosch  <bosch@adacore.com>
2024
2025         * s-gearop.adb: Minor comment additions.
2026
2027 2011-10-13  Fedor Rybin  <frybin@adacore.com>
2028
2029         * gnat_ugn.texi: Add gnattest section.
2030
2031 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2032
2033         * freeze.adb: Do not create body of renaming if declaration has
2034         errors.
2035
2036 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2037
2038         * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
2039         further, to the ppc+kernel case only.
2040
2041 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
2042
2043         * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
2044         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2045         Do not create a pool formal on .NET/JVM.
2046         (Expand_N_Extended_Return_Statement): Alphabetize local
2047         variables. Do not create a renaming of the build-in-place pool
2048         parameter on .NET/JVM.  (Make_Build_In_Place_Call_In_Allocator):
2049         Add the user-defined pool only on non-VM targets.
2050         (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
2051         local variables.  Do not add a pool actual on .NET/JVM.
2052         * sem_ch6.adb: Add with and use clause for Targparm.
2053         (Create_Extra_Formals): Add build-in-place pool formal only on
2054         non-VM targets.
2055         * rtsfind.ads: Alphabetize entries.
2056
2057 2011-10-13  Sergey Rybin  <rybin@adacore.com>
2058
2059         * gnat_ugn.texi: Minor correction.
2060
2061 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2062
2063         * sem_ch8.adb: Minor error message improvement.
2064
2065 2011-10-13  Robert Dewar  <dewar@adacore.com>
2066
2067         * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
2068
2069 2011-10-13  Gary Dismukes  <dismukes@adacore.com>
2070
2071         * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
2072         of a for loop for an enumeration type with an enumeration rep
2073         clause, which involves moving the original loop parameter into
2074         a nested block, the loop parameter's entity must be removed from
2075         the entity list of the loop scope.
2076
2077 2011-10-13  Bob Duff  <duff@adacore.com>
2078
2079         * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2080         that gets passed in the same cases where BIP_Alloc_Form is passed
2081         (caller-unknown-size results). BIP_Storage_Pool is used when
2082         BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
2083         to the user-defined storage pool is passed at the call site,
2084         and this pool is used in callee to allocate the result.
2085         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2086         version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2087         the additional BIP_Storage_Pool actual.
2088         (Expand_N_Extended_Return_Statement): Allocate the function
2089         result using the user-defined storage pool, if BIP_Alloc_Form =
2090         User_Storage_Pool.
2091         * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2092         * exp_ch4.adb: Don't overwrite storage pool set by
2093         Expand_N_Extended_Return_Statement.
2094         * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2095         for use in build-in-place function calls within allocators
2096         where the access type has a user-defined storage pool.
2097
2098 2011-10-13  Sergey Rybin  <rybin@adacore.com>
2099
2100         * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2101         literal casing.
2102
2103 2011-10-13  Nicolas Roche  <roche@adacore.com>
2104
2105         * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2106         with 'rtp'.
2107
2108 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2109
2110         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2111         account that an unchecked union type can be limited.
2112
2113 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2114
2115         * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2116         the use of the signal trampoline for PPC in the sjlj case as well.
2117         Add legitimate casts, preventing compile time warnings on the
2118         (sighandler *) profile.
2119
2120 2011-10-13  Yannick Moy  <moy@adacore.com>
2121
2122         * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2123         in Alfa mode.
2124
2125 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2126
2127         * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2128         expressions are legal limited return values if each one of their
2129         dependent expressions are legal.
2130
2131 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2132
2133         * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2134         if the prefix of the call is a qualified expression, rewrite as
2135         a code statement.
2136         * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2137         code statement is legal if it is a rewriting of a procedure call.
2138
2139 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2140
2141         * exp_aggr.adb (Flatten): If a component association has a box,
2142         assume that aggregate is not static.
2143         (Safe_Aggregate): If a component association in a non-limited
2144         aggregate has a box, assume that it cannot be expanded in place.
2145
2146 2011-10-13  Vincent Celier  <celier@adacore.com>
2147
2148         * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2149         Process_Project_Tree_Phase_1 with Packages_To_Check.
2150         (Process_Project_And_Apply_Config): Ditto
2151         * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2152         Remove default for argument Packages_To_Check.
2153         * prj-proc.adb (Recursive_Process): New argument
2154         Packages_To_Check.
2155         (Process): Ditto.
2156         (Process_Project_Tree_Phase_1): Ditto.
2157         (Recursive_Project.Process_Aggregated_Projects): Call
2158         Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2159         Packages_To_Check.
2160         * prj-proc.ads (Process): New argument Packages_To_Check
2161         (Process_Project_Tree_Phase_1): Ditto
2162
2163 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
2164
2165         * gcc-interface/Makefile.in: Fix typo.
2166
2167 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2168
2169         * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2170         Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
2171         Use sloc of defining identifier of farmal type declaration,
2172         as sloc of generated internal entity, to prevent misplaced
2173         references in ali.
2174
2175 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2176
2177         * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2178         is fully defined before checking that it is a numeric type.
2179
2180 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2181
2182         * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2183         association for component X has a box, then X is covered in the
2184         aggregate even if there is not default value for X in the type
2185         declaration, and X has to be default-initialized.
2186
2187 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2188
2189         * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2190         literals as referenced only if reference is in current source unit.
2191
2192 2011-10-13  Matthew Heaney  <heaney@adacore.com>
2193
2194         * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2195
2196 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2197
2198         * sigtramp.h: New file.  Prototype and spec of the signal
2199         trampoline to be called by an established handler to provide
2200         dwarf call frame info before the real signal processing code.
2201         * sigtramp-ppcvxw.c: New file.  Implementation of the signal
2202         trampoline for ppc-vxworks.
2203         * init.c (vxworks section): Use it for ppc.
2204
2205 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2206
2207         * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2208         (Check_Future_Identifier): New subprogram,
2209         factors duplicated code from Par.Ch2.P_Identifier and
2210         Par.Ch3.P_Defining_Identifier.
2211
2212 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2213
2214         * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2215         if we fail to initialize CV attributes or CV.
2216
2217 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2218
2219         * s-tasren.adb (Timed_Selective_Wait, case
2220         Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2221         we know abortion is already deferred.
2222
2223 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
2224
2225         * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2226         (Build_Master_Renaming (function)): Removed.
2227         (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2228         (Expand_Full_Type_Declaration): Alphabetize
2229         variables. Reformatting of code and comments. Rewrite the
2230         section on processing of anonymous access-to-task types in
2231         record components.
2232         * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2233         (Build_Master_Renaming): Moved to exp_ch9.
2234         * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2235         (Build_Master_Entity): Add formal parameter
2236         Use_Current. Reformatting of code and comments.
2237         (Build_Master_Renaming): Moved from exp_ch3.
2238         * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2239         exp_ch3. Update comment on usage.
2240         (Build_Master_Entity):
2241         Add formal parameter Use_Current. Update comment on usage.
2242         (Build_Master_Renaming): Moved from exp_ch3.
2243         * sem_ch3.adb (Access_Definition): Remove redundant code to
2244         create a _master and a renaming.
2245
2246 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2247
2248         * lib-xref.adb: Do no emit reference to overridden operation,
2249         if it is internally generated.
2250
2251 2011-10-13  Vincent Celier  <celier@adacore.com>
2252
2253         * bindgen.adb: Remove any processing related to g-trasym
2254         * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2255         * mlib-prj.adb: Remove any processing related to g-trasym.
2256
2257 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2258
2259         * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2260         * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2261         (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2262         (ADA_FLAGS_TO_PASS): Likewise.
2263         (COMMON_FLAGS_TO_PASS): New.
2264         (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
2265         native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2266         (gnatlib): Use COMMON_FLAGS_TO_PASS.
2267         (ada.install-common): Likewise.
2268         (install-gnatlib): Likewise.
2269         (install-gnatlib-obj): Likewise.
2270         (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2271         (gnat-cross): Delete.
2272         (gnatboot): Likewise.
2273         (gnatboot2): Likewise.
2274         (gnatboot3): Likewise.
2275         (gnatstage1): Likewise.
2276         (gnatstage2): Likewise.
2277         * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2278         (MOST_ADAFLAGS): Likewise.
2279         (LOOSE_CFLAGS): Likewise.
2280         (gnat-cross): Likewise.
2281         (GNATLIBFLAGS): Add -W -Wall.
2282         (GNATLIBCFLAGS_FOR_C): Likewise.
2283         * gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
2284         * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2285
2286 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2287
2288         * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2289         (push_range_check_info): Likewise.
2290         (gnat_to_gnu) <N_Code_Statement>: Likewise.
2291         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2292         (gnat_invariant_expr): Likewise.
2293         * gcc-interface/utils.c (compute_related_constant): Likewise.
2294         (max_size): Fix handling of SAVE_EXPR.
2295         (remove_conversions): Fix formatting.
2296
2297 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2298
2299         * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2300         (DECL_INDUCTION_VAR): New macro.
2301         (SET_DECL_INDUCTION_VAR): Likewise.
2302         * gcc-interface/gigi.h (convert_to_index_type): Declare.
2303         (gnat_invariant_expr): Likewise.
2304         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2305         parameter, set DECL_LOOP_PARM_P on it.
2306         * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2307         is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2308         * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2309         (struct range_check_info_d): New type.
2310         (struct loop_info_d): Likewise.
2311         (gnu_loop_stack): New stack.
2312         (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2313         built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
2314         is set, do not test DECL_RENAMED_OBJECT.
2315         (push_range_check_info): New function.
2316         (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2317         the label.  Reference the label and the iteration variable from it.
2318         Build the special induction variable in the unsigned version of the
2319         size type, if it is larger than the base type.  And attach it to the
2320         iteration variable if the latter isn't by-ref.  In the iteration scheme
2321         case, initialize the invariant conditions in front of the loop if
2322         deemed profitable.  Use gnu_loop_stack.
2323         (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2324         <N_Raise_Constraint_Error>: Always process the reason.  In the range
2325         check and related cases, and if loop unswitching is enabled, compute
2326         invariant conditions and push this information onto the stack.
2327         Do not translate again the condition if it has been already translated.
2328         * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2329         DECL_LOOP_PARM_P isn't set.
2330         (convert_to_index_type): New function.
2331         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2332         to convert the index from the base index type to sizetype.
2333         (gnat_invariant_expr): New function.
2334
2335 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2336
2337         * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2338         two parallel arrays to hold standard builtin declarations, and
2339         replace it with a function based interface that can support
2340         creating builtins on the fly in the future.
2341         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2342         (gnat_to_gnu): Ditto.
2343
2344 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
2345
2346         PR lto/50492
2347         * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2348         * gcc-interface/utils.c (global_context): New variable.
2349         (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2350         that are either public external or at top level.  Use "No" macro.
2351         (end_subprog_body): Call decl_function_context.
2352         (rest_of_subprog_body_compilation): Likewise.
2353
2354 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
2355
2356         * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2357         (rest_of_subprog_body_compilation): Likewise.
2358         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2359         test for useless conversions by means of gnat_useless_type_conversion.
2360         * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2361         (language_function): Add named_ret_val and other_ret_val.
2362         (f_named_ret_val): New macro.
2363         (f_other_ret_val): Likewise.
2364         (gigi): Call rest_of_subprog_body_compilation.
2365         (struct nrv_data): New structure.
2366         (is_nrv_p): New predicate.
2367         (prune_nrv_r): New helper function.
2368         (prune_nrv_in_block): New function.
2369         (finalize_nrv_r): New helper function.
2370         (finalize_nrv): New function.
2371         (return_value_ok_for_nrv_p): New predicate.
2372         (build_return_expr): If optimization is enabled, record candidates for
2373         the Named Return Value optimization.
2374         (build_function_stub): Call rest_of_subprog_body_compilation.
2375         (Subprogram_Body_to_gnu): If optimization is enabled and there are
2376         candidates, finalize the Named Return Value optimization.
2377         Call rest_of_subprog_body_compilation.
2378         (call_to_gnu): At the end, if a return value is needed, simplify the
2379         result before wrapping it up in a COMPOUND_EXPR.
2380         * gcc-interface/utils.c (end_subprog_body): Split into...
2381         (rest_of_subprog_body_compilation): ...this.  New function.
2382         (gnat_useless_type_conversion): Likewise.
2383
2384 2011-10-06  Thomas Quinot  <quinot@adacore.com>
2385
2386         * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2387         exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2388         g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2389         par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2390         sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2391         sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2392         s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2393         * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2394
2395 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
2396
2397         * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2398         references.
2399
2400 2011-10-06  Matthew Heaney  <heaney@adacore.com>
2401
2402         * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2403         (Dequeue_Only_High_Priority): Protected procedure now implemented.
2404
2405 2011-10-06  Vincent Celier  <celier@adacore.com>
2406
2407         * g-trasym.adb: Replace old implementation with the default
2408         implementation that returns list of addresses as "0x...".
2409         * g-trasym.ads: Update the list of platforms with the full
2410         capability.  Indicate that there is a default implementation
2411         for other platforms.
2412         * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2413         * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2414         is now a default implementation for all platforms without the full
2415         capability.
2416
2417 2011-10-06  Robert Dewar  <dewar@adacore.com>
2418
2419         * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2420         a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2421         a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2422         reorganization (use conditional expressions).
2423
2424 2011-10-06  Robert Dewar  <dewar@adacore.com>
2425
2426         * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2427         floating divide by zero.
2428
2429 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
2430
2431         * sem_ch6.adb: Limited interfaces that are not immutably limited
2432         are OK in return statements.
2433
2434 2011-09-30  Iain Sandoe  <iains@gcc.gnu.org>
2435
2436         * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2437         change to powerpc section.
2438
2439 2011-09-29  Iain Sandoe  <iains@gcc.gnu.org>
2440
2441         * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
2442         across the port.
2443
2444 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2445
2446         * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
2447         a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
2448         a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
2449         indefinite sets.
2450         * a-coorma.ads: Minor reformmating.
2451         * einfo.ads: Improve the comment describing the
2452         Directly_Designated_Type function.
2453         * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
2454         ordered maps.
2455         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2456         dependencies.
2457
2458 2011-09-27  Robert Dewar  <dewar@adacore.com>
2459
2460         * a-comutr.ads: Minor reformatting.
2461
2462 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2463
2464         * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
2465         iterators to multiway trees.
2466
2467 2011-09-27  Yannick Moy  <moy@adacore.com>
2468
2469         * debug.adb (d.D): New option for strict Alfa mode.
2470         * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
2471         permissions as strictly as possible.
2472         * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
2473         Alfa mode, now, interpret ranges of base types like GNAT does; in
2474         strict mode, simply change the range of the implicit base Itype.
2475         * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
2476
2477 2011-09-27  Robert Dewar  <dewar@adacore.com>
2478
2479         * exp_ch9.adb: Minor comment fixes.
2480
2481 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2482
2483         * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
2484         trees.
2485
2486 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
2487
2488         * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
2489         instead of Directly_Designated_Type in the indirect array case.
2490
2491 2011-09-27  Robert Dewar  <dewar@adacore.com>
2492
2493         * exp_util.adb, exp_aggr.adb: Minor reformatting.
2494
2495 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2496
2497         * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
2498         on subtype declarations.
2499         * exp_aggr.adb: Minor comment update.
2500
2501 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
2502
2503         * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
2504         test in the N_Explicit_Dereference case.  Fold double logical
2505         negation in the special loop case and conditionalize it on
2506         Variable_Ref being true.
2507
2508 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2509
2510         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
2511         single protected object and the selector is a discriminant or an
2512         entry family, this is a non-overloaded candidate interpretation,
2513         and possible primitive operations of the type must not be
2514         examined.
2515
2516 2011-09-27  Arnaud Charlet  <charlet@adacore.com>
2517
2518         * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2519
2520 2011-09-27  Pascal Obry  <obry@adacore.com>
2521
2522         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2523         s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
2524         Add dummy definitions for pthread_rwlock_t
2525         and pthread_rwlockattr_t on all POSIX platforms.
2526         * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
2527         reference.
2528         (Finalize_Lock): Likewise.
2529         (Write_Lock): Likewise.
2530         (Unlock): Likewise.
2531
2532 2011-09-27  Tristan Gingold  <gingold@adacore.com>
2533
2534         * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
2535         windows 64.
2536
2537 2011-09-27  Pascal Obry  <obry@adacore.com>
2538
2539         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
2540         s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
2541         s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
2542         s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
2543         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2544         s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
2545         s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
2546         s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
2547         s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
2548         s-taprop-posix.adb: Revert previous changes.
2549         (Lock): Now a record containing the two possible lock
2550         (mutex and read/write) defined in OS_Interface.
2551         * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
2552         'R' locking policy.
2553         (Initialize_Protection): Likewise.
2554         (Lock): Likewise.
2555         (Lock_Read_Only): Likewise.
2556         (Unlock): Likewise.
2557
2558 2011-09-27  Pascal Obry  <obry@adacore.com>
2559
2560         * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
2561         OS_Interface.pthread_rwlock_t.
2562
2563 2011-09-27  Robert Dewar  <dewar@adacore.com>
2564
2565         * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
2566         a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
2567         sem_ch5.adb, sem_util.adb: Minor reformatting.
2568
2569 2011-09-27  Pascal Obry  <obry@adacore.com>
2570
2571         * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
2572         (Finalize_Lock)[RW_Lock]: Likewise.
2573         (Write_Lock)[RW_Lock]: Likewise.
2574         (Unlock)[RW_Lock]: Likewise.
2575         (Read_Lock): Define L as RW_Lock (instead of Lock).
2576         * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
2577         routine for r/w lock.
2578         (Finalize_Lock)[RW_Lock]: Likewise.
2579         (Write_Lock)[RW_Lock]: Likewise.
2580         (Unlock)[RW_Lock]: Likewise.
2581         (Read_Lock): Define L as RW_Lock (instead of Lock).
2582
2583         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2584         s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
2585         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2586         (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
2587         routine for standard lock.
2588         (Finalize_Lock)[RW_Lock]: Likewise.
2589         (Write_Lock)[RW_Lock]: Likewise.
2590         (Unlock)[RW_Lock]: Likewise.
2591         (Read_Lock): Define L as RW_Lock (instead of Lock).
2592         * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
2593         in the record definition.
2594         * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
2595         lock for 'R' locking policy.
2596         (Initialize_Protection): Likewise.
2597         (Lock): Likewise.
2598         (Lock_Read_Only): Likewise.
2599         (Unlock): Likewise.
2600         * s-taspri-posix.ads (RW_Lock): New type defined as
2601         OS_Interface.pthread_rwlock_t.
2602
2603         * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
2604         s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
2605         s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
2606         s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
2607
2608 2011-09-27  Pascal Obry  <obry@adacore.com>
2609
2610         * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
2611
2612 2011-09-27  Pascal Obry  <obry@adacore.com>
2613
2614         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2615         s-osinte-hpux.ads, s-osinte-irix.ads,
2616         s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
2617         pthread_mutex_t.
2618         (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
2619         * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
2620         pthread_rwlockattr_init, pthread_rwlockattr_destroy,
2621         pthread_rwlockattr_setkind_np, pthread_rwlock_init,
2622         pthread_rwlock_destroy, pthread_rwlock_rdlock,
2623         pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
2624
2625 2011-09-27  Pascal Obry  <obry@adacore.com>
2626
2627         * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
2628         (RE_Id): Add RE_Lock_Read_Only.
2629         (RE_Unit_Table): Likewise.
2630         * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
2631         to lift restriction on first character. Handle now the
2632         Name_Concurrent_Readers_Locking where policy character is set to
2633         'R'.
2634         * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
2635         constant.
2636         * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
2637         read only lock for function in protected object.
2638         * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
2639         this routine is now used.
2640
2641 2011-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2642
2643         * s-atocou-x86.adb (Decrement): Use %;.
2644         (Increment): Likewise.
2645
2646 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2647
2648         * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
2649         dereference of the pointer to the storage area.  Remove useless type
2650         conversions and factor out common code.
2651
2652 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2653
2654         * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
2655         variable and use it throughout.
2656         <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
2657         <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
2658         first step.  Also convert to the unpadded type as a last step.
2659
2660 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2661
2662         * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
2663         DECL_CHAIN in comment.
2664         * gcc-interface/trans.c (gigi): Likewise.
2665         (Attribute_to_gnu): Likewise.
2666         (build_function_stub): Likewise.
2667         (gnat_to_gnu): Likewise.
2668         * gcc-interface/utils.c (create_subprog_decl): Likewise.
2669         (convert_vms_descriptor64): Likewise.
2670         (convert_vms_descriptor32): Likewise.
2671
2672 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2673
2674         * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
2675         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
2676         issues.  Use COMPLETE_TYPE_P in assertion.  Also set TREE_READONLY if
2677         the type of the record is TYPE_READONLY.
2678
2679 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2680             Robert Dewar  <dewar@adacore.com>
2681
2682         * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
2683         OUT formal parameter which is of an null-exclusion access subtype.
2684
2685 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2686
2687         * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
2688         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
2689         (gnat_to_gnu_param): Likewise.
2690         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
2691         maybe_unconstrained_array instead of doing the work manually.
2692         (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
2693         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
2694         is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
2695         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
2696         (gnat_stabilize_reference): Likewise.
2697
2698 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2699
2700         * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
2701         (SET_TYPE_NULL_BOUNDS): Likewise.
2702         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
2703         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
2704         * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
2705         pointer types.
2706         * gcc-interface/utils.c (create_var_decl_1): If the object is external,
2707         check that the initializer is a valid constant expression for use in
2708         initializing a static variable.  Add missing guard.
2709         (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
2710         (convert_to_fat_pointer): In the null fat pointer case, build a valid
2711         pointer for the bounds.
2712         * gcc-interface/utils2.c (compare_fat_pointers): New function.
2713         (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
2714
2715 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2716
2717         * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
2718         * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
2719         the by-ref case.  Do not set TREE_READONLY on a renamed object.  Set
2720         TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
2721         (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
2722         to the indirect case.
2723         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
2724         the TREE_THIS_NOTRAP flag.
2725
2726 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2727
2728         * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
2729         iteration scheme, always generate the do-while form if optimization
2730         is enabled.  Use more straightforward test at the end.
2731
2732 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2733
2734         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
2735         XNEW instead of xmalloc.  Do not build useless pointer type.
2736         <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
2737         * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
2738         * gcc-interface/utils2.c (build_unary_op): Remove local variable.
2739
2740 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2741
2742         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
2743         the alignment if this doesn't prevent BLKmode access to the object.
2744
2745 2011-09-24  Iain Sandoe  <iains@gcc.gnu.org>
2746
2747         * gcc-interface/Makefile.in (darwin): Do not issue the
2748         '-flat_namespace' linker flag during Ada build.
2749         * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
2750         default shared library options.
2751
2752 2011-09-19  Alexandre Oliva  <aoliva@redhat.com>
2753
2754         * gcc-interface/decl.c (annotate_value): Look up expression for
2755         insertion in the cache at the end.
2756
2757 2011-09-19  Arnaud Charlet  <charlet@adacore.com>
2758
2759         * gcc-interface/Make-lang.in: Update dependencies.
2760
2761 2011-09-19  Steve Baird  <baird@adacore.com>
2762
2763         * snames.ads-tmpl: Move declaration of Name_Annotate into range of
2764         configuration pragma names so that Is_Configuration_Pragma_Name
2765         will return True for Name_Annotate.  Make corresponding change in
2766         Pragma_Id enumeration type.  This is needed to allow an Annotate
2767         pragma to occur in a configuration pragma file (typically,
2768         a gnat.adc file).
2769         * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
2770         * gnat_rm.texi: Note that pragma Annotate may be used as a
2771         configuration pragma.
2772
2773 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
2774
2775         * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
2776         a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
2777
2778 2011-09-19  Yannick Moy  <moy@adacore.com>
2779
2780         * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
2781         for expansion of set membership.
2782         (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
2783         * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
2784         visible for use in Alfa expansion.
2785         * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
2786         variable in Alfa mode.
2787
2788 2011-09-19  Thomas Quinot  <quinot@adacore.com>
2789
2790         * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
2791
2792 2011-09-19  Thomas Quinot  <quinot@adacore.com>
2793
2794         * exp_ch9.adb: Minor reformatting.
2795
2796 2011-09-19  Hristian Kirtchev  <kirtchev@adacore.com>
2797
2798         * freeze.adb (Build_Renamed_Body): Generic subprograms
2799         instantiations cannot be poperly inlined by the compiler, do
2800         not set the Body_To_Inline attribute in such cases.
2801         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
2802         inlining-related flags from the generic subprogram declaration.
2803
2804 2011-09-19  Thomas Quinot  <quinot@adacore.com>
2805
2806         * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
2807         (Build_Stub_Type): Remove, instead copy components from
2808         System.Partition_Interface.RACW_Stub_Type.
2809         (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
2810         (Copy_Component_List): New subprogram.
2811
2812 2011-09-19  Yannick Moy  <moy@adacore.com>
2813
2814         * lib-xref.adb (Generate_Reference): Ignore references to
2815         constants in Standard.
2816
2817 2011-09-19  Robert Dewar  <dewar@adacore.com>
2818
2819         * err_vars.ads, errout.ads: Minor reformatting.
2820
2821 2011-09-19  Robert Dewar  <dewar@adacore.com>
2822
2823         * aspects.ads (Impl_Defined_Aspects): New array
2824         * lib-writ.adb (No_Dependences): New name for No_Dependence
2825         * restrict.adb (No_Dependences): New name for No_Dependence
2826         (Check_Restriction_No_Specification_Of_Aspect): New
2827         procedure.
2828         (Set_Restriction_No_Specification_Of_Aspect): New procedure
2829         (Restricted_Profile_Result): New variable
2830         (No_Specification_Of_Aspects): New variable
2831         (No_Specification_Of_Aspect_Warning): New variable
2832         * restrict.ads (No_Dependences): New name for No_Dependence
2833         (Check_Restriction_No_Specification_Of_Aspect): New procedure
2834         (Set_Restriction_No_Specification_Of_Aspect): New procedure
2835         * s-rident.ads: Add restriction
2836         No_Implementation_Aspect_Specifications, this is also added to
2837         the No_Implementation_Extensions profile.
2838         * sem_ch13.adb (Analyze_Aspect_Specifications): Check
2839         No_Implementation_Defined_Aspects
2840         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2841         * sem_prag.adb (Analyze_Aspect_Specifications): Check
2842         No_Implementation_Aspects
2843         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2844         * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
2845
2846 2011-09-19  Yannick Moy  <moy@adacore.com>
2847
2848         * lib-xref.adb (Generate_Reference): Take into account multiple
2849         renamings for Alfa refs.
2850
2851 2011-09-19  Thomas Quinot  <quinot@adacore.com>
2852
2853         * g-socthi-mingw.adb: Minor reformatting.
2854
2855 2011-09-19  Yannick Moy  <moy@adacore.com>
2856
2857         * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
2858         expansion to False in mode Alfa
2859
2860 2011-09-19  Pascal Obry  <obry@adacore.com>
2861
2862         * mingw32.h: Remove obsolete code needed for old versions
2863         of MingW.
2864
2865 2011-09-19  Robert Dewar  <dewar@adacore.com>
2866
2867         * errout.ads: Minor reformatting.
2868
2869 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
2870
2871         * sem_ch6.adb (Analyze_Expression_Function): When the expression
2872         function is transformed into a declaration and a body, insert
2873         body at the end of the declarative part, to prevent premature
2874         freeze actions, and preserve original specification in the
2875         subprogram declaration.
2876
2877 2011-09-19  Vincent Celier  <celier@adacore.com>
2878
2879         * projects.texi: Minor editing.
2880
2881 2011-09-19  Robert Dewar  <dewar@adacore.com>
2882
2883         * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
2884         exp_aggr.adb: Minor reformatting.
2885
2886 2011-09-19  Yannick Moy  <moy@adacore.com>
2887
2888         * lib-xref.adb (Generate_Reference): Change entity referenced
2889         to underlying object if any, or else reference to the HEAP.
2890
2891 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
2892
2893         * gcc-interface/Make-lang.in: Update dependencies.
2894
2895 2011-09-15  Robert Dewar  <dewar@adacore.com>
2896
2897         * tree_io.ads: Minor reformatting.
2898         * a-intnam.ads: Fix bad header.
2899
2900 2011-09-15  Thomas Quinot  <quinot@adacore.com>
2901
2902         * a-exexpr-gcc.adb: Minor reformatting.
2903
2904 2011-09-15  Yannick Moy  <moy@adacore.com>
2905
2906         * sem_ch6.adb: Propagate information that an expression function comes
2907         from source (otherwise references to this entity are not stored).
2908
2909 2011-09-15  Robert Dewar  <dewar@adacore.com>
2910
2911         * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
2912         a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
2913         a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2914
2915 2011-09-15  Ed Schonberg  <schonberg@adacore.com>
2916
2917         * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
2918         if the expression function is not a completion, create a
2919         new specification for the generated declaration, and keep the
2920         original specification in the generated body. Shorter code also
2921         ensures that proper warnings are generated for unused formals
2922         in all cases.
2923
2924 2011-09-15  Sergey Rybin  <rybin@adacore.com>
2925
2926         * tree_io.ads: Update ASIS_Version_Number because of the changes
2927         in the tree structures for expression functions.
2928
2929 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
2930
2931         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2932         s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
2933         s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
2934         (CLOCK_REALTIME): Fix wrong value on some OSes.
2935         * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
2936
2937 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2938
2939         * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
2940         to unconstrained array case, deal with each branch of a COND_EXPR.
2941         * gcc-interface/utils2.c (build_allocator): Deal with each branch of
2942         a COND_EXPR in the initializer, if present.
2943
2944 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2945
2946         * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
2947         of an addressable type.
2948         * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
2949         Deal with those cases for which creating a temporary is mandatory.
2950
2951 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2952
2953         * gcc-interface/trans.c (call_to_gnu): Use local variable.  Make sure
2954         this is a real formal parameter before testing whether it is by ref.
2955
2956 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2957
2958         * gcc-interface/gigi.h (build_call_0_expr): Delete.
2959         (build_call_1_expr): Likewise.
2960         (build_call_2_expr): Likewise.
2961         (build_call_n_expr): New prototype.
2962         * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
2963         * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
2964         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2965         (Exception_Handler_to_gnu_zcx): Likewise.
2966         (gnat_to_gnu): Likewise.
2967         (build_binary_op_trapv): Likewise.
2968         * gcc-interface/utils2.c (build_call_0_expr): Delete.
2969         (build_call_1_expr): Likewise.
2970         (build_call_2_expr): Likewise.
2971         (build_call_n_expr): New function.
2972         (build_call_raise): Use build_call_n_expr.
2973         (build_call_raise_range): Likewise.
2974         (build_call_raise_column): Likewise.
2975         (build_call_alloc_dealloc_proc): Likewise.
2976         (maybe_wrap_malloc): Likewise.
2977         (maybe_wrap_free): Likewise.
2978
2979 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2980
2981         * gcc-interface/trans.c (build_return_expr): Use void_type_node for
2982         MODIFY_EXPR.
2983         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
2984         the result type is null if ENABLE_CHECKING.  Set operation_type at the
2985         end unconditionally if not set in the previous cases.
2986         Use build2 and void_type_node for MODIFY_EXPR.
2987         (build_allocator): Use NULL_TREE for MODIFY_EXPR.
2988
2989 2011-09-08  Eric Botcazou  <ebotcazou@adacore.com>
2990
2991         * gcc-interface/utils.c (unchecked_convert): Use a field of the right
2992         precision when converting to or from an integral type whose precision
2993         is not equal to its size.
2994
2995 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
2996
2997         * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
2998
2999 2011-09-07  Iain Sandoe  <iains@gcc.gnu.org>
3000
3001         * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
3002         implementation.
3003         * system-darwin-ppc64.ads: New file.
3004
3005 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3006
3007         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
3008         reference to "-lm".
3009
3010 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3011
3012         * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
3013         size switches to the link phase for shared libs.
3014
3015 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3016
3017         * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
3018         LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
3019
3020 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3021
3022         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
3023         (gnattools, regnattools, cross-gnattools, canadian-gnattools,
3024         gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
3025         New targets.
3026         (TOOLS_FLAGS_TO_PASS): New.
3027         (../stamp-tools): Reintroduce, to avoid merge conflicts.
3028
3029 2011-09-06  Robert Dewar  <dewar@adacore.com>
3030
3031         * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
3032         name for Is_RM_Defined_Unit. Also several fixes to this unit.
3033
3034 2011-09-06  Robert Dewar  <dewar@adacore.com>
3035
3036         * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
3037         * s-rident.ads: New restriction No_Implementation_Units
3038         (this restriction is also part of the profile
3039         No_Implementation_Extensions)
3040         * sem_ch10.adb (Analyze_With_Clause): Add check for
3041         No_Implementation_Units restriction.
3042
3043 2011-09-06  Jerome Guitton  <guitton@adacore.com>
3044
3045         * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
3046         on vThreads.
3047
3048 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3049
3050         * s-solita.adb: Minor reformatting.
3051
3052 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3053
3054         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
3055         is a rewriting of an expression function does not freeze previous
3056         entities.
3057
3058 2011-09-06  Robert Dewar  <dewar@adacore.com>
3059
3060         * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
3061
3062 2011-09-06  Tristan Gingold  <gingold@adacore.com>
3063
3064         * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
3065         powerpc-wrs-vxworksae.
3066
3067 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3068
3069         * s-os_lib.ads (Spawn): Minor documentation clarification,
3070         Success is True for a zero exit status.
3071
3072 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3073
3074         * sem_ch5.adb: Add message for common iterator error.
3075
3076 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3077
3078         * exp_ch3.adb (Build_Initialization_Call): If the target is a
3079         selected component discriminated by a current instance, replace
3080         the constraint with a reference to the target object, regardless
3081         of whether the context is an init_proc.
3082
3083 2011-09-06  Robert Dewar  <dewar@adacore.com>
3084
3085         * exp_attr.adb: Descriptor_Size is never static.
3086
3087 2011-09-06  Robert Dewar  <dewar@adacore.com>
3088
3089         * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3090
3091 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3092
3093         * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3094         non-static.
3095
3096 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3097
3098         * sem_res.adb (Resolve): An expression that is the body of an
3099         expression function does not freeze.
3100
3101 2011-09-06  Matthew Heaney  <heaney@adacore.com>
3102
3103         * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3104         a-cuprqu.adb: Changed copyright notice to indicate current
3105         year only.
3106
3107 2011-09-06  Vincent Celier  <celier@adacore.com>
3108
3109         * prj.adb: Minor spelling error fix in comment
3110         * sem_res.adb: Minor reformatting
3111
3112 2011-09-06  Pascal Obry  <obry@adacore.com>
3113
3114         * sysdep.c (winflush_nt): Removed as not needed anymore.
3115         (winflush_95): Likewise.
3116         (winflush_init): Likewise.
3117         (winflush_function): Likewise.
3118         (getc_immediate_common): Remove call to winflush_function.
3119
3120 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3121
3122         * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3123         processing for Descriptor_Size.
3124         * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3125         to account for its broader usage.
3126         * sem_attr.adb (Analyze_Attribute): Change the error detection
3127         circuitry for Descriptor_Size as the attribute is now applicable
3128         to all types.
3129
3130 2011-09-06  Robert Dewar  <dewar@adacore.com>
3131
3132         * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3133
3134 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3135
3136         * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3137         in a parameter association must not set the Referenced flag on
3138         the formal.
3139         * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3140
3141 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3142
3143         * gnat_rm.texi: Add a section on attribute Descriptor_Size
3144
3145 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3146
3147         * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3148         gnatlink-re): Speed up by using -j0.
3149
3150 2011-09-06  Yannick Moy  <moy@adacore.com>
3151
3152         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3153         Set_Corresponding_Aspect when creating pragma from aspect.
3154         (Add_Predicates): Use new field Corresponding_Aspect.
3155         * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3156         name when present, for the purpose of issuing error messages;
3157         remove local procedure Error_Pragma_Arg_Alternate_Name.
3158         * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3159         N_Pragma node.
3160         (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3161         N_Pragma node.
3162
3163 2011-09-06  Robert Dewar  <dewar@adacore.com>
3164
3165         * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3166
3167 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3168
3169         * exp_ch6.adb (Build_Heap_Allocator): Add new
3170         local variable Desig_Typ. Code and comment reformatting. Add
3171         machinery to ensure that the allocation uses a fat pointer when
3172         the type of the return object is a constrained array and the
3173         function return type is an unconstrained array.
3174
3175 2011-09-06  Vincent Celier  <celier@adacore.com>
3176
3177         * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3178         parameters in subprograms.
3179
3180 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3181
3182         * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3183
3184 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3185
3186         * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3187         (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3188         subprogram.
3189         (System.Tasking.Primitive_Operations.Specific.Set): If argument
3190         is null, destroy task specific data, to make API consistent with
3191         other platforms, and thus compatible with the shared version
3192         of s-tpoaal.adb.
3193         (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3194         Document the above assumption.
3195
3196 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3197
3198         * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3199         variable for type of return value when return type is
3200         unconstrained and context is an assignment.
3201
3202 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3203
3204         * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3205         class-wide operation if expansion is not enabled.
3206
3207 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3208
3209         * checks.adb (Apply_Scalar_Range_Check): Deal with access
3210         type prefix.
3211
3212 2011-09-06  Yannick Moy  <moy@adacore.com>
3213
3214         * sem_ch13.adb (Analyze_Aspect_Specifications, case
3215         Aspect_Invariant): Do not issue error at this point on illegal
3216         pragma placement, as this is checked later on when analyzing
3217         the corresponding pragma.
3218         * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3219         similar to Error_Pragma_Arg, except the source name of the
3220         aspect/pragma to use in warnings may be equal to parameter
3221         Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3222         message to distinguish source name of pragma/aspect, and whether
3223         the illegality resides in the type being public, or being private
3224         without a public declaration
3225
3226 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3227
3228         * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3229         size check (fd_set is implemented differently on that platform).
3230
3231 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3232
3233         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3234         s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3235         s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3236         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3237         (ATCB_Allocation): New subpackage of
3238         System.Tasking.Primitive_Operations, shared across all targets
3239         with full tasking runtime.
3240         (ATCB_Allocation.New_ATCB): Moved there (from target specific
3241         s-taprop bodies).
3242         (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3243         taking care of establishing a local temporary ATCB if the one
3244         being deallocated is Self, to avoid a reference to the freed
3245         ATCB in Abort_Undefer.
3246
3247 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3248
3249         * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3250         terminated, mark it for deallocation upon termination.
3251         (Terminate_Task): Call Free_Task again if the task is marked
3252         for automatic deallocation upon termination.
3253
3254 2011-09-06  Robert Dewar  <dewar@adacore.com>
3255
3256         * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3257         a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3258         a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3259         a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3260         a-intnam-solaris.ads, a-intnam-tru64.ads,
3261         a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3262         cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3263         * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3264         * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3265         * s-rident.ads: Add new restriction No_Implementation_Identifiers
3266         Add new profile No_Implementation_Extensions
3267         * sem_prag.adb: Implement pragma Implementation_Defined Implement
3268         profile No_Implementation_Extensions
3269         * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3270         Check violation of restriction No_Implementation_Identifiers
3271         * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3272         Add entry for Name_No_Implementation_Extensions
3273
3274 2011-09-06  Robert Dewar  <dewar@adacore.com>
3275
3276         * impunit.ads: Minor reformatting.
3277
3278 2011-09-06  Robert Dewar  <dewar@adacore.com>
3279
3280         * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3281
3282 2011-09-06  Pascal Obry  <obry@adacore.com>
3283
3284         * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3285         types.
3286
3287 2011-09-06  Robert Dewar  <dewar@adacore.com>
3288
3289         * g-socket.adb: Minor reformatting
3290
3291 2011-09-06  Javier Miranda  <miranda@adacore.com>
3292
3293         * ali.adb (Scan_ALI): Add missing support to load references of
3294         entities imported from other languages.
3295         * ali.ads (Xref_Record): Adding new fields to store the language and
3296         name of an imported entity.
3297         * lib-xref.adb (Output_Import_Export_Info): Fix typo
3298         in comment.
3299
3300 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3301
3302         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3303         is allowed on a full type declaration if it is the completion of
3304         a private declarations.
3305         * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3306         aspect is allowed on a full type declaration in the private part
3307         of a package.
3308
3309 2011-09-06  Robert Dewar  <dewar@adacore.com>
3310
3311         * sem_ch8.ads: Minor reformatting
3312
3313 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3314
3315         * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3316         Guard against socket values that are not in [0;FD_SETSIZE[
3317
3318 2011-09-06  Robert Dewar  <dewar@adacore.com>
3319
3320         * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3321         reformatting.
3322
3323 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3324
3325         * s-linux-alpha.ads: Minor reformatting
3326         * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3327         Use sizeof instead of corresponding C defines in s-oscons template.
3328
3329 2011-09-06  Vadim Godunko  <godunko@adacore.com>
3330
3331         * a-convec.ads, a-iteint.ads: Minor reformatting.
3332
3333 2011-09-06  Vincent Celier  <celier@adacore.com>
3334
3335         * projects.texi: Add menus and @node lines.
3336
3337 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3338
3339         * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3340         where the return type is an unconstrained array and the context
3341         is an assignment. Optimize the case when the target of the
3342         assignment is a selected component.
3343
3344 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3345
3346         * s-solita.adb: Update comments.
3347
3348 2011-09-06  Pascal Obry  <obry@adacore.com>
3349
3350         * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3351         s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3352         * s-oscons-tmplt.c: Add support for generating pthread related
3353         types size on GNU/Linux as done for Darwin.
3354         * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3355
3356 2011-09-06  Robert Dewar  <dewar@adacore.com>
3357
3358         * exp_ch6.adb: Fix minor typo.
3359
3360 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3361
3362         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3363         (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3364         (Double_Size_Of): Alphabetized. Update the comment on usage.
3365         (Make_Finalize_Address_Stmts): Update comments and reformat code.
3366         (Nearest_Multiple_Rounded_Up): New routine.
3367         (Size_Of): Update comment on usage. The generated expression now
3368         accounts for alignment gaps by rounding the size of the type to the
3369         nearest multiple rounded up of the type's alignment.
3370
3371 2011-09-06  Robert Dewar  <dewar@adacore.com>
3372
3373         * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3374
3375 2011-09-06  Steve Baird  <baird@adacore.com>
3376
3377         * exp_ch4.adb (Expand_Allocator_Expression): Look through
3378         derived subprograms in checking for presence of an
3379         Extra_Accessibility_Of_Result formal parameter.
3380         * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3381         checking for presence of an Extra_Accessibility_Of_Result formal
3382         parameter.
3383         (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3384         case where the Parameter_Associatiations attribute is already set,
3385         but set to an empty list.
3386         (Needs_Result_Accessibility_Level):
3387         Unconditionally return False. This is a temporary
3388         change, disabling the Extra_Accessibility_Of_Result
3389         mechanism.
3390         (Expand_Simple_Function_Return): Check for
3391         Extra_Accessibility_Of_Result parameter's presence instead of
3392         testing Ada_Version when generating a runtime accessibility
3393         check which makes use of the parameter.
3394
3395 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3396
3397         * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3398         expression in a given case alternative must be attached to the
3399         statement list of the ccrresponding case statement alternative
3400         They cannot be propagated ahead of the case statement, because
3401         the validity of the expression that generated the action may
3402         hold only for that alternative.
3403
3404 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3405
3406         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3407         (Alignment_Of): Remove the code for strict alignment targets.
3408         (Double_Alignment_Of): Removed.
3409         (Double_Size_Of): New routine.
3410         (Make_Finalize_Address_Stmts): Change the
3411         calculation of the dope's size.  Update relevant comments.
3412         (Size_Of): New routine.
3413
3414 2011-09-06  Steve Baird  <baird@adacore.com>
3415
3416         * einfo.ads (Extra_Accessibility): Update associated comment to use
3417         the term "present" correctly ("present" just means that it is not
3418         an error to query the value of the attribute - it does not imply
3419         that the value must be non-null).
3420         (Extra_Constrained): Ditto.
3421         (Is_Visible_Formal): Ditto.
3422         (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3423         (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3424         * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3425         * exp_ch6.adb (Expand_Call): The callee may require an
3426         Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3427         < Ada_2012. This can occur if the callee is exported from a Gnat
3428         runtimes unit. Also improve a comment.
3429
3430 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3431
3432         * exp_ch7.adb: Add with and use clauses for Get_Targ.
3433         (Alignment_Of): Rename formal parameter Some_Typ
3434         to Typ, update related comment. Use the allocator alignment on
3435         strict alignment targets such as SPARC.
3436         (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3437         related comment.
3438
3439 2011-09-06  Gary Dismukes  <dismukes@adacore.com>
3440
3441         * sem_ch9.adb (Check_Interfaces): Test
3442         Is_Limited_Type rather than Is_Limited_Record when checking that
3443         the partial view of a synchronized full view must be limited.
3444
3445 2011-09-06  Emmanuel Briot  <briot@adacore.com>
3446
3447         * g-comlin.adb (Free): Fix memory leak.
3448
3449 2011-09-06  Robert Dewar  <dewar@adacore.com>
3450
3451         * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
3452
3453 2011-09-06  Steve Baird  <baird@adacore.com>
3454
3455         * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
3456         (Ada2012) cases described in AI05-0234 where the accessibility
3457         level of a function result is "determined by the point of
3458         call", an implicit parameter representing that accessibility
3459         level is passed in. Extra_Accessibilty_Of_Result yields this
3460         additional formal parameter. Extra_Accessibility_Of_Result
3461         is analogous to the existing Extra_Accessibility
3462         function used in the implementation of access parameters.
3463         (Set_Extra_Accessibility_Of_Result): New procedure; sets
3464         Extra_Accessibility_Of_Result attribute.
3465         * einfo.adb (Extra_Accessibility_Of_Result): New function.
3466         (Set_Extra_Accessibility_Of_Result): New procedure.
3467         (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
3468         * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
3469         an accessibility level literal to Natural; introduce a nested
3470         function, Make_Level_Literal, to do this.
3471         * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
3472         determines whether a given function (or access-to-function
3473         type) needs to have an implicitly-declared accessibility-level
3474         parameter added to its profile.
3475         (Add_Extra_Actual_To_Call): Export an existing procedure which was
3476         previously declared in the body of Exp_Ch6.
3477         * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
3478         it to exp_ch6.ads.
3479         (Has_Unconstrained_Access_Discriminants): New Function; a
3480         predicate on subtype entities which returns True if the given
3481         subtype is unconstrained and has one or more access discriminants.
3482         (Expand_Call): When expanding a call to a function which takes an
3483         Extra_Accessibility_Of_Result parameter, pass in the appropriate
3484         actual parameter value. In the case of a function call which is
3485         used to initialize an allocator, this may not be possible because
3486         the Etype of the allocator may not have been set yet. In this
3487         case, we defer passing in the parameter and handle it later in
3488         Expand_Allocator_Expression.
3489         (Expand_Simple_Function_Return): When returning from a function which
3490         returns an unconstrained subtype having at least one access
3491         discriminant, generate the accessibility check needed to ensure that
3492         the function result will not outlive any objects designated by its
3493         discriminants.
3494         (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
3495         description.
3496         * exp_ch4.adb (Expand_Allocator_Expression): When a function call
3497         is used to initialize an allocator, we may need to pass in "the
3498         accessibility level determined by the point of call" (AI05-0234)
3499         to the function. Expand_Call, where such actual parameters are
3500         usually generated, is too early in this case because the Etype of
3501         the allocator (which is used in determining the level to be passed
3502         in) may not have been set yet when Expand_Call executes. Instead,
3503         we generate code to pass in the appropriate actual parameter
3504         in Expand_Allocator_Expression.
3505         * sem_ch6.adb (Create_Extra_Formals): Create
3506         the new Extra_Accessibility_Of_Result formal if
3507         Needs_Result_Accessibility_Level returns True. This includes the
3508         introduction of a nested procedure, Check_Against_Result_Level.
3509
3510 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3511
3512         * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
3513         declaration.
3514
3515 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3516
3517         * s-finmas.adb (Set_Finalize_Address): Explain the reason
3518         for the synchronization. Move the test for null from
3519         s-stposu.Allocate_Any_Controlled to this routine since the check
3520         needs to be protected too.
3521         (Set_Heterogeneous_Finalize_Address): Explain the reason for the
3522         synchronization code.
3523         * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
3524         explaining the context in which this routine is used.
3525         * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
3526         to s-finmas.Set_Finalize_Address.
3527
3528 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3529
3530         * einfo.ads: Document that itypes have no parent field.
3531
3532 2011-09-05  Robert Dewar  <dewar@adacore.com>
3533
3534         * rtsfind.adb (Check_CRT): Check for overloaded entity
3535         * rtsfind.ads: Document that entities to be found by rtsfind
3536         cannot be overloaded
3537         * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
3538         (Lock_Entries_With_Status): New name for Lock_Entries with two
3539         arguments (changed to meet rtsfind no overloading rule).
3540
3541 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3542
3543         * s-finmas.adb (Set_Finalize_Address (Address,
3544         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3545         (Set_Finalize_Address (in out Finalization_Master,
3546         Finalize_Address_Ptr): Add synchronization code.
3547         * s-finmas.ads (Set_Finalize_Address (Address,
3548         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3549         * s-stposu.adb (Allocate_Any_Controlled): Update the call to
3550         Set_Finalize_Address for the heterogeneous case.
3551
3552 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3553
3554         * sem_ch3.adb: Undo previous change, not suitable after all.
3555
3556 2011-09-05  Robert Dewar  <dewar@adacore.com>
3557
3558         * einfo.ads: Minor comment clarification.
3559
3560 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3561
3562         * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
3563         no longer needs to search through the entities of the return
3564         statement scope to find the _chain.
3565         * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
3566         (Analyze_Block_Statement): Add local variable
3567         Is_BIP_Return_Statement. Add machinery to install all entities
3568         produced by the expansion of the return object declaration.
3569         (Install_Return_Entities): New routine.
3570         * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
3571
3572 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3573
3574         * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
3575         of subunit is incomplete.
3576         (Analyze_Proper_Body): If parent spec is not available, do not
3577         attempt analysis.
3578
3579 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3580
3581         * sem_disp.adb (Find_Controlling_Arg): Add checks for
3582         interface type conversions, that are expanded into dereferences.
3583
3584 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3585
3586         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3587         Examine the parameter and return profile of a subprogram and swap
3588         any incomplete types coming from a limited context with their
3589         corresponding non-limited views.
3590         (Exchange_Limited_Views): New routine.
3591
3592 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3593
3594         * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
3595         of internal entity to the subtype declaration, so that when
3596         entities are subsequently exchanged in a package body, the tree
3597         remains properly formatted for ASIS.
3598
3599 2011-09-05  Johannes Kanig  <kanig@adacore.com>
3600
3601         * g-comlin.adb (Set_Usage): Additional optional argument to set help
3602         message.
3603         (Display_Help): display the user given help message, if available.
3604
3605 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3606
3607         * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
3608         is legal if the original node is an identifier that is a
3609         parameterless function call.
3610
3611 2011-09-05  Pascal Obry  <obry@adacore.com>
3612
3613         * prj-nmsc.adb: Minor reformatting.
3614         Add support for standalone aggregate library.
3615         (Check_Stand_Alone_Library): Handle standalone aggregate library.
3616         * projects.texi: Fix documentation for aggregate library projects.
3617
3618 2011-09-05  Robert Dewar  <dewar@adacore.com>
3619
3620         * sem_ch6.adb: Minor reformatting.
3621
3622 2011-09-05  Matthew Gingell  <gingell@adacore.com>
3623
3624         * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
3625         stack guard page on PPC Linux. This patch ensures the 64K guard page at
3626         the bottom of the stack is not overwritten.
3627
3628 2011-09-05  Thomas Quinot  <quinot@adacore.com>
3629
3630         * exp_intr.adb, s-tasini.adb: Minor reformatting.
3631
3632 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3633
3634         * sem_ch3.adb (Access_Definition): If an access type declaration
3635         appears in a child unit, the scope of whatever anonymous type
3636         may be generated is the child unit itself.
3637
3638 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3639
3640         * sem_ch6.adb (Analyze_Expression_Function): Do not set
3641         Comes_From_Source on rewritten body.
3642         (Analyze_Subprogram_Body_Helper): Check that the original node for
3643         the body comes from source, when determining whether expansion
3644         of a protected operation is needed.
3645
3646 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3647
3648         * exp_aggr.adb (Replace_Type): If the target of the assignment is
3649         a selected component and the right-hand side is a self-referential
3650         access, the proper prefix of the rewritten attribute is a copy
3651         of the left-hand side, not of its prefix.
3652
3653 2011-09-05  Robert Dewar  <dewar@adacore.com>
3654
3655         * sem_ch5.adb: Minor reformatting.
3656         * sem_ch3.adb: Minor code clean up.
3657
3658 2011-09-05  Jose Ruiz  <ruiz@adacore.com>
3659
3660         * exp_ch9.adb (Make_Initialize_Protection): The fact that
3661         restriction No_Dynamic_Attachment is in effect or not should
3662         not influence the default priority associated to a protected
3663         object. With this change, when the restriction is in effect (as
3664         is the case for the Ravenscar profile) the default priority of
3665         a protected object with an interrupt handler is in the range of
3666         interrupt priorities (Default_Interrupt_Priority) as required
3667         by D.3(10).
3668
3669 2011-09-05  Arnaud Charlet  <charlet@adacore.com>
3670
3671         * a-iteint.ads: Fix header.
3672
3673 2011-09-05  Vincent Celier  <celier@adacore.com>
3674
3675         * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
3676         with a directory separator to avoid output such as:
3677           "/path/to/objauto.cgpr" has been deleted.
3678
3679 2011-09-05  Robert Dewar  <dewar@adacore.com>
3680
3681         * sem_ch3.adb: Minor reformatting.
3682
3683 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3684
3685         * sem_ch5.adb: Better error message.
3686
3687 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3688
3689         * exp_aggr.adb: Add with and use clause for Exp_Ch6.
3690         (Expand_Array_Aggregate): Detect a special case of an aggregate
3691         which contains tasks in the context of an unexpanded return
3692         statement of a build-in-place function.
3693         * exp_ch6.adb: Add with and use clause for Exp_Aggr.
3694         (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
3695         which contains tasks and expand it now that the original simple
3696         return statement has been rewritten.
3697         * exp_ch9.adb (Build_Activation_Chain_Entity): Code
3698         reformatting. Do not create a chain for an extended return
3699         statement if one is already available.
3700         (Has_Activation_Chain): New routine.
3701
3702 2011-09-05  Marc Sango  <sango@adacore.com>
3703
3704         * sem_ch3.adb (Analyze_Object_Declaration): Remove
3705         the wrong test and add the correct test to detect the violation
3706         of illegal use of unconstrained string type in SPARK mode.
3707
3708 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3709
3710         * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
3711         message on an iterator over an array.
3712
3713 2011-09-05  Robert Dewar  <dewar@adacore.com>
3714
3715         * lib-xref-alfa.adb: Minor reformatting.
3716
3717 2011-09-05  Robert Dewar  <dewar@adacore.com>
3718
3719         * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
3720         exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
3721
3722 2011-09-05  Gary Dismukes  <dismukes@adacore.com>
3723
3724         * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
3725
3726 2011-09-05  Johannes Kanig  <kanig@adacore.com>
3727
3728         * lib-xref-alfa.adb: Update comments.
3729
3730 2011-09-05  Thomas Quinot  <quinot@adacore.com>
3731
3732         * sem_res.adb: Minor reformatting
3733
3734 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3735
3736         * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
3737         present, create them now.  Needed in case the return type was
3738         a limited view in the function declaration.
3739         (Make_Build_In_Place_Call_In_Allocator): If return type contains
3740         tasks, build the activation chain for it.  Pass a reference to
3741         the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
3742         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
3743         with build_in_place calls.
3744         * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
3745         incomplete, inatialize its Corresponding_Record_Type component.
3746         * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
3747         of limited views.
3748
3749 2011-09-05  Johannes Kanig  <kanig@adacore.com>
3750
3751         * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
3752         information.
3753
3754 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3755
3756         * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
3757         appears within a package specification and the token after "IS"
3758         is not a parenthesis, assume that this is an unparenthesized
3759         expression function, even if the token appears in a line by
3760         itself.
3761         * par.adb: Clarify use of Labl field of scope stack in error
3762         recovery.
3763
3764 2011-09-05  Bob Duff  <duff@adacore.com>
3765
3766         * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
3767         conversions instead of normal type conversions in all cases where a
3768         type conversion would be illegal. In particular, use unchecked
3769         conversions when the operand types are private.
3770
3771 2011-09-05  Johannes Kanig  <kanig@adacore.com>
3772
3773         * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
3774         objects of task type or protected type.
3775
3776 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3777
3778         * sem_ch6.adb (Analyze_Expression_Function): If the expression
3779         function comes from source, indicate that so does its rewriting,
3780         so it is compatible with any subsequent expansion of the
3781         subprogram body (e.g. when it is a protected operation).
3782         * sem_ch4.adb: minor reformatting
3783
3784 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3785
3786         * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
3787         Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
3788         may lead to wrong ancestor package in the case of instantiated subunit
3789         bodies. If a subunit is instantiated, follow the chain of instantiations
3790         rather than the stub structure.
3791
3792 2011-09-02  Robert Dewar  <dewar@adacore.com>
3793
3794         * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
3795         * gcc-interface/Make-lang.in: Update dependencies.
3796
3797 2011-09-02  Marc Sango  <sango@adacore.com>
3798
3799         * sem_ch3.adb (Analyze_Object_Declaration): Change
3800         comment and add additional check to differentiate constant of
3801         type string from others unconstrained type.
3802
3803 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3804
3805         * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
3806         present in incomplete type declarations to refine the error
3807         message the full declaration is in the same unit.
3808         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
3809         an incomplete type, set the Premature_Use for additional message.
3810         * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
3811         and Premature_Use is set, place additional information at the
3812         point of premature use.
3813
3814 2011-09-02  Bob Duff  <duff@adacore.com>
3815
3816         * sem_ch6.adb: (Check_Post_State): Suppress warning
3817         "postcondition refers only to pre-state" when the expression has not
3818         yet been analyzed, because it causes false alarms. This can happen when
3819         the postcondition contains a quantified expression, because those are
3820         analyzed later. This is a temporary/partial fix.
3821         (Process_Post_Conditions): Minor: change wording of warning.
3822
3823 2011-09-02  Marc Sango  <sango@adacore.com>
3824
3825         * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
3826         illegal use of unconstrained string type in SPARK mode.
3827         * sem_res.adb (Analyze_Operator_Symbol): Set the
3828         right place where the string operand of concatenation should be
3829         violate in SPARK mode.
3830
3831 2011-09-02  Robert Dewar  <dewar@adacore.com>
3832
3833         * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
3834         exp_ch3.adb: Minor reformatting.
3835
3836 2011-09-02  Vincent Celier  <celier@adacore.com>
3837
3838         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
3839         as the compiler driver so Is_Compilable returns True for sources.
3840         * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
3841         for the body.
3842
3843 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3844
3845         * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
3846         condition, a reference to a controlling formal must be interpreted
3847         as having the class-wide type (or an access to such) so that the
3848         inherited condition can be properly applied to any overriding
3849         operation (see ARM12 6.6.1 (7)).
3850
3851 2011-09-02  Tristan Gingold  <gingold@adacore.com>
3852
3853         * init.c (__gnat_is_vms_v7): Fix case and add prototype
3854         for LIB$GETSYI.
3855
3856 2011-09-02  Javier Miranda  <miranda@adacore.com>
3857
3858         * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
3859         initializing expression of a class-wide interface object declaration
3860         if its type is limited.
3861
3862 2011-09-02  Johannes Kanig  <kanig@adacore.com>
3863
3864         * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
3865         literals, take into account the type name; the type is *not*
3866         the scope for an enumeration literal.
3867
3868 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3869
3870         * sem_ch6.adb (Check_Overriding_Indicator): add special check
3871         to reject an overriding indicator on a user-defined Adjust
3872         subprogram for a limited controlled type.
3873
3874 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3875
3876         * sem_res.adb (Resolve_Actuals): add missing call to Resolve
3877         for an actual that is a function call returning an unconstrained
3878         limited controlled type.
3879
3880 2011-09-02  Tristan Gingold  <gingold@adacore.com>
3881
3882         * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
3883
3884 2011-09-02  Johannes Kanig  <kanig@adacore.com>
3885
3886         * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
3887         from "HEAP" to __HEAP Change comment that refers to that variable
3888         * put_alfa.adb: Change comment that refers to that variable
3889
3890 2011-09-02  Robert Dewar  <dewar@adacore.com>
3891
3892         * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
3893
3894 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3895
3896         * exp_util.adb (Extract_Renamed_Object): Renamed to
3897         Find_Renamed_Object. This routine has been reimplemented and now uses
3898         tree traversal to locate a renamed object.
3899         (Is_Aliased): Replace call to Extract_Renamed_Object with
3900         Find_Renamed_Object.
3901
3902 2011-09-02  Tristan Gingold  <gingold@adacore.com>
3903
3904         * init.c: (__gnat_is_vms_v7): New function.
3905
3906 2011-09-02  Olivier Hainque  <hainque@adacore.com>
3907
3908         * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
3909         that have a misaligned backchain, necessarily bogus.
3910
3911 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3912
3913         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
3914         TSS routine Finalize_Address when compiling in Alfa mode.
3915         (Expand_Freeze_Record_Type): Do not create TSS routine
3916         Finalize_Address when compiling in Alfa mode.
3917         * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
3918         call to Set_Finalize_Address in Alfa mode because Finalize_Address is
3919         not built.
3920         (Expand_N_Allocator): Do not produce a call to
3921         Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
3922         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
3923         produce a call to primitive Set_Finalize_Address in Alfa mode because
3924         Finalize_Address is not built.
3925         * exp_ch7.adb (Build_Finalization_Master): Do not create
3926         finalization masters in Afa mode since they are not needed.
3927         (Build_Finalizer): Do not create scope and library-level
3928         finalizers in Alfa mode since they are not needed.
3929         * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
3930         "new" and "free" when applied to controlled objects in Alfa mode since
3931         this is not needed.
3932
3933 2011-09-02  Vincent Celier  <celier@adacore.com>
3934
3935         * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
3936         only library names with the syntax of Ada identifiers, to avoid errors
3937         when compiling the binder generated files.
3938         * projects.texi: Document restriction on SAL library names
3939
3940 2011-09-02  Thomas Quinot  <quinot@adacore.com>
3941
3942         * a-chtgbo.adb: Minor comment fix.
3943
3944 2011-09-02  Robert Dewar  <dewar@adacore.com>
3945
3946         * lib-xref.adb: Minor reformatting
3947
3948 2011-09-02  Vincent Celier  <celier@adacore.com>
3949
3950         * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
3951         gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
3952         --version and --help in usage.
3953         * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
3954
3955 2011-09-02  Bob Duff  <duff@adacore.com>
3956
3957         * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
3958         compilers don't understand it.
3959
3960 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
3961
3962         * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
3963         underlying subtype rather than its base type on the call to
3964         Build_Record_Or_Elementary_Input_Function, so that any
3965         constraints on a discriminated subtype will be available for
3966         doing the check required by AI05-0192.
3967         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3968         If the prefix subtype of the 'Input attribute is a constrained
3969         discriminated subtype, then check each constrained discriminant value
3970         against the corresponding value read from the stream.
3971
3972 2011-09-02  Yannick Moy  <moy@adacore.com>
3973
3974         * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
3975         warnings on suspicious contracts, and enable them with -gnatwa.
3976
3977 2011-09-02  Robert Dewar  <dewar@adacore.com>
3978
3979         * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
3980         reformatting.
3981
3982 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3983
3984         * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
3985         which ensure that restriction No_Dynamic_Attachment has not been
3986         violated.
3987         (Make_Initialize_Protection): Protected types with attach or
3988         interrupt handlers must not violate restriction No_Dynamic_Attachment.
3989         * exp_util.adb (Corresponding_Runtime_Package): Add a guard
3990         which ensures that restriction No_Dynamic_Attachment has not been
3991         violated.
3992         * sem_attr.adb: (Eval_Attribute): Transform
3993         VAX_Float_Type'First and 'Last into references to
3994         the temporaries which store the corresponding bounds. The
3995         transformation is needed since the back end cannot evaluate
3996         'First and 'Last on VAX.
3997         (Is_VAX_Float): New routine.
3998
3999 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4000
4001         * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
4002         generic unit is not intrinsic and has an explicit convention,
4003         the instance inherits it.
4004
4005 2011-09-02  Robert Dewar  <dewar@adacore.com>
4006
4007         * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
4008         prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
4009
4010 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4011
4012         * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
4013         Guard against a prefix that is an N_Has_Entity but has no
4014         associated entity.
4015
4016 2011-09-02  Yannick Moy  <moy@adacore.com>
4017
4018         * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
4019         references.
4020
4021 2011-09-02  Yannick Moy  <moy@adacore.com>
4022
4023         * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
4024         * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
4025         contracts.
4026         * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
4027         procedure looking for suspicious postconditions.
4028         * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
4029         * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
4030         options -gnatw.t and -gnatw.T.
4031
4032 2011-09-02  Pascal Obry  <obry@adacore.com>
4033
4034         * prj.adb: Minor code refactoring. Move check for null project in
4035         Project_Changed.
4036         * projects.texi: Fix minor typos.
4037
4038 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4039
4040         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4041         of iteration is an expression, its value must be captured in a
4042         renaming declaration, so that modification of the elements is
4043         propagated to the original container.
4044
4045 2011-09-02  Pascal Obry  <obry@adacore.com>
4046
4047         * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
4048         prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
4049         prj-tree.adb: Minor reformatting and style fixes.
4050
4051 2011-09-02  Robert Dewar  <dewar@adacore.com>
4052
4053         * s-rident.ads: Add new restriction No_Implicit_Aliasing
4054         * sem_attr.adb: (Analyze_Access_Attribute): Deal with
4055         No_Implicit_Aliasing
4056         (Analyze_Attribute, case Address): ditto
4057         (Analyze_Attribute, case Unrestricted_Access): ditto
4058         * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
4059         No_Implicit_Aliasing restriction.
4060         * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
4061
4062 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4063
4064         * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
4065         is an unchecked conversion, apply test to its expression.
4066
4067 2011-09-02  Javier Miranda  <miranda@adacore.com>
4068
4069         * sem_ch3.adb (Check_Abstract_Overriding): When
4070         traversing the chain of aliased subprograms avoid reporting a
4071         redundant error on the current entity.
4072
4073 2011-09-02  Sergey Rybin  <rybin@adacore.com>
4074
4075         * gnat_ugn.texi: Minor clean up.
4076
4077 2011-09-02  Bob Duff  <duff@adacore.com>
4078
4079         * s-htable.adb (Set_If_Not_Present): Use renaming
4080         instead of ":=", because the type Key is limited in the generic (even
4081         if not in the instances).
4082
4083 2011-09-02  Robert Dewar  <dewar@adacore.com>
4084
4085         * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4086         g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4087         reformatting.
4088
4089 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4090
4091         * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4092         inherited component with the enclosing derived type. Code reformatting.
4093
4094 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4095
4096         * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4097         return done when overflow checks are enabled, since comparisons against
4098         Lor and Hir should not be done when OK1 is False.
4099
4100 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4101
4102         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4103         Add new formal Master_Exp. When present, add that expression to the
4104         call as an extra actual.
4105         (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4106         Fmaster_Actual and in the case of a BIP call initializing a return
4107         object of an enclosing BIP function set it to a
4108         new reference to the implicit finalization master
4109         formal of the enclosing function. Fmaster_Actual is
4110         then passed to the new formal Master_Exp on the call to
4111         Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4112         initializations of Enclosing_Func to its declaration.
4113
4114 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4115
4116         * csets.ads: Minor reformatting
4117
4118 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4119
4120         * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4121         the full view of a private type coming from an instantiation.
4122         * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4123         loop to iterate over the declarations rather than use the
4124         First_Entity / Next_Entity scheme.
4125
4126 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4127
4128         * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4129         X'range (N) into X'First (N) ..  X'Last (N), do not share the
4130         dimension indicator N, if present. Even though it is a static
4131         constant, its source location may be modified when printing
4132         expanded code under -gnatDL, and node sharing will lead to chaos
4133         in Sprint on large files, by generating a sloc value that does
4134         not correspond to any source file.
4135
4136 2011-09-02  Bob Duff  <duff@adacore.com>
4137
4138         * einfo.adb: (Has_Xref_Entry): Do not call
4139         Implementation_Base_Type. Lib.Xref has been
4140         rewritten to avoid the need for it, and it was costly.
4141         * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4142         functions in support of efficient xref.
4143         * lib-xref-alfa.adb: Misc changes related to Key component of
4144         type Xref_Entry.
4145         * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4146         (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4147         no longer does. This is the one place where it is needed.
4148
4149 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4150
4151         * g-comlin.adb (Getopt): New optional argument Concatenate to have
4152         similar interface as the other Getopt function.
4153
4154 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4155
4156         * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4157         a call to Set_Finalize_Address if there is no allocator available.
4158         * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4159         a case of allocator expansion where the allocator is not expanded but
4160         needs a custom allocate routine. Code reformatting.
4161         (Is_Finalizable_Transient): Remove local variables Has_Rens and
4162         Ren_Obj. Code reformatting.
4163         (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4164         through the use of 'reference.
4165         * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4166         as part of build-in-place expansion. They are intentionally marked as
4167         coming from source, but their parents are not.
4168
4169 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4170
4171         * sem_ch10.adb (Analyze_With_Clause): If the library unit
4172         is the generated subprogram declaration for a child unit body
4173         that acts as spec, use the original body in the with_clause,
4174         to prevent binding errors.
4175
4176 2011-09-02  Vincent Celier  <celier@adacore.com>
4177
4178         * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4179         qualifier /MULTI_UNIT_INDEX=
4180
4181 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4182
4183         * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4184         instead of calling the callback function
4185
4186 2011-09-02  Robert Dewar  <dewar@adacore.com>
4187
4188         * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4189         prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4190
4191 2011-09-02  Vincent Celier  <celier@adacore.com>
4192
4193         * prj-nmsc.adb: (Find_Sources): When the list of sources is
4194         explicitly declared in an extending project, do not warn if a source
4195         for an inherited naming exception is not found.
4196
4197 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4198
4199         * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4200         expansion is inactive.
4201
4202 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4203
4204         * sem_util.adb (Note_Possible_Modification): If the entity
4205         being modified is the renaming generated for an Ada2012 iterator
4206         element, the enclosing container or array is modified as well.
4207
4208 2011-09-02  Jose Ruiz  <ruiz@adacore.com>
4209
4210         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4211         Initialize): Define and initialize the
4212         mutex attributes and condition variable attributes locally.
4213
4214 2011-09-02  Vincent Celier  <celier@adacore.com>
4215
4216         * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4217         exception replaced in an extending project.
4218         (Check_Object): No error when the other source is locally removed.
4219
4220 2011-09-02  Yannick Moy  <moy@adacore.com>
4221
4222         * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4223         unresolved calls.
4224
4225 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
4226
4227         * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4228         run-time files.
4229         * gcc-interface/Make-lang.in: Update dependencies.
4230
4231 2011-09-01  Robert Dewar  <dewar@adacore.com>
4232
4233         * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4234
4235 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4236
4237         * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4238         * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4239         __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4240         specific for systems where their glibc version does not define the
4241         routines to handle dynamically allocated CPU sets.
4242
4243 2011-09-01  Vincent Celier  <celier@adacore.com>
4244
4245         * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4246         prj-env.adb: Implement inheritance of naming exceptions in extending
4247         projects.
4248
4249 2011-09-01  Romain Berrendonner  <berrendo@adacore.com>
4250
4251         * gnatls.adb: Display simple message instead of content of
4252         gnatlic.adl.
4253
4254 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4255
4256         * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4257         access discriminant and anonymous access component scopes.
4258         (Inherit_Component): Reuse the itype of an access discriminant
4259         or anonymous access component by copying it in order to set the proper
4260         scope. This is done only when the parent and the derived type
4261         are in different scopes.
4262         (Set_Anonymous_Etype): New routine.
4263
4264 2011-09-01  Robert Dewar  <dewar@adacore.com>
4265
4266         * a-convec.adb: Minor reformatting throughout.
4267
4268 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4269
4270         * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4271         __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4272         CPU_ALLOC_SIZE and CPU_FREE linux macros.
4273         (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4274         CPU_SET_S respectively because we are now using dynamically allocated
4275         CPU sets which are more portable across different glibc versions.
4276         * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4277         CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4278         masks dynamically according to the number of processors in the target
4279         platform.
4280         (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4281         respectively, so we need to pass the size of the masks as
4282         parameters.
4283         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4284         created cpu_set_t masks
4285         with the number of processors available in the target platform,
4286         instead of static bit arrays. It enhances portability because
4287         it uses the information from the target platform.
4288         * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4289         are using a restricted run-time library, use the flag
4290         Configurable_Run_Time_Mode instead of Restricted_Profile.
4291
4292 2011-09-01  Vincent Celier  <celier@adacore.com>
4293
4294         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4295         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4296
4297 2011-09-01  Nicolas Roche  <roche@adacore.com>
4298
4299         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4300         on VxWorks in kernel mode.
4301
4302 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4303
4304         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4305         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4306         directly the bit array.
4307         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4308         the linux macros with the same name.
4309         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4310         wrappers around the CPU_ZERO and CPU_SET linux macros.
4311
4312 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4313
4314         * exp_ch7.adb (Find_Insertion_List): Removed.
4315         (Process_Transient_Objects): Insert the declarations of the hook
4316         access type and the hook object before the associated transient object.
4317
4318 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4319
4320         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4321         package System.Aux_Dec when using restricted run-time libraries which
4322         do not have this package.
4323
4324 2011-09-01  Tristan Gingold  <gingold@adacore.com>
4325
4326         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4327
4328 2011-09-01  Bob Duff  <duff@adacore.com>
4329
4330         * sem_attr.adb (Analyze_Access_Attribute): Do not call
4331         Kill_Current_Values for P'Unrestricted_Access, where P is library level
4332
4333 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4334
4335         * exp_ch5.adb: Minor reformatting
4336         * gnat_ugn.texi: Fix minor typos.
4337         * gcc-interface/Make-lang.in: Update dependencies.
4338
4339 2011-09-01  Robert Dewar  <dewar@adacore.com>
4340
4341         * inline.adb, sem_aggr.adb: Minor reformatting.
4342
4343 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4344
4345         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4346
4347 2011-09-01  Robert Dewar  <dewar@adacore.com>
4348
4349         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4350
4351 2011-09-01  Bob Duff  <duff@adacore.com>
4352
4353         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4354         body" the same as "in inlined body", because visibility shouldn't
4355         apply there.
4356
4357 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
4358
4359         * inline.adb (Add_Inlined_Body): Refine previous change.
4360
4361 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
4362
4363         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4364         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4365         Test for case where call
4366         initializes an object of a return statement before testing for
4367         a constrained call, to ensure that all such cases get handled
4368         by simply passing on the caller's parameters. Also, in that
4369         case call Needs_BIP_Alloc_Form to determine whether to pass on
4370         the BIP_Alloc_Form parameter of the enclosing function rather
4371         than testing Is_Constrained. Add similar tests for the return
4372         of a BIP call to later processing to ensure consistent handling.
4373         (Needs_BIP_Alloc_Form): New utility function.
4374         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4375         a BIP_Alloc_Form formal with call to new utility function
4376         Needs_BIP_Alloc_Form.
4377
4378 2011-09-01  Pascal Obry  <obry@adacore.com>
4379
4380         * prj-part.adb: Minor reformatting.
4381
4382 2011-09-01  Vincent Celier  <celier@adacore.com>
4383
4384         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4385         half character in the unit name.
4386
4387 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4388
4389         * exp_ch4.adb: Minor code and comment reformatting.
4390
4391 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4392
4393         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4394         for Is_Limited_Type and Is_Tagged_Type in condition checking
4395         for by-reference type.
4396         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4397         subprograms may have a completion because of a previous
4398         Inline_Always clause, but the enclosing package must be marked
4399         inlined for the subprogram body to become visible to the backend.
4400
4401 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4402
4403         * sem_aux.adb, exp_ch4.adb: Minor reformatting
4404
4405 2011-09-01  Pascal Obry  <obry@adacore.com>
4406
4407         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4408
4409 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4410
4411         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4412         the formals of a subprogram stub that acts as a spec.
4413
4414 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4415
4416         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4417         type, declare a renaming for it, not an object declaration.
4418
4419 2011-09-01  Yannick Moy  <moy@adacore.com>
4420
4421         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4422         Ignore_Errors to ignore failures to read ALI files when True.
4423
4424 2011-09-01  Javier Miranda  <miranda@adacore.com>
4425
4426         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4427         constructor calls associated with non-tagged record types.
4428
4429 2011-09-01  Robert Dewar  <dewar@adacore.com>
4430
4431         * g-socthi-vms.adb: Minor reformatting.
4432
4433 2011-09-01  Nicolas Roche  <roche@adacore.com>
4434
4435         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4436         in order to avoid impact of imcompatible changes.
4437         * cstreams.c: Likewise
4438         * cio.c: Likewise
4439         * aux-io.c: Likewise
4440
4441 2011-09-01  Yannick Moy  <moy@adacore.com>
4442
4443         * lib-writ.adb (Write_With_Lines): Always output complete information
4444         on "with" line in Alfa mode, as this is required by formal verification
4445         back-end.
4446
4447 2011-09-01  Tristan Gingold  <gingold@adacore.com>
4448
4449         * g-socthi-vms.adb: Add comments.
4450
4451 2011-09-01  Pascal Obry  <obry@adacore.com>
4452
4453         * prj.ads: Minor reformatting.
4454
4455 2011-09-01  Vincent Celier  <celier@adacore.com>
4456
4457         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
4458         exceptions in the config pragmas file.
4459
4460 2011-09-01  Tristan Gingold  <gingold@adacore.com>
4461
4462         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
4463
4464 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4465
4466         * exp_ch7.adb (Find_Insertion_List): New routine.
4467         (Process_Transient_Objects): Add code to handle the abnormal
4468         finalization of a controlled transient associated with a subprogram
4469         call. Since transients are cleaned up right after the associated
4470         context, an exception raised during a subprogram call may bypass the
4471         finalization code.
4472
4473 2011-09-01  Robert Dewar  <dewar@adacore.com>
4474
4475         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
4476         aliased.
4477
4478 2011-09-01  Robert Dewar  <dewar@adacore.com>
4479
4480         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
4481
4482 2011-09-01  Robert Dewar  <dewar@adacore.com>
4483
4484         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
4485
4486 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4487
4488         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
4489         GNATRTL_NONTASKING_OBJS.
4490
4491 2011-09-01  Robert Dewar  <dewar@adacore.com>
4492
4493         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
4494         possibility of this flag being set for formals in Ada 2012 mode.
4495         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
4496         2012.
4497         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
4498         mode.
4499         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
4500         Ada 2012.
4501         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
4502         Ada 2012.
4503
4504 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4505
4506         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
4507         insertion node in a tree of nested Expression_With_Actions nodes.
4508         (Process_Transient_Object): In the case where a complex if statement
4509         has been converted into nested Expression_With_Actions nodes, the
4510         "hook" object and the associated access type must be inserted before
4511         the top most Expression_With_Actions.
4512
4513 2011-09-01  Robert Dewar  <dewar@adacore.com>
4514
4515         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
4516         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
4517
4518 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4519
4520         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
4521
4522 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4523
4524         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
4525         aspect.
4526         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
4527         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
4528         in a similar way as we do for the Priority or Dispatching_Domain aspect.
4529         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
4530         Dispatching_Domains_Frozen): Move this local data to package
4531         System.Tasking because with the CPU aspect we need to have access
4532         to this data when creating the task in System.Tasking.Stages.Create_Task
4533         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
4534         Move these variables from the body of
4535         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
4536         we need to have access to this data when creating the task in
4537         System.Tasking.Stages.Create_Task.
4538         * s-taskin.adb (Initialize): Signal the allocation of the environment
4539         task to a CPU, if any, so that we know whether the CPU can be
4540         transferred to a different dispatching domain.
4541         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
4542         is being allocated belongs to the dispatching domain where the task
4543         lives. Signal the allocation of the task to a CPU, if any, so that we
4544         know whether the CPU can be transferred to a different dispatching
4545         domain.
4546
4547 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4548
4549         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
4550         attributes Same_Storage and Overlaps_Storage.
4551
4552 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4553
4554         * exp_strm.adb: Remove with and use clause for Opt.
4555         (Build_Array_Input_Function): Remove the version-dependent generation
4556         of the return statement. The Ada 2005 tree is now the default.
4557
4558 2011-09-01  Yannick Moy  <moy@adacore.com>
4559
4560         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
4561         it is never empty when compiling in Alfa mode.
4562
4563 2011-09-01  Robert Dewar  <dewar@adacore.com>
4564
4565         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
4566         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
4567         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
4568         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
4569
4570 2011-09-01  Matthew Heaney  <heaney@adacore.com>
4571
4572         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
4573         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
4574         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
4575         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
4576         unbounded queue container.
4577         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
4578         bounded queue container.
4579         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
4580         unbounded priority queue container.
4581         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
4582         bounded priority queue container.
4583
4584 2011-08-31  Pascal Obry  <obry@adacore.com>
4585
4586         * a-direct.adb: Do not try to create an UNC path on Windows.
4587         (Create_Path): Skip leading computer name in UNC path if any.
4588
4589 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4590
4591         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
4592         version-dependent generation of the return statement. The Ada 2005 tree
4593         is now the default.
4594
4595 2011-08-31  Thomas Quinot  <quinot@adacore.com>
4596
4597         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
4598         types Stream_Element_Offset and Storage_Offset have a different native
4599         type depending on whether the platform is 32 or 64 bits. When
4600         exchanging them, always convert to 64 bits.
4601
4602 2011-08-31  Yannick Moy  <moy@adacore.com>
4603
4604         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
4605         --force-alfa to gnat2why.
4606
4607 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4608
4609         * sem_ch12.adb (Save_References): If the node has aspects, save
4610         references within the corresponding expressions in a separate step,
4611         because the aspects are not directly in the tree for the declaration
4612         to which they belong.
4613
4614 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
4615
4616         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
4617         in CodePeer mode, since representation clauses are partially ignored.
4618         * gcc-interface/Make-lang.in: Update dependencies.
4619
4620 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4621
4622         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4623         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
4624         to any dispatching domain.
4625
4626 2011-08-31  Thomas Quinot  <quinot@adacore.com>
4627
4628         * exp_ch4.adb: Minor reformatting.
4629
4630 2011-08-31  Bob Duff  <duff@adacore.com>
4631
4632         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
4633         on nodes for which it is not defined.
4634         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
4635         parent type.
4636
4637 2011-08-31  Bob Duff  <duff@adacore.com>
4638
4639         * sem_ch3.adb (Process_Full_View): Disable legality check if
4640         In_Instance, to avoid spurious errors.
4641         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
4642         if In_Instance, to avoid spurious errors.
4643
4644 2011-08-31  Pascal Obry  <obry@adacore.com>
4645
4646         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
4647         directory speparators.
4648         (Compose): Use Dir_Seps to handle both forms.
4649         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
4650         changes.
4651         (Extension): Use Dir_Seps to handle both forms.
4652
4653 2011-08-31  Pascal Obry  <obry@adacore.com>
4654
4655         * prj-conf.adb: Minor reformatting.
4656
4657 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4658
4659         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
4660         dispatching domain aspect.
4661         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
4662         aspect.
4663         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
4664         Dispatching_Domain aspect in a similar way as we do for the Priority
4665         aspect.
4666         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
4667         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
4668         is present.
4669         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
4670         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
4671         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
4672         Dispatching_Domain and add it to the task definition.
4673         (Sig_Flags): Add Pragma_Dispatching_Domain.
4674         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
4675         support to find the types Dispatching_Domain and
4676         Dispatching_Domain_Access.
4677         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
4678         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
4679         query the availability of a pragma Dispatching_Domain.
4680         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
4681         the expander to pass the Dispatching_Domain when creating a task.
4682         (Name_Dispatching_Domain): Add this new name for a pragma.
4683         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
4684         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
4685         task has been allocated at creation time.
4686         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
4687         Ravenscar is always null.
4688         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
4689         the task has been allocated at creation time.
4690         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
4691         a specific dispatching domain.
4692         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
4693         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
4694         and CPU are specified for the task, and the CPU value is not contained
4695         within the range of processors for the domain.
4696
4697 2011-08-31  Vincent Celier  <celier@adacore.com>
4698
4699         * make.adb (Original_Gcc) : New constant String_Access.
4700         (Gnatmake): For VM targets, do not use VM version of the compiler if
4701         --GCC= has been specified.
4702
4703 2011-08-31  Thomas Quinot  <quinot@adacore.com>
4704
4705         * sem_ch5.adb: Minor reformatting.
4706
4707 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4708
4709         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
4710         not reanalyze it.
4711
4712 2011-08-31  Bob Duff  <duff@adacore.com>
4713
4714         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
4715         the access type is private; we don't care about privacy in expansion.
4716
4717 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4718
4719         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
4720         subcomponents tnat may be limited, because they originate in view
4721         conflicts. If the original aggregate is legal and the actuals are
4722         legal, the aggregate itself is legal.
4723
4724 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4725
4726         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
4727         status.
4728
4729 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4730
4731         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
4732         errors in B tests.
4733
4734 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4735
4736         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
4737         Interrupt_Priority aspects, force the analysis of the aspect expression
4738         (when building the equivalent pragma). Otherwise, its analysis is done
4739         too late, after the task or protected object has been created.
4740         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
4741         Analyze_Single_Task_Declaration): Remove the code to move the aspects
4742         to the object declaration because they are needed in the type
4743         declaration.
4744
4745 2011-08-31  Robert Dewar  <dewar@adacore.com>
4746
4747         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
4748         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
4749         reformatting.
4750
4751 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4752
4753         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
4754         if the corresponding type is malformed due to restriction violations.
4755
4756 2011-08-31  Robert Dewar  <dewar@adacore.com>
4757
4758         * s-ransee.ads, s-ransee.adb: Minor reformatting.
4759
4760 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4761
4762         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
4763         would cause the generation of Set_Finalize_Address if the target is a
4764         VM and the designated type is not derived from [Limited_]Controlled.
4765
4766 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
4767
4768         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
4769         subprogram.
4770         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
4771         case of a compilation error.
4772
4773 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4774
4775         * init.c (__gnat_error_handler): Standardize the stack overflow or
4776         erroneous memory access message.
4777         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
4778         or erroneous memory access message.
4779
4780 2011-08-31  Robert Dewar  <dewar@adacore.com>
4781
4782         * sem_ch4.adb: Minor reformatting.
4783         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
4784
4785 2011-08-31  Thomas Quinot  <quinot@adacore.com>
4786
4787         * scos.ads: Minor documentation clarification.
4788         * put_scos.adb: Do not generate SCO unit header line for a unit that
4789         has no SCO lines.
4790
4791 2011-08-31  Robert Dewar  <dewar@adacore.com>
4792
4793         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
4794
4795 2011-08-31  Tristan Gingold  <gingold@adacore.com>
4796
4797         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
4798         hold variables between these following subprograms.
4799         (Build_Exception_Handler, Build_Object_Declarations,
4800         Build_Raise_Statement): Use the above type as parameter.
4801         Make the above adjustments.
4802         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
4803
4804 2011-08-31  Pascal Obry  <obry@adacore.com>
4805
4806         * projects.texi: Minor reformatting.
4807
4808 2011-08-31  Tristan Gingold  <gingold@adacore.com>
4809
4810         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
4811         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
4812
4813 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4814
4815         * exp_ch5.adb: Minor code cleanup.
4816         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
4817         prevent cascaded errors.
4818         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
4819         variable of an iterator specification in current scope.
4820         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
4821         postconditions on the stack, as they contain no return statements.
4822
4823 2011-08-31  Yannick Moy  <moy@adacore.com>
4824
4825         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
4826         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
4827         call Qualify_Entity_Names.
4828         (Expand_Alfa): call Qualify_Entity_Names in more cases
4829         * lib-xref-alfa.adb: Take into account system package.
4830         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
4831         CodePeer mode in which we are interested in finding bugs even if
4832         compiler cannot compile source.
4833         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
4834         deferred constant.
4835
4836 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4837
4838         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
4839         denoted by the subtype mark to ensure getting the concurrent type in
4840         the case where the subtype mark denotes a private subtype of a
4841         concurrent type (needed when using -gnatc).
4842         (Process_Subtype): For the processing specific to type kinds, case on
4843         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
4844         subtype denotes a private subtype whose base type is nonprivate (needed
4845         for subtypes of private fulfilled by task types when compiling with
4846         -gnatc).
4847
4848 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4849
4850         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
4851         late primitives that override interface operations when the full
4852         expander is not active, to avoid blowups in Register_Primitive when
4853         types don't have associated secondary dispatch tables.
4854
4855 2011-08-31  Yannick Moy  <moy@adacore.com>
4856
4857         * alfa_test.adb: Code clean up.
4858
4859 2011-08-31  Marc Sango  <sango@adacore.com>
4860
4861         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
4862         by Comes_From_Source (Original_Node (N)) in order to treat also the
4863         nodes which have been rewritten.
4864         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
4865         explicit dereference and slice violation in spark mode on the nodes 
4866         coming only from the source code.
4867
4868 2011-08-31  Robert Dewar  <dewar@adacore.com>
4869
4870         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
4871         lib-xref-alfa.adb: Minor reformatting.
4872
4873 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4874
4875         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
4876
4877 2011-08-31  Javier Miranda  <miranda@adacore.com>
4878
4879         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
4880         only for class-wide subprograms conflicting with entities of concurrent
4881         tagged types.
4882
4883 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4884
4885         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
4886         node to null value.
4887
4888 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4889
4890         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
4891         general description of the routine.
4892
4893 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4894
4895         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
4896         doubly-linked lists.
4897
4898 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4899
4900         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
4901         check is needed for a left-hand side that is a dereference, and the
4902         base type is private without discriminants (whereas the full type does
4903         have discriminants), an extra retrieval of the underlying type may be
4904         needed in the case where the subtype is a record subtype whose base
4905         type is private. Update comments.
4906
4907 2011-08-31  Javier Miranda  <miranda@adacore.com>
4908
4909         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
4910         found check if there is a class-wide subprogram covering the primitive.
4911         
4912 2011-08-31  Yannick Moy  <moy@adacore.com>
4913
4914         * sem_res.adb: Further cases where full expansion test is needed,
4915         rather than expansion test.
4916
4917 2011-08-31  Pascal Obry  <obry@adacore.com>
4918
4919         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
4920
4921 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4922
4923         * exp_ch5.adb: Handle iterators over derived container types.
4924
4925 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4926
4927         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
4928         (Has_Anonymous_Master): New routine.
4929         (Set_Has_Anonymous_Master): New routine.
4930         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
4931         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
4932         (Current_Anonymous_Master): New routine.
4933         (Current_Unit_First_Declaration): Removed.
4934         (Current_Unit_Scope): Removed.
4935         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
4936         their objects on a per-unit heterogeneous finalization master.
4937
4938 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4939
4940         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
4941         array.
4942
4943 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4944
4945         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
4946         when not needed.
4947
4948 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4949
4950         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
4951         where the actual is an unexpanded call to 'Input.
4952
4953 2011-08-31  Yannick Moy  <moy@adacore.com>
4954
4955         * sem_ch4.adb: Code clean up.
4956
4957 2011-08-31  Yannick Moy  <moy@adacore.com>
4958
4959         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
4960
4961 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4962
4963         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
4964         and TSS primitive Finalize_Address if finalization is suppressed.
4965         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
4966         primitive Finalize_Address if finalization is suppressed.
4967
4968 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4969
4970         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
4971         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
4972         sure that the underlying task has already been created before trying
4973         to change its affinity.
4974         (Set_CPU): Use the term processor instead of CPU, as we do in
4975         Assign_Task.
4976
4977 2011-08-31  Vincent Celier  <celier@adacore.com>
4978
4979         * prj-attr.adb: New Compiler attribute Source_File_Switches.
4980         * prj-nmsc.adb (Process_Compiler): Process attribute
4981         Source_File_Switches.
4982         * prj.ads (Language_Config): New name list component
4983         Name_Source_File_Switches.
4984         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
4985
4986 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4987
4988         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
4989         discriminated component of an actual, expand at once to prevent
4990         ouf-of-order references with generated subtypes.
4991
4992 2011-08-31  Yannick Moy  <moy@adacore.com>
4993
4994         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
4995         reference to operator in Alfa xrefs.
4996
4997 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4998
4999         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
5000         where the parent instance was frozen before the current instance due to
5001         the presence of a source body. Update calls to Insert_After_Last_Decl.
5002         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
5003         Update the comment which illustrates the purpose of the routine.
5004         Package instances are now frozen by source bodies which appear after
5005         the instance. This ensures that entities coming from within the
5006         instance are available for use in the said bodies.
5007         (Install_Body): Add code to handle the case where the parent instance
5008         was frozen before the current instance due to the presence of a source
5009         body. Update calls to Insert_After_Last_Decl.
5010
5011 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5012
5013         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
5014         access types.
5015         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
5016
5017 2011-08-31  Yannick Moy  <moy@adacore.com>
5018
5019         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
5020         full-expander test.
5021         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
5022         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
5023         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
5024         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
5025         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
5026         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5027         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
5028         ALFA in Alfa (we dropped acronym).
5029         * einfo.adb (Primitive_Operations): Correctly return list of primitive
5030         operations in a case where it returned previously No_Elist.
5031
5032 2011-08-31  Robert Dewar  <dewar@adacore.com>
5033
5034         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
5035         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
5036         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5037         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
5038         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
5039         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
5040         reformatting.
5041
5042 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5043
5044         * sem_ch12 (Check_Private_View): Revert previous change.
5045         * sem_res.adb (Conversion_Check): Do not emit the error message if the
5046         conversion is in a generic instance.
5047
5048 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5049
5050         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
5051         * a-chtgbo.adb (Free): Allow 0 as index value.
5052
5053 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5054
5055         * a-cborma.adb (Insert): Add comment to explain why no element
5056         assignment.
5057
5058 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5059
5060         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
5061         spec discriminant is already a concurrent type, in which case just use
5062         it, otherwise fetch the Corresponding_Concurrent_Type as before.
5063
5064 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5065
5066         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
5067         system-linux-mips.ads, system-linux-mipsel.ads,
5068         system-linux-mips64el.ads, system-linux-ppc64.ads,
5069         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
5070
5071 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5072
5073         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
5074         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
5075         (build_unary_op): Likewise.
5076
5077 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5078
5079         * raise-gcc.c: Do not include coretypes.h and tm.h.
5080         (setup_to_install): Remove test for compiler macro.
5081         * targext.c: Document use for the library.
5082         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5083
5084 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5085
5086         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5087         the expression to the nominal type if the latter is a record type with
5088         a variant part and the type of the former is a record type without one.
5089
5090 2011-08-30  Yannick Moy  <moy@adacore.com>
5091
5092         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5093         expansion in Alfa mode.
5094         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5095         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5096         Alfa mode.
5097         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5098         * sem_res.adb: Ditto.
5099         * gcc-interface/Make-lang.in: Update dependencies.
5100
5101 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5102
5103         * g-socket.ads: Minor documentation adjustment.
5104
5105 2011-08-30  Robert Dewar  <dewar@adacore.com>
5106
5107         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5108
5109 2011-08-30  Yannick Moy  <moy@adacore.com>
5110
5111         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5112         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5113         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5114         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5115         Revert change which introduced files for "light"
5116         expansion, to be replaced by a single file for Alfa expansion.
5117
5118 2011-08-30  Robert Dewar  <dewar@adacore.com>
5119
5120         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5121         Minor code reorg/reformatting.
5122
5123 2011-08-30  Yannick Moy  <moy@adacore.com>
5124
5125         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5126         common shorthand for (Expander_Active and not ALFA_Mode) that can be
5127         used for testing full expansion, that is active expansion not in the
5128         reduced mode for Alfa
5129         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5130         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5131         of the verbose (Expander_Active and not ALFA_Mode)
5132
5133 2011-08-30  Tristan Gingold  <gingold@adacore.com>
5134
5135         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5136         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5137         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5138         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5139
5140 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
5141
5142         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5143         access conversions to check that the conversion is a rewritten node,
5144         rather than just having Comes_From_Source set to False, which wasn't
5145         sufficient.
5146
5147 2011-08-30  Robert Dewar  <dewar@adacore.com>
5148
5149         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5150         g-socket.ads: Minor reformatting.
5151
5152 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5153
5154         * sem_util.adb: Minor reformatting.
5155
5156 2011-08-30  Tristan Gingold  <gingold@adacore.com>
5157
5158         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5159         to be compliant with the ABI.
5160
5161 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
5162
5163         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5164         of a designated type when the related access type is an actual in an
5165         instance. This ensures that the full view of designated type is
5166         available when inside the body of the instance.
5167
5168 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5169
5170         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5171         in a position to be modified, a slice is treated like an indexed
5172         component.
5173
5174 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5175
5176         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5177         field tv_sec in struct timeval.
5178
5179 2011-08-30  Yannick Moy  <moy@adacore.com>
5180
5181         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5182         blocks of code doing full expansion, previously only guarded by
5183         Expander_Active, by anding the test that ALFA_Mode is not set
5184
5185 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5186
5187         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5188         add the function to the list of private dependents, for subsequent
5189         legality check on Taft amendment types.
5190         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5191         Private_Dependents, as for other incomplete types.
5192         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5193         Taft-amendment type is used as the return type of a function.
5194
5195 2011-08-30  Javier Miranda  <miranda@adacore.com>
5196
5197         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5198         which emits an error by a call to a new routine which report the error.
5199         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5200         entity does not cover an existing interface.
5201         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5202         code.
5203         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5204         protected procedures or entries whose mode is not conformant.
5205         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5206         an error by a call to a new routine which report the error.
5207
5208 2011-08-30  Robert Dewar  <dewar@adacore.com>
5209
5210         * gnat_rm.texi: Minor change.
5211         * exp_attr_light.adb: Minor reformatting.
5212
5213 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5214
5215         * sem_ch3.adb: Patch inheritance of aspects in
5216         Complete_Private_Subtype, to avoid infinite loop.
5217
5218 2011-08-30  Javier Miranda  <miranda@adacore.com>
5219
5220         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5221         been reported and a subprogram covering an interface primitive is not
5222         found then skip generating the internal entity. Done to avoid crashing
5223         the frontend.
5224         (Check_Abstract_Overriding): Change text of error of wrong formal of
5225         protected subprogram or entry. Done for consistency to emit exactly the
5226         same error reported by Check_Synchronized_Overriding. In addition, the
5227         error is restricted to protected types (bug found working on AI05-0090)
5228
5229 2011-08-30  Yannick Moy  <moy@adacore.com>
5230
5231         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5232         expansion in Alfa mode.
5233         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5234         * exp_light.adb, exp_light.ads: New package defining light expansion.
5235         * expander.adb (Expand): Call light expansion in Alfa mode
5236         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5237         constructs.
5238         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5239         constructs.
5240         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5241         * gnat1drv.adb (Adjust_Global_Switches): Comment
5242
5243 2011-08-30  Yannick Moy  <moy@adacore.com>
5244
5245         * lib-xref-alfa.adb: Minor refactoring.
5246
5247 2011-08-30  Yannick Moy  <moy@adacore.com>
5248
5249         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5250         mode.
5251         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5252         expansion in Alfa mode.
5253         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5254         mode.
5255
5256 2011-08-30  Robert Dewar  <dewar@adacore.com>
5257
5258         * debug_a.adb: Update comment.
5259
5260 2011-08-30  Robert Dewar  <dewar@adacore.com>
5261
5262         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5263         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5264         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5265         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5266
5267 2011-08-30  Robert Dewar  <dewar@adacore.com>
5268
5269         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5270         volatile.
5271
5272 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
5273
5274         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5275         Build_Finalization_Master by supplying an insertion node and enclosing
5276         scope. In its old version, the call did not generate a finalization
5277         master.
5278         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5279         recognize anonymous access-to-controlled components. Rewrite the
5280         machinery which creates finalization masters to service anonymous
5281         access-to-controlled components of a record type. In its current state,
5282         only one heterogeneous master is necessary to handle multiple anonymous
5283         components.
5284         (Freeze_Type): Comment reformatting.
5285         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5286         RE_Unit_Table.
5287         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5288         associates TSS primitive Finalize_Address with either the master itself
5289         or with the internal hash table depending on the mode of operation of
5290         the master.
5291
5292 2011-08-30  Javier Miranda  <miranda@adacore.com>
5293
5294         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5295         interface type then do not generate code to compare this component.
5296         Required since they have no components and their equality operator is
5297         abstract.
5298
5299 2011-08-30  Steve Baird  <baird@adacore.com>
5300
5301         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5302         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5303         returns the (static) accessibility level of the object. Otherwise, the
5304         same as Type_Access_Level.
5305         (Dynamic_Accessibility_Level): New function; given an expression which
5306         could occur as the rhs of an assignment to a saooaaat (i.e., an
5307         expression of an access-to-object type), return the new value for the
5308         saooaaat's associated Extra_Accessibility object.
5309         (Effective_Extra_Accessibility): New function; same as
5310         Einfo.Extra_Accessibility except that object renames are looked through.
5311         * sem_util.adb 
5312         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5313         (Dynamic_Accessibility_Level): New function; see sem_util.ads
5314         description.
5315         (Effective_Extra_Accessibility): New function; see sem_util.ads
5316         description.
5317         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5318         (Extra_Accessibility): Update comments.
5319         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5320         except RM_Size field (which is only for types) is unaffected.
5321         * einfo.adb
5322         (Extra_Accessibility): Expand domain to allow objects, not just formals.
5323         (Set_Extra_Accessibility): Expand domain to allow objects, not just
5324         formals.
5325         (Init_Size): Add assertion that we are not trashing the
5326         Extra_Accessibility attribute of an object.
5327         (Init_Size_Align): Add assertion that we are not trashing the
5328         Extra_Accessibility attribute of an object.
5329         (Init_Object_Size_Align): New procedure; see einfo.ads description.
5330         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5331         differently for the type of a (non-library-level) saooaaat depending
5332         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5333         is queried in this set of changes - everything else (in particular,
5334         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5335         driven off of the setting of the Is_Local_Anonymous_Access attribute.
5336         The special treatment of library-level saooaaats is an optimization,
5337         not required for correctnesss. This is based on the observation that the
5338         Ada2012 rules (static and dynamic) for saooaaats turn out to be
5339         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5340         * exp_ch3.adb
5341         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5342         false for the type of a saooaaat, declare and initialize its
5343         accessibility level object and set the Extra_Accessibility attribute
5344         of the saooaaat to refer to this object.
5345         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5346         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5347         calls to Effective_Extra_Accessibility in order to support
5348         renames of saooaaats.
5349         (Expand_N_Type_Conversion): Add new local function,
5350         Has_Extra_Accessibility, and call it when determining whether an
5351         accessibility check is needed.
5352         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5353         evaluate to True (without raising an exception).
5354         * exp_ch5.adb
5355         (Expand_N_Assignment_Statement): When assigning to an Ada2012
5356         saooaaat, update its associated Extra_Accessibility object (if
5357         it has one). This includes an accessibility check.
5358         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5359         a saooaaat, update its Extra_Accessibility object too (if it
5360         has one).
5361         (Expand_Call): Replace a couple of calls to Type_Access_Level
5362         with calls to Dynamic_Access_Level to handle cases where
5363         passing a literal (any literal) is incorrect.
5364         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5365         checks associated with "Saooaat := Some_Object'Access;"; this must
5366         be rejected if Some_Object is declared in a more nested scope
5367         than Saooaat.
5368         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5369         assignment to a saooaaat even if Is_Local_Anonymous_Access
5370         returns False for its type (indicating a 2012-style saooaaat).
5371         * sem_ch8.adb
5372         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5373         (which is only appropriate for objects, not types) with a call
5374         of Init_Object_Size_Align in order to avoid trashing the
5375         Extra_Accessibility attribute of a rename (the two attributes
5376         share storage).
5377         * sem_res.adb
5378         (Valid_Conversion) Replace six calls to Type_Access_Level with
5379         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5380         Ada2012 non-library-level saooaaat, the former returns library level
5381         while the latter returns the (static) accessibility level of the
5382         saooaaat. A type conversion to the anonymous type of a saooaaat
5383         can only occur as part of an assignment to the saooaaat, so we
5384         know that such a conversion must be in a lhs context, so Deepest
5385         yields the result that we need. If such a conversion could occur,
5386         say, as the operand of an equality operator, then this might not
5387         be right. Also add a test so that static accessibilty checks are
5388         performed for converting to a saooaaat's type even if
5389         Is_Local_Anonymous_Access yields False for the type.
5390
5391 2011-08-30  Javier Miranda  <miranda@adacore.com>
5392
5393         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5394         controls generation of a warning associated with late declaration of
5395         dispatching functions. Required to avoid generating spurious
5396         warnings.
5397
5398 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
5399
5400         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5401         return object has an anonymous access type and the function's type is
5402         a named access type.
5403         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5404         conversions on implicit conversions, since such conversions can occur
5405         for anonymous access cases due to expansion. Issue error for attempt
5406         to rename an anonymous expression as an object of a named access type.
5407         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5408         to indicate whether this function should report errors on invalid
5409         conversions.
5410         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5411         the expression is of an anonymous access type and the expected type is
5412         a named general access type, rewrite the expression as a type
5413         conversion, unless this is an expression of a membership test.
5414         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5415         calling of Error_Msg_N on new formal Report_Errs.
5416         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5417         calling of Error_Msg_NE on new formal Report_Errs.
5418         (Valid_Conversion): Move declaration of this function to the package
5419         spec, to allow calls from membership test processing. For Ada 2012,
5420         enforce legality restrictions on implicit conversions of anonymous
5421         access values to general access types, disallowing such conversions in
5422         cases where the expression has a dynamic accessibility level (access
5423         parameters, stand-alone anonymous access objects, or a component of a
5424         dereference of one of the first two cases).
5425         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5426         in the context of a named general access expected type.
5427         * exp_ch4.adb Add with and use of Exp_Ch2.
5428         (Expand_N_In): Add processing for membership tests applied to
5429         expressions of an anonymous access type. First, Valid_Conversion is
5430         called to check whether the test is statically False, and then the
5431         conversion is expanded to test that the expression's accessibility
5432         level is no deeper than that of the tested type. In the case of
5433         anonymous access-to-tagged types, a tagged membership test is applied
5434         as well.
5435         (Tagged_Membership): Extend to handle access type cases, applying the
5436         test to the designated types.
5437         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5438         accessibility level, and the actual is a 'Access applied to a current
5439         instance, pass the accessibility level of the type of the current
5440         instance rather than applying Object_Access_Level to the prefix. Add a
5441         ??? comment, since this level isn't quite right either (will eventually
5442         need to pass an implicit level parameter to init procs).
5443
5444 2011-08-30  Bob Duff  <duff@adacore.com>
5445
5446         * s-taskin.ads: Minor comment fix.
5447
5448 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5449
5450         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
5451         component and the selector is a dispatching operation, check if it is
5452         a prefixed call before rewriting as a parameterless function call.
5453
5454 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
5455
5456         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
5457         tsystem.h into $(RTSDIR) instead of rts.
5458
5459 2011-08-29  Robert Dewar  <dewar@adacore.com>
5460
5461         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5462         reformatting.
5463         * gcc-interface/Make-lang.in: Update dependencies.
5464
5465 2011-08-29  Yannick Moy  <moy@adacore.com>
5466
5467         * alfa.ads (Name_Of_Heap_Variable): New constant name.
5468         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
5469         table to hold dereferences.
5470         (Add_ALFA_Xrefs): Take into account dereferences as special
5471         reads/writes to the variable "HEAP".
5472         (Enclosing_Subprogram_Or_Package): Move subprogram here.
5473         (Generate_Dereference): New procedure to store a read/write dereferencew
5474         in the table Drefs.
5475         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
5476         the special "HEAP" var.
5477         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
5478         in ALFA mode.
5479         * sem_util.adb (Note_Possible_Modification): Store write dereference
5480         in ALFA mode.
5481
5482 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5483
5484         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
5485         ensures that the level of the subpool access type is not deeper than
5486         that of the pool object.
5487         * sem_util.adb (Object_Access_Level): Expand to handle defining
5488         identifiers.
5489         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
5490         subpool handle name of a rewritten allocator.
5491
5492 2011-08-29  Robert Dewar  <dewar@adacore.com>
5493
5494         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
5495
5496 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5497
5498         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
5499         values, we generate multiple triples of parameters in the TypeCode.
5500         Bump Choice_Index for each such triple so that a subsequent default
5501         choice is associated with the correct index in the typecode.
5502
5503 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5504
5505         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
5506         container.
5507         (First, Last): Handle properly an iterator over a null container.
5508
5509 2011-08-29  Bob Duff  <duff@adacore.com>
5510
5511         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
5512         processing if we run across a node with no Scope. This can happen if
5513         we're with-ing an library-level instance, and that instance got errors
5514         that caused "instantiation abandoned".
5515         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
5516         an exception instead of using Assert, so it won't go into an infinite
5517         loop, even when assertions are turned off.
5518
5519 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5520
5521         * a-coorse.adb: Proper handling of empty ordered sets.
5522
5523 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5524
5525         * debug.adb: Add comments.
5526
5527 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5528
5529         * a-except.adb, a-except-2005.adb: Minor comment rewording and
5530         reformatting.
5531
5532 2011-08-29  Yannick Moy  <moy@adacore.com>
5533
5534         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
5535         declaration for Itypes in Alfa mode.
5536
5537 2011-08-29  Robert Dewar  <dewar@adacore.com>
5538
5539         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
5540         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
5541         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
5542         reformatting.
5543
5544 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5545
5546         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
5547         package spec.
5548         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
5549         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
5550         while raising PE.
5551
5552 2011-08-29  Robert Dewar  <dewar@adacore.com>
5553
5554         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
5555
5556 2011-08-29  Javier Miranda  <miranda@adacore.com>
5557
5558         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
5559         renamings of formal subprograms when the actual for a formal type is
5560         class-wide.
5561
5562 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5563
5564         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
5565         to Target.
5566
5567 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5568
5569         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
5570         components of record type.
5571         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
5572         to Target.
5573
5574 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5575
5576         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
5577         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
5578         container packages.
5579
5580 2011-08-29  Robert Dewar  <dewar@adacore.com>
5581
5582         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
5583         reformatting.
5584
5585 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5586
5587         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
5588         components of record type.
5589
5590 2011-08-29  Bob Duff  <duff@adacore.com>
5591
5592         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
5593         by the termination handler.
5594
5595 2011-08-29  Yannick Moy  <moy@adacore.com>
5596
5597         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
5598         created in Alfa mode, instead of inserting artificial declarations of
5599         non-Itypes in the tree.
5600         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
5601         know if an Itype has a corresponding declaration, as defined in
5602         itypes.ads.
5603
5604 2011-08-29  Yannick Moy  <moy@adacore.com>
5605
5606         * gnat1drv.adb: Minor rewrite.
5607
5608 2011-08-29  Bob Duff  <duff@adacore.com>
5609
5610         * s-tasuti.adb (Make_Passive): Work around race condition in
5611         Make_Independent, which can cause Wait_Count to be zero. So instead of
5612         asserting that Wait_Count > 0, and then decrementing it, decrement it
5613         only if Wait_Count > 0.
5614         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
5615         should be nonnegative, so declare them Natural instead of Integer.
5616
5617 2011-08-29  Robert Dewar  <dewar@adacore.com>
5618
5619         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
5620         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
5621         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
5622         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
5623         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
5624
5625 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5626
5627         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
5628
5629 2011-08-29  Vadim Godunko  <godunko@adacore.com>
5630
5631         * s-parint.ads: Minor comment clarification.
5632
5633 2011-08-29  Vincent Celier  <celier@adacore.com>
5634
5635         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
5636         may be used as identifiers.
5637
5638 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5639
5640         * a-coinho.ads: Minor reformating.
5641
5642 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5643
5644         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
5645         container of a derived type.
5646
5647 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5648
5649         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
5650         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
5651
5652 2011-08-29  Pascal Obry  <obry@adacore.com>
5653
5654         * exp_disp.adb: Minor comment fix.
5655         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
5656         to avoid warnings when compiling with -Wall.
5657         (Make_Disp_Conditional_Select_Body): Likewise.
5658         (Make_Disp_Timed_Select_Body): Likewise.
5659
5660 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5661
5662         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
5663         an entity name, generate reference for it.
5664
5665 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5666
5667         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
5668         iterator form.
5669         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
5670         the class-wide type.
5671         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
5672
5673 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5674
5675         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
5676         subtype for an object whose type is an unconstrained union.
5677
5678 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5679
5680         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
5681         is allowed in a component definition, by AI95-406.
5682
5683 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5684
5685         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
5686
5687 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5688
5689         * a-except-2005.adb: Alphabetize all routines.
5690         (Triggered_By_Abort): New routine.
5691         * a-except-2005.ads (Triggered_By_Abort): New routine.
5692         * a-except.adb Alphabetize all routines.
5693         (Triggered_By_Abort): New routine.
5694         * a-except.ads (Triggered_By_Abort): New routine.
5695         * exp_ch7.adb: Update all comments involving the detection of aborts in
5696         finalization code.
5697         (Build_Object_Declarations): Do not generate code to detect the
5698         presence of an abort at the start of finalization code, use a runtime
5699         routine istead.
5700         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
5701         RE_Unit_Table.
5702         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
5703         allocate a task on a subpool.
5704         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
5705         The flag disables all actions related to the maintenance of
5706         Finalize_Address_Table when subpools are not in use.
5707         (Allocate_Any_Controlled): Signal the machinery that subpools are in
5708         use.
5709         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
5710         performs costly task locking when subpools are not in use.
5711
5712 2011-08-29  Yannick Moy  <moy@adacore.com>
5713
5714         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
5715         types and dispatching calls in Alfa mode.
5716         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
5717         correspondance between body and spec scopes, to reuse utility functions
5718         (Traverse_Declarations_Or_Statements): Protect access to body for stub
5719         by testing the presence of the library unit for the body
5720         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
5721         mode the expansion of accept statements is skipped
5722         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
5723         the unique entity corresponding to the one returned by
5724         Unique_Defining_Entity applied to the enclosing declaration of the
5725         argument.
5726
5727 2011-08-29  Bob Duff  <duff@adacore.com>
5728
5729         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
5730         gdb when x is not a node (it can be a node list, name_id, etc). pp is
5731         an alias for pn. ppp is an alias for pt.
5732
5733 2011-08-29  Javier Miranda  <miranda@adacore.com>
5734
5735         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
5736         aggregate to take a consistent decision on the need to convert into
5737         assignments aggregates that initialize constant objects.
5738
5739 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5740
5741         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
5742         Build_Allocate_Deallocate_Proc in order to handle allocation of
5743         non-controlled objects on subpools.
5744         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
5745         to be end-user visible.
5746         * s-finmas.adb: Add with and use clause for System.HTable.
5747         Add an instantiation of Simple_HTable which provides a mapping between
5748         the address of a controlled object and the corresponding
5749         Finalize_Address used to clean up the object. The table is used when a
5750         master is operating in heterogeneous mode.
5751         (Attach): Explain why the input node is not verified on being already
5752         attached.
5753         (Delete_Finalize_Address): New routine.
5754         (Detach): Add pragma Assert which ensures that a node is already
5755         attached.
5756         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
5757         since nodes are no longer removed on traversal. Explain why node
5758         detachment is undesirable in this case.
5759         (Get_Finalize_Address): New routine.
5760         (Hash): New routine.
5761         (Is_Empty_List): Removed.
5762         (pm): Renamed to Print_Master. Add output for discriminant
5763         Is_Homogeneous.
5764         Comment reformatting.
5765         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5766         * s-finmas.ads: Various comments additions / improvements.
5767         Type Finalization_Master has a discriminant which determines the mode of
5768         operation.
5769         (Delete_Finalize_Address): New routine.
5770         (Get_Finalize_Address): New routine.
5771         (pm): Renamed to Print_Master.
5772         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5773         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
5774         use clause for System.IO.
5775         (Allocate_Any_Controlled): Add machinery to set TSS primitive
5776         Finalize_Address depending on the mode of allocation and the mode of
5777         the master.
5778         (Deallocate_Any_Controlled): Remove the relation pair object -
5779         Finalize_Address regardless of the master mode. Add comment explaining
5780         the reason.
5781         (Detach): Ensure that fields Prev and Next are null after detachment.
5782         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
5783         scheme to check whether the list of subpools is empty. There is no
5784         longer need to store the next subpool or advance the current pointer.
5785         (Is_Empty_List): New routine.
5786         (Print_Pool): New routine.
5787         (Print_Subpool): New routine.
5788         * s-stposu.ads: Various comments additions / improvements.
5789         Field Master of type Root_Subpool is now a heterogeneous collection.
5790         (Print_Pool): New routine.
5791         (Print_Subpool): New routine.
5792
5793 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5794
5795         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
5796         forms, using aspects of container types.
5797         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
5798         Has_Implicit_Dereference flags, that may be set on the partial view.
5799         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
5800         container type with an indexing aspect.
5801         (Analyze_Quantified_Expression): Analyze construct with expansion
5802         disabled, because it will be rewritten as a loop during expansion.
5803         (Try_Container_Indexing): The prefix itself may be a container type
5804         with an indexing aspect, as with a vector of vectors.
5805         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
5806         the original doamin of iteration, for name capture.
5807         (Analyze_Iterator_Specification): If the domain is an expression that
5808         needs finalization, create a separate declaration for it.
5809         For an iterator with "of" retrieve default iterator info from aspect of
5810         container type. For "in" iterator, retrieve type of Iterate function.
5811         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
5812         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
5813         analysis, to prevent spurious errors about late attributes.
5814         * sprint.adb: Handle quantified expression with either loop or iterator
5815         specification.
5816         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
5817         iterator.
5818
5819 2011-08-29  Vincent Celier  <celier@adacore.com>
5820
5821         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
5822         Binder or Linker of the main project file.
5823
5824 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5825
5826         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
5827         unit.
5828
5829 2011-08-29  Yannick Moy  <moy@adacore.com>
5830
5831         * exp_ch9.adb: Partial revert of previous change for Alfa mode
5832
5833 2011-08-29  Yannick Moy  <moy@adacore.com>
5834
5835         * exp_ch11.adb: Minor expansion of comment.
5836
5837 2011-08-29  Yannick Moy  <moy@adacore.com>
5838
5839         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
5840
5841 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5842
5843         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
5844         interpretation, set the type before resolving the operands, because
5845         legality checks on an exponention operand need to know the type of the
5846         context.
5847
5848 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5849
5850         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
5851         cleanups on a master if the instance is within a generic unit.
5852         Complement to the corresponding fix to inline.adb for K520-030.
5853
5854 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5855
5856         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
5857         occurrence.
5858         * exp_intr.adb: Minor comment fix.
5859
5860 2011-08-29  Bob Duff  <duff@adacore.com>
5861
5862         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
5863         Delay_Required was used as an uninitialized variable.
5864
5865 2011-08-29  Robert Dewar  <dewar@adacore.com>
5866
5867         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
5868         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
5869         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
5870
5871 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5872
5873         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
5874         Remove unused variables.
5875
5876 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5877
5878         * sem_res.adb: Remove Build_Explicit_Dereference.
5879         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
5880         from sem_res.adb, used in analysis of additional constructs.
5881         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
5882         expansion of iterators.
5883         (Is_Object_Reference): Recognize variables rewritten as explicit
5884         dereferences in Ada2012.
5885         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
5886         Reversible_Iterator names, for expansion of Ada2012 iterators.
5887         * aspects.ads, aspects.adb (Find_Aspect): Utility.
5888         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
5889         linked list container.
5890         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
5891         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
5892
5893 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5894
5895         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
5896         containers.
5897
5898 2011-08-29  Vincent Celier  <celier@adacore.com>
5899
5900         * make.adb (Gnatmake): Get the maximum number of simultaneous
5901         compilation processes after the Builder switches has been scanned, as
5902         there may include -jnn.
5903
5904 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5905
5906         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
5907
5908 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5909
5910         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
5911         GNAT_DRIVER_COMMAND_LINE to 255.
5912
5913 2011-08-29  Pascal Obry  <obry@adacore.com>
5914
5915         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
5916         reformatting and style fix (class attribute casing).
5917
5918 2011-08-29  Yannick Moy  <moy@adacore.com>
5919
5920         * exp_ch11.adb: Yet another case where expansion should be common
5921         between CodePeer and Alfa.
5922
5923 2011-08-29  Yannick Moy  <moy@adacore.com>
5924
5925         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
5926
5927 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5928
5929         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
5930         incomplete type and its completion match.
5931
5932 2011-08-29  Yannick Moy  <moy@adacore.com>
5933
5934         * exp_ch13.adb: Adjust previous change.
5935
5936 2011-08-29  Robert Dewar  <dewar@adacore.com>
5937
5938         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
5939         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
5940         Minor reformatting.
5941
5942 2011-08-29  Emmanuel Briot  <briot@adacore.com>
5943
5944         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
5945         initialize aggregated projects.
5946
5947 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5948
5949         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
5950         depth of candidates to resolve a potentially spurious ambiguity between
5951         two visible subprograms.
5952
5953 2011-08-29  Yannick Moy  <moy@adacore.com>
5954
5955         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5956         Requires/Ensures.
5957         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
5958         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
5959         Requires/Ensures.
5960
5961 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5962
5963         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
5964         Add comment.
5965
5966 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5967
5968         * sem_res.adb: Minor reformatting.
5969
5970 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5971
5972         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
5973         mode.
5974         * gnat1drv.adb (Adjust_Global_Switches): Set
5975         Use_Expressions_With_Actions to False in ALFA mode.
5976         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
5977         ALFA mode.
5978
5979 2011-08-29  Yannick Moy  <moy@adacore.com>
5980
5981         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
5982         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
5983         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
5984         tagged types and dispatching calls in Alfa mode.
5985
5986 2011-08-29  Javier Miranda  <miranda@adacore.com>
5987
5988         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
5989         we do not report an error on an Empty node.
5990
5991 2011-08-29  Geert Bosch  <bosch@adacore.com>
5992
5993         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
5994         a-nlrear.o and a-nurear.o.
5995
5996 2011-08-29  Robert Dewar  <dewar@adacore.com>
5997
5998         * freeze.adb: Minor code reorganization.
5999         Minor reformatting.
6000         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
6001         sem_ch6.adb: Minor reformatting
6002
6003 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6004
6005         * s-except.ads, s-except.adb: Provide dummy body.
6006
6007 2011-08-29  Yannick Moy  <moy@adacore.com>
6008
6009         * sem_warn.adb (Within_Postcondition): Take into account the case of
6010         an Ensures component in a Test_Case.
6011
6012 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6013
6014         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
6015         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
6016         System_Exceptions_Debug
6017         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
6018         * a-except.adb: With and use System.Exceptions_Debug instead of
6019         System.Exceptions.
6020         * a-except-2005.adb: Likewise.
6021         * s-assert.adb: Likewise.
6022         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
6023         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
6024         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
6025         s-excdeb. Update dependencies.
6026         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
6027         as these no longer need external libraries.
6028
6029 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6030
6031         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
6032         exponentiation operator on universal values in a context that requires
6033         a fixed-point type.
6034
6035 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6036
6037         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
6038         before calling notify_handled_exception.
6039         * a-exextr.adb: Fix comment.
6040
6041 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6042
6043         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
6044         Finalize_Address of the access type's finalization master.
6045         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
6046         access type's finalization master. Add a guard to prevent
6047         Associated_Storage_Pool from being set on .NET/JVM.
6048         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
6049         attribute Finalize_Address of the access type's finalization master.
6050         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
6051         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
6052         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
6053         RE_Unit_Table.
6054         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
6055         use clause for System.IO
6056         (Detach): Relax the assertion, to be reinstated later.
6057         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
6058         Relax the assertion on Finalize_Address, to be reinstated later.
6059         (Is_Empty_List): New routine.
6060         (pm): New debug routine.
6061         (Set_Finalize_Address): New routine.
6062         * s-finmas.ads (pm): New debug routine.
6063         (Set_Finalize_Address): New routine.
6064         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
6065
6066 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6067
6068         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
6069         Remove convention C.
6070
6071 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6072
6073         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
6074         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
6075         (Finalize_TCB): Remove its finalization.
6076         (Initialize): Remove assignment of GET_Exc_Stack_Addr
6077         * s-soflin.adb (NT_Exc_Stack): Remove
6078         (Get_Exc_Stack_Addr_NT): Likewise.
6079         (Get_Exc_Stack_Addr_Soft): Likewise.
6080         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6081         (Get_Exc_Stack_Addr): Likewise.
6082         (Get_Exc_Stack_Addr_Soft): Likewise
6083         * s-taspri-vms.ads (Exc_Stack_T): Remove.
6084         (Exc_Stack_Ptr_T): Likewise.
6085         (Private_Data): Remove Exc_Stack_Ptr component.
6086
6087 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6088
6089         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6090
6091 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6092
6093         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6094
6095 2011-08-29  Geert Bosch  <bosch@adacore.com>
6096
6097         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6098         L2_Norm, Swap_Column): New generic subprograms
6099         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6100         L2_Norm, Swap_Column): Implement new subprograms in order to
6101         eliminate dependency on BLAS and LAPACK libraries in
6102         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6103         version. Forward_Eliminate/Back_Substitute can be used to put a
6104         matrix in row echelon or reduced row echelon form using partial
6105         pivoting.
6106         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6107         Swap_Column): Instantiate from System.Generic_Array_Operations.
6108         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6109         (Sqrt): Local function for simple computation of square root without
6110         adding dependencies on Generic_Elementary_Functions.
6111         (Swap): New subprogram to exchange floating point numbers.
6112         (Inverse): Reimplement using Jordan-Gauss elimination.
6113         (Jacobi): New procedure implementing Jacobi's method for computation
6114         of eigensystems, based on Rutishauser's implementation.
6115         (L2_Norm): Implement directly using the inner product.
6116         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6117         decreasing eigenvalue as required by the Ada RM.
6118         (Swap_Column): New helper procedure for Sort_Eigensystem.
6119         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6120         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6121         Sort_Eigensystems.
6122
6123 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6124
6125         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6126         statements line.
6127
6128 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6129
6130         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6131         than the current node.
6132         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6133         Finalization_Master. The list headers have two fields instead of three.
6134         This should fix alignment issue but subpool allocations are now
6135         unusable. Alphabetize subprograms.
6136         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6137         the size of the header when converting the beginning of the object to
6138         a FM_Node. Set the master's Finalize_Address attribute if not already
6139         set.
6140         (Deallocate_Any_Controlled): Use the offset rather than the size of the
6141         header when converting the beginning of the object to a FM_Node.
6142
6143 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6144
6145         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6146         reraise when compiling for CodePeer.
6147
6148 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6149
6150         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6151         now needed by a-convec.adb. Fix warning.
6152
6153 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6154
6155         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6156         processing of TSS routine Finalize_Address when compiling in
6157         CodePeer_Mode.
6158
6159 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6160
6161         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6162         sem_warn.adb: Minor reformatting.
6163
6164 2011-08-29  Emmanuel Briot  <briot@adacore.com>
6165
6166         * prj-conf.adb (Get_Config_Switches): Also collect the list of
6167         languages from aggregated projects.
6168
6169 2011-08-29  Yannick Moy  <moy@adacore.com>
6170
6171         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6172         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6173         Traverse_Package_Declaration, Traverse_Subprogram_Body,
6174         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6175         for stubs are traversed too when parameter is set
6176         (Traverse_All_Compilation_Units): Traverse without going inside stubs
6177         (Traverse_Declarations_Or_Statements): Do the special traversing for
6178         stubs when required.
6179         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6180         return subprogram or package body from stub.
6181         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6182         stubs without prior subprogram decl.
6183
6184 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
6185
6186         * gnat_ugn.texi: Fix typo.
6187
6188 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6189
6190         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6191         which accounts for size vs alignment issues and calculates the size of
6192         the list header.
6193         (Deallocate_Any_Controlled): Ditto.
6194         (Nearest_Multiple_Rounded_Up): New routine.
6195
6196 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6197
6198         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6199         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6200         (Set_Exception_Msg): Ditto.
6201         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
6202         Private_Data.
6203         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6204         Use Save_Occurrence instead of Save_Occurrence_No_Private.
6205         (Raise_With_Msg): Remove Cleanup_Flag.
6206         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6207         Clean_Flag and Private_Data components.
6208
6209 2011-08-29  Yannick Moy  <moy@adacore.com>
6210
6211         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6212         in CodePeer mode.
6213         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6214         of an explicitly declared type, so that the base types of the original
6215         type and this generated type are the same, and a "type" (not a subtype
6216         like previously).
6217         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6218         small" in Alfa mode, like in CodePeer mode.
6219         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6220         clauses in Alfa mode.
6221
6222 2011-08-29  Javier Miranda  <miranda@adacore.com>
6223
6224         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6225         function to the package spec.
6226         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6227         internally generated bodies of null procedures locate the internally
6228         generated spec enforcing mode conformance.
6229         (Is_Interface_Conformant): Ensure that the controlling formal of the
6230         primitives match.
6231
6232 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6233
6234         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6235         reject the pragma if it appears to apply to a formal subprogram.
6236
6237 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6238
6239         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6240         inner expression, to prevent double evaluation.
6241
6242 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6243
6244         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6245         they were unused.
6246         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6247         * a-except-2005.adb (Propagate_Exception): Adjust spec.
6248         (Raise_Current_Excep): Adjust call.
6249         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6250
6251 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6252
6253         * exp_disp.adb: Minor reformatting.
6254
6255 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6256
6257         * a-exexpr.adb (Setup_Exception): Removed.
6258         * a-exexpr-gcc.adb (Setup_Exception): Removed.
6259         * a-except.adb (Exception_Propagation): Removed.
6260         * a-except-2005.adb (Setup_Exception): Removed.
6261         (Reraise): Remove call to Setup_Exception.
6262         (Reraise_Occurrence): Ditto.
6263         (Reraise_Occurrence_Always): Ditto.
6264         (Reraise_Occurrence_No_Defer): Ditto.
6265         (Transfer_Occurrence): Ditto.
6266         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6267         (Set_Exception_Msg): Ditto.
6268
6269 2011-08-29  Robert Dewar  <dewar@adacore.com>
6270
6271         * a-convec.adb, exp_disp.adb: Minor reformatting.
6272
6273 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6274
6275         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6276
6277 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6278
6279         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6280         Exception_Handlers to No_List instead of Empty_List in the case where
6281         there are no handlers.
6282
6283 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6284
6285         * gcc-interface/gigi.h (enum standard_datatypes): Add
6286         ADT_reraise_zcx_decl
6287         (reraise_zcx_decl): New macro.
6288         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6289         (gigi): Set reraise_zcx_decl.
6290         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6291         (gnat_to_gnu): Handle N_Raise_Statement.
6292
6293 2011-08-29  Robert Dewar  <dewar@adacore.com>
6294
6295         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6296         a-undesu.adb: Minor reformatting.
6297
6298 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6299
6300         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6301         table, accept an unfrozen untagged component if it is an actual for a
6302         formal incomplete type.
6303         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6304         provide new iterator forms over vectors.
6305         Introduce type Iterator in package body to implement operations of
6306         Reversible_Iterator interface.
6307         * a-iteint.ads: Make package pure so it is usable with new container
6308         packages, that are categorized Remote_Types.
6309
6310 2011-08-29  Robert Dewar  <dewar@adacore.com>
6311
6312         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6313
6314 2011-08-29  Bob Duff  <duff@adacore.com>
6315
6316         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6317         of <>, because this is the routine that checks for dimensionality
6318         errors (for example, for a two-dimensional array, (others => <>) should
6319         be (others => (others => <>)).
6320
6321 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6322
6323         * impunit.adb: Add new run-time units.
6324         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6325         s-stposu.ads, s-stposu.adb: Code clean up.
6326         Handle protected class-wide or task class-wide types
6327         Handle C/C++/CIL/Java types.
6328         * s-spsufi.adb, s-spsufi.ads: New files.
6329
6330 2011-08-29  Yannick Moy  <moy@adacore.com>
6331
6332         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6333         library-level subprogram.
6334         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6335         placement.
6336         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6337         component.
6338         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6339         component.
6340         * gnat_rm.texi: Update doc for Test_Case pragma.
6341
6342 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6343
6344         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6345         convention C.
6346         (GCC_Exception_Access): New type.
6347         (Unwind_DeleteException): New imported procedure
6348         (Foreign_Exception): Import it.
6349         (GNAT_GCC_Exception): Simply have the occurrence inside.
6350         (To_GCC_Exception): New function.
6351         (To_GNAT_GCC_Exception): New function.
6352         (GNAT_GCC_Exception_Cleanup): New procedure..
6353         (Propagate_GCC_Exception): New procedure.
6354         (Reraise_GCC_Exception): New procedure.
6355         (Setup_Current_Excep): New procedure.
6356         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6357         (Unwind_RaiseException): Ditto.
6358         (Unwind_ForcedUnwind): Ditto.
6359         (Remove): Removed.
6360         (Begin_Handler): Change type of parameter.
6361         (End_Handler): Ditto. Now delete the exception if still present.
6362         (Setup_Key): Removed.
6363         (Is_Setup_And_Not_Propagated): Removed.
6364         (Set_Setup_And_Not_Propagated): Ditto.
6365         (Clear_Setup_And_Not_Propagated): Ditto.
6366         (Save_Occurrence_And_Private): Ditto.
6367         (EID_For): Add 'not null' constraint on parameter.
6368         (Setup_Exception): Does nothing.
6369         (Propagate_Exception): Simplified.
6370         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6371         re-raise is not expanded anymore.
6372         * s-except.ads (Foreign_Exception): New exception - placeholder for
6373         non Ada exceptions.
6374         * raise-gcc.c (__gnat_setup_current_excep): Declare
6375         (CXX_EXCEPTION_CLASS): Define (not yet used)
6376         (GNAT_EXCEPTION_CLASS): Define.
6377         (is_handled_by): Handle foreign exceptions.
6378         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6379
6380 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6381
6382         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6383
6384 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6385
6386         * a-synbar-posix.adb: Minor reformatting.
6387
6388 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6389
6390         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6391         a-exetim-default.ads (Interrupt_Clocks_Supported,
6392         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6393         definitions to be compliant with AI-0171. The target systems do not
6394         support separate account for the execution time of interrupt handlers.
6395
6396 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6397
6398         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6399         in the barrier to put first the easiest to evaluate (and the one which
6400         will be True more often). More efficient.
6401
6402 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
6403
6404         * s-atocou-x86.adb: Fix constraint in machine code insertion.
6405
6406 2011-08-29  Bob Duff  <duff@adacore.com>
6407
6408         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6409         attributes that are now aspects, as specified by AI05-0229-1.
6410         * sem_ch13.adb (Analyze_Aspect_Specifications,
6411         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6412         pragmas or attribute references, as appropriate.
6413
6414 2011-08-29  Robert Dewar  <dewar@adacore.com>
6415
6416         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6417         a-synbar-posix.ads: Minor reformatting.
6418
6419 2011-08-29  Yannick Moy  <moy@adacore.com>
6420
6421         * snames.ads-tmpl: Add name Force.
6422
6423 2011-08-29  Pascal Obry  <obry@adacore.com>
6424
6425         * prj-nmsc.adb: Minor reformatting.
6426
6427 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6428
6429         * a-exetim.ads (Interrupt_Clocks_Supported,
6430         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6431         definitions to be compliant with AI-0171.
6432
6433 2011-08-29  Robert Dewar  <dewar@adacore.com>
6434
6435         * a-ngelfu.adb: Add comments.
6436
6437 2011-08-29  Geert Bosch  <bosch@adacore.com>
6438
6439         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6440         the closest machine number to Pi / 2.0.
6441
6442 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6443
6444         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
6445         package Ada.Synchronous_Barriers.
6446         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
6447         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
6448         default implementation using protected objects and another one
6449         a-synbar-posix using POSIX barriers as the underlying support.
6450         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
6451         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
6452         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
6453         Clean up dependencies.
6454         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
6455
6456 2011-08-29  Robert Dewar  <dewar@adacore.com>
6457
6458         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
6459         exp_dist.adb: Minor code reorganization.
6460         Minor reformatting.
6461
6462 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6463
6464         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
6465         primitive operation must support external streaming if it is not a
6466         controlling access result.
6467
6468 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6469
6470         * sinfo.ads, sem_ch7.adb: Minor reformatting.
6471
6472 2011-08-29  Bob Duff  <duff@adacore.com>
6473
6474         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
6475         restriction on allocators, as required by AI05-0013-1.
6476         * restrict.ads: Minor comment fix.
6477
6478 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6479
6480         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
6481         (To_Jmpbuf_Address): Ditto
6482         (builtin_longjmp): Ditto
6483
6484 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6485
6486         * sem_res.adb: Minor reformatting.
6487
6488 2011-08-29  Vincent Celier  <celier@adacore.com>
6489
6490         * make.adb (Gnatmake): Move special processing for VM targets after the
6491         call to Get_Target_Parameters.
6492
6493 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6494
6495         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
6496
6497 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6498
6499         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
6500         where an anonymous access discriminant of a limited designated type
6501         appears in a non-immutably limited discriminated type and issue an
6502         error message. Add local variable Desig_T and replace all occurrences
6503         of Designated_Type.
6504
6505 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6506
6507         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
6508         implementation is compliant to RM D.15(15/2) after the modification
6509         imposed by AI05-0094-1 (binding interpretation).
6510
6511 2011-08-29  Robert Dewar  <dewar@adacore.com>
6512
6513         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
6514         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
6515
6516 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6517
6518         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
6519         the scope name, do not report a missing label as a style violation (it
6520         will be diagnosed as an illegality).
6521         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
6522         variant records: Get_Enum_Lit_From_Pos already returns a usage
6523         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
6524         on Expr in Integer_Literal case so that it can be used by
6525         Build_To_Any_Call.
6526
6527 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6528
6529         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
6530         Adjust comment.
6531         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
6532         (Build_Abort_Block_Handler): New function to build an Abort_Signal
6533         exception handler.
6534         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
6535         Build_Abort_Block_Handler to build the exception handler. Do not
6536         undefer aborts for the Abort_Signal exception handler if back-end
6537         exception mechanism.
6538         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
6539         back_end exceptions for all others and abort_signal.
6540         * s-except.ads (ZCX_By_Default): New constant.
6541         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
6542         (Raise_Exception_Always): Ditto.
6543         (Raise_From_Signal_Handler): Ditto.
6544         (Raise_With_Location_And_Msg): Ditto.
6545         (Raise_With_Msg): Ditto.
6546         (Reraise): Ditto.
6547         (Reraise_Occurence): Ditto.
6548         (Reraise_Occurrence_Always): Ditto.
6549         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
6550         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
6551
6552 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6553
6554         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
6555
6556 2011-08-29  Robert Dewar  <dewar@adacore.com>
6557
6558         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
6559         Minor code reorganization.
6560
6561 2011-08-29  Bob Duff  <duff@adacore.com>
6562
6563         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
6564         2012, not just Ada 2005.
6565
6566 2011-08-29  Vincent Celier  <celier@adacore.com>
6567
6568         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
6569         with a project file or with gprbuid, if -gnatep= is specified, the
6570         builder may need to be invoked with -x.
6571
6572 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6573
6574         * a-exexpr-gcc.adb: Minor comment fix.
6575
6576 2011-08-29  Robert Dewar  <dewar@adacore.com>
6577
6578         * sem_ch8.adb: Minor reformatting.
6579
6580 2011-08-29  Bob Duff  <duff@adacore.com>
6581
6582         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
6583         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
6584         treating "some" as unreserved in earlier Ada versions. This is now
6585         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
6586         rather than Name_Some, since Tok_Some is now recognized as reserved.
6587         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
6588         reserved word.
6589         * scans.ads: Minor comment fixes.
6590         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
6591         for other language versions.
6592         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
6593         treating "some" as unreserved in earlier Ada versions. This is now
6594         handled in Snames.Is_Keyword_Name.
6595         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
6596         Ada 2012.
6597         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
6598         unreserved in earlier Ada versions. This is now handled in
6599         Snames.Is_Keyword_Name.
6600         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
6601         words as for other language versions.
6602         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
6603         Ada 2012, not just Ada 2005.
6604
6605 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6606
6607         * sem_ch13.adb: Additional semantic checks for aspects involved in
6608         iterators.
6609
6610 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6611
6612         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
6613         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
6614         Container parameter.
6615         (Ancestor_Find): ditto.
6616
6617 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6618
6619         * par-endh.adb: Minor reformatting.
6620
6621 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6622
6623         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
6624         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
6625         (Adjust_N_CLeanups_For): Remove.
6626         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
6627         stack is reached.
6628         (Propgate_Exception): Adjust.
6629         * raise-gcc.c: Add a few static/const.
6630         (Adjust_N_Cleanups_For): Remove declaration.
6631         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
6632
6633 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6634
6635         * sem_ch8.adb: Use type of function return when rewriting as object
6636         declaration.
6637
6638 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6639
6640         * sem_type.adb: Minor reformatting.
6641
6642 2011-08-29  Robert Dewar  <dewar@adacore.com>
6643
6644         * makeutl.adb: Minor reformatting.
6645
6646 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6647
6648         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
6649         function call of a limited type, the expansion of the renaming is
6650         complicated by the presence of various temporaries and subtypes that
6651         capture constraints of the renamed object.
6652         Rewrite node as an object declaration, whose expansion is simpler.
6653         Given that the object is limited there is no copy involved and no
6654         performance hit.
6655
6656 2011-08-29  Robert Dewar  <dewar@adacore.com>
6657
6658         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
6659         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
6660
6661 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6662
6663         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
6664         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
6665         system-linux-hppa.ads, system-linux-s390.ads,
6666         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
6667         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
6668         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
6669         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
6670         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
6671         system-solaris-sparc.ads, system-lynxos-x86.ads,
6672         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
6673         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
6674         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
6675         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
6676         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
6677         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
6678         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
6679         * opt.ads: Adjust comment.
6680         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
6681         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
6682         * system.ads: Move GCC_ZCX_Support to obsolete entries.
6683
6684 2011-08-29  Emmanuel Briot  <briot@adacore.com>
6685
6686         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
6687         file name is specified on the gnatmake or gprbuild command line, and
6688         before we search for that file in the project.
6689
6690 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6691
6692         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
6693         used to determine whether a possible interpretation for an overloadable
6694         entity is declared within the current instantiation and should be
6695         included in the candidate set.
6696
6697 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
6698
6699         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
6700
6701 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6702
6703         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
6704         access subtype is access_to_subprogram, when applying checks for
6705         RM 3.10.2 (27).
6706
6707 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6708
6709         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
6710         for sibling when common parent.
6711
6712 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6713
6714         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
6715         "pragma_".
6716
6717 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6718
6719         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
6720         for the return type when in ASIS mode.
6721
6722 2011-08-29  Vincent Celier  <celier@adacore.com>
6723
6724         * make.adb (Gnatmake): Get the default search dirs, then the target
6725         parameters after getting the Builder switches, as the Builder switches
6726         may include --RTS= and that could change the default search dirs.
6727
6728 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6729
6730         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
6731         Make_Final_Call. Move the processing for class-wide types before the
6732         processing for derivations from [Limited_]Controlled.
6733         (Make_Final_Call): Move the processing for class-wide types before the
6734         processing for derivations from [Limited_]Controlled.
6735         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
6736         Add code to account for alignments larger than the list header. Add a
6737         comment illustrating the structure of the allocated object + padding +
6738         header.
6739         (Deallocate_Any_Controlled): Add code to account for alignments larger
6740         than the list header.
6741
6742 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6743
6744         * sinfo.ads, sinfo.adb: New node kind
6745         N_Formal_Incomplete_Type_Definition, related flags.
6746         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
6747         Parse formal incomplete types.
6748         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
6749         sem_ch12.
6750         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
6751         Formal incomplete types do not need completion.
6752         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
6753         Validate_Incomplete_Type_Instance): New procedures to handle formal
6754         incomplete types.
6755         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
6756         that corresponds to a formal incomplete type.
6757         * sprint.adb: Handle formal incomplete type declarations.
6758         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
6759         an insertion point.
6760
6761 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6762
6763         * a-fihema.ads, a-fihema.adb: Unit removed.
6764         * a-undesu.ads, a-undesu.adb: New unit implementing
6765         Ada.Unchecked_Deallocate_Subpool.
6766         * einfo.adb: Remove Associated_Collection from the node usage.
6767         Add Finalization_Master to the node usage.
6768         (Associated_Collection): Removed.
6769         (Finalization_Master): New routine.
6770         (Set_Associated_Collection): Removed.
6771         (Set_Finalization_Master): New routine.
6772         (Write_Field23_Name): Remove Associated_Collection from the output. Add
6773         Finalization_Master to the output.
6774         * einfo.ads: Remove attribute Associated_Collection and its uses in
6775         entities.
6776         Add new attribute Finalization_Master along with its uses in entitites.
6777         (Associated_Collection): Removed along with its pragma import.
6778         (Finalization_Master): New routine along with a pragma import.
6779         (Set_Associated_Collection): Removed along with its pragma import.
6780         (Set_Finalization_Master): New routine along with a pragma import.
6781         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
6782         Build_Finalization_Collection with Build_Finalization_Master.
6783         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
6784         before the bodies of the predefined routines. Add comment explaining
6785         this. Replace call to Build_Finalization_Collection with
6786         Build_Finalization_Master.
6787         (Freeze_Type): Replace call to Build_Finalization_Collection with
6788         Build_Finalization_Master.
6789         (Make_Finalize_Address_Body): Comment reformatting.
6790         (Make_Predefined_Primitive_Specs): Code reformatting.
6791         (Stream_Operation_OK): Update comment mentioning finalization
6792         collections. Replace RE_Finalization_Collection with
6793         RE_Finalization_Master.
6794         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
6795         Associated_Collection with Finalization_Master. Replace call to
6796         Build_Finalization_Collection with Build_Finalization_Master.
6797         (Expand_Allocator_Expression): Replace call to Associated_Collection
6798         with Finalization_Master. Replace call to Set_Associated_Collection with
6799         Set_Finalization_Master. Remove the generation of
6800         Set_Finalize_Address_Ptr.
6801         (Expand_N_Allocator): Replace call to Associated_Collection with
6802         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
6803         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
6804         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
6805         comment on usage. Replace call to Needs_BIP_Collection with
6806         Needs_BIP_Finalization_Master Remplace BIP_Collection with
6807         BIP_Finalization_Master. Update all comments which mention finalization
6808         collections. Replace Associated_Collection with
6809         Finalization_Master. Replace Build_Finalization_Collection with
6810         Build_Finalization_Master.
6811         (BIP_Formal_Suffix): Update BIP_Collection's case.
6812         (Build_Heap_Allocator): Update the related comment. Rename local
6813         variable Collect to Fin_Mas_Id and update its occurrences. Update
6814         comments which mention finalization collections. Replace
6815         Set_Associated_Collection with Set_Finalization_Master.
6816         (Expand_Call): Update the code which detects a special piece of library
6817         code for .NET/JVM.
6818         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
6819         Add_Collection_Actual_To_Build_In_Place_Call with
6820         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
6821         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
6822         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
6823         Add_Collection_Actual_To_Build_In_Place_Call with
6824         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6825         (Make_Build_In_Place_Call_In_Assignment): Replace call to
6826         Add_Collection_Actual_To_Build_In_Place_Call with
6827         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6828         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6829         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
6830         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6831         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
6832         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
6833         Replace call to Set_Associated_Collection with Set_Finalization_Master.
6834         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
6835         Replace the call to Associated_Collection with Finalization_Master.
6836         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
6837         Update the way finalization master names are generated. Update the
6838         retrieval of the correct access type which will carry the pool and
6839         master attributes.
6840         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
6841         (Make_Finalize_Address_Body): Abstract types do not need
6842         Finalize_Address. Code reformatting.
6843         (Make_Finalize_Address_Stmts): Update comment on usage.
6844         (Make_Set_Finalize_Address_Ptr_Call): Removed.
6845         (Process_Declarations): Update comments.
6846         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
6847         Build_Finalization_Master. Update associated comment.
6848         (Make_Set_Finalize_Address_Ptr_Call): Removed.
6849         * exp_ch13.adb: Update comments which mention finalization collections.
6850         (Expand_N_Free_Statement): Replace the call to Associated_Collection
6851         with Finalization_Master.
6852         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
6853         create calls to routines Allocate_Any_Controlled and
6854         Deallocate_Any_Controlled.
6855         (Find_Finalize_Address): New routine.
6856         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
6857         comparison.
6858         (Requires_Cleanup_Actions): Update the comment on freeze node
6859         inspection.
6860         * exp_util.ads: Remove comment on generated code for
6861         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
6862         is better to simply look in the body.
6863         * freeze.adb (Freeze_All): Update the comment of finalization
6864         collections. Replace the call to Associated_Collection with
6865         Finalization_Master. Replace the call to Build_Finalization_Collection
6866         with Build_Finalization_Master.
6867         * impunit.adb: Add a-undesu and s-stposu to the list of units.
6868         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
6869         a-fihema.
6870         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
6871         Ada.Finalization. Add processing for children of System.Storage_Pools.
6872         * rtsfind.ads: Remove the naming of second level children of
6873         Ada.Finalization.
6874         Remove Ada_Finalization_Heap_Management from the list of units.
6875         Remove subtype Ada_Finalization_Child.
6876         Remove the following subprogram entities:
6877         
6878            RE_Allocate
6879            RE_Deallocate
6880            RE_Finalization_Collection
6881            RE_Finalization_Collection_Ptr
6882            RE_Set_Finalize_Address_Ptr
6883         
6884         Add the naming of second level children of System.Storage_Pools.
6885         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
6886         the list of units.
6887         Add subtype System_Storage_Pools_Child.
6888         Add the following subprogram entities to System.Finalization_Masters:
6889         
6890            RE_Finalization_Master
6891            RE_Finalization_Master_Ptr
6892         
6893         Add the following subprogram entities to System.Storage_Pools.Subpools:
6894         
6895            RE_Allocate_Any_Controlled
6896            RE_Deallocate_Any_Controlled
6897            RE_Root_Storage_Pool_With_Subpools
6898            RE_Root_Subpool
6899            RE_Subpool_Handle
6900         
6901         Move the following subprogram entities from
6902         Ada.Finalization.Heap_Management to System.Finalization_Masters:
6903         
6904            RE_Add_Offset_To_Address
6905            RE_Attach
6906            RE_Base_Pool
6907            RE_Detach
6908         
6909         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
6910         Set_Associated_Collection with Set_Finalization_Master.
6911         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
6912         BIP_Finalization_Master is created.
6913         * s-finmas.adb: New unit System.Finalization_Masters.
6914         * s-finmas.ads: New unit System.Finalization_Masters.
6915         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
6916         * s-stposu.ads, s-stposu.adb: New unit implementing
6917         System.Storage_Pools.Subpools.
6918
6919 2011-08-29  Bob Duff  <duff@adacore.com>
6920
6921         * tbuild.adb: Add assertion.
6922
6923 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6924
6925         * s-pooglo.adb: Minor reformatting.
6926
6927 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6928
6929         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
6930         an indexed component of a packed array whose element type is a record
6931         with a representation clause different from that of the right-hand
6932         side, generate a temporary to minimuze the number of bit-field
6933         operations generated.
6934
6935 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6936
6937         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
6938         declarations, and thus are likely insertion points for actions.
6939
6940 2011-08-29  Bob Duff  <duff@adacore.com>
6941
6942         * einfo.ads: Minor comment fix.
6943
6944 2011-08-29  Robert Dewar  <dewar@adacore.com>
6945
6946         * frontend.adb, gnat1drv.adb: Minor reformatting.
6947
6948 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6949
6950         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
6951         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
6952         space in front of the header.
6953
6954 2011-08-29  Johannes Kanig  <kanig@adacore.com>
6955
6956         * frontend.adb (Frontend): Exit after creating Standard package when
6957         -gnatd.H is present.
6958         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
6959         present.
6960
6961 2011-08-29  Robert Dewar  <dewar@adacore.com>
6962
6963         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
6964         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
6965         snames.ads-tmpl: Minor reformatting.
6966
6967 2011-08-29  Philippe Gil  <gil@adacore.com>
6968
6969         * prj.adb (Reset_Units_In_Table): New procedure.
6970         Reset units to avoid access to freed memory.
6971
6972 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6973
6974         * get_scos.adb: When reading a P statement SCO without a pragma name
6975         (from an older ALI file), ensure that the Pragma_Name component is set
6976         to Unknown_Pragma (not left uninitialized).
6977
6978 2011-08-29  Vincent Celier  <celier@adacore.com>
6979
6980         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
6981         modified to compute correctly the object path of a SAL project that is
6982         extending another library project.
6983         (Write_Path_File): New procedure.
6984         * makeutl.ads (Directories): New table moved from Buildgpr
6985         (Get_Directories): New procedure moved from Buildgpr
6986         (Write_Path_File): New procedure
6987         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
6988         paths before binding SALs, instead of Set_Ada_Paths.
6989         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
6990         Prj.
6991         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
6992         (Current_Source_Path_File_Of): New function
6993         (Set_Current_Object_Path_File_Of): New procedure
6994         (Current_Source_Object_File_Of): New function
6995         (Set_Current_Object_Path_File_Of): New procedure
6996         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
6997         (Current_Source_Path_File_Of): New function
6998         (Set_Current_Object_Path_File_Of): New procedure
6999         (Current_Source_Object_File_Of): New function
7000         (Set_Current_Object_Path_File_Of): New procedure
7001
7002 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7003
7004         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
7005         packed entity, use a bit-field assignment only if there is no change of
7006         representation.
7007
7008 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7009
7010         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
7011         Is_RTU instead of using Chars comparisons.
7012
7013 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7014
7015         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
7016         temporary object if the actual is constrained, and the discriminants
7017         read from the stream don't match.
7018
7019 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7020
7021         * sem_attr.adb, exp_attr.adb: Add handling of
7022         Attribute_System_Allocator_Alignment
7023         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
7024         Attribute_System_Allocator_Alignment.
7025         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
7026         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
7027         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
7028         get_target_system_allocator_alignment.
7029
7030 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7031
7032         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
7033         dependencies.
7034
7035 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7036
7037         * exp_ch3.adb (In_Runtime): Fix typo.
7038
7039 2011-08-29  Bob Duff  <duff@adacore.com>
7040
7041         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
7042
7043 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7044
7045         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
7046         and a separate tag assignment is generated, ensure that the tag
7047         assignment is analyzed.
7048
7049 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7050
7051         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
7052         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
7053         of statement lists that may contain local declarations.
7054         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
7055         duplicate the triggering statements needed for the expansion of this
7056         construct, when the trigger is a dispatching call to a synchronized
7057         primitive.
7058
7059 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7060
7061         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
7062         * bindgen.adb: Add comments.
7063         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
7064         in CodePeer mode.
7065
7066 2011-08-29  Robert Dewar  <dewar@adacore.com>
7067
7068         * exp_attr.adb: Minor reformatting.
7069         Minor code reorganization and commenting.
7070         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
7071         reformatting.
7072
7073 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7074
7075         * get_scos.adb: Ignore chaining indicators not currently supported
7076         by Ada.
7077
7078 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7079
7080         * system.ads: Minor editing.
7081
7082 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7083
7084         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7085         CodePeer mode.
7086         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7087         Attribute_Elab_Subp_Body.
7088         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7089         * sem_util.adb: Update comments.
7090
7091 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7092
7093         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7094         pragma name for each SCO statement corresponding to a pragma.
7095
7096 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7097
7098         * opt.ads: Minor editing.
7099
7100 2011-08-29  Yannick Moy  <moy@adacore.com>
7101
7102         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7103         that only made sense for CodePeer mode.
7104
7105 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7106
7107         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7108         which is no longer used.
7109         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7110         handling of the 64-bit division check.
7111         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7112         division available.
7113         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7114         longer used.
7115
7116 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7117
7118         * get_scos.adb: Minor reformatting.
7119
7120 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7121
7122         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7123         statement list is wrapped in a block, the block is explicitly analyzed
7124         in order to properly redecorate the entities and create a servicing
7125         finalizer.
7126
7127 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7128
7129         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7130         (Set_Zero_Cost_Handling): Remove.
7131
7132 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7133
7134         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7135
7136 2011-08-29  Geert Bosch  <bosch@adacore.com>
7137
7138         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7139         instruction, as the latter may produce -0.0, which is not a valid VAX
7140         F float number.
7141         (Neg_G): Likewise for VAX F float.
7142
7143 2011-08-29  Robert Dewar  <dewar@adacore.com>
7144
7145         * exp_util.adb: Minor reformatting.
7146
7147 2011-08-29  Yannick Moy  <moy@adacore.com>
7148
7149         * sem_ch3.adb: Minor comment update.
7150
7151 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7152
7153         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7154         the operand type.
7155
7156 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7157
7158         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7159         current statement sequence on a generic instantiation or a subprogram
7160         declaration.
7161
7162 2011-08-29  Robert Dewar  <dewar@adacore.com>
7163
7164         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7165         Minor reformatting.
7166
7167 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7168
7169         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7170         Correct the check which involves the freeze node of a controlled or
7171         access-to-controlled type.
7172
7173 2011-08-29  Geert Bosch  <bosch@adacore.com>
7174
7175         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7176         statements.
7177         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7178         Asm statements.
7179
7180 2011-08-29  Yannick Moy  <moy@adacore.com>
7181
7182         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7183         for every index type and component type that is not a subtype_mark.
7184         (Process_Subtype): Set Etype of subtype.
7185
7186 2011-08-29  Robert Dewar  <dewar@adacore.com>
7187
7188         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7189         reorganization.  Minor reformatting.
7190
7191 2011-08-29  Steve Baird  <baird@adacore.com>
7192
7193         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7194         for CodePeer and ALFA modes.
7195
7196 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7197
7198         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7199         that comes from an enclosing scope if it is not the renaming of an
7200         actual, to handle properly a spurious ambiguity in an instance.
7201
7202 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
7203
7204         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7205         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
7206         use it instead of the Esize of the first parameter.
7207         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7208         above change.
7209         <Size>: Likewise.  Call it for composite types on the RM size.
7210
7211 2011-08-29  Yannick Moy  <moy@adacore.com>
7212
7213         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7214         * sem_util.adb (Unique_Name): Correct behaviour for names of
7215         compilation units.
7216
7217 2011-08-29  Yannick Moy  <moy@adacore.com>
7218
7219         * sem_prag.adb (Check_Precondition_Postcondition): In formal
7220         verification mode, analyze pragma expression for correctness, for
7221         pre/post on library-level subprogram, as it is not expanded later.
7222
7223 2011-08-29  Yannick Moy  <moy@adacore.com>
7224
7225         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7226         in formal verification.
7227
7228 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7229
7230         * sem_util.adb: Minor reformatting.
7231         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7232         there's no pragma.
7233         * par_sco.ads, par_sco.adb: Update comments.
7234
7235 2011-08-29  Yannick Moy  <moy@adacore.com>
7236
7237         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7238         associated getter/setter.
7239         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7240
7241 2011-08-29  Vincent Celier  <celier@adacore.com>
7242
7243         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7244         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7245         with declarations for Language_Kind and Dependency_Kind for Ada.
7246         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7247         (Process_Compiler): Take into account the new attributes Dependency_Kind
7248         and Language_Kind.
7249         (Check_Configuration): Check if language kind is unit based, not if the
7250         language name is Ada.
7251         (Process_Exceptions_Unit_Based): Ditto
7252         (Add_Language): Remove default additions of language and dependency kind
7253         * prj.ads: Minor comment change
7254         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7255
7256 2011-08-29  Johannes Kanig  <kanig@adacore.com>
7257
7258         * debug.adb: Update comments.
7259
7260 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
7261
7262         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7263         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7264         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7265         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7266         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7267
7268 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7269
7270         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7271         (GNATLIBCFLAGS_FOR_C): Replace
7272         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7273         (gnatlib-shared-default, gnatlib-shared-dual-win32)
7274         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7275         (gnatlib-sjlj, gnatlib-zcx): Likewise.
7276
7277 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
7278
7279         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7280
7281         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7282
7283         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7284
7285 2011-08-05  Nicolas Roche  <roche@adacore.com>
7286
7287         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7288         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7289         canadian cross.
7290         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7291
7292 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7293
7294         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7295         subprogram bodies declared out-of-order.
7296
7297 2011-08-05  Yannick Moy  <moy@adacore.com>
7298
7299         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7300         entities directly in package Standard, otherwise skip the standard
7301         prefix.
7302
7303 2011-08-05  Robert Dewar  <dewar@adacore.com>
7304
7305         * a-cbmutr.adb: Minor reformatting
7306         (Allocate_Node): refactor node allocation algorithm
7307
7308 2011-08-05  Robert Dewar  <dewar@adacore.com>
7309
7310         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7311         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7312         mode.
7313         (Analyze_Pragma, case Check_Policy): Ditto.
7314         * sem_prag.ads (Check_Disabled): New function
7315         * snames.ads-tmpl: Add Name_Disable.
7316
7317 2011-08-05  Robert Dewar  <dewar@adacore.com>
7318
7319         * gnat_rm.texi: Document implementation-defined policy DISABLE for
7320         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7321
7322 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7323
7324         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7325         that appears in a generic formal part and applies to a formal
7326         subprogram.
7327
7328 2011-08-05  Robert Dewar  <dewar@adacore.com>
7329
7330         * a-cbmutr.ads: Minor reformatting.
7331
7332 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7333
7334         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7335         to check count, check sign of value instead.
7336         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7337         (Copy_Subtree): allocate copy of source element
7338         (Equal_Subtree): compare elements, not access objects
7339
7340 2011-08-05  Vincent Celier  <celier@adacore.com>
7341
7342         * gnat_ugn.texi: Fix VMS alternative.
7343
7344 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7345
7346         * sem_ch11.adb: Add comment.
7347
7348 2011-08-05  Robert Dewar  <dewar@adacore.com>
7349
7350         * exp_util.adb: Minor comment fix.
7351
7352 2011-08-05  Robert Dewar  <dewar@adacore.com>
7353
7354         * scng.adb (Error_Unterminated_String): Improve flag position when
7355         comma present.
7356
7357 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7358
7359         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7360         tree containers).
7361         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7362         multiway tree containers.
7363
7364 2011-08-05  Robert Dewar  <dewar@adacore.com>
7365
7366         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7367         * stylesw.adb: Implement -gnatyC to control comment spacing
7368         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7369         -gnatyc/C).
7370         * usage.adb: Add line for -gnatyC.
7371
7372 2011-08-05  Robert Dewar  <dewar@adacore.com>
7373
7374         * gnat_ugn.texi: Document -gnatyC.
7375         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7376         synonym for COMMENTS2).
7377
7378 2011-08-05  Robert Dewar  <dewar@adacore.com>
7379
7380         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7381         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7382         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7383         a-comutr.ads, lib-xref.adb: Minor reformatting.
7384
7385 2011-08-05  Robert Dewar  <dewar@adacore.com>
7386
7387         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7388         warning if there is an exception handler present.
7389
7390 2011-08-05  Pascal Obry  <obry@adacore.com>
7391
7392         * a-iteint.ads: Fix copyright year.
7393
7394 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7395
7396         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7397         statement SCO for a USE clause or a representation clause.
7398
7399 2011-08-05  Yannick Moy  <moy@adacore.com>
7400
7401         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7402         between body and spec for stub.
7403         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7404         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7405         pragma precondition or postcondition, for which the enclosing
7406         subprogram or package in the AST is not the desired one, return empty.
7407
7408 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7409
7410         * g-expect.adb: Minor reformatting.
7411
7412 2011-08-05  Bob Duff  <duff@adacore.com>
7413
7414         * a-fihema.adb: Comment out OS_Lib.
7415
7416 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7417
7418         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7419         (unbounded multiway tree containers) and a-iteint.ads.
7420         * a-comutr.ads, a-comutr.adb:
7421         This is the new Ada 2012 unit for unbounded multiway tree containers
7422         * a-cimutr.ads, a-cimutr.adb
7423         This is the new Ada 2012 unit for indefinite multiway tree containers
7424         * a-iteint.ads: New file.
7425
7426 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7427
7428         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7429
7430 2011-08-05  Bob Duff  <duff@adacore.com>
7431
7432         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7433         subpools.
7434         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7435
7436 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7437
7438         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7439         general indexing aspects of Ada2012. Called when analyzing indexed
7440         components when other interpretations fail.
7441         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
7442         in an expression context where overloading is meaningful. This excludes
7443         the occurrence in an aspect specification (efficiency only).
7444         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
7445         related to iterators can be set by an attribute specification, but
7446         cannot be queried.
7447         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
7448         Constant_Indexing and Variable_Indexing.
7449         (Check_Indexing_Functions): New procedure to perform legality checks.
7450         Additional semantic checks at end of declarations.
7451
7452 2011-08-05  Sergey Rybin  <rybin@adacore.com>
7453
7454         * tree_io.ads: Update ASIS_Version_Number because of the change of the
7455         order of calling Tree_Write/Tree_Read routines made for aspects.
7456
7457 2011-08-05  Bob Duff  <duff@adacore.com>
7458
7459         * a-fihema.adb (Finalize): Fix race condition.
7460
7461 2011-08-05  Yannick Moy  <moy@adacore.com>
7462
7463         * sem_ch12.adb (Analyze_Package_Instantiation,
7464         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
7465         mode.
7466
7467 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7468
7469         * sem_type.adb (Specific_Type): in an instance, the type-specific
7470         operand of an equality check that involves null may have a private
7471         type. Use full view to determine legality of construct.
7472
7473 2011-08-05  Vincent Celier  <celier@adacore.com>
7474
7475         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7476         delete or close the file when the call to gnatmake was successful.
7477
7478 2011-08-05  Yannick Moy  <moy@adacore.com>
7479
7480         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
7481         Global_Discard_Names.
7482
7483 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7484
7485         * sinfo.ads: comments on use of entity field for aspect specifications.
7486
7487 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7488
7489         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
7490         node is not itself an entity but a selected component, it is a
7491         rewritten parameterless call to an en enclosing synchronized operation,
7492         and this expansion will be performed again in the instance, so there is
7493         no global information to preserve.
7494
7495 2011-08-05  Javier Miranda  <miranda@adacore.com>
7496
7497         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
7498         for renamings of predefined primitives.
7499         (In_Predef_Prims_DT): New subprogram.
7500
7501 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7502
7503         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
7504         possible interpretation of name is a reference type, add an
7505         interpretation that is the designated type of the reference
7506         discriminant of that type.
7507         * sem_res.adb (resolve): If the interpretation imposed by context is an
7508         implicit dereference, rewrite the node as the deference of the
7509         reference discriminant.
7510         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
7511         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
7512         parent type or base type.
7513         * sem_ch4.adb (Process_Indexed_Component,
7514         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
7515         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
7516         Check for implicit dereference.
7517         (List_Operand_Interps): Indicate when an implicit dereference is
7518         ambiguous.
7519         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
7520
7521 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7522
7523         * scos.ads: Update documentation of SCO table. Pragma statements can now
7524         be marked as disabled (using 'p' instead of 'P' as the statement kind).
7525         * par_sco.ads, par_sco.adb: Implement the above change.
7526         (Process_Decisions_Defer): Generate a P decision for the first parameter
7527         of a dyadic pragma Debug.
7528         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
7529         necessary.
7530         * put_scos.adb: Code simplification based on above change.
7531
7532 2011-08-05  Robert Dewar  <dewar@adacore.com>
7533
7534         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
7535         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
7536         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
7537         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
7538
7539 2011-08-05  Bob Duff  <duff@adacore.com>
7540
7541         * a-stunau.ads, g-spipat.adb: Update comments.
7542
7543 2011-08-05  Bob Duff  <duff@adacore.com>
7544
7545         * a-fihema.ads: Minor comment fix.
7546         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
7547         correct.
7548         (Attach, Detach): Remove some unnecessary code.
7549         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
7550
7551 2011-08-05  Bob Duff  <duff@adacore.com>
7552
7553         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
7554         allocation for Objects component. This simplifies the code somewhat. It
7555         is also a little more efficient in the not-so-unusual case where there
7556         are no controlled objects allocated.
7557         Make Finalization_Started flag atomic.
7558         (Finalize): Avoid unnecessary detachment of items from the list.
7559         (pcol): Minor cleanup.
7560
7561 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7562
7563         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
7564         package whose name is the same as that of the generic unit, or its
7565         ultimate prefix.
7566
7567 2011-08-05  Bob Duff  <duff@adacore.com>
7568
7569         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
7570         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
7571         Minor comment fixes.
7572
7573 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
7574
7575         * make.adb (Linking_Phase): No longer need to set source search path
7576         before calling gnatlink in CodePeer mode.
7577         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
7578         gcc in CodePeer mode, since the binder generated file no longer has a
7579         'with Main'.
7580         * switch.ads, switch.adb (Is_Language_Switch): Removed.
7581         * switch-c.adb: Update comment.
7582
7583 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7584
7585         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
7586
7587 2011-08-05  Nicolas Roche  <roche@adacore.com>
7588
7589         * gnat_ugn.texi: Fix minor syntax error issue.
7590
7591 2011-08-05  Vincent Celier  <celier@adacore.com>
7592
7593         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7594         delete or close the file when the call to gnatmake returns a non
7595         successful return code.
7596
7597 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7598
7599         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
7600         check, indicate that the copy of the original node does not come from
7601         source, to prevent an infinite recursion of the expansion.
7602
7603 2011-08-05  Johannes Kanig  <kanig@adacore.com>
7604
7605         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
7606         VC generation for subprogram bodies.
7607
7608 2011-08-05  Yannick Moy  <moy@adacore.com>
7609
7610         * einfo.ads: Typo.
7611         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
7612         the base type with the smallest allowed base type.
7613
7614 2011-08-05  Sergey Rybin  <rybin@adacore.com>
7615
7616         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
7617         aspects.
7618
7619 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7620
7621         * sem_ch12.ads: minor comment updates.
7622
7623 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7624
7625         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
7626         instantiation and a formal package the compiler generates a package
7627         renaming declaration so that the generic name within the declaration
7628         is interpreted as a renaming of the instance. At the end of a formal
7629         package declaration, this renaming must become invisible.
7630
7631 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
7632
7633         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
7634         comparison and rely on concrete entities instead.
7635
7636 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7637
7638         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
7639         and discriminants, to indicate that the type has an access discriminant
7640         that supports implicit dereference.
7641         * snames.ads-tmpl: Add names of aspects and attributes related to
7642         Ada2012 iterators: constant_indexing, default_iterator,
7643         iterator_element, implicit_dereference, variable_indexing.
7644         * aspects.ads, aspects.adb: entries for iterator-related aspects.
7645         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
7646         iterator-related aspects.
7647         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
7648
7649 2011-08-05  Sergey Rybin  <rybin@adacore.com>
7650
7651         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
7652         metrics in gnatmetric to cover new kinds of coupling mentrics.
7653
7654 2011-08-05  Steve Baird  <baird@adacore.com>
7655
7656         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
7657         of calling the user-defined main subprogram.
7658         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
7659         is set) Call_Main_Subprogram ahead of, as opposed to
7660         inside of, Main.
7661         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
7662         generation of a "with" of the user-defined main subprogram.
7663         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
7664         (which is now called from Gen_Main instead).
7665
7666 2011-08-05  Emmanuel Briot  <briot@adacore.com>
7667
7668         * projects.texi: Added reference to the Makefile package.
7669
7670 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7671
7672         * exp_ch7.adb: Minor comment rewording.
7673
7674 2011-08-05  Ed Falis  <falis@adacore.com>
7675
7676         * env.c: Fix comment.
7677
7678 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
7679
7680         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
7681         character comparison and rely on concrete entities instead.
7682
7683 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7684
7685         * sem_ch3.adb: (Check_Private_Overriding): better error message,
7686         suggested by AI95-0068.
7687
7688 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
7689
7690         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
7691         the two potential initialization calls. This accounts for any
7692         access-before-elaboration checks which may precede the initialization
7693         calls.
7694         (Next_Suitable_Statement): New routine. Returns the next real statement
7695         after the input node while skipping generated checks.
7696         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
7697         with comment on usage.
7698         Do not generate Elaborate_All when the trigger is a finalization call
7699         coming from a type init proc.
7700         (Check_Elab_Call): Propagate the initialization procedure context to
7701         subsequent calls to Check_A_Call.
7702         (Check_Internal_Call_Continue): Propagate the initialization procedure
7703         context to subsequent calls to Check_Elab_Call.
7704         (Is_Finalization_Procedure): New routine. Returns True if the input
7705         entity denotes a [Deep_]Finalize routine.
7706         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
7707         along with comment on usage.
7708
7709 2011-08-05  Vadim Godunko  <godunko@adacore.com>
7710
7711         * s-atocou.ads: Add list of supported platforms.
7712
7713 2011-08-05  Yannick Moy  <moy@adacore.com>
7714
7715         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
7716
7717         * opt.ads (Disable_ALI_File): new Boolean flag
7718         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
7719
7720 2011-08-05  Ed Falis  <falis@adacore.com>
7721
7722         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
7723         environ is properly defined.
7724
7725 2011-08-05  Vincent Celier  <celier@adacore.com>
7726
7727         * make.adb (Compilation_Phase): Exit immediately when all objects have
7728         been found up to date, to avoid multiple exit messages.
7729         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
7730         same project for languages with no compiler.
7731         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
7732         -eI.
7733 2011-08-05  Robert Dewar  <dewar@adacore.com>
7734
7735         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
7736         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
7737         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
7738         s-atocou-builtin.adb: Minor reformatting.
7739
7740 2011-08-05  Yannick Moy  <moy@adacore.com>
7741
7742         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
7743         if the node to wrap is a pragma check, this node and enclosed
7744         expression are not expanded, so do not apply any transformations here.
7745         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
7746         introducing transient scopes.
7747
7748 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
7749
7750         * adaint.c (__gnat_set_writable, __gnat_set_readable,
7751         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
7752         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
7753         routine is available, so we use the default implementation of these
7754         functions.
7755         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
7756         support for copying attributes on VxWorks 6.
7757
7758 2011-08-05  Yannick Moy  <moy@adacore.com>
7759
7760         * debug.adb: Remove use of -gnatd.D.
7761         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
7762         * opt.ads: Simplify variables for ALFA mode, to keep one only
7763         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
7764         to ALFA mode.
7765
7766 2011-08-05  Vincent Celier  <celier@adacore.com>
7767
7768         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
7769         Builder'Default_Switches.
7770
7771 2011-08-05  Vincent Celier  <celier@adacore.com>
7772
7773         * makeusg.adb: Add lines for --create-map-file switches.
7774
7775 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7776
7777         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
7778         profile is incomplete and the full view is available, replace it with
7779         the full view.
7780         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
7781         incomplete, freezing the subprogram is delayed until the full view is
7782         frozen.
7783         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
7784         fixed-point multiplication operator and the predefined operator is
7785         resolved in favor of the user-defined one.
7786
7787 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7788
7789         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
7790         CONST_CAST.
7791
7792 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7793
7794         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
7795         whether a type lacks user-defined Read or Write operations, or has a
7796         component that lacks them.
7797         * sem_attr.adb (Check_Stream_Attribute): if restriction
7798         No_Default_Stream_Attributes is active, verify that all subcomponent
7799         types of the target have user-defined stream operations, and report
7800         error otherwise.
7801         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
7802         * exp_strm.adb: Build_Elementary_Input_Call,
7803         Build_Elementary_Write_Call): remove checks for restriction
7804         No_Default_Stream_Attributes, now checked in semantics.
7805
7806 2011-08-04  Vincent Celier  <celier@adacore.com>
7807
7808         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
7809         switches on the command line, look for all valid --RTS switches in the
7810         Builder switches and for each language use the first runtime name found
7811         to invoke gprconfig.
7812         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
7813         command line and there is no auto-configuration.
7814         (Runtime_Name_Set_For): New function.
7815
7816 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7817
7818         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
7819         elaborate initialization expression for variable Abort when processing
7820         a package body or a declaration.
7821         (Create_Finalizer): Propagate the package context when creating the
7822         exception-related variables.
7823         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
7824         For_Package along with usage comment.
7825
7826 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7827
7828         * gcc-interface/Makefile.in: Clean up targets.
7829         Enable new package for atomic counters and copy-on-write implementation
7830         of unbounded strings on x86 platforms.
7831         * gcc-interface/Make-lang.in: Update dependencies.
7832
7833 2011-08-04  Robert Dewar  <dewar@adacore.com>
7834
7835         * exp_ch7.adb: Minor reformatting.
7836
7837 2011-08-04  Robert Dewar  <dewar@adacore.com>
7838
7839         * exp_strm.adb: Minor reformatting.
7840
7841 2011-08-04  Vadim Godunko  <godunko@adacore.com>
7842
7843         * s-atocou.adb: Replace by dummy version and use on targets where atomic
7844         operations are not supported.
7845         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
7846         * s-atocou-x86.adb: New file.
7847         * Makefile.rtl: Add s-atocou.o file
7848
7849 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7850
7851         * make.adb (Compile): Move setting of CodePeer_Mode to ...
7852         (Compilation_Phase): ... here.
7853         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
7854
7855 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7856
7857         * Make-generated.in: Fix minor typo in comment.
7858
7859 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7860
7861         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
7862         the project path.
7863
7864 2011-08-04  Robert Dewar  <dewar@adacore.com>
7865
7866         * a-coinho.adb: Minor reformatting.
7867
7868 2011-08-04  Robert Dewar  <dewar@adacore.com>
7869
7870         * a-coinho.ads: Minor reformatting.
7871
7872 2011-08-04  Vadim Godunko  <godunko@adacore.com>
7873
7874         * s-atocou.ads, s-atocou.adb: New files.
7875         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
7876         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
7877         direct use of GCC's atomic builtins and replace them by use of new
7878         atomic counter package.
7879
7880 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7881
7882         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
7883
7884 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7885
7886         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
7887         with a call to Get_External_Tag.
7888         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
7889         subprogram usage. Remove the guard against package declarations and
7890         bodies since Build_Cleanup_Statements is no longer invoked in that
7891         context.
7892         (Build_Components): Initialize Tagged_Type_Stmts when the context
7893         contains at least one library-level tagged type.
7894         (Build_Finalizer): New local variables Has_Tagged_Types and
7895         Tagged_Type_Stmts along with associated comments on usage. Update the
7896         logic to include tagged type processing.
7897         (Create_Finalizer): Insert all library-level tagged type unregistration
7898         code before the jump block circuitry.
7899         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
7900         (Expand_N_Package_Declaration): Remove the call to
7901         Build_Cleanup_Statements.
7902         (Process_Tagged_Type_Declaration): New routine. Generate a call to
7903         unregister the external tag of a tagged type.
7904         (Processing_Actions): Reimplemented to handle tagged types.
7905         (Process_Declarations): Detect the declaration of a library-level
7906         tagged type and carry out the appropriate actions.
7907         (Unregister_Tagged_Types): Removed. The machinery has been directly
7908         merged with Build_Finalizer.
7909
7910 2011-08-04  Robert Dewar  <dewar@adacore.com>
7911
7912         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
7913         gnatls.adb, exp_ch3.adb: Minor reformatting.
7914
7915 2011-08-04  Marc Sango  <sango@adacore.com>
7916
7917         * sem_attr.adb (Analyze_Attribute): Replace the message
7918         "invisible attribute of}" of the spark restriction violation in
7919         attribute reference by the simple message "invisible attribute of type".
7920         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
7921         two insertion characters: '&' and '}'.
7922
7923 2011-08-04  Vadim Godunko  <godunko@adacore.com>
7924
7925         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
7926         * a-coinho.ads, a-coinho.adb: New file.
7927         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
7928
7929 2011-08-04  Nicolas Roche  <roche@adacore.com>
7930
7931         * alfa_test.adb: Not all ali files are containing alfa information even
7932         if compiled with -gnatd.F. So suppress warning about missing ALFA
7933         information.
7934
7935 2011-08-04  Yannick Moy  <moy@adacore.com>
7936
7937         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
7938         scope.
7939         * put_alfa.adb: Check that scope name is not empty.
7940
7941 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7942
7943         * exp_ch3.adb (Stream_Operation_Ok): new predicate
7944         Needs_Elementary_Stream_Operation, to determine whether user-defined
7945         Read and Write attributes are available for the elementary components
7946         of the given type. If only the predefined attributes are available,
7947         then when restriction No_Default_Stream_Attributes is active the
7948         predefined stream attributes for the composite type cannot be created.
7949
7950 2011-08-04  Robert Dewar  <dewar@adacore.com>
7951
7952         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
7953         Put routines in alpha order
7954
7955 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
7956
7957         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
7958         * gcc-interface/Make-lang.in: Update dependencies.
7959
7960 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7961
7962         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
7963         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
7964         gnat1why).
7965
7966 2011-08-04  Robert Dewar  <dewar@adacore.com>
7967
7968         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
7969         lib-xref-alfa.adb: Minor reformatting.
7970
7971 2011-08-04  Marc Sango  <sango@adacore.com>
7972
7973         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
7974         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
7975         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
7976         mode.
7977
7978 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7979
7980         * bindgen.adb (Gen_Adainit_C): Remove.
7981         (Gen_Adafinal_C): Ditto.
7982         (Gen_Elab_Externals_C): Ditto.
7983         (Gen_Elab_Calls_C): Ditto.
7984         (Gen_Elab_Order_C): Ditto.
7985         (Gen_Elab_Defs_C): Ditto.
7986         (Gen_Finalize_Library_C): Ditto.
7987         (Gen_Finalize_Library_Defs_C): Ditto.
7988         (Gen_Main_C): Ditto.
7989         (Gen_Output_File_C): Ditto.
7990         (Gen_Restrictions_C): Ditto.
7991         (Gen_Versions_C): Ditto.
7992         (Write_Info_Ada_C): Ditto.
7993         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
7994         (Gen_Output_File): Do not force Ada_Bind_File anymore.
7995         Always call Gen_Output_File_Ada.
7996         * gnatlink.adb (Begin_Info): Now a constant.
7997         (End_Info): Ditto.
7998         (Ada_Bind_File): Remove
7999         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
8000         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
8001         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
8002         * opt.ads (Ada_Bind_File): Remove.
8003
8004 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8005
8006         * projects.texi: Document target-specific directory in default project
8007         path for gnatmake.
8008
8009 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8010
8011         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
8012         path in all cases .
8013
8014 2011-08-04  Yannick Moy  <moy@adacore.com>
8015
8016         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
8017         opt.ads, lib-xref.ads: Code clean up.
8018
8019 2011-08-04  Yannick Moy  <moy@adacore.com>
8020
8021         * gnat_rm.texi: Update description of Test_Case
8022         * gnat_ugn.texi: Typo.
8023
8024 2011-08-04  Ed Falis  <falis@adacore.com>
8025
8026         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
8027
8028 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8029
8030         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
8031         it is of type Root_Controlled. This action eliminates fields Prev and
8032         Next from type equality.
8033
8034 2011-08-04  Yannick Moy  <moy@adacore.com>
8035
8036         * lib-xref-alfa.adb: Correct typo.
8037
8038 2011-08-04  Matthew Heaney  <heaney@adacore.com>
8039
8040         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
8041         component.
8042
8043 2011-08-04  Yannick Moy  <moy@adacore.com>
8044
8045         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
8046         (Analyze_Pragma): allow static string expression for name of Test_Case,
8047         instead of simply string literals.
8048         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
8049         expressions.
8050
8051 2011-08-04  Vincent Celier  <celier@adacore.com>
8052
8053         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
8054         case suffixes to find truncated main sources.
8055
8056 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8057
8058         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
8059         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
8060         (Compute_Current_Task): Ditto.
8061
8062 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8063
8064         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
8065
8066 2011-08-04  Yannick Moy  <moy@adacore.com>
8067
8068         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
8069         library-level constant.
8070         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
8071         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
8072         used as selector of parameter association, in ALFA mode.
8073
8074 2011-08-04  Robert Dewar  <dewar@adacore.com>
8075
8076         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
8077         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8078         reformatting.
8079
8080 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8081
8082         * make.adb (Linking_Phase): Set source search path before calling
8083         gnatlink in CodePeer mode.
8084
8085 2011-08-04  Javier Miranda  <miranda@adacore.com>
8086
8087         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8088         Remove code which takes care of building TSDs.
8089         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8090         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8091         the accessibility check in VM targets.
8092         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8093         (Building_Static_DT): Now returns false for VM targets.
8094         (Build_VM_TSDs): Removed.
8095         (Expand_Interface_Conversion): Generate missing runtime check for
8096         conversions to interface types whose target type is unknown at compile
8097         time.
8098         (Make_VM_TSD): Add missing code to disable the generation of calls to
8099         Check_TSD if the tagged type is not defined at library level, or not
8100         has a representation clause specifying its external tag, or -gnatdQ is
8101         active.
8102         * exp_disp.ads (Build_VM_TSDs): Removed.
8103         (Make_VM_TSDs): Spec relocated from exp_disp.adb
8104         * sem_disp.adb (Check_Dispatching_Operation): No code required to
8105         register primitives in the dispatch tables in VM targets.
8106         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8107         initialization of class-wide interface objects in VM targets.
8108         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8109         of Make_DT).
8110
8111 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
8112
8113         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8114         when dotnet-ld cannot be found.
8115
8116 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8117
8118         * bindgen.adb: Simplify significantly generation of binder body file in
8119         CodePeer mode.
8120         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8121         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8122         not expanded).
8123
8124 2011-08-04  Yannick Moy  <moy@adacore.com>
8125
8126         * sem_prag.adb, sem.ads: Code cleanup.
8127
8128 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8129
8130         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8131         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8132         results if possible.
8133         * s-stusta.adb (Print): Adjust after changes in s-stausa.
8134         * gnat_ugn.texi: Update dynamic stack usage section.
8135
8136 2011-08-04  Steve Baird  <baird@adacore.com>
8137
8138         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8139         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8140         contains only a call to the user-defined main subprogram.
8141         (Gen_Main_Ada) - If CodePeer_Mode is set, then
8142         call the "wrapper" subprogram instead of directly
8143         calling the user-defined main subprogram.
8144
8145 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8146
8147         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8148         alternatives of a case statement for controlled objects. Rename local
8149         variable A to Dead_Alt.
8150         (Expand_N_If_Statement): Check the then and else statements of an if
8151         statement for controlled objects. Check the then statements of all
8152         elsif parts of an if statement for controlled objects.
8153         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8154         objects.
8155         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8156         detects a loop associated with the expansion of an array object.
8157         Augment the processing of the loop statements to account for a possible
8158         wrap done by Process_Statements_For_Controlled_Objects.
8159         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8160         statements and abortable part of an asynchronous select for controlled
8161         objects.
8162         (Expand_N_Conditional_Entry_Call): Check the else statements of a
8163         conditional entry call for controlled objects.
8164         (Expand_N_Selective_Accept): Check the alternatives of a selective
8165         accept for controlled objects.
8166         (Expand_N_Timed_Entry_Call): Check the entry call and delay
8167         alternatives of a timed entry call for controlled objects.
8168         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8169         exception handler for controlled objects.
8170         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8171         Add formal parameter Nested_Constructs along with its associated
8172         comment.
8173         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8174         Requires_Cleanup_Actions.
8175         (Process_Statements_For_Controlled_Objects): New routine.
8176         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8177         routine. Inspect a node which contains a non-handled sequence of
8178         statements for controlled objects. If such an object is found, the
8179         statements are wrapped in a block.
8180
8181 2011-08-04  Bob Duff  <duff@adacore.com>
8182
8183         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8184         need to compare with Class_Wide_Type (T2), in order to get at the
8185         original class-wide type node.
8186         * sem_type.ads (Covers): Improve the comment.
8187         * einfo.ads (Class_Wide_Type): Improve the comment.
8188         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8189         the type of the Deref.
8190
8191 2011-08-04  Yannick Moy  <moy@adacore.com>
8192
8193         * gnat_rm.texi: Document that Test_Case pragma can only appear on
8194         separate declarations.
8195         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8196         check identifier of pragma argument.
8197         (Chain_TC): check that no other test case associated to the same entity
8198         share the same name.
8199         (Check_Test_Case): disallow test case inside subprogram body
8200         (Analyze_Pragma): correct call to check identifier and not argument
8201         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8202         function gets name from test case pragma.
8203
8204 2011-08-04  Yannick Moy  <moy@adacore.com>
8205
8206         * gnat_rm.texi: Document new pragma and aspect.
8207         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8208         (No_Duplicates_Allowed): new constant array defining whether duplicates
8209         aspects of each kind can appear on the same declaration.
8210         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8211         field, which points to a node holding the previous Spec_PPC_List.
8212         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8213         through the indirection with Contract.
8214         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8215         * par-prag.adb (Prag): do nothing on Test_Case pragma
8216         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8217         be called directly.
8218         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8219         component Ensures of Test_Case.
8220         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8221         (Analyze_Generic_Subprogram_Declaration,
8222         Analyze_Subprogram_Instantiation,
8223         Analyze_Abstract_Subprogram_Declaration,
8224         Analyze_Subprogram_Body_Helper,
8225         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8226         insert contract in subprogram node at point of definition
8227         * sem_ch13.adb
8228         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8229         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8230         corresponding pragma
8231         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8232         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8233         similar to the analysis of pre/post
8234         (Derive_Subprogram): insert contract in subprogram node at point of
8235         derivation.
8236         * sem_prag.adb, sem_prag.ads
8237         (Check_Arg_Is_String_Literal, Check_Identifier):
8238         new checking procedures to be called in treatment of pragmas
8239         (Check_Test_Case): new procedure to check that a Test_Case aspect or
8240         pragma is well-formed. This does not check currently that 'Result is
8241         used only in the Ensures component of a Test_Case.
8242         (Analyze_Pragma): add case for Test_Case
8243         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8244         components of a Test_Case.
8245         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8246         expressions in the 3rd (and 4th if present) arguments of a Test_Case
8247         pragma, treated as spec expressions.
8248         (Sig_Flags): add value -1 for Test_Case.
8249         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8250         Get_Requires_From_Test_Case_Pragma): getters for both expression
8251         components of a Test_Case.
8252         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8253         indirection between an entry or [generic] subprogram entity and its
8254         pre/post + test-cases.
8255         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8256         get/set for fields of an N_Contract node.
8257         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8258         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8259         names and pragma for Test_Case.
8260         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8261
8262 2011-08-04  Vincent Celier  <celier@adacore.com>
8263
8264         * gnat_ugn.texi: Improve documentation of gnatmake switch
8265         --source-info-file=.
8266
8267 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8268
8269         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8270         type). Initialize Atyp to the appropriate type which is later checked
8271         for completion. Rewrite the assertion associated with private type
8272         completion.
8273
8274 2011-08-04  Ed Falis  <falis@adacore.com>
8275
8276         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8277         initialize the number of CPUs.
8278
8279 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8280
8281         * sem_type.adb (Disambiguate): New subsidiary routine
8282         In_Same_Declaration_List, to implement AI05-0020: a user-defined
8283         equality on an anonymous access type whose designated type is private
8284         does not lead to an ambiguity with the universal access equality
8285         operator in the body or child units of the defining package. The same
8286         is true for a multiplication operator on a private type completed with
8287         a fixed-point-type.
8288
8289 2011-08-04  Javier Miranda  <miranda@adacore.com>
8290
8291         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8292         (Normalize_Scalars_Config): Removed.
8293         * opt.adb
8294         (Register_Opt_Config_Switches): Remove registering config values of
8295         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8296         (Restore_Opt_Config_Switches): Remove code which restores the values of
8297         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8298         Init_Or_Norm_Scalars.
8299         (Save_Opt_Config_Switches): Remove code which saves values of
8300         Init_Or_Norm_Scalars and Normalize_Scalars.
8301         (Set_Opt_Config_Switches): Remove code which restores config values of
8302         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8303         Init_Or_Norm_Scalars.
8304
8305 2011-08-04  Yannick Moy  <moy@adacore.com>
8306
8307         * frontend.adb (Frontend): remove previous patch to avoid full
8308         qualification in ALFA mode.
8309         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8310         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8311         unique name for an entity, which could be used to identify the entity
8312         across compilation units.
8313
8314 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8315
8316         * prj-env.adb
8317         (Initialize_Default_Project_Path): Add target specific directory
8318         ($prefix/$target/lib/gnat) in front of project path in all cases
8319         (making gnatmake's behaviour consistent with gprbuild).
8320         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8321         Pass target name from Sdefault to project subsystem.
8322         * gnatls.adb: Show new target specific default project directory.
8323
8324 2011-08-04  Johannes Kanig  <kanig@adacore.com>
8325
8326         * cstand.adb: Add Information to Identifier in Standard
8327         (Identifer_For): Set Entity to the corresponding entity
8328
8329 2011-08-04  Sergey Rybin  <rybin@adacore.com>
8330
8331         * gnat_ugn.texi: Update doc on gnatcheck.
8332
8333 2011-08-04  Yannick Moy  <moy@adacore.com>
8334
8335         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8336         xrefs in a scope.
8337
8338 2011-08-04  Yannick Moy  <moy@adacore.com>
8339
8340         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8341         performing expansion.
8342         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8343         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8344         it is not called in ALFA mode.
8345
8346 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8347
8348         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8349         after all, so removed.
8350
8351 2011-08-04  Sergey Rybin  <rybin@adacore.com>
8352
8353         * vms_data.ads: Add missing VMS qualifiers.
8354
8355 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8356
8357         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8358         the list of files on the command line after processing it through
8359         Complete_Mains.
8360
8361 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8362
8363         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8364         processing for .NET/JVM. These targets can now benefit from
8365         Raise_From_Controlled_Operation and they share the same processing with
8366         standard targets.
8367         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8368         These targets need transient scopes in order to properly finalize short
8369         lived controlled objects.
8370         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8371          NET/JVM. These targets can now benefit from
8372         Raise_From_Controlled_Operation and they share the same processing with
8373         standard targets.
8374
8375 2011-08-04  Geert Bosch  <bosch@adacore.com>
8376
8377         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8378
8379 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8380
8381         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8382         Expand_Record_Aggregate, to determine whether aggregate must be
8383         expanded into assignments. This is the case if the ancestor part is
8384         private, regarless of the setting of the flag Has_Private_Ancestor.
8385
8386 2011-08-04  Ed Falis  <falis@adacore.com>
8387
8388         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8389
8390 2011-08-04  Bob Duff  <duff@adacore.com>
8391
8392         * sinfo.ads: Fix comment.
8393
8394 2011-08-04  Steve Baird  <baird@adacore.com>
8395
8396         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8397         choose a package name in much the same way as is
8398         done for JGNAT when VM_Target /= No_VM, except that
8399         a slightly more distinctive prefix string is used.
8400
8401 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8402
8403         * makeutl.adb (Complete_Mains): no longer accept unit names on the
8404         gnatmake command line.
8405         This behavior was never documented (and was supported only because of
8406         an early bug in the code). This case might lead to ambiguous cases
8407         (between unit names and truncated base names without suffixes).
8408
8409 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8410
8411         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8412         Remove the external tag of a tagged type from the internal hash table.
8413         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8414         expanded usage of the routine. Strenghten the check for Is_Master. Add
8415         processing for tagged types.
8416         (Build_Finalizer): Create all the necessary lists used in finalizer
8417         creation when the processed context is a package that may contain
8418         tagged types.
8419         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8420         Requires_Cleanup_Actions.
8421         (Expand_N_Package_Body): Package bodies may need clean up code
8422         depending on whether they contain tagged types.
8423         (Expand_N_Package_Declaration): Package declarations may need clean up
8424         code depending on whether they contain tagged types.
8425         (Unregister_Tagged_Types): New routine. Search through a list of
8426         declarations or statements, looking for non-abstract Ada tagged types.
8427         For each such type, generate code to unregister the external tag.
8428         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8429         Requires_Cleanup_Actions.
8430         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8431         through a list of declarations or statements looking for non-abstract
8432         Ada tagged types or controlled objects.
8433         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8434         Requires_Cleanup_Actions.
8435         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8436         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8437         RE_Unit_Table.
8438
8439 2011-08-04  Vincent Celier  <celier@adacore.com>
8440
8441         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
8442         has Ada sources, not project Project, because if the root project
8443         Project has no sources of its own, all projects will be deemed without
8444         sources.
8445
8446 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
8447
8448         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
8449         of the No_Param_Proc acc-to-subp type used for initialization of
8450         __gnat_finalize_library_objects so that it's declared at library level
8451         rather than nested inside of the adainit routine.
8452
8453 2011-08-04  Javier Miranda  <miranda@adacore.com>
8454
8455         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
8456         if the tagged type has a representation clause which specifies its
8457         external tag.
8458
8459 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8460
8461         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
8462         Remove previous procedure with that name.
8463         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
8464         when appropriate.
8465         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
8466         subtype mark, the ancestor cannot have unknown discriminants.
8467         (Resolve_Record_Aggregate): if the type has invisible components
8468         because of a private ancestor, the aggregate is illegal.
8469
8470 2011-08-04  Vincent Celier  <celier@adacore.com>
8471
8472         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
8473         account switches -gnat2005, -gnat12 and -gnat2012.
8474
8475 2011-08-04  Bob Duff  <duff@adacore.com>
8476
8477         * s-tasdeb.ads: Minor comment fix.
8478
8479 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8480
8481         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
8482         CodePeer mode.
8483         * switch.ads, switch.adb (Is_Language_Switch): New function.
8484
8485 2011-08-04  Vincent Celier  <celier@adacore.com>
8486
8487         * switch-c.adb: Minor comment addition.
8488
8489 2011-08-04  Vincent Celier  <celier@adacore.com>
8490
8491         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
8492         ending with '=' is followed by a space (missing file name).
8493
8494 2011-08-04  Pascal Obry  <obry@adacore.com>
8495
8496         * g-regist.ads: Fix size of HKEY on x86_64-windows.
8497
8498 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8499
8500         * sem_ch12.adb (Analyze_Associations): New routine
8501         Check_Overloaded_Formal_Subprogram to reject a formal package when
8502         there is a named association or a box initialisation for an overloaded
8503         formal subprogram of the corresponding generic.
8504
8505 2011-08-04  Yannick Moy  <moy@adacore.com>
8506
8507         * alfa.ads (ALFA_Xref_Record): add component for type of entity
8508         * get_alfa.adb, put_alfa.adb: Read and write new component of
8509         cross-reference.
8510         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
8511
8512 2011-08-04  Pascal Obry  <obry@adacore.com>
8513
8514         * urealp.adb: Minor reformatting.
8515
8516 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8517
8518         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
8519         Handle the case when Cleanup_Protected_Object returns Empty.
8520
8521 2011-08-04  Yannick Moy  <moy@adacore.com>
8522
8523         * frontend.adb (Frontend): only qualify names in non-ALFA mode
8524
8525 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8526
8527         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
8528         call, ignore functions.
8529
8530 2011-08-04  Geert Bosch  <bosch@adacore.com>
8531
8532         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
8533         point.
8534
8535 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8536
8537         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
8538         as an index for Builder'Switches. This conforms to the documentation.
8539         * make.adb (Insert_Project_Sources): avoid duplicate code
8540
8541 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8542
8543         * makeutl.adb (Complete_Mains): if the user has passed a relative file
8544         name on the command line (for instance "../dummy"), never assume it can
8545         be a unit name.
8546
8547 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8548
8549         * bindgen.adb: Remove code the reference or create the
8550         Break_Start/__gnat_break_start procedure.
8551         * s-stalib.adb (Break_Start): Removed.
8552
8553 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8554
8555         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
8556         shared with gprbuild.
8557
8558 2011-08-04  Yannick Moy  <moy@adacore.com>
8559
8560         * par-ch4.adb (P_Primary): preferentially issue an error message about
8561         a missing parenthesis arount a conditional or case expression in Ada
8562         2012 mode, if we detect that the alignment is not correct for a
8563         statement.
8564
8565 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8566
8567         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
8568         tag-to-class-wide conversion as needing finalization actions.
8569         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
8570         a tag-to-class-wide conversion as needing finalization actions.
8571         (Is_Finalizable_Transient): The result of a tag-to-class-wide
8572         conversion does not need finalization actions.
8573         (Is_Tag_To_CW_Conversion): New routine.
8574         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
8575         whether an object is the result of a tag-to-class-wide conversion.
8576
8577 2011-08-04  Yannick Moy  <moy@adacore.com>
8578
8579         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
8580         the left-hand-side and right-hand-side of a conjunct are inserted when
8581         translating a pre- or postcondition
8582         * sem_ch6.adb: Correct typo in comment
8583
8584 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8585
8586         * gnat_rm.texi: Ravenscar does not prohibit dependence on
8587         Unchecked_Conversion and Unchecked_Deallocation.
8588
8589 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8590
8591         * make.adb: Minor reformatting.
8592
8593 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8594
8595         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
8596         sources in the project and its imported projects, but not in the whole
8597         tree.
8598
8599 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8600
8601         * make.adb: Remove debug trace.
8602
8603 2011-08-04  Vincent Celier  <celier@adacore.com>
8604
8605         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
8606         path in canonical form, to be able to compare path names on platforms
8607         such as Windows or Darwin.
8608
8609 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8610
8611         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
8612         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
8613         * scos.ads: Update documentation accordingly.
8614         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
8615         pragmas.
8616
8617 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8618
8619         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
8620         attribute only if prefix type is scalar.
8621
8622 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8623
8624         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
8625         in gnatmake for specifying mains on the command line that do not belong
8626         to the main project. These mains must currently all belong to the same
8627         project, though.
8628         (Ultimate_Extension_Of): removed, since duplicated
8629         Ultimate_Extending_Project.
8630
8631 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8632
8633         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
8634         instead.
8635         (CodePeer_Mode_String): New.
8636         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
8637         CodePeer mode.
8638         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
8639         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
8640         mode, since no useful elaboration subprogram is needed by CodePeer.
8641         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
8642         In this mode, compile binder file with -gnatC and do stop after this
8643         step.
8644
8645 2011-08-04  Vincent Celier  <celier@adacore.com>
8646
8647         * exp_ch7.adb: Minor comment fix.
8648
8649 2011-08-04  Robert Dewar  <dewar@adacore.com>
8650
8651         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
8652         exp_ch4.adb, makeutl.adb: Minor reformatting.
8653
8654 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8655
8656         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
8657         Create several new subprograms to move code out of Make. This makes the
8658         code more readable, removes code duplication, and is a preparation work
8659         for adding support for aggregate projects.
8660
8661 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8662
8663         * s-po32gl.ads, s-po32gl.adb: New files.
8664         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
8665         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
8666         (Build_Finalization_Collection): Use it.
8667         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
8668         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
8669         literals.
8670         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
8671         * gcc-interface/Make-lang.in: Update dependencies.
8672
8673 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8674
8675         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
8676         the command line.
8677
8678 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8679
8680         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
8681         command line is not a file name, also check whether it could be a unit
8682         name.
8683
8684 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8685
8686         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
8687         the header of the finalization routine.
8688         If the unit has no finalizer but is a body whose spec has one, then
8689         generate the decrement of the elaboration entity only.
8690         If the unit has a finalizer and is a spec, then do not generate the
8691         decrement of the elaboration entity.
8692         (Gen_Finalize_Library_C): Likewise.
8693
8694 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8695
8696         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
8697         (Bounds_Size_Expression): Removed.
8698         (Double_Alignment_Of): New subsidiary routine.
8699         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
8700         for a hole in the dope vector of unconstrained arrays due to different
8701         index and element alignments.
8702
8703 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8704
8705         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
8706         raise program_error because body has not been seen yet.
8707
8708 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8709
8710         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
8711         an unresolved name.
8712
8713 2011-08-04  Vincent Celier  <celier@adacore.com>
8714
8715         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
8716
8717 2011-08-04  Yannick Moy  <moy@adacore.com>
8718
8719         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
8720         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
8721
8722 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8723
8724         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
8725         instantiation in RCI.
8726
8727 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8728
8729         * make.adb: Share more code with gprbuild
8730
8731 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8732
8733         * projects.texi: Added documentation for the IDE'Gnat project file
8734         attribute.
8735
8736 2011-08-04  Nicolas Roche  <roche@adacore.com>
8737
8738         * gnat_rm.texi: Minor editing.
8739
8740 2011-08-04  Javier Miranda  <miranda@adacore.com>
8741
8742         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
8743         and the library case for VM targets.
8744         (Gen_Adainit_Ada): Likewise.
8745
8746 2011-08-04  Robert Dewar  <dewar@adacore.com>
8747
8748         * g-altive.ads: Minor comment updates.
8749         * prj-nmsc.adb: Minor reformatting.
8750
8751 2011-08-04  Javier Miranda  <miranda@adacore.com>
8752
8753         * opt.ads
8754         (Normalize_Scalars_Config): Value of the configuration switch set by
8755         pragma Normalize_Scalars when it appears in the gnat.adc file.
8756         (Normalize_Scalars): New field for record Config_Switches_Type. Used
8757         to save and restore settings of this pragma.
8758         * opt.adb
8759         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
8760         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
8761
8762 2011-08-04  Vincent Celier  <celier@adacore.com>
8763
8764         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
8765
8766 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8767
8768         * makeutl.adb: Minor reformatting.
8769
8770 2011-08-04  Olivier Hainque  <hainque@adacore.com>
8771
8772         * g-altive.ads: Update comments to reflect that only the soft
8773         binding is available today.
8774
8775 2011-08-04  Robert Dewar  <dewar@adacore.com>
8776
8777         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
8778         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
8779         * gcc-interface/Make-lang.in: Update dependencies.
8780
8781 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8782
8783         * prj-env.adb: Remove local debug traces.
8784
8785 2011-08-04  Yannick Moy  <moy@adacore.com>
8786
8787         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
8788         was used instead of Hi_OK, which could cause a read of an uninitialized
8789         value later on. Detected while working on the new warning.
8790         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
8791         to local variable.
8792         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
8793         in more cases, in order to detect more unreferenced values.
8794         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
8795         object for expression, if any.
8796
8797 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8798
8799         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
8800         the operand types instead of the Esize.
8801
8802 2011-08-04  Steve Baird  <baird@adacore.com>
8803
8804         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
8805         enable CodePeer_Mode.
8806         * bindusg.adb (Display): Add help message describing -P binder switch.
8807         * gnat_ugn.texi: Document -P binder switch.
8808         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
8809         user-defined main program directly.
8810         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
8811         user-defined main program in the context clause of the package body.
8812
8813 2011-08-04  Yannick Moy  <moy@adacore.com>
8814
8815         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
8816         duplicate of Defining_Entity
8817         (Get_Unique_Entity_For_Decl): rename function into
8818         Unique_Defining_Entity
8819         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
8820         (Formal_Proof_On): remove synthesized flag
8821         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8822         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
8823         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
8824         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
8825         Annotate (Formal_Proof)
8826
8827 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8828
8829         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
8830         source files with non-standard naming schemes, in imported projects
8831
8832 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8833
8834         * makeutl.adb (Complete_Mains): when a multi-unit source file is
8835         specified on the gprbuild command line, we need to compile all units
8836         within that file, not just the first one we find
8837         Fix error message for mains that are not found.
8838
8839 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8840
8841         * sem_ch6.adb: Update comment.
8842         * sem_ch12.adb: Minor reformatting.
8843
8844 2011-08-04  Bob Duff  <duff@adacore.com>
8845
8846         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
8847         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
8848         race condition whose symptom is to fail to lock Parent. That, in turn,
8849         causes Parent.Awake_Count to be accessed without locking Parent, which
8850         causes another race condition whose symptom is that Parent.Awake_Count
8851         can be off by 1 (either too high or too low). The solution is to lock
8852         Parent unconditionally, and then lock Acceptor, before reading
8853         Acceptor.Terminate_Alternative.
8854
8855 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8856
8857         * debug.adb: Update comment.
8858
8859 2011-08-04  Robert Dewar  <dewar@adacore.com>
8860
8861         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
8862         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
8863         exp_ch6.adb: Minor reformatting.
8864
8865 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
8866
8867         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
8868         checks for -gnateE.
8869
8870 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8871
8872         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
8873
8874 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8875
8876         * sinfo.ads: Minor reformatting.
8877
8878 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8879
8880         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
8881         even if there is no location.
8882
8883 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8884
8885         * sem_res.adb, sem_ch4.adb: move check for restriction
8886         No_Task_Hierarchy to resolve_allocator.
8887
8888 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8889
8890         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
8891         This flag of N_Pragma nodes is not used, remove it as well as all of
8892         the associated circuitry.
8893
8894 2011-08-04  Javier Miranda  <miranda@adacore.com>
8895
8896         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
8897         runtime check on duplicated externa tags
8898         * debug.adb Document switch -gnatdQ.
8899
8900 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
8901
8902         * a-fihema.ads: Minor typo fix.
8903
8904 2011-08-04  Yannick Moy  <moy@adacore.com>
8905
8906         * sem_ch10.adb: Minor comment update.
8907
8908 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8909
8910         * einfo.adb: Update the node field usage to reflect the renaming of
8911         Return_Flag to Return_ Flag_Or_Transient_Decl.
8912         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
8913         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
8914         (Write_Field15_Name): Change Return_Flag to
8915         Return_Flag_Or_Transient_Decl.
8916         * einfo.ads: Rename node field Return_Flag to
8917         Return_Flag_Or_Transient_Decl. Update the associated comment and all
8918         occurrences in entities.
8919         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
8920         associated Inline pragma.
8921         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
8922         associated Inline pragma.
8923         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
8924         routine.
8925         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
8926         Return_Flag and Set_Return_Flag.
8927         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
8928         objects generated for controlled transients declared inside an
8929         Exception_With_Actions. Update the calls to Return_Flag.
8930         (Process_Object_Declaration): Add code to add a null guard for hook
8931         objects generated for controlled transients declared inside an
8932         Exception_With_Actions. Update related comment.
8933         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
8934         objects generated for controlled transients declared inside an
8935         Exception_With_Actions. Update the calls to Return_Flag.
8936         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
8937
8938 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8939
8940         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
8941         positional aggregate.
8942
8943 2011-08-04  Vincent Celier  <celier@adacore.com>
8944
8945         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
8946         SLOC only for pragmas.
8947
8948 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8949
8950         * projects.texi: Minor typo fix.
8951
8952 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8953
8954         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
8955         on case-sensitive file systems.
8956
8957 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8958
8959         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
8960         nested in a disabled pragma.
8961         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
8962         enclosing pragma, if any, for X decisions.
8963
8964 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8965
8966         * sem_prag.adb: Minor reformatting.
8967
8968 2011-08-04  Vincent Celier  <celier@adacore.com>
8969
8970         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
8971         allowed in no run time mode.
8972
8973 2011-08-04  Vincent Celier  <celier@adacore.com>
8974
8975         * make.adb (Check): When -gnatc is used, check for the source file
8976         inside the ALI file with a canonical case file name.
8977
8978 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8979
8980         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
8981         overriding the separator.
8982
8983 2011-08-04  Robert Dewar  <dewar@adacore.com>
8984
8985         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
8986         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
8987
8988 2011-08-04  Robert Dewar  <dewar@adacore.com>
8989
8990         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
8991
8992 2011-08-04  Yannick Moy  <moy@adacore.com>
8993
8994         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
8995         'Result only appears in postcondition of function.
8996
8997 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8998
8999         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
9000         external tag, include the value of the external tag in the exception
9001         message.
9002
9003 2011-08-04  Yannick Moy  <moy@adacore.com>
9004
9005         * sem_attr.adb (Result): modify error message for misplaced 'Result
9006
9007 2011-08-04  Sergey Rybin  <rybin@adacore.com>
9008
9009         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
9010         clear that the second argument must be an identifier.
9011
9012 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9013
9014         * exp_ch9.adb (Build_Barrier_Function): When compiling with
9015         -fpreserve-control-flow, insert an IF statement on the barrier
9016         condition to ensure that a conditional branch instruction is generated.
9017
9018 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9019
9020         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
9021         (Processing_Flags.Ignore_Missing_With): new flag.
9022
9023 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9024
9025         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
9026         Source_List_File on case-insensitive systems where the file is actually
9027         on a case-sensitive file system (NFS,...).
9028
9029 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9030
9031         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
9032         function return contains a controlled [extension] aggregate and the
9033         return statement is not part of a handled sequence of statements, wrap
9034         the return in a block. This ensures that all controlled temporaries
9035         generated during aggregate resolution will be picked up by the
9036         finalization machinery.
9037
9038 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9039
9040         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
9041         components, freeze type before resolution, to ensure that default
9042         initializations are present for all components.
9043         * sem_res.adb (Resolve_Actuals): the designated object of an
9044         accces-to-constant type is a legal actual in a call to an
9045         initialization procedure.
9046
9047 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9048
9049         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
9050         N_Unchecked_Type_Conversion to the possible containers of a renamed
9051         transient variable.
9052
9053 2011-08-04  Yannick Moy  <moy@adacore.com>
9054
9055         * par-ch13.adb (Aspect_Specifications_Present): recognize
9056         "with Identifier'Class =>" as an aspect, so that a meaningful warning
9057         is issued in Strict mode.
9058         * par.adb: Fix typos in comments.
9059
9060 2011-08-04  Yannick Moy  <moy@adacore.com>
9061
9062         * sem_attr.adb (Result): modify error message to take into account Post
9063         aspect when compiling Ada 2012 (or newer) code.
9064
9065 2011-08-04  Nicolas Roche  <roche@adacore.com>
9066
9067         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
9068         remove need for GCC exceptions.
9069
9070 2011-08-04  Vincent Celier  <celier@adacore.com>
9071
9072         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
9073         project, not the source file name.
9074         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
9075         excluded, continue looking. This excluded source will only be returned
9076         if there is no other source with the same base name that is not locally
9077         removed.
9078
9079 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9080
9081         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9082         private and one of the operands is a real literal, use a qualified
9083         expression rather than a conversion which is not meaningful to the
9084         back-end.
9085
9086 2011-08-04  Yannick Moy  <moy@adacore.com>
9087
9088         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9089         corresponding aspect X'Class are allowed, proceed with analysis of the
9090         aspect instead of skipping it.
9091
9092 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9093
9094         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9095         This will allow to have an Ada implementation for the subprogram.
9096
9097 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9098
9099         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9100         completion and aspects are present, apply them to the entity for the
9101         type which is currently the partial view, but which is the one that
9102         will be frozen.
9103         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9104         applies to a partial view, indicate that the full view has predicates
9105         and delayed aspects.
9106         (Replace_Type_Reference): Handle properly predicates that apply to the
9107         full view of a private completion.
9108
9109 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9110
9111         * layout.adb (Layout_Type): For composite types, do not set Esize.
9112         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9113         set Esize.
9114         (Size_Known): Look at the RM size of components instead of the Esize.
9115         (Freeze_Record_Type): Look at the RM size instead of the Esize to
9116         issue warning and activate Implicit_Packing.
9117         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
9118         if the Esize is not known.
9119         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9120         for elementary types only.
9121         (Analyze_Record_Representation_Clause): Look at the RM size instead
9122         of the Esize to issue errors.
9123         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9124         is not known.
9125         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
9126         obsolete block.
9127         Look at the RM size instead of the Esize for types if the latter is
9128         not known.
9129         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9130
9131 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9132
9133         * sem_type.adb: proper handling of equality not involving anonymous
9134         access types.
9135
9136 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9137
9138         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9139         Vis_Decls. When creating a library-level finalizer for a package spec,
9140         both the declaration and body of the finalizer are inserted either in
9141         the visible or private declarations of the package spec.
9142
9143 2011-08-04  Javier Miranda  <miranda@adacore.com>
9144
9145         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9146         use of the full-view of a type when invoking Is_Ancestor.
9147         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9148         the full-view of private parents is requested, then use also the
9149         full-view of the parent of the first derivation.
9150
9151 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9152
9153         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9154         instead of the locally imported procedure.
9155         * s-taprop-mingw.adb (Enter_Task): Ditto.
9156         * s-valrea.adb (Scan_Real): Ditto.
9157         * s-imgrea.adb (Set_Image_Real): Ditto.
9158         * s-flocon.ads: Make the package pure.
9159
9160 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9161
9162         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9163         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9164         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9165         New subprogram, moved here from...
9166         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9167         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9168         rewriting of the last argument into a procedure call statement here...
9169         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9170         instead.
9171
9172 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9173
9174         * par_sco.adb: Minor reformatting.
9175
9176 2011-08-04  Robert Dewar  <dewar@adacore.com>
9177
9178         * erroutc.adb: Minor reformatting.
9179
9180 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9181
9182         * par_sco.adb: Comment update.
9183
9184 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9185
9186         * s-flocon.ads: New file.
9187         * g-flocon.ads: Now a renaming of s-flocon.
9188         * Makefile.rtl: Add s-flocon.o
9189
9190 2011-08-04  Javier Miranda  <miranda@adacore.com>
9191
9192         * exp_strm.adb (Build_Array_Input_Function): if the array type is
9193         constrained, do not attempt to build a subtype of it.
9194
9195 2011-08-04  Yannick Moy  <moy@adacore.com>
9196
9197         * errout.ads Change comments: remove 'R'M as an example where quotes
9198         are needed; add ALFA as another case where quotes are not needed
9199         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9200         case where quotes are not needed.
9201         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9202         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9203         Remove all occurrences of 'A'L'F'A
9204
9205 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9206
9207         * sem_ch13.adb: check legality of invariant pragma.
9208
9209 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9210
9211         * bindgen.adb: Add comments.
9212
9213 2011-08-04  Yannick Moy  <moy@adacore.com>
9214
9215         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9216         synthesized flag.
9217         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9218         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9219
9220 2011-08-04  Robert Dewar  <dewar@adacore.com>
9221
9222         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9223         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9224         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9225
9226 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9227
9228         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9229
9230 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9231
9232         PR ada/47880
9233         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9234         allocated object.
9235
9236 2011-08-04  Robert Dewar  <dewar@adacore.com>
9237
9238         * einfo.ads, exp_ch4.adb: Minor reformatting.
9239
9240 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9241
9242         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9243
9244 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9245
9246         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9247         type in all cases to compute list of primitive operations, because full
9248         view may be an itype that is not attached to the list of declarations.
9249
9250 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9251
9252         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9253         library has already been finalized.
9254         (Gen_Adafinal_C): Likewise.
9255         (Gen_Adainit_Ada): Generate an early return if the library has
9256         already been elaborated.
9257         (Gen_Adainit_C): Likewise.
9258         (Gen_Output_File_Ada): Generate an elaboration flag.
9259         (Gen_Output_File_C): Likewise.
9260
9261 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9262
9263         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9264         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9265         built in the first place.
9266         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9267         for CodePeer because Finalize_Address was not built to begin with.
9268         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9269
9270 2011-08-04  Pascal Obry  <obry@adacore.com>
9271
9272         * adaint.c (__gnat_tmp_name): Use current process id to create temp
9273         filenames, this ensures unicity of filenames across processes.
9274
9275 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9276
9277         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9278         Raise_Controlled to Raise_From_Controlled_Operation. Update the
9279         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9280         Add False as the actual to From_Abort in the generated call to
9281         Raise_From_Controlled_Operation.
9282
9283 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9284
9285         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9286         so that the ali file name can be retrieved from outside of this package.
9287         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9288         doing nothing in the general case, but used to update the object file
9289         timestamp if directly generated by the backend.
9290         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9291         to a later time than the ali file one.
9292
9293 2011-08-04  Yannick Moy  <moy@adacore.com>
9294
9295         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9296         entities whose body contains an Annotate pragma which forces formal
9297         proof on this body.
9298         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9299         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9300         Mark_Non_ALFA_Subprogram to pass in a message and node.
9301         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9302         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9303         surrounding subprogram.
9304         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9305         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9306         as not in ALFA is annotated with Formal_Proof being On, then an error
9307         is issued based on the additional parameters for message and node.
9308         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9309         * gcc-interface/Make-lang.in: Update dependencies.
9310
9311 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9312
9313         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9314         Finalize_Address when CodePeer is enabled.
9315
9316 2011-08-04  Pascal Obry  <obry@adacore.com>
9317
9318         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9319         the latter returns a pointer to a static buffer which is deallocated
9320         at the end of the routine.
9321
9322 2011-08-04  Yannick Moy  <moy@adacore.com>
9323
9324         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9325         after index creation; mark unconstrained base array type generated as
9326         being in/not in ALFA as well
9327         (Make_Index): mark subtype created as in/not in ALFA
9328         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9329         over a loop as in/not in ALFA, depending on its type and form of loop
9330         iteration.
9331
9332 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9333
9334         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9335         directly to False on .NET and JVM.
9336
9337 2011-08-04  Yannick Moy  <moy@adacore.com>
9338
9339         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9340         constraint that subtype must come from source code to be in ALFA, so
9341         that anonymous subtypes can be in ALFA too.
9342
9343 2011-08-04  Yannick Moy  <moy@adacore.com>
9344
9345         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9346         reference for ALFA mode.
9347         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9348         procedure public so as to use it from formal verification back-end.
9349
9350 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9351
9352         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9353         invalid checks of the Parameter, making Remove_Switch not working
9354         correctly.
9355
9356 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9357
9358         * targparm.ads: Update header: no run-time exception is needed on this
9359         file.
9360
9361 2011-08-04  Vincent Celier  <celier@adacore.com>
9362
9363         * a-fihema.adb: Use System.IO instead of GNAT.IO
9364
9365 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9366
9367         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9368         are forbidden in Compiler_Unit mode.
9369
9370 2011-08-04  Robert Dewar  <dewar@adacore.com>
9371
9372         * sem_util.adb: Minor reformatting.
9373
9374 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9375
9376         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9377         library-level finalizers.
9378         (Gen_Finalize_Library_C): Update the import string for library-level
9379         finalizers.
9380         (Gen_Finalize_Library_Defs_C): Update the definition name of a
9381         library-level finalizer.
9382         * exp_ch7.adb: Remove with and use clauses for Stringt.
9383         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9384         Spec_Decl. Add local variable Body_Id. The names of library-level
9385         finalizers are now manually fully qualified and are no longer external.
9386         A single name is now capable of servicing .NET, JVM and non-VM targets.
9387         Pragma Export is no longer required to provide visibility for the name.
9388         (Create_Finalizer_String): Removed.
9389         (New_Finalizer_Name): New routine which mimics New_..._Name.
9390
9391 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9392
9393         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9394         elaboration counter to Standard_Short_Integer.
9395         * sem_util.adb (Build_Elaboration_Entity): Likewise.
9396         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9397         (Gen_Elab_Externals_C): Likewise.
9398
9399 2011-08-04  Ed Falis  <falis@adacore.com>
9400
9401         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9402         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9403         system-vxworks-mips.ads, system-vxworks-x86.ads
9404         (Always_Compatible_Rep): set to False for all VxWorks targets.
9405
9406 2011-08-04  Robert Dewar  <dewar@adacore.com>
9407
9408         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9409         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9410         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9411         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9412         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9413         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9414         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9415         Minor reformatting and code reorganization.
9416
9417 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9418
9419         * projects.texi: Added doc for aggregate projects.
9420
9421 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9422
9423         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9424         Add support for overriding the Project_Path in aggregate projects.
9425
9426 2011-08-04  Robert Dewar  <dewar@adacore.com>
9427
9428         * a-cofove.ads: Minor reformatting.
9429
9430 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9431
9432         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9433         on the generated code.
9434         (Build_Finalize_Statements): Update the comment on the generated code.
9435         (Build_Initialize_Statements): Update the comment on the generated code.
9436         (Build_Object_Declarations): Add local variable Result. The object
9437         declarations are now built in sequence.
9438         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9439         RE_Unit_Table.
9440
9441 2011-08-04  Robert Dewar  <dewar@adacore.com>
9442
9443         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
9444
9445 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9446
9447         * einfo.ads (Elaboration_Entity): Document new definition and use.
9448         (Elaboration_Entity_Required): Adjust to above change.
9449         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
9450         * exp_ch12.adb: And with and use for Snames.
9451         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
9452         * exp_util.adb (Set_Elaboration_Flag): Likewise.
9453         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
9454         <Check_Unit_Name>: Deal with N_Expanded_Name.
9455         <Attribute_Elaborated>: Extend to all unit names.
9456         * sem_elab.adb: And with and use for Uintp.
9457         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
9458         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
9459         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
9460         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
9461         from Gen_Adainit_Ada.
9462         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
9463         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
9464         case, do not call System.Standard_Library.Adafinal; instead call
9465         finalize_library if needed.
9466         (Gen_Adafinal_C): Likewise.
9467         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
9468         non-main program case.
9469         (Gen_Adainit_C): Generate a couple of external declarations here.
9470         In the main program case, set SSL.Finalize_Library_Objects.
9471         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
9472         (Gen_Elab_Calls_C): Likewise.
9473         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
9474         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
9475         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
9476         objects here.
9477         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
9478         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
9479         Gen_Adafinal_Ada.
9480         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
9481         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
9482         of external declarations.  Call Gen_Finalize_Library_C.
9483
9484 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9485
9486         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
9487         Compute_Compilation_Phases): new subprogram.
9488         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
9489         The number of mains as well as the various compilation phases that
9490         need to be run are now project tree specific, since various
9491         aggregated trees might have different requirements. In particular,
9492         they do not all require bind or link phases.
9493
9494 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9495
9496         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
9497         (Project_Tree_Appdata): New type.
9498         It is now possible to associate application-specific data to a project
9499         tree. In particular, this is used in the gprbuild builder to avoid a
9500         number of global tables and htables, especially now that there can be
9501         several project trees loaded at once because of aggregate projects.
9502         (Debug_Name): new procedure.
9503         * projects.texi: Clarify syntax of "**" for Source_Dirs
9504
9505 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9506
9507         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
9508         the "roots" for a main.
9509         (Fill_From_Project): add support for aggregate projects. Main units
9510         in aggregated projects are now automatically added in the list of
9511         files to build (although this fails later on in gprbuild, because
9512         these files are not using the root proejct tree, so this needs
9513         further cleanup)
9514         * gcc-interface/Make-lang.in: Update dependencies.
9515
9516 2011-08-03  Yannick Moy  <moy@adacore.com>
9517
9518         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
9519         conditional expression in ALFA.
9520         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
9521         expressions as not in ALFA.
9522
9523 2011-08-03  Robert Dewar  <dewar@adacore.com>
9524
9525         * a-cofove.adb: Minor reformatting.
9526
9527 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9528
9529         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
9530         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
9531         gprbuild sources.
9532         These packages are more logically placed in the Queue package, since
9533         they manipulate the queue. It is also likely that they can be adapted
9534         for gnatmake, thus sharing more code.
9535         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
9536         that we could move the above.
9537
9538 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9539
9540         * errutil.adb (Finalize): clean up the list of error messages on exit.
9541         Calling this subprogram multiple times will no longer show duplicate
9542         error messages on stderr.
9543
9544 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9545
9546         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
9547         Getopt_Switches when we have already define a command line
9548         configuration.
9549
9550 2011-08-03  Yannick Moy  <moy@adacore.com>
9551
9552         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
9553         in ALFA. Instead, they are considered as assertions to prove.
9554         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
9555         nodes as not in ALFA. Instead, include conditional expressions in ALFA
9556         if they have no ELSE part, or if they occur in pre- and postconditions,
9557         where the Condition cannot have side-effects in ALFA
9558         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
9559         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
9560         Instead, include type conversion between scalar types in ALFA.
9561         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
9562         if-and-only-if its type is in ALFA.
9563
9564 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9565
9566         * scos.adb, get_scos.adb, put_scos.adb
9567         New code letter for decisions: G (entry guard)
9568         * par_sco.adb
9569         (Traverse_Subprogram_Body): Rename to...
9570         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
9571         (Traverse_Protected_Body): New subprogram
9572         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
9573         protected bodies and entry bodies.
9574
9575 2011-08-03  Yannick Moy  <moy@adacore.com>
9576
9577         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
9578         entities with get/set subprograms, which is set on procedure entities
9579         generated by the compiler for a postcondition.
9580         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
9581         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
9582         entity for a declaration
9583         (Get_Unique_Entity_For_Decl): new function returning an entity which
9584         represents a declaration, so that matching spec and body have the same
9585         entity.
9586
9587 2011-08-03  Robert Dewar  <dewar@adacore.com>
9588
9589         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
9590         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
9591
9592 2011-08-03  Yannick Moy  <moy@adacore.com>
9593
9594         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
9595         library-level because retriction No_Implicit_Dynamic_Code in the
9596         front-end prevents its definition as a local subprogram
9597         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
9598         for reuse in other contexts
9599         (Traverse_Declarations_Or_Statements,
9600         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
9601         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
9602         procedures take a callback parameter to be called on all declarations
9603         * lib-xref.ads
9604         (Traverse_All_Compilation_Units): new generic function to traverse a
9605         compilation unit and call a callback parameter on all declarations
9606
9607 2011-08-03  Javier Miranda  <miranda@adacore.com>
9608
9609         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
9610         in Java since they are always enclosed in a namespace that
9611         differentiates them, and overloaded entities are supported by the VM.
9612
9613 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9614
9615         * checks.adb (Determine_Range): If a computed bound of an operation is
9616         outside the range of the base type of the expression, and overflow
9617         checks are enabled, the result is unknown and cannot be used for any
9618         subsequent constant folding.
9619         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
9620         unknown, so is the result of the comparison.
9621
9622 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9623
9624         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
9625         From_Abort. When finalization was triggered by an abort, propagate
9626         Standard'Abort_Signal rather than Program_Error.
9627         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
9628         From_Abort.
9629         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
9630         From_Abort. When finalization was triggered by an abort, propagate
9631         Standard'Abort_Signal rather than Program_Error.
9632         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
9633         From_Abort.
9634         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
9635         Abort_Id. Update the calls to Build_Object_Declarations and
9636         Build_Raise_Statement to include Abort_Id.
9637         (Build_Adjust_Statements): New local variable Abort_Id. Update the
9638         calls to Build_Object_Declarations and Build_Raise_Statement to include
9639         Abort_Id.
9640         (Build_Finalize_Statements): New local variable Abort_Id. Update the
9641         calls to Build_Object_Declarations and Build_Raise_Statement to include
9642         Abort_Id.
9643         (Build_Components): Create an entity for Abort_Id when exceptions are
9644         allowed on the target.
9645         (Build_Finalizer): New local variable Abort_Id.
9646         (Build_Initialize_Statements): New local variable Abort_Id. Update the
9647         calls to Build_Object_Declarations and Build_Raise_Statement to include
9648         Abort_Id.
9649         (Build_Object_Declarations): Add new formal Abort_Id. Create the
9650         declaration of flag Abort_Id to preserve the original abort status
9651         before finalization code is executed.
9652         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
9653         runtime routine Raise_From_Controlled_Operation.
9654         (Create_Finalizer): Update the call to Build_Raise_Statement to include
9655         Abort_Id. Update the call to Build_Object_Declarations to include
9656         Abort_Id. Update the layout of the finalizer body.
9657         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
9658         (Process_Transient_Objects): New local variable Abort_Id. Remove the
9659         clunky code to create all flags and objects related to
9660         exception propagation and replace it with a call to
9661         Build_Object_Declarations. Update the call to Build_Raise_Statement to
9662         include Abort_Id.
9663         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
9664         Add new formal Abort_Id and associated comment on its use.
9665         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
9666         on its use.
9667         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
9668         Remove the clunky code to create all flags and objects related to
9669         exception propagation and replace it with a call to
9670         Build_Object_Declarations. Update the call to Build_Raise_Statement.
9671
9672 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9673
9674         * s-tassta.adb: Fix minor typos.
9675
9676 2011-08-03  Robert Dewar  <dewar@adacore.com>
9677
9678         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
9679         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
9680
9681 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9682
9683         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
9684         to packages. This ensures that the finalizer body will not end up
9685         inside the freeze node.
9686         (Process_Declarations): Add code to detect whether a freeze node has a
9687         nested finalization collection.
9688
9689 2011-08-03  Pascal Obry  <obry@adacore.com>
9690
9691         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
9692         (Current_Session): Return a not null access to Session_Type.
9693         (Default_Session): Likewise.
9694
9695 2011-08-03  Robert Dewar  <dewar@adacore.com>
9696
9697         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
9698         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
9699
9700 2011-08-03  Pascal Obry  <obry@adacore.com>
9701
9702         * g-awk.ads: Minor comment fix.
9703
9704 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9705
9706         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9707         the tree structure related to discriminant constraints.
9708         Original_Discriminant cannot be used any more for computing the
9709         defining name for the reference to a discriminant.
9710
9711 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9712
9713         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
9714         function is not visibly tagged, this is not a dispatching call and
9715         therfore is not Tag_Indeterminate, even if the function is marked as
9716         dispatching on result.
9717
9718 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9719
9720         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
9721         (Expand_N_Free_Statement): Add a guard to protect against run-times
9722         which do not support controlled types.
9723         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
9724         against run-times which do not support controlled types.
9725         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
9726         against run-times which do not support controlled types.
9727         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
9728         against run-times which do not support controlled types.
9729         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
9730         protect against run-times which do not support controlled types.
9731
9732 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9733
9734         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
9735         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
9736
9737 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9738
9739         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
9740         modified in the source, to prevent spurious warnings when compiling
9741         with -gnatg.
9742
9743 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9744
9745         * a-except-2005.adb: Minor reformatting.
9746
9747 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9748
9749         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
9750         is a renaming declaration in the private part of a package, do not emit
9751         a warning that the with_clause could be moved because the renaming may
9752         be used in the body or in a child unit.
9753
9754 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9755
9756         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9757         Propagate the Comes_From_Source attribute from the original return
9758         object to the renaming.
9759
9760 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9761
9762         * exp_ch7.adb (Build_Raise_Statement): Do not call
9763         Raise_From_Controlled_Operation when this routine is not present in
9764         the run-time library.
9765         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
9766         libraries (Ravenscar), tasks are non-terminating, and protected objects
9767         and tasks can only appear at library level, so we do not want
9768         finalization of protected objects nor tasks.
9769         * exp_intr.adb: Minor clarification in comment.
9770         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
9771         Gen_Output_File_C): Remove references to finalization of library-level
9772         objects when using restricted run-time libraries.
9773
9774 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9775
9776         * sem_ch3.adb (Build_Discriminant_Constraints): Set
9777         Original_Discriminant only if the parent type is a generic formal.
9778
9779 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9780
9781         * exp_ch13.adb: Add with and use clause for Targparm;
9782         (Expand_N_Free_Statement): Prevent the generation of a custom
9783         Deallocate on .NET/JVM targets since this requires pools and address
9784         arithmetic.
9785         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
9786         .NET/JVM targets, attach the newly allocated object to the access
9787         type's finalization collection. Do not generate a call to
9788         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
9789         exist in the runtime.
9790         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
9791         create a custom Allocate for object that do not require initialization.
9792         Attach a newly allocated object to the access type's finalization
9793         collection on .NET/JVM.
9794         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
9795         assignment of controlled types on .NET/JVM. The two hidden pointers
9796         Prev and Next and stored and later restored after the assignment takes
9797         place.
9798         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
9799         kludge for .NET/JVM to recognize a particular piece of code coming from
9800         Heap_Management and change the call to Finalize into Deep_Finalize.
9801         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
9802         finalization collections on .NET/JVM only for types derived from
9803         Controlled. Separate the association of storage pools with a collection
9804         and only allow it on non-.NET/JVM targets.
9805         (Make_Attach_Call): New routine.
9806         (Make_Detach_Call): New routine.
9807         (Process_Object_Declarations): Suppress the generation of
9808         build-in-place return object clean up code on .NET/JVM since it uses
9809         pools.
9810         * exp_ch7.ads (Make_Attach_Call): New routine.
9811         (Make_Detach_Call): New routine.
9812         * exp_intr.adb Add with and use clause for Targparm.
9813         (Expand_Unc_Deallocation): Detach a controlled object from a collection
9814         on .NET/JVM targets.
9815         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
9816         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
9817         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
9818         names used in finalization.
9819
9820 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9821
9822         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
9823         (Attach, Detach): Lock the current task when chaining an object onto a
9824         collection.
9825
9826 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9827
9828         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
9829         Rewritten to create the message strings when the exception is not
9830         raised by an abort during finalization.
9831         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
9832         Raise_From_Controlled_Operation and update its associated comment.
9833         * a-fihema.ads, a-fihema.adb: New GNAT unit.
9834         Ada.Finalization.Heap_Management provides key functionality
9835         associated with controlled objects on the heap, their creation,
9836         finalization and reclamation. Type Finalization_Collection is
9837         effectively a wrapper which sits ontop of a storage pool and performs
9838         all necessary bookkeeping for all the objects it contains. Each
9839         access-to-controlled or access-to-class-wide type receives a collection
9840         as part of its expansion. The compiler generates buffer code and
9841         invokes Allocate / Deallocate to create and destroy allocated
9842         controlled objects.
9843         * a-finali.adb ("="): Removed.
9844         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
9845         fields Prev and Next.
9846         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
9847         A library unit with at least one controlled object on the library level
9848         has a special finalizer which is invoked by the binder. To signal this,
9849         ali files carry field PF.
9850         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
9851         associated comment on field usage.
9852         * a-tags.adb (Get_RC_Offset): Removed.
9853         (Needs_Finalization): New routine.
9854         * a-tags.ads: Update the structure of the GNAT dispatch tables.
9855         Dispatch tables now carry field Needs_Finalization which provides
9856         runtime indication whether a type is controlled or has controlled
9857         components or both. Remove field RC_Offset.
9858         (Get_RC_Offset): Removed along with its associated pragma Export.
9859         Since tagged types with controlled components no longer carry hidden
9860         field _controller, the special mechanism to retrieve its location is no
9861         longer needed.
9862         (Needs_Finalization): New routine.
9863         * atree.ads, atree.adb (Elist24): New routine.
9864         (Set_Elist24): New routine.
9865         * atree.h: Add a define clause for Elist24.
9866         * bindgen.adb New library-level variable Lib_Final_Built.
9867         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
9868         presence of a VM target, the routine generates calls to the proper
9869         library finalization routine.
9870         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
9871         targets. Set the correct library finalization routine depending on
9872         whether the library has controlled objects or this is a VM compilation.
9873         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
9874         to library-level finalizers of compiled units in reverse order of
9875         elaboration. It also produces exception management code and reraises a
9876         potential exception after all units have been finalized.
9877         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
9878         library-level finalizers of compiled units in reverse order of
9879         elaboration.
9880         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
9881         definitions of all library-level finalizers available to the compilation
9882         (Gen_Main_Ada): Directly call Adafinal which now contails all target
9883         dependent code.
9884         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
9885         System.Standard_Library.Adafinal directly. If the library needs
9886         finalization actions, create the sequence of finalization calls.
9887         (Gen_Output_File_Ada): Alphabetize local variables and constants.
9888         Generate a with clause for System.Soft_Links when compiling for a VM.
9889         Remove the code which imports System.Standard_Library.Adafinal as
9890         Do_Finalize. Generate the library finalization routine.
9891         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
9892         If the library needs finalization actions, create all the definitions
9893         of library- level finalizers.
9894         (Has_Finalizer): New routine. Determines whether at least one compiled
9895         unit has a library-level finalizer.
9896         Add type Qualification_Mode.
9897         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
9898         * einfo.adb: New usage of field 15 as Return_Flag.
9899         Remove Finalization_Chain_Entity from the usages of field 19.
9900         Remove Associated_Final_Chain from the usages of field 23.
9901         New usage of field 23 as Associated_Collection.
9902         New usage of field 24 as Finalizer.
9903         New usage of flag 252 as Is_Processed_Transient.
9904         (Associated_Final_Chain): Removed.
9905         (Associated_Collection): New routine.
9906         (Finalization_Chain_Entity): Removed.
9907         (Finalizer): New routine.
9908         (Is_Finalizer): New routine.
9909         (Is_Processed_Transient): New routine.
9910         (Return_Flag): New routine.
9911         (Set_Associated_Final_Chain): Removed.
9912         (Set_Associated_Collection): New routine.
9913         (Set_Finalization_Chain_Entity): Removed.
9914         (Set_Finalizer): New routine.
9915         (Set_Is_Processed_Transient): New routine.
9916         (Set_Return_Flag): New routine.
9917         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
9918         displayed flags.
9919         (Write_Field8_Name): Alphabetize the output.
9920         (Write_Field11_Name): Alphabetize the output.
9921         (Write_Field12_Name): Alphabetize the output.
9922         (Write_Field13_Name): Alphabetize the output.
9923         (Write_Field14_Name): Alphabetize the output.
9924         (Write_Field15_Name): Alphabetize the output.
9925         (Write_Field16_Name): Alphabetize the output.
9926         (Write_Field17_Name): Alphabetize the output.
9927         (Write_Field18_Name): Alphabetize the output.
9928         (Write_Field19_Name): Alphabetize the output. Remove the output of
9929         Finalization_Chain_Entity.
9930         (Write_Field20_Name): Alphabetize the output.
9931         (Write_Field21_Name): Alphabetize the output.
9932         (Write_Field22_Name): Alphabetize the output.
9933         (Write_Field23_Name): Alphabetize the output. Remove the output of
9934         Associated_Final_Chain. Add output for Associated_Collection.
9935         (Write_Field24_Name): Alphabetize the output.
9936         (Write_Field25_Name): Add output for Finalizer.
9937         (Write_Field26_Name): Alphabetize the output.
9938         (Write_Field27_Name): Alphabetize the output.
9939         (Write_Field28_Name): Alphabetize the output.
9940         * einfo.ads: Add new field description for Associated_Collection and
9941         its uses in nodes.
9942         Remove Associated_Final_Chain and its uses in nodes.
9943         Remove Finalization_Chain_Entity and its uses in nodes.
9944         Add new field description for Finalizer and its uses in nodes.
9945         Add new synthesized attribute Is_Finalizer.
9946         Add new flag description for Is_Processed_Transient and its uses in
9947         nodes.
9948         Add new field description for Return_Flag and its uses in nodes.
9949         (Associated_Final_Chain): Removed along with its pragma Inline.
9950         (Associated_Collection): New routine and pragma Inline.
9951         (Finalization_Chain_Entity): Removed along with its pragma Inline.
9952         (Finalizer): New routine and pragma Inline.
9953         (Is_Finalizer): New routine and pragma Inline.
9954         (Is_Processed_Transient): New routine and pragma Inline.
9955         (Return_Flag): New routine and pragma Inline.
9956         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
9957         (Set_Associated_Collection): New routine and pragma Inline.
9958         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
9959         (Set_Finalizer): New routine and pragma Inline.
9960         (Set_Is_Processed_Transient): New routine and pragma Inline.
9961         (Set_Return_Flag): New routine and pragma Inline.
9962         * exp_aggr.adb: Alphabetize subprograms.
9963         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
9964         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
9965         associated comments. Remove local variables External_Final_List and
9966         Attach.
9967         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
9968         Ancestor. Remove the retrieval of finalization lists. Update the call to
9969         Make_Adjust_Call.
9970         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
9971         lists. Update the call to Late_Expansion.
9972         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
9973         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
9974         (Gen_Assign): Remove the retrieval of the finalization list used to
9975         build the assignment. Update the calls to Make_Init_Call and
9976         Make_Adjust_Call.
9977         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
9978         Remove the mechanism to determine attachment levels and finalization
9979         list retrieval. Remove the processing for coextensions.
9980         (Init_Controller): Removed. Controllers no longer exist.
9981         (Late_Expansion): Remove formals Flist and Obj along with their
9982         associated comments. Update the calls to Build_Record_Aggr_Code and
9983         Build_Array_Aggr_Code.
9984         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
9985         (Expand_N_Freeze_Entity): Add special processing for finalizers which
9986         appear in entry bodies, protected subprograms and task bodies.
9987         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
9988         * exp_ch3.adb (Add_Final_Chain): Removed.
9989         (Build_Array_Init_Proc): Alphabetize local variables.
9990         (Build_Assignment): Alphabetize local variables. Update the call to
9991         Maked_Adjust_Call.
9992         (Build_Class_Wide_Master): Rename local variables to better reflect
9993         their role.
9994         (Build_Discriminant_Assignments): Code reformatting.
9995         (Build_Init_Call_Thru): Code reformatting.
9996         (Build_Init_Procedure): Code reformatting. Generate a special version
9997         of Deep_Finalize which is capable of finalizing all initialized
9998         components and ignore the rest.
9999         (Build_Init_Statements): Rename local variables to better reflect their
10000         role.
10001         Reimplement the mechanism to include the creation and update of an index
10002         variable called a "counter". It is used as a bookmark for tracing
10003         initialized and non-initialized components.
10004         (Build_Initialization_Call): Remove local variable Controller_Typ.
10005         Alphabetize all local variables. Remove the initialization of the
10006         record controller and update the call to Make_Init_Call.
10007         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
10008         New local variable Counter.
10009         (Constrain_Array): Alphabetize.
10010         (Expand_Freeze_Array_Type): Create a collection instead of a
10011         finalization list.
10012         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
10013         Finalize_Address which is used in conjunction with allocated controlled
10014         objects.
10015         (Expand_N_Object_Declaration): Remove the creation of a finalization
10016         list for anonymous access types. Update the calls to Make_Init_Call and
10017         Make_Adjust_Call.
10018         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
10019         retrieval of finalization lists. Remove the expansion of the record
10020         controller. Create TSS primitive Finalize_Address used in conjunction
10021         with controlled objects on the heap. Create finalization collections
10022         for access-to-controlled record components.
10023         (Expand_Record_Controller): Removed.
10024         (Freeze_Type): Remove the freezing of record controllers. Freezing of
10025         class-wide types now requires additional processing. Create
10026         finalization collections for access-to-controlled types.
10027         (Increment_Counter): New routine.
10028         (Make_Counter): New routine.
10029         (Make_Eq_If): Remove the mention of Name_uController.
10030         (Make_Predefined_Primitive_Specs): There is no longer need to skip
10031         types coming from System.Finalization_Root.
10032         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
10033         (Predefined_Primitive_Bodies): There is no longer need to skip types
10034         coming from System.Finalization_Root.
10035         (Stream_Operation_OK): Do not generate stream routines for
10036         type Ada.Finalization.Heap_Management.Finalization_Collection.
10037         * exp_ch3.ads: Alphabetize subprograms.
10038         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
10039         Add with and use clause for Lib.
10040         (Complete_Coextension_Finalization): Removed.
10041         (Complete_Controlled_Allocation): New routine. Create a finalization
10042         collection for anonymous access-to-controlled types. Create a custom
10043         Allocate which interfaces with the back end and the machinery in
10044         Heap_Management.
10045         (Expand_Allocator_Expression): Add necessary calls to
10046         Complete_Controlled_Allocation. Remove the retrieval of finalization
10047         lists. Update the calls to Make_Adjust_Call. Generate a call to
10048         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10049         the associated collection.
10050         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
10051         Code clean up. Remove the retrieval of finalization lists and
10052         attachment levels.
10053         Update the call to Make_Init_Call. Generate a call to
10054         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10055         the associated collection.
10056         (Get_Allocator_Final_List): Removed. Finalization lists are not
10057         available.
10058         (Suitable_Element): Remove the mention of Name_uController.
10059         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
10060         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
10061         the left hand side, carry out the assignment and adjust the left hand
10062         side.
10063         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
10064         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
10065         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
10066         BIP_Collection and BIPcollection.
10067         (Build_Heap_Allocator): New routine used to allocate the return object
10068         of a build-in-place function onto a collection.
10069         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
10070         (Expand_Call): Do not replace direct calls to Deep routines with their
10071         aliases.
10072         (Expand_N_Extended_Return_Statement): Give all variables shorter names
10073         and update their occurrences. Add a special return flag to monitor the
10074         [ab]normal execution of the function. The flag is set right before the
10075         return statement.
10076         Rewrite the mechanism used to allocate a build-in-place return object
10077         on the heap or on a storage pool.
10078         (Is_Direct_Deep_Call): New routine.
10079         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10080         build-in-place function call instead of a final list. Build a call to
10081         Set_Finalize_Address_Ptr to decorate the associated collection.
10082         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10083         order to name the build-in-place function call's result for later
10084         finalization. Add a collection to a build-in-place function call
10085         instead of a final list.
10086         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10087         build-in-place function call instead of a final list. Remove the code
10088         which moves one final list and transforms it into the actual in a
10089         nested build-in-place call.
10090         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10091         build-in-place function call instead of a final list.
10092         (Move_Final_List): Removed.
10093         (Needs_BIP_Collection): New routine.
10094         (Needs_BIP_Final_List): Removed.
10095         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10096         enumeration type BIP_Formal_Kind.
10097         Update the related comment.
10098         (Needs_BIP_Collection): New routine.
10099         (Needs_BIP_Final_List): Removed.
10100         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10101         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10102         majority of subprograms in this unit. Add Name_Finalize_Address to
10103         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10104         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10105         statements for an array type.
10106         (Build_Adjust_Statements): Create the adjust statements for a record
10107         type.
10108         (Build_Cleanup_Statements): New routine. A procedure which given any
10109         construct containing asynchronous calls, references to _master, or is a
10110         task body, a task allocation or a protected body produces the necessary
10111         runtime calls to clean up these constructs.
10112         (Build_Exception_Handler): New routine.
10113         (Build_Final_List): Removed.
10114         (Build_Finalization_Collection): New routine. A core procedure which
10115         creates a collection to service heap allocated controlled objects
10116         associated with an access-to-controlled type.
10117         (Build_Finalize_Statements): Create the finalization statements for a
10118         record types.
10119         (Build_Finalizer): New routine. A core procedure which given any
10120         construct with declarations and/or statements detects all objects which
10121         need any type of clean up (controlled objects, protected objects) and
10122         generates all necessary code to clean up the said objects in the proper
10123         order.
10124         (Build_Finalizer_Call): New routine.
10125         (Build_Initialize_Statements): Create the initialization statements for
10126         an array type. The generated routine contains code to finalize partially
10127         initialized arrays.
10128         (Build_Object_Declarations): New routine.
10129         (Build_Raise_Statement): New routine.
10130         (Clean_Simple_Protected_Objects): Removed.
10131         (Controller_Component): Removed.
10132         (Enclosing_Function): New routine.
10133         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10134         either declarations or statements or both.
10135         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10136         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10137         package.
10138         (Find_Final_List): Removed.
10139         (Global_Flist_Ref): Removed.
10140         (In_Finalization_Root): Removed.
10141         (Insert_Actions_In_Scope_Around): Determine the range of the transient
10142         scope in terms of tree nodes. Process all transient variables within
10143         that range.
10144         (Make_Adjust_Call): Rewritten. There is no longer an attach call
10145         generated after the adjust.
10146         (Make_Attach_Call): Removed.
10147         (Make_Call): New routine.
10148         (Make_Clean): Removed.
10149         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10150         build routines.
10151         (Make_Deep_Proc): Rewritten to generate the new profile signature used
10152         in Deep routines.
10153         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10154         build routines.
10155         (Make_Final_Call): Modified to simply create a call to either
10156         Deep_Finalize or Finalize.
10157         (Make_Finalize_Address_Body): New routine.
10158         (Make_Finalize_Address_Stmts): New routine. A function which produces
10159         TSS primitive Finalize_Address used in conjunction with heap allocated
10160         controlled objects.
10161         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10162         (Make_Init_Call): Rewritten. There is no longer an attach call
10163         generated after initialization.
10164         (Make_Local_Deep_Finalize): New routine.
10165         (Make_Set_Finalize_Address_Ptr_Call): New routine.
10166         (Make_Transient_Block): Remove the finalization list retrieval and
10167         manipulation.
10168         (Needs_Finalization): Moved to Exp_Util.
10169         (Parent_Field_Type): New routine.
10170         (Preprocess_Components): New routine.
10171         (Process_Transient_Objects): New routine.
10172         (Wrap_HSS_In_Block): New routine.
10173         (Wrap_Transient_Declaration): Remove finalization list management and
10174         controller insertion.
10175         (Wrap_Transient_Expression): Code reformatting.
10176         (Wrap_Transient_Statement): Code reformatting.
10177         * exp_ch7.ads (Build_Final_List): Removed.
10178         (Build_Finalization_Collection): New routine.
10179         (Build_Raise_Statement): New routine.
10180         (Controller_Component): Removed.
10181         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10182         (Find_Final_List): Removed.
10183         (In_Finalization_Root): Removed.
10184         (Is_Simple_Protected_Type): Update related comment.
10185         (Make_Adjust_Call): New parameter profile and associated comments.
10186         (Make_Attach_Call): Removed.
10187         (Make_Final_Call): New parameter profile and associated comments.
10188         (Make_Finalize_Address_Body): New routine.
10189         (Make_Init_Call): New parameter profile and associated comments.
10190         (Make_Local_Deep_Finalize): New routine.
10191         (Make_Set_Finalize_Address_Ptr_Call): New routine.
10192         (Needs_Finalization): Moved to Exp_Util.
10193         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10194         (Expand_N_Protected_Body): Remove the handling of finalization lists.
10195         (Find_Protection_Type): Moved to Exp_Util.
10196         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10197         (Make_DT): Update sequence of dispatch table initialization. Remove the
10198         initialization of field RC_Offset. Add initialization of field Needs_
10199         Finalization.
10200         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10201         Reimplement how an object is first finalized, then deallocated.
10202         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10203         Code reformatting.
10204         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10205         Register TSS_Finalize_Address with type TSS_Names.
10206         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10207         procedure provides the interface between an allocation / deallocation
10208         and the support machinery in Ada.Finalization.Heap_Management.
10209         (Find_Init_Call): Code reformatting.
10210         (Find_Init_Call_In_List): Code reformatting.
10211         (Find_Protection_Type): Moved from Exp_Ch9.
10212         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10213         (Has_Controlled_Coextensions): Removed.
10214         (Has_Controlled_Objects): New routine.
10215         (In_Library_Level_Package_Body): New routine.
10216         (Insert_Action_After): New routine.
10217         (Is_Finalizable_Transient): New routine. This predicate determines
10218         whether an object declaration is one of the many variants of controlled
10219         transients.
10220         (Is_Null_Access_BIP_Func_Call): New routine.
10221         (Is_Non_BIP_Func_Call): New routine.
10222         (Is_Related_To_Func_Return): New routine.
10223         (Needs_Finalization): Moved from Exp_Ch7.
10224         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10225         (Find_Protection_Type): Moved from Exp_Ch9.
10226         (Has_Controlled_Coextensions): Removed.
10227         (Has_Controlled_Objects): New routine.
10228         (In_Library_Level_Package_Body): New routine.
10229         (Insert_Action_After): New routine.
10230         (Is_Finalizable_Transient): New routine.
10231         (Is_Null_Access_BIP_Func_Call): New routine.
10232         (Is_Non_BIP_Func_Call): New routine.
10233         (Is_Related_To_Func_Return): New routine.
10234         (Needs_Finalization): Moved from Exp_ch7.
10235         * expander.adb (Expand): Add a case for N_Free_Statement.
10236         * freeze.adb (Freeze_All): Replace the generation of a finalization
10237         list with a collection for access-to-controlled types.
10238         (Freeze_Entity): Code reformatting.
10239         (Freeze_Record_Type): Remove the freezing of a record controller
10240         component.
10241         (Freeze_Subprogram): Code reformatting.
10242         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10243         finalization list.
10244         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10245         has a library-level finalizer.
10246         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10247         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10248         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10249         files. Add a-fihema to the list of object files.
10250         * par-ch4.adb:
10251         Alphabetize the associations in type Is_Parameterless_Attribute.
10252         * rtsfind.ads: Ada.Finalization_List.Controller and
10253         System.Finalization_Implementation are no longer a GNAT unit.
10254         Update the range of type Ada_Finalization_Child. Remove the following
10255         recoverable entities:
10256
10257            RE_Attach_To_Final_List
10258            RE_Deep_Tag_Attach
10259            RE_Finalize_List
10260            RE_Finalize_One
10261            RE_Finalizable_Ptr_Ptr
10262            RE_Global_Final_List
10263            RE_Limited_Record_Controller
10264            RE_List_Controller
10265            RE_Move_Final_List
10266            RE_Record_Controller
10267            RE_Simple_List_Controller
10268
10269         Add the following recoverable entities:
10270
10271            RE_Add_Offset_To_Address
10272            RE_Allocate
10273            RE_Base_Pool
10274            RE_Deallocate
10275            RE_Exception_Identity
10276            RE_Finalization_Collection
10277            RE_Finalization_Collection_Ptr
10278            RE_Needs_Finalization
10279            RE_Save_Library_Occurrence
10280            RE_Set_Finalize_Address_Ptr
10281            RE_Set_Storage_Pool_Ptr
10282            RE_Storage_Count
10283         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10284         Name_uController.
10285         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10286         (First_Stored_Discriminant): Remove the mention of Name_uController.
10287         * sem_aux.ads: Comment reformatting.
10288         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10289         to redecorate an already existing class-wide type.
10290         (Decorate_Tagged_Type): New parameter profile and associated comment.
10291         Create a "shadow class-wide type" for a shadow entity.
10292         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10293         of the final chain along with the associated comment.
10294         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10295         Full_Desig and set it to the full view of the designated type.
10296         Initialize the finalization collection to empty.
10297         (Build_Derived_Record_Type): Alphabetize local variables. Code
10298         reformatting.
10299         (Collect_Fixed_Components): Remove the mention of Name_uController.
10300         (Create_Constrained_Components): Remove the mention of Name_uController.
10301         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10302         class-wide type of a shadow entity.
10303         (Process_Full_View): Update the machinery which marks type
10304         Limited_Controlled's entity as limited.
10305         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10306         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10307         list, instead make a collection build-in-place formal.
10308         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10309         a designated type in order to establish a match between the renaming
10310         and the renamed entity.
10311         (Find_Selected_Component): Add guard to prevent spurious exceptions
10312         from being raised on .NET/JVM.
10313         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10314         to the list of primitive that need special processing. Update arrays
10315         C_Names and D_Names.
10316         (Replace_Types): Handle class-wide types.
10317         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10318         different parameter profile, look at the first formal.
10319         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10320         use clauses for Exp_Util.
10321         * sem_res.adb: Remove with and use clauses for Elists.
10322         (Propagate_Coextensions): Removed.
10323         (Resolve_Allocator): Do not propagate the list of coextensions from one
10324         allocator to another.
10325         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10326         Deaccessed_T to Desig_Typ.
10327         (Enter_Name): Remove the mention of Name_uController.
10328         (Gather_Components): Remove the mention of Name_uController.
10329         (Incomplete_Or_Private_View): New routine.
10330         (Is_Coextension_Root): Removed.
10331         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10332         * sem_util.ads (Incomplete_Or_Private_View): New routine.
10333         (Is_Coextension_Root): Removed.
10334         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10335         Controlled types are now derived from a null tagged record. Remove
10336         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10337         * sinfo.adb (Coextensions): Removed.
10338         (Set_Coextensions): Removed.
10339         * sinfo.ads: Remove Coextensions from the explanation of node fields
10340         and its uses in nodes.
10341         Update the field usage of N_Allocator.
10342         (Coextensions): Removed along with its pragma Inline.
10343         (Set_Coextensions): Removed along with its pragma Inline.
10344         * snames.ads-tmpl: Remove names
10345
10346           Name_uClean
10347           Name_uController
10348           Name_uFinal_List
10349           Name_uLocal_Final_List
10350           Name_Finalization_Root
10351           Name_Next
10352           Name_Prev
10353
10354         Add names
10355
10356           Name_uFinalizer
10357           Name_Finalize_Address
10358         * s-pooglo.adb (Allocate): Add overriding indicator.
10359         (Deallocate): Add overriding indicator.
10360         (Storage_Size): Add overriding indicator.
10361         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10362         than Finalize_Global_List.
10363         (Null_Finalize_Global_List): Removed.
10364         (Save_Library_Occurrence): New routine.
10365         * s-soflin.ads: Remove variable Finalize_Global_List along with its
10366         initialization. Add variable Finalize_Library_Objects along with its
10367         pragma Export. Add variables Library_Exception and
10368         Library_Exception_Set along with their pragma Export.
10369         (Null_Finalize_Global_List): Removed.
10370         (Save_Library_Occurrence): New routine.
10371         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10372         rather than Finalize_Global_List.
10373         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10374         of the constructed node.
10375
10376 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10377
10378         * link.c: Include "auto-host.h" before system headers.
10379
10380 2011-08-03  Vincent Celier  <celier@adacore.com>
10381
10382         * make.adb (Gnatmake): Add to table Library_Projs only library projects
10383         that are not extended. Do not check if a library project that is
10384         extended should be regenerated. Do not add to table Library_Paths the
10385         libraries that are in extended projects. Link only with libraries that
10386         are in libray projects that are not extended.
10387         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10388         for a library project that is extended.
10389
10390 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10391
10392         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10393         conforming subprogram renamings that appear to be completions if they
10394         are not fully conformant.
10395         Such renamings are homographs but not completions.
10396         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10397         names in a subprogram renaming that appears in an instance.
10398
10399 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10400
10401         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10402         not immutably limited, build actual subtype from expression to provide
10403         proper bounds to caller.
10404
10405 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10406
10407         * sem_ch8.adb: Minor comment correction.
10408
10409 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10410
10411         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10412         returning a limited array, use an extended return statement.
10413
10414 2011-08-03  Vincent Celier  <celier@adacore.com>
10415
10416         * make.adb (Initialize): If --subdirs= is used, but no project file is
10417         specified, attempt to create the specify subdir if it does not already
10418         exist and use it as the object directory as if -D had been specified.
10419
10420 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10421
10422         * s-tpopsp-vms.adb: New file.
10423         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10424         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10425
10426 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10427
10428         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10429         package.
10430
10431 2011-08-03  Yannick Moy  <moy@adacore.com>
10432
10433         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10434         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10435         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10436         detect that an array has static bounds.
10437
10438 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10439
10440         * exp_dist.adb: Minor reformatting.
10441
10442 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10443
10444         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
10445         (ATCB_Key): Removed, not always used.
10446
10447 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10448
10449         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
10450         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
10451         most remaining global variables.
10452
10453 2011-08-03  Robert Dewar  <dewar@adacore.com>
10454
10455         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
10456         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
10457         reformatting.
10458
10459 2011-08-03  Javier Miranda  <miranda@adacore.com>
10460
10461         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
10462         that must be passed by copy in VM targets.
10463
10464 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10465
10466         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
10467         duplicates a similar htable now in the project tree.
10468
10469 2011-08-03  Claire Dross  <dross@adacore.com>
10470
10471         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
10472         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
10473         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
10474         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
10475         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
10476         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
10477         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
10478         update.
10479
10480 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10481
10482         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
10483         (ATCB_Key): Removed, not always used.
10484         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
10485         s-taprop-posix.adb.
10486         * s-tpopsp-tls.adb: New file.
10487         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
10488         x86/x64/ia64/powerpc/sparc Linux.
10489
10490 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10491
10492         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
10493         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
10494
10495 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10496
10497         * rtsfind.ads, exp_dist.adb, exp_dist.ads
10498         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
10499         Fix type selection for mapping integer types to PolyORB types.
10500
10501 2011-08-03  Bob Duff  <duff@adacore.com>
10502
10503         * sem_ch7.adb: Minor comment clarification.
10504
10505 2011-08-03  Bob Duff  <duff@adacore.com>
10506
10507         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
10508         an error analyzing a choice, skip further processing. Further
10509         processing could cause a crash or cascade errors.
10510
10511 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10512
10513         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
10514         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
10515         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
10516         prj-env.ads (Shared_Project_Tree_Data): new type
10517         An aggregate project and its aggregated trees need to share the common
10518         data structures used for lists of strings, packages,... This makes the
10519         code simpler since otherwise we have to pass the root tree (also used
10520         for the configuration file data) in addition to the current project
10521         tree. This also avoids ambiguities as to which tree should be used.
10522         And finally this saves a bit of memory.
10523         (For_Every_Project_Imported): new parameter Tree.
10524         Since aggregated projects are using a different tree, we need to let
10525         the caller know which tree to use to manipulate the returned project.
10526
10527 2011-08-03  Robert Dewar  <dewar@adacore.com>
10528
10529         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
10530         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
10531         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
10532         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
10533
10534 2011-08-03  Javier Miranda  <miranda@adacore.com>
10535
10536         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
10537         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
10538
10539 2011-08-03  Bob Duff  <duff@adacore.com>
10540
10541         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
10542         the Base_Type.
10543
10544 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
10545
10546         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
10547         g-sehash.ads: Fix typo. Update header.
10548
10549 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10550
10551         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
10552         expansion.
10553
10554 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10555
10556         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
10557         prefixes of private types along with records, since the selector may be
10558         a discriminant.
10559         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
10560         private types along with records, since the selector may be a
10561         discriminant.
10562
10563 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10564
10565         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
10566
10567 2011-08-03  Javier Miranda  <miranda@adacore.com>
10568
10569         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
10570         Tagged_Type_Expansion.
10571
10572 2011-08-03  Yannick Moy  <moy@adacore.com>
10573
10574         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
10575         violation when the argument of concatenation is the name of a
10576         constant.
10577
10578 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10579
10580         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
10581         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
10582         (Process_Declarative_Items): new parameter Child_Env.
10583
10584 2011-08-03  Yannick Moy  <moy@adacore.com>
10585
10586         * alfa.ads: Update format of ALFA section in ALI file in order to
10587         add a mapping from bodies to specs when both are present.
10588         (ALFA_Scope_Record): Add components for spec file/scope.
10589         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
10590         present.
10591         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
10592         collected, fill in the spec information when relevant.
10593         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
10594         present.
10595
10596 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10597
10598         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
10599         code unit to decide whether to add internally generated subprograms.
10600
10601 2011-08-03  Javier Miranda  <miranda@adacore.com>
10602
10603         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
10604         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
10605         be handled by copy in VM targets.
10606
10607 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10608
10609         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
10610         code with Makeutl.Get_Switches.
10611         * prj-tree.adb: Update comment.
10612
10613 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10614
10615         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
10616         subprogram with a limited formal that does not support external
10617         streaming.
10618
10619 2011-08-03  Yannick Moy  <moy@adacore.com>
10620
10621         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
10622         continuation line
10623         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
10624         not from current unit in two phases, because it is not possible to
10625         change the table while iterating over its content.
10626         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
10627
10628 2011-08-03  Sergey Rybin  <rybin@adacore.com>
10629
10630         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
10631         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
10632
10633 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10634
10635         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
10636         and the component type is composite, this is ambiguous for predefined
10637         concatenation, but if the node is not overloaded and the entity is a use
10638         -defined function its profile can be used to resolve that aggregate.
10639
10640 2011-08-03  Robert Dewar  <dewar@adacore.com>
10641
10642         * exp_ch4.adb: Minor code cleanup.
10643
10644 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10645
10646         * exp_dist.adb: Do not generate distribution stubs if serious errors
10647         have been diagnosed.
10648
10649 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10650
10651         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
10652         the first formal of a primitive operation, go to the base type to
10653         handle properly an access to a derived type with constrained
10654         discriminants.
10655         * sem_type.adb (Disambiguate): an immediately visible operator hides a
10656         user-defined function that is only use-visible.
10657
10658 2011-08-03  Robert Dewar  <dewar@adacore.com>
10659
10660         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
10661         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
10662         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
10663         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
10664         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
10665         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
10666         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
10667         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
10668
10669 2011-08-03  Robert Dewar  <dewar@adacore.com>
10670
10671         * repinfo.adb (List_Mechanism): Add handling of
10672         Convention_Ada_Pass_By_XXX.
10673         * sem_mech.adb (Set_Mechanism): Ditto.
10674         * sem_prag.adb (Process_Convention): Add entries for
10675         Convention_Ada_Pass_By_XXX.
10676         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
10677
10678 2011-08-03  Pascal Obry  <obry@adacore.com>
10679
10680         * makeutl.adb: Minor reformatting.
10681
10682 2011-08-03  Vincent Celier  <celier@adacore.com>
10683
10684         * fname-uf.adb
10685         (Get_File_Name) If the file cannot be found when there are no config
10686         pragmas file and May_Fail is True, return No_File instead of the file
10687         name, to be consistent.
10688
10689 2011-08-03  Pascal Obry  <obry@adacore.com>
10690
10691         * adaint.c (__gnat_is_executable_file_attr): Avoid access
10692         to null pointer.
10693
10694 2011-08-03  Javier Miranda  <miranda@adacore.com>
10695
10696         * sem_ch13.adb
10697         (Same_Representation): In VM targets the representation of arrays with
10698         aliased components differs from arrays with non-aliased components.
10699
10700 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10701
10702         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
10703         not systematically lower case attribute indexes that contain no "."
10704         Fix definition of several Naming attributes, which take
10705         a unit name as index and therefore should be case insensitive.
10706         Minor refactoring (reduce length of variable names).
10707
10708 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10709
10710         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
10711
10712 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10713
10714         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
10715         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
10716         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
10717         prj-tree.ads (Prj.Tree.Environment): new type.
10718
10719 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10720
10721         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
10722         prj-tree.adb, prj-tree.ads (Environment): new type.
10723
10724 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10725
10726         * prj-tree.ads: Remove unused variable.
10727
10728 2011-08-03  Yannick Moy  <moy@adacore.com>
10729
10730         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
10731         issuing messages related to SPARK restriction violation.
10732
10733 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10734
10735         * sem_ch6.adb: guard against error nodes in return statements.
10736
10737 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10738
10739         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
10740         a warning can only appear on a configuration file, so emit warning
10741         without further checks.
10742
10743 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10744
10745         * s-interr.ads: add overriding keyword.
10746
10747 2011-08-03  Geert Bosch  <bosch@adacore.com>
10748
10749         * exp_attr.adb: Fix minor typo.
10750
10751 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10752
10753         * par-ch4.adb: improve error recovery.
10754
10755 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10756
10757         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
10758         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
10759         to Errout_Handling.
10760
10761 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10762
10763         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
10764         "external" as an attribute name in aggregate projects.
10765
10766 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
10767
10768         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
10769         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
10770         from 0, so we need to adjust.
10771
10772 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10773
10774         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
10775         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
10776
10777 2011-08-03  Yannick Moy  <moy@adacore.com>
10778
10779         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
10780         restriction on overloaded entity if the entity is not an operator.
10781
10782 2011-08-03  Yannick Moy  <moy@adacore.com>
10783
10784         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
10785         restrict.ads: Rename remaining Check_Formal_Restriction* into
10786         Check_SPARK_Restriction*.
10787
10788 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10789
10790         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
10791         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
10792         qualifier.
10793         (Project_Empty): removed
10794         (Empty_Project): new parameter Qualifier
10795         This is used to have fields specific to aggregate projects, cleaner
10796         New field to store the list of aggregated projects.
10797         (Check_Aggregate_Project): removed
10798         (Process_Aggregated_Projects, Free): new subprograms.
10799
10800 2011-08-03  Olivier Hainque  <hainque@adacore.com>
10801
10802         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
10803
10804 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10805
10806         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
10807         explicit dereference of an unconstrained type, create a constrained
10808         subtype for it, as is done for function calls that return an
10809         unconstrained type.
10810
10811 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10812
10813         * g-pehage.adb (Finalize): Avoid possible double-free.
10814
10815 2011-08-03  Steve Baird  <baird@adacore.com>
10816
10817         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
10818         Elab_Spec/Body attrs in CodePeer_Mode.
10819
10820 2011-08-03  Javier Miranda  <miranda@adacore.com>
10821
10822         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
10823         low bound is not known at compile time but they have no others choice.
10824         Done because in this case the bounds can be obtained directly from the
10825         aggregate.
10826
10827 2011-08-03  Ed Falis  <falis@adacore.com>
10828
10829         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
10830         on VxWorks SMP. Remove unusable constant ANY_CPU.
10831
10832 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10833
10834         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
10835         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
10836         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
10837         Prj.Env.Initialize_Empty): new subprograms
10838         (Get_Env, Find_Project): remove parameter Target_Name.
10839
10840 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10841
10842         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
10843         as a condition for the delayed call to Derived_Subprograms done for the
10844         case of the rewriting of a derived type that constrains the
10845         discriminants of its parent type.
10846         Avoids redundant subprogram derivations for private subtype derivations.
10847
10848 2011-08-03  Javier Miranda  <miranda@adacore.com>
10849
10850         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
10851         Build_Record_Aggr_Code.
10852         (Build_Record_Aggr_Code): Add missing support to initialize hidden
10853         discriminants in extension aggregates.
10854
10855 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10856
10857         * prj-pp.adb (Print): also output project qualifiers, since in
10858         particular "aggregate" is mandatory in an aggregate project.
10859
10860 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10861
10862         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
10863         (Debug_Output): new function.
10864
10865 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10866
10867         * gnat_ugn.texi: Document -Wstack-usage.
10868         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
10869
10870 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10871
10872         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
10873         have keyword LIMITED.
10874
10875 2011-08-03  Yannick Moy  <moy@adacore.com>
10876
10877         * alfa.adb, alfa.ads, alfa_test.adb: New files.
10878         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
10879         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
10880         section (does not happen in compiler, only if code directly calls
10881         Scan_ALI).
10882         * get_alfa.adb, get_alfa.ads: New files.
10883         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
10884         needed.
10885         * lib-xref-alfa.adb: New file.
10886         * lib-xref.adb, lib-xref.ads
10887         (Xref_Entry): redefine information needed in cross-references for ALFA.
10888         Push ALFA treatments in separated local package.
10889         (Enclosing_Subpragram_Or_Package): treat specially subprogram
10890         identifiers. Return entity of package body instead of spec. Return
10891         Empty for a scope with no location.
10892         (Generate_Reference): adapt to new components for ALFA information.
10893         Remove the need for D references on definitions.
10894         (Is_Local_Reference): moved to ALFA local package
10895         (Output_References): extract subfunction as Extract_Source_Name
10896         (Output_Local_References): remove procedure, replaced by filtering of
10897         cross-references in package ALFA and printing in Put_ALFA.
10898         (Write_Entity_Name): remove procedure
10899         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
10900         print exact name of entity as it appears in source file
10901         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
10902         * put_alfa.adb, put_alfa.ads: New files.
10903         * xref_lib.adb (Search_Xref): protect read of cross-references against
10904         reading other sections of the ALI file, in gnatxref
10905         (Search): protect read of cross-references against reading other
10906         sections of the ALI file, in gnatfind.
10907         * gcc-interface/Make-lang.in: Update dependencies.
10908
10909 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10910
10911         * sem_ch3.adb: Minor reformatting.
10912
10913 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
10914
10915         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
10916         raising an exception.
10917
10918 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10919
10920         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
10921         type, always use 1 as the lower bound or string, even if lower bound of
10922         context is not static, to handle properly null strings in a non-static
10923         context.
10924
10925 2011-08-03  Bob Duff  <duff@adacore.com>
10926
10927         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
10928         always legal on the right-hand side of an assignment statement; there
10929         is always an applicable index constraint in this case. Therefore, the
10930         check for Pkind = N_Assignment_Statement is now unconditional -- it
10931         doesn't depend on whether Is_Constrained (Typ).
10932
10933 2011-08-03  Robert Dewar  <dewar@adacore.com>
10934
10935         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
10936
10937 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10938
10939         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
10940         for an itype created within a generic unit.
10941
10942 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10943
10944         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
10945         suppresses all inlining.
10946
10947 2011-08-03  Robert Dewar  <dewar@adacore.com>
10948
10949         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
10950         exp_aggr.adb: Minor reformatting.
10951
10952 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10953
10954         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
10955         tagged assignment when discriminant checks are suppressed. This is
10956         useless and extremely costly in terms of static stack usage.
10957
10958 2011-08-03  Bob Duff  <duff@adacore.com>
10959
10960         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
10961         of generics, because this leads to the wrong entity in the wrong scope,
10962         causing (e.g.) pragma Export_Procedure to get an error if the entity is
10963         an instance.
10964         (Process_Interface_Name): Follow Alias for instances of generics, to
10965         correct for the above change.
10966
10967 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10968
10969         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
10970         is an integer literal it is always safe to replace the reference. In
10971         addition, if the reference appears in the generated code for an object
10972         declaration it is necessary to copy because otherwise the reference
10973         might be to the uninitilized value of the discriminant of the object
10974         itself.
10975
10976 2011-08-03  Pascal Obry  <obry@adacore.com>
10977
10978         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
10979         ACL used, in this case we want to check for ending .exe, not .exe
10980         anywhere in the path.
10981
10982 2011-08-03  Sergey Rybin  <rybin@adacore.com>
10983
10984         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10985         the tree structure (semantic decoration of references to record
10986         discriminants).
10987
10988 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10989
10990         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
10991         choices of a named array aggregate, bail out when any choices are
10992         marked as Errors_Posted.
10993
10994 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10995
10996         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
10997         in which entity is frozen, to handle properly loop variables in
10998         iterators.
10999
11000 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11001
11002         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
11003         subtype is not static, compute the upper bound using attributes, to
11004         handle properly index types that are not integer types.
11005
11006 2011-08-03  Bob Duff  <duff@adacore.com>
11007
11008         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
11009         Update copyright notice.
11010
11011 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11012
11013         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
11014         Original_Discriminant if within an instance.
11015         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
11016
11017 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11018
11019         * einfo.ads: Minor reformatting.
11020
11021 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11022
11023         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
11024         composite type with an unfrozen subcomponent, in the profile of a
11025         primitive operation.
11026
11027 2011-08-03  Robert Dewar  <dewar@adacore.com>
11028
11029         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
11030
11031 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11032
11033         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
11034         unconstrained type with discriminants is initialized with an aggregate,
11035         use the constrained subtype of the aggregate as the type of the object,
11036         because it is immutable, and this allows the back-end to generate no
11037         code for the object declaration.
11038
11039 2011-08-03  Robert Dewar  <dewar@adacore.com>
11040
11041         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
11042         comparison operand is variable, and turns out to be zero or negative.
11043
11044 2011-08-03  Javier Miranda  <miranda@adacore.com>
11045
11046         * exp_intr.adb
11047         (Expand_Dispatching_Constructor_Call): Disable expansion of
11048         code required for native targets. Done to avoid generating
11049         references to unavailable runtime entities in VM targets.
11050         * exp_ch3.adb
11051         (Expand_N_Object_Declaration): Add missing support to handle
11052         the explicit initialization of class-wide interface objects.
11053         Fix documentation.
11054
11055 2011-08-03  Matthew Heaney  <heaney@adacore.com>
11056
11057         * a-cobove.adb (Merge): Move source onto target, instead of using
11058         Assign.
11059
11060 2011-08-03  Matthew Heaney  <heaney@adacore.com>
11061
11062         * a-cbdlli.adb (Splice): Move source items from first to last.
11063
11064 2011-08-03  Yannick Moy  <moy@adacore.com>
11065
11066         * sem_util.ads: Add comment.
11067
11068 2011-08-03  Javier Miranda  <miranda@adacore.com>
11069
11070         * exp_aggr.adb
11071         (Expand_Record_Aggregate): In VM targets disable the expansion into
11072         assignments of aggregates whose type is not known at compile time.
11073
11074 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11075
11076         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
11077         protected entries and task entries, to build the proper renaming
11078         declaration for entry formals, used in debugging.
11079         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11080         parameters in the same way.
11081
11082 2011-08-02  Robert Dewar  <dewar@adacore.com>
11083
11084         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11085         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11086         code reorganization.
11087
11088 2011-08-02  Robert Dewar  <dewar@adacore.com>
11089
11090         * debug.adb: Debug flag d.P to suppress length comparison optimization
11091         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11092         comparison of Length by comparing First/Last instead.
11093
11094 2011-08-02  Matthew Heaney  <heaney@adacore.com>
11095
11096         * a-cobove.ads: Code clean up.
11097
11098 2011-08-02  Vincent Celier  <celier@adacore.com>
11099
11100         * adaint.c (file_names_case_sensitive_cache): New static int.
11101         (__gnat_get_file_names_case_sensitive): Cache the return value in
11102         file_names_case_sensitive_cache at the first invocation, to avoid
11103         multiple calls to getenv.
11104
11105 2011-08-02  Bob Duff  <duff@adacore.com>
11106
11107         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11108
11109 2011-08-02  Yannick Moy  <moy@adacore.com>
11110
11111         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11112         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11113         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11114         indicate that we are in a precondition or postcondition. This is used in
11115         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11116         decide whether to flag the spec or body of the current subprogram as
11117         not in ALFA.
11118
11119 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
11120
11121         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11122         list.
11123         * a-extiin.ads: New file.
11124
11125 2011-08-02  Bob Duff  <duff@adacore.com>
11126
11127         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11128         now raises Name_Error instead of Use_Error in certain cases. The other
11129         parts of this AI were already implemented properly.
11130
11131 2011-08-02  Vincent Celier  <celier@adacore.com>
11132
11133         * link.c: Only import "auto-host.h" when building the gnattools.
11134
11135 2011-08-02  Yannick Moy  <moy@adacore.com>
11136
11137         * sem_util.adb: Inter-unit inlining does not work for a subprogram
11138         which calls a local subprogram, so extract subprogram
11139         from Mark_Non_ALFA_Subprogram_Body.
11140
11141 2011-08-02  Javier Miranda  <miranda@adacore.com>
11142
11143         * exp_ch9.adb
11144         (Extract_Dispatching_Call): If the type of the dispatching object is an
11145         access type then return an explicit dereference in the Object out-mode
11146         parameter.
11147
11148 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11149
11150         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11151         compatibility checks for all indexes of an array subtype, not just the
11152         first. Reset Has_Dynamic_Range_Check on the subtype before each
11153         potential check to ensure that Insert_Range_Checks will not elide any
11154         of the dynamic checks.
11155
11156 2011-08-02  Yannick Moy  <moy@adacore.com>
11157
11158         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11159         SPARK restriction at parsing time.
11160         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11161         directive only if the SPARK restriction is set for this unit.
11162
11163 2011-08-02  Yannick Moy  <moy@adacore.com>
11164
11165         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11166         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11167         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11168         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11169         Mark_Non_ALFA_Subprogram_Body.
11170         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11171         inlined.
11172
11173 2011-08-02  Yannick Moy  <moy@adacore.com>
11174
11175         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11176         might be costly.
11177
11178 2011-08-02  Robert Dewar  <dewar@adacore.com>
11179
11180         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11181         exp_ch3.adb: Minor reformatting.
11182
11183 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11184
11185         * adaint.c (__gnat_locate_exec_on_path): only returns executable
11186         files, not any regular file.
11187         (__gnat_locate_file_with_predicate): new subprogram.
11188
11189 2011-08-02  Yannick Moy  <moy@adacore.com>
11190
11191         * sinfo.adb, sinfo.ads: Restrict the use of flags
11192         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11193         nodes, plus N_Subtype_Declaration for the 2nd one.
11194
11195 2011-08-02  Sergey Rybin  <rybin@adacore.com>
11196
11197         * gnat_rm.texi: Ramification of pragma Eliminate documentation
11198          - fix bugs in the description of Source_Trace;
11199          - get rid of UNIT_NAME;
11200
11201 2011-08-02  Javier Miranda  <miranda@adacore.com>
11202
11203         * exp_ch9.adb
11204         (Build_Dispatching_Requeue): Adding support for VM targets
11205         since we cannot directly reference the Tag entity.
11206         * exp_sel.adb (Build_K): Adding support for VM targets.
11207         (Build_S_Assignment): Adding support for VM targets.
11208         * exp_disp.adb
11209         (Default_Prim_Op_Position): In VM targets do not restrict availability
11210         of predefined interface primitives to compiling in Ada 2005 mode.
11211         (Is_Predefined_Interface_Primitive): In VM targets this service is not
11212         restricted to compiling in Ada 2005 mode.
11213         (Make_VM_TSD): Generate code that declares and initializes the OSD
11214         record. Needed to support dispatching calls through synchronized
11215         interfaces.
11216         * exp_ch3.adb
11217         (Make_Predefined_Primitive_Specs): Enable generation of predefined
11218         primitives associated with synchronized interfaces.
11219         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11220         primitives associated with synchronized interfaces.
11221
11222 2011-08-02  Yannick Moy  <moy@adacore.com>
11223
11224         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11225         statements hidden in SPARK if preceded by the HIDE directive
11226         (Parse_Exception_Handlers): mark each exception handler in a sequence of
11227         exception handlers as hidden in SPARK if preceded by the HIDE directive
11228         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11229         if starting with the HIDE directive
11230         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11231         starting with the HIDE directive; mark the declarations in a private
11232         part as hidden in SPARK if the private part starts with the HIDE
11233         directive
11234         * restrict.adb, restrict.ads
11235         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11236         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11237         argument node belongs to a part which is hidden in SPARK
11238         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11239         parts in SPARK; protect the possibly costly call to
11240         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11241         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11242         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11243         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11244         Tok_SPARK_Hide.
11245         (Scan): recognize special comment starting with '#' and followed by
11246         SPARK keyword "hide" as a HIDE directive.
11247
11248 2011-08-02  Yannick Moy  <moy@adacore.com>
11249
11250         * types.ads, erroutc.ads: Minor reformatting.
11251
11252 2011-08-02  Vincent Celier  <celier@adacore.com>
11253
11254         * link.c: Add response file support for cross platforms.
11255
11256 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11257
11258         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11259         in an association, set parent field of copy before partial analysis.
11260         * sem_res.adb (Resolve_Slice): create reference to itype only when
11261         expansion is enabled.
11262
11263 2011-08-02  Yannick Moy  <moy@adacore.com>
11264
11265         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11266         for new flag denoting which subprogram bodies are in ALFA
11267         * restrict.adb, sem_ch7.adb: Update comment
11268         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11269         sem_ch9.adb, sem_res.adb: Add calls to
11270         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11271         * sem_ch6.adb (Analyze_Function_Return): add calls to
11272         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11273         middle of the body, and extended return.
11274         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11275         False when missing return.
11276         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11277         to True for subprograms whose spec is in ALFA. Remove later on the flag
11278         on the entity used for a subprogram body when there exists a separate
11279         declaration.
11280         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11281         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11282         False, otherwise do nothing.
11283
11284 2011-08-02  Robert Dewar  <dewar@adacore.com>
11285
11286         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11287
11288 2011-08-02  Yannick Moy  <moy@adacore.com>
11289
11290         * sem_ch4.ads: minor formatting.
11291
11292 2011-08-02  Yannick Moy  <moy@adacore.com>
11293
11294         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11295         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11296         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11297         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11298         opt.ads: cleanup of SPARK mode
11299
11300 2011-08-02  Yannick Moy  <moy@adacore.com>
11301
11302         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11303         types.
11304         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11305         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11306         * sem_ch3.adb
11307         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11308         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11309         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11310         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11311         types.
11312         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11313         non-static range.
11314         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11315         functions whose return type is not in ALFA.
11316         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11317         specifications.
11318         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11319         parameter's type is not in ALFA.
11320         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11321         types are in ALFA.
11322
11323 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11324
11325         * sem_ch6 (Analyze_Expression_Function): treat the function as
11326         Inline_Always, and introduce a subprogram declaration for it when it is
11327         not a completion.
11328         * inline.adb (Add_Inlined_Body): recognize bodies that come from
11329         expression functions, so that the back-end can determine whether they
11330         can in fact be inlined.
11331         * sem_util.adb (Is_Expression_Function): predicate to determine whether
11332         a function body comes from an expression function.
11333
11334 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11335
11336         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11337         null exclusions to test Can_Never_Be_Null on the anonymous access types
11338         of the formals rather than testing the formals themselves. Exclude this
11339         check in cases where the Old_Formal is marked as a controlling formal,
11340         to avoid issuing spurious errors for bodies completing dispatching
11341         operations (due to the flag not getting set on controlling access
11342         formals in body specs).
11343         (Find_Corresponding_Spec): When checking full and subtype conformance of
11344         subprogram bodies in instances, pass Designated and E in that order, for
11345         consistency with the expected order of the formals (New_Id followed by
11346         Old_Id).
11347
11348 2011-08-02  Robert Dewar  <dewar@adacore.com>
11349
11350         * sem_ch8.adb: Minor reformatting.
11351
11352 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11353
11354         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11355         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11356         primitive operations of class-wide actuals.
11357
11358 2011-08-02  Javier Miranda  <miranda@adacore.com>
11359
11360         * exp_atag.ads, exp_atag.adb
11361         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11362         since its value is implicitly passed in argument Typ.
11363         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11364         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11365         Build_Common_Dispatching_Select_Statements.
11366
11367 2011-08-02  Robert Dewar  <dewar@adacore.com>
11368
11369         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11370         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11371         Minor reformatting.
11372
11373 2011-08-02  Robert Dewar  <dewar@adacore.com>
11374
11375         * sem_res.adb: Minor reformatting.
11376         * sem_prag.adb: Minor reformatting.
11377
11378 2011-08-02  Javier Miranda  <miranda@adacore.com>
11379
11380         * exp_atag.adb, exp_atags.ads
11381         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11382         by the tagged type Entity. Required to use this routine in the VM
11383         targets since we do not have available the Tag entity in the VM
11384         platforms.
11385         * exp_ch6.adb
11386         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11387         Ada.Tags has not been previously loaded.
11388         * exp_ch7.adb
11389         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11390         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11391         * sem_aux.adb
11392         (Enclosing_Dynamic_Scope): Add missing support to handle the full
11393         view of enclosing scopes. Required to handle enclosing scopes that
11394         are synchronized types whose full view is a task type.
11395         * exp_disp.adb
11396         (Build_VM_TSDs): Minor code improvement to avoid generating and
11397         analyzing lists with empty nodes.
11398         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11399         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11400         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11401         (Make_Disp_Timed_Select_Body): Add support for VM targets.
11402         (Make_Select_Specific_Data_Table): Add support for VM targets.
11403         (Make_VM_TSD): Generate code to initialize the SSD structure of
11404         the TSD.
11405
11406 2011-08-02  Yannick Moy  <moy@adacore.com>
11407
11408         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11409         cross-references section in ALI.
11410         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11411         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11412         Sub).
11413         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11414         subprogram or package entity of a node
11415         (Is_Local_Reference_Type): new function returns True for references
11416         selected in local cross-references.
11417         (Lt): function extracted from Lt in Output_References
11418         (Write_Entity_Name): function extracted from Output_References
11419         (Generate_Definition): generate reference with type 'D' for definition
11420         of objects (object declaration and parameter specification), with
11421         appropriate locations and units, for use in local cross-references.
11422         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11423         references of type 'I' for initialization in object definition.
11424         (Output_References): move part of function Lt and procedure
11425         Write_Entity_Name outside of the body. Ignore references of types 'D'
11426         and 'I' introduced for local cross-references.
11427         (Output_Local_References): new procedure to output the local
11428         cross-references sections.
11429         (Lref_Entity_Status): new array defining whether an entity is a local
11430         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11431         with 'I' type when initialization expression is present.
11432         * get_scos.adb, get_scos.ads: Correct comments and typos
11433
11434 2011-08-02  Javier Miranda  <miranda@adacore.com>
11435
11436         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11437         the JVM target.
11438         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11439         the JVM target.
11440         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11441         TSD support.
11442
11443 2011-08-02  Vincent Celier  <celier@adacore.com>
11444
11445         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11446         (No_Space_Img): New function
11447         (Find_Excluded_Sources): When reading from a file, record the file name
11448         and the line number for each excluded source.
11449         (Mark_Excluded_Sources): When reporting an error, if the excluded
11450         sources were read from a file, include file name and line number in
11451         the error message.
11452
11453 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11454
11455         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11456
11457 2011-08-02  Robert Dewar  <dewar@adacore.com>
11458
11459         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11460
11461 2011-08-02  Javier Miranda  <miranda@adacore.com>
11462
11463         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11464         generation of TSDs to the DOTNET compiler.
11465         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11466         generation of TSDs to the DOTNET compiler.
11467
11468 2011-08-02  Javier Miranda  <miranda@adacore.com>
11469
11470         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11471         record of all the tagged types declared inside library level package
11472         declarations, library level package bodies or library level subprograms.
11473         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11474         associated with a given tagged type.
11475         (Build_VM_TSDs): New subprogram.
11476         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11477         compilation units that are subprograms.
11478         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11479         compilation units that are package bodies.
11480         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11481         units that are a package declaration or a package instantiation.
11482         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11483         reorganization to improve the error generated by the frontend when the
11484         function Ada.Tags.Secondary_Tag is not available.
11485         * rtsfind.ads (RE_Register_TSD): New runtime entity.
11486         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11487
11488 2011-08-02  Javier Miranda  <miranda@adacore.com>
11489
11490         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11491
11492 2011-08-02  Robert Dewar  <dewar@adacore.com>
11493
11494         * s-imenne.ads: Minor reformatting.
11495
11496 2011-08-02  Robert Dewar  <dewar@adacore.com>
11497
11498         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11499         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11500         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11501
11502 2011-08-02  Robert Dewar  <dewar@adacore.com>
11503
11504         * einfo.ads (Materialize_Entity): Document this is only for renamings
11505         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11506         required debug information in the case where we transform the object
11507         declaration into a renaming declaration.
11508         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11509         object
11510         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11511         Materialize_Entity.
11512
11513 2011-08-02  Robert Dewar  <dewar@adacore.com>
11514
11515         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11516         Suppress_Init_Procs.
11517         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11518         Suppress_Initialization/Initialization_Suppressed.
11519         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11520         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11521         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11522         * sem_prag.adb: New processing for pragma Suppress_Initialization.
11523
11524 2011-08-02  Robert Dewar  <dewar@adacore.com>
11525
11526         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11527         Minor reformatting.
11528
11529 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11530
11531         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11532         only have inheritable classwide pre/postconditions.
11533
11534 2011-08-02  Javier Miranda  <miranda@adacore.com>
11535
11536         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11537         * rtsfind.ads (RE_Check_TSD): New runtime entity.
11538         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11539         checks if the external tag of a type is the same as the external tag
11540         of some other declaration.
11541
11542 2011-08-02  Thomas Quinot  <quinot@adacore.com>
11543
11544         * s-taskin.ads: Minor reformatting.
11545
11546 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11547
11548         * g-comlin.adb (Display_Help): swap the order in which it prints the
11549         short help and the general usage.
11550
11551 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11552
11553         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11554         the aspect declarations and attach them to the generic copy for
11555         subsequent analysis.
11556         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11557         declarations of the generic tree to the new subprogram declarations.
11558         * sem_attr.adb (Check_Precondition_Postcondition): recognize
11559         conditions that apply to a subprogram instance.
11560
11561 2011-08-02  Robert Dewar  <dewar@adacore.com>
11562
11563         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11564
11565 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11566
11567         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11568         private type with a tagged full view is not derived in the immediate
11569         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11570
11571 2011-08-02  Robert Dewar  <dewar@adacore.com>
11572
11573         * exp_ch4.adb: Minor reformatting.
11574
11575 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11576
11577         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
11578         Ada2012 iterator, the loop will be rewritten during expansion into a
11579         while loop with a cursor and an element declaration. Do not analyze the
11580         body in this case, because if the container is for indefinite types the
11581         actual subtype of the elements will only be determined when the cursor
11582         declaration is analyzed.
11583
11584 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11585
11586         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11587         size/alignment related attributes in CodePeer_Mode.
11588
11589 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11590
11591         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11592         Prepend_Element, since this can result in the operation getting the
11593         wrong slot in the full type's dispatch table if the full type has
11594         inherited operations. The incomplete type's operation will get added
11595         to the proper position in the full type's primitives
11596         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11597         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11598         dispatching operations, since there are cases where nonprimitive
11599         subprograms can get added to the list of incomplete dependents (such
11600         as subprograms in nested packages).
11601         * sem_ch6.adb (Process_Formals): First, remove test for being in a
11602         private part when determining whether to add a primitive with a
11603         parameter of a tagged incomplete type to the Private_Dependents list.
11604         Such primitives can also occur in the visible part, and should not have
11605         been excluded from being private dependents.
11606         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11607         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11608         list of a Taft-amendment incomplete type is a primitive before issuing
11609         an error that the full type must appear in the same unit. There are
11610         cases where nonprimitives can be in the list (such as subprograms in
11611         nested packages).
11612         * sem_disp.adb (Derives_From): Use correct condition for checking that
11613         a formal's type is derived from the type of the corresponding formal in
11614         the parent subprogram (the condition was completely wrong). Add
11615         checking that was missing for controlling result types being derived
11616         from the result type of the parent operation.
11617
11618 2011-08-02  Yannick Moy  <moy@adacore.com>
11619
11620         * errout.adb (First_Node): minor renaming
11621         * restrict.adb (Check_Formal_Restriction): put restriction warning on
11622         first node.
11623
11624 2011-08-02  Yannick Moy  <moy@adacore.com>
11625
11626         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11627         before accessing operands.
11628         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11629         decide whether an initialization expression respects SPARK rules, as
11630         the plain node is the expanded one. This allows for more valid warnings
11631         to be issued.
11632         * gnat_rm.texi: Minor update.
11633
11634 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11635
11636         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11637         previous change.
11638
11639 2011-08-02  Robert Dewar  <dewar@adacore.com>
11640
11641         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11642
11643 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11644
11645         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11646         loop statements and the element renaming declaration with a block when
11647         the element type is controlled.
11648
11649 2011-08-02  Yannick Moy  <moy@adacore.com>
11650
11651         * sinfo.ads: Minor formatting.
11652
11653 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11654
11655         * sem_aggr.adb (Add_Association): if the association has a box and no
11656         expression, use the Sloc of the aggregate itself for the new
11657         association.
11658         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11659         the Original_Node.
11660
11661 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11662
11663         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11664         When a container is provided via a function call, generate a renaming
11665         of the function result. This avoids the creation of a transient scope
11666         and the premature finalization of the container.
11667         * exp_ch7.adb (Is_Container_Cursor): Removed.
11668         (Wrap_Transient_Declaration): Remove the supression of the finalization
11669         of the list controller when the declaration denotes a container cursor,
11670         it is not needed.
11671
11672 2011-08-02  Yannick Moy  <moy@adacore.com>
11673
11674         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11675         node is from source, instead of the original node being from source.
11676         * sem_aggr.adb
11677         (Resolve_Array_Aggregate): refine the check for a static expression, to
11678         recognize also static ranges
11679         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11680         Array_Type_Declaration): postpone the test for the type being a subtype
11681         mark after the type has been resolved, so that component-selection and
11682         expanded-name are discriminated.
11683         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11684         to distinguish the case of an iteration scheme, so that an error is
11685         issed on a non-static range in SPARK except in an iteration scheme.
11686         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11687         In_Iter_Schm = True.
11688         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11689         user-defined operators so that they are allowed in renaming
11690         * sem_ch8.adb
11691         (Find_Selected_Component): refine the check for prefixing of operators
11692         so that they are allowed in renaming. Move the checks for restrictions
11693         on selector name after analysis discriminated between
11694         component-selection and expanded-name.
11695         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11696         concatenation argument of string type if it is static.
11697         * sem_util.adb, sem_util.ads
11698         (Check_Later_Vs_Basic_Declarations): add a new function
11699         Is_Later_Declarative_Item to decice which declarations are allowed as
11700         later items, in the two different modes Ada 83 and SPARK. In the SPARK
11701         mode, add that renamings are considered as later items.
11702         (Enclosing_Package): new function to return the enclosing package
11703         (Enter_Name): correct the rule for homonyms in SPARK
11704         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11705         from source (result of expansion) to avoid issuing wrong warnings.
11706
11707 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11708
11709         * errout.adb: On anything but an expression First_Node returns its
11710         argument.
11711
11712 2011-08-02  Pascal Obry  <obry@adacore.com>
11713
11714         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11715
11716 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11717
11718         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11719         Set the associated loop as the related expression of internally
11720         generated cursors.
11721         * exp_ch7.adb (Is_Container_Cursor): New routine.
11722         (Wrap_Transient_Declaration): Supress the finalization of the list
11723         controller when the declaration denotes a container cursor.
11724
11725 2011-08-02  Yannick Moy  <moy@adacore.com>
11726
11727         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11728         command line now.
11729         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11730         expression is a simple expression. This check cannot be performed in
11731         the semantics, so just drop it.
11732         (P_Index_Or_Discriminant_Constraint): move check that the index or
11733         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11734         semantics. Other cases were previously checked in the semantics.
11735         * par-ch4.adb (P_Name): move checks that a selector name is not
11736         character literal or an operator symbol to Find_Selected_Component in
11737         the semantics
11738         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11739         declarations are not placed after later declarations in a separate
11740         procedure in Sem_Util (possibly not the best choice?), to be used both
11741         during parsing, for Ada 83 mode, and during semantic analysis, for
11742         SPARK mode.
11743         * par-endh.adb (Check_End): move check that end label is not missing
11744         to Process_End_Label in the semantics
11745         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11746         the special case for SPARK restriction
11747         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11748         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11749         parameter Force to issue the error message even on internal node (used
11750         for generated end label). Call Check_Restriction to check when an error
11751         must be issued. In SPARK mode, issue an error message even if the
11752         restriction is not set.
11753         (Check_Restriction): new procedure with an additional out parameter to
11754         inform the caller that a message has been issued
11755         * sem_aggr.adb: Minor modification of message
11756         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11757         instead of issuing an error message directly
11758         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11759         declarations are not placed after later declarations, by calling
11760         Check_Later_Vs_Basic_Declarations
11761         (Analyze_Subtype_Declaration): move here the check that an index or
11762         discriminant constraint must be a subtype mark. Change the check that
11763         a subtype of String must start at one so that it works on subtype marks.
11764         * sem_ch4.adb (Analyze_Call): move here the check that a named
11765         association cannot follow a positional one in a call
11766         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11767         instead of issuing an error message directly
11768         * sem_ch8.adb (Find_Selected_Component): move here the check that a
11769         selector name is not a character literal or an operator symbol. Move
11770         here the check that the prefix of an expanded name cannot be a
11771         subprogram or a loop statement.
11772         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11773         procedure called from parsing and semantics to check that basic
11774         declarations are not placed after later declarations
11775         (Process_End_Label): move here the check that end label is not missing
11776
11777 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11778
11779         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11780         representation clause in codepeer mode, since it confuses CodePeer and
11781         does not bring useful info.
11782
11783 2011-08-02  Ed Falis  <falis@adacore.com>
11784
11785         * init.c: initialize fp hw on MILS.
11786
11787 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11788
11789         * errout.adb (First_Node): for bodies, return the node itself (small
11790         optimization). For other nodes, do not check source_unit if the node
11791         comes from Standard.
11792
11793 2011-08-02  Robert Dewar  <dewar@adacore.com>
11794
11795         * exp_ch3.adb: Minor comment additions.
11796         * sem_ch13.adb: Minor reformatting.
11797
11798 2011-08-02  Pascal Obry  <obry@adacore.com>
11799
11800         * make.adb, makeutl.adb: Removes some superfluous directory separator.
11801
11802 2011-08-02  Robert Dewar  <dewar@adacore.com>
11803
11804         * sem_attr.adb: Minor reformatting.
11805
11806 2011-08-02  Robert Dewar  <dewar@adacore.com>
11807
11808         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11809         (Has_Default_Component_Value): Removed
11810         * einfo.ads Comment updates
11811         (Has_Default_Aspect): Replaces Has_Default_Value
11812         (Has_Default_Component_Value): Removed
11813         * exp_ch13.adb
11814         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11815         * exp_ch3.adb
11816         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11817         (Get_Simple_Init_Val): Handle Default_Value aspect
11818         (Needs_Simple_Initialization): Handle Default_Value aspect
11819         * exp_ch3.ads: Needs_Simple_Initialization
11820         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11821         * par-prag.adb (Pragma_Default[_Component]Value) Removed
11822         * sem_ch13.adb
11823         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11824         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11825         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11826
11827 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11828
11829         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11830         package containing iteration primitives.
11831         exp_ch5.adb (Expand_Iterator_Loop): ditto.
11832
11833 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11834
11835         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11836         "of", pre-analyze expression in case it is a function call with
11837         finalization actions that must be placed ahead of the loop.
11838         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11839         on an Ada2012 iterator, insert them ahead of the rewritten loop.
11840
11841 2011-08-02  Geert Bosch  <bosch@adacore.com>
11842
11843         * cstand.adb (Create_Float_Types): Only consider C's long double for
11844         Long_Long_Float, in addition to double.
11845
11846 2011-08-02  Robert Dewar  <dewar@adacore.com>
11847
11848         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11849         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11850         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11851         Minor reformatting.
11852
11853 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11854
11855         * sem_attr.adb: handle properly 'Result when it is a prefix of an
11856         indexed component.
11857
11858 2011-08-02  Javier Miranda  <miranda@adacore.com>
11859
11860         * einfo.ads, einfo.adb
11861         (Original_Access_Type): Move this attribute to Node26 since there was
11862         an undocumented use of Node21 in E_Access_Subprogram_Type entities
11863         which causes conflicts and breaks the generation of the .NET compiler.
11864         (Interface_Name): Add missing documentation on JGNAT only uses of
11865         this attribute.
11866
11867 2011-08-02  Geert Bosch  <bosch@adacore.com>
11868
11869         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11870         (Find_Back_End_Float_Type): Likewise
11871         (Create_Back_End_Float_Types): Likewise
11872         (Create_Float_Types): Likewise
11873         (Register_Float_Type): Likewise
11874         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11875         Nlist and split out type selection in new local Find_Base_Type function.
11876         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11877         Nlist
11878         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11879
11880 2011-08-02  Robert Dewar  <dewar@adacore.com>
11881
11882         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11883         alpha order).
11884         * opt.ads: Minor comment change.
11885         * sem_ch12.adb: Minor code reorganization.
11886
11887 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11888
11889         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11890         subtype's list of rep items to the list on the full subtype in the case
11891         where the lists are the same.
11892
11893 2011-08-02  Geert Bosch  <bosch@adacore.com>
11894
11895         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11896         using the one from System.Strings, which also deallocates all strings.
11897
11898 2011-08-02  Geert Bosch  <bosch@adacore.com>
11899
11900         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11901         function.
11902         * gcc-interface/Make-lang.in: Update dependencies.
11903
11904 2011-08-02  Olivier Hainque  <hainque@adacore.com>
11905
11906         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11907         end_locus.
11908
11909 2011-08-02  Javier Miranda  <miranda@adacore.com>
11910
11911         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11912         associated with anonymous access to subprograms.
11913
11914 2011-08-02  Geert Bosch  <bosch@adacore.com>
11915
11916         * opt.ads
11917         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11918         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11919         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11920         (Add_Symbol_Definition): Move to switch-c.adb
11921         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11922         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11923         (Add_Symbol_Definition): Move to switch-c.adb.
11924         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11925         * sem_warn.adb
11926         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11927         Move to warnsw.adb.
11928         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11929         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11930         Move to warnsw.adb.
11931         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11932         (Add_Symbol_Definition): Moved from Prepcomp.
11933         * switch-c.ads: Update copyright notice. Use String_List instead of
11934         Argument_List, removing dependency on System.OS_Lib.
11935
11936 2011-08-02  Yannick Moy  <moy@adacore.com>
11937
11938         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11939         mode on initialization expression which does not respect SPARK
11940         restrictions.
11941         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11942         if the tree referenced by its argument represents an initialization
11943         expression in SPARK, suitable for initializing an object in an object
11944         declaration.
11945
11946 2011-08-02  Javier Miranda  <miranda@adacore.com>
11947
11948         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11949         internally generated access to subprogram with its associated protected
11950         subprogram type.
11951         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11952
11953 2011-08-02  Geert Bosch  <bosch@adacore.com>
11954
11955         * cstand.adb (Register_Float_Type): Print information about type to
11956         register, if the Debug_Flag_Dot_B is set.
11957         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11958         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11959         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11960         with a requested precision of more than Max_Digits digits and no more
11961         than Max_Base_Digits digits, if a range specification is present and the
11962         Predefined_Float_Types list has a suitable type to derive from.
11963         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11964         case of type completion with pragma Import
11965         * sem_prag.adb
11966         (Process_Import_Predefined_Type): Processing to complete a type
11967         with pragma Import. Currently supports floating point types only.
11968         (Set_Convention_From_Pragma): Do nothing without underlying type.
11969         (Process_Convention): Guard against absence of underlying type,
11970         which may happen when importing incomplete types.
11971         (Process_Import_Or_Interface): Handle case of importing predefined
11972         types. Tweak error message.
11973
11974 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11975
11976         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11977         functions to previous change.  Reorganize code slightly.
11978
11979 2011-08-02  Geert Bosch  <bosch@adacore.com>
11980
11981         * back_end.ads (Register_Type_Proc): New call back procedure type for
11982         allowing the back end to provide information about available types.
11983         (Register_Back_End_Types): New procedure to register back end types.
11984         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11985         available types.
11986         * cstand.adb (Back_End_Float_Types): New list for floating point types
11987         supported by the back end.
11988         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11989         (Copy_Float_Type): New procedure to make new copies of predefined types.
11990         (Register_Float_Type): New call back procedure to populate the BEFT list
11991         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11992         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11993         (Create_Float_Types): New procedure to create entities for floating
11994         point types predefined in Standard, and put these and any remaining
11995         BEFTs on the Predefined_Float_Types list.
11996         * stand.ads (Predefined_Float_Types): New list for predefined floating
11997         point types that do not have declarations in package Standard.
11998
11999 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12000
12001         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
12002         entity node for the unit containing the parameter.
12003         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12004         (Add_Inlined_Subprogram): Likewise.
12005         * gcc-interface/Make-lang.in: Update dependencies.
12006
12007 2011-08-02  Thomas Quinot  <quinot@adacore.com>
12008
12009         * s-stusta.adb (Print): Make sure Pos is always initialized to a
12010         suitable value.
12011
12012 2011-08-02  Geert Bosch  <bosch@adacore.com>
12013
12014         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12015
12016 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12017
12018         * sem_type.adb (Covers): Move trivial case to the top and reuse the
12019         computed value of Base_Type.
12020
12021 2011-08-02  Yannick Moy  <moy@adacore.com>
12022
12023         * restrict.adb (Check_Restriction): issue an error for any use of
12024         class-wide, even if the No_Dispatch restriction is not set.
12025         * sem_aggr.adb: Correct typos in comments and messages in formal mode
12026         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12027         when completing a private extension, the type named in the private part
12028         is not the same as that named in the visible part.
12029         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12030         of an inherited primitive operations of a tagged type or type extension
12031         that returns the tagged type.
12032         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12033         function which returns True for an implicit operation inherited by the
12034         derived type declaration for the argument type.
12035         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12036         order.
12037
12038 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12039
12040         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12041         Process_Bounds, to perform analysis with expansion of a range or an
12042         expression that is the iteration scheme for a loop.
12043         (Analyze_Iterator_Specification): If domain of iteration is given by a
12044         function call with a controlled result, as is the case if call returns
12045         a predefined container, ensure that finalization actions are properly
12046         generated.
12047         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12048
12049 2011-08-02  Javier Miranda  <miranda@adacore.com>
12050
12051         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12052         * gcc-interface/Make-lang.in: Update dependencies.
12053
12054 2011-08-02  Javier Miranda  <miranda@adacore.com>
12055
12056         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12057         determine if the analysis is performed using N or Original_Node (N).
12058         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12059         functionality of routine Is_Variable avoids code duplication.
12060         * checks.adb (Determine_Range): Handle temporaries generated by
12061         Remove_Side_Effects.
12062
12063 2011-08-02  Javier Miranda  <miranda@adacore.com>
12064
12065         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12066         expansion of the condition. Required since the previous analysis was
12067         done with expansion disabled (see Resolve_Quantified_Expression) and
12068         hence checks were not inserted and record comparisons have not been
12069         expanded.
12070
12071 2011-08-02  Ed Falis  <falis@adacore.com>
12072
12073         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12074         Update header.
12075
12076 2011-08-02  Bob Duff  <duff@adacore.com>
12077
12078         * opt.ads: Minor comment fix.
12079
12080 2011-08-02  Bob Duff  <duff@adacore.com>
12081
12082         * sem_ch12.adb (Analyze_Package_Instantiation,
12083         Analyze_Subprogram_Instantiation): Turn off style checking while
12084         analyzing an instance. Whatever style checks that apply to the generic
12085         unit should apply, so it makes no sense to apply them in an instance.
12086         This was causing trouble when compiling an instance of a runtime
12087         unit that violates the -gnatyO switch.
12088         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12089         one of the two case statements, causing spurious errors.
12090
12091 2011-08-02  Robert Dewar  <dewar@adacore.com>
12092
12093         * uname.adb: Minor reformatting.
12094         * gnatcmd.adb: Minor reformatting.
12095         * exp_attr.adb: Minor reformatting.
12096
12097 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12098
12099         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12100         No_Dispatching_Calls, do not look for the Assign primitive, because
12101         predefined primitives are not created in this case.
12102
12103 2011-08-02  Bob Duff  <duff@adacore.com>
12104
12105         * stylesw.ads: Minor comment fixes.
12106
12107 2011-08-02  Robert Dewar  <dewar@adacore.com>
12108
12109         * freeze.adb (Add_To_Result): New procedure.
12110
12111 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
12112
12113         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12114         time, if the specific run-time routines for handling streams of strings
12115         are not available, use the default mechanism.
12116
12117 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12118
12119         * s-regpat.ads: Fix typo.
12120
12121 2011-08-02  Vincent Celier  <celier@adacore.com>
12122
12123         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12124         not null, call it to create the in memory config project file without
12125         parsing an existing default config project file.
12126
12127 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12128
12129         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12130
12131 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12132
12133         * sem_elim.adb: an abstract subprogram does not need an eliminate
12134         pragma for its descendant to be eliminable.
12135
12136 2011-08-02  Ed Falis  <falis@adacore.com>
12137
12138         * init.c: revert to handling before previous checkin for VxWorks
12139         * s-intman-vxworks.adb: delete unnecessary declarations related to
12140         using Ada interrupt facilities for handling signals.
12141         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12142         * s-intman-vxworks.ads: Import __gnat_install_handler as
12143         Initialize_Interrupts.
12144         * s-taprop-vxworks.adb: Delete Signal_Mask.
12145         (Abort_Handler): change construction of mask to unblock exception
12146         signals.
12147
12148 2011-08-02  Jerome Guitton  <guitton@adacore.com>
12149
12150         * a-except-2005.adb (Raise_From_Signal_Handler): Call
12151         Debug_Raise_Exception before propagation starts.
12152
12153 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12154
12155         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12156         to Restriction_Check_Required.
12157         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12158         * sem_res.adb (Resolve_Call): Likewise.
12159         * sem_attr.adb (Check_Stream_Attribute): Likewise.
12160
12161 2011-08-02  Bob Duff  <duff@adacore.com>
12162
12163         * stylesw.ads: Update comment.
12164         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12165         * errout.ads: Remove obsolete comment.
12166
12167 2011-08-02  Javier Miranda  <miranda@adacore.com>
12168
12169         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12170         (Set_Is_Safe_To_Reevaluate): new procedure.
12171         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12172         assignment is allowed on safe-to-reevaluate variables.
12173         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12174         temporary created to remove side effects in expressions that use
12175         the secondary stack as safe-to-reevaluate.
12176         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12177         variables that are not true constants.
12178
12179 2011-08-02  Robert Dewar  <dewar@adacore.com>
12180
12181         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12182         sem_res.adb, sem_ch6.adb: Minor reformatting.
12183
12184 2011-08-02  Jerome Guitton  <guitton@adacore.com>
12185
12186         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12187
12188 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12189
12190         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12191         not set Overridden_Operation if subprogram is an initialization
12192         procedure.
12193
12194 2011-08-02  Yannick Moy  <moy@adacore.com>
12195
12196         * par-ch6.adb: Correct obsolete name in comments
12197         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12198         which takes two message arguments (existing function takes one), with
12199         second message used for continuation.
12200         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12201         block statements that originate from a source block statement, not
12202         generated block statements
12203         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12204         symmetry with procedure case
12205         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12206         function to issue an error in formal mode if a package specification
12207         contains more than one tagged type or type extension.
12208         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12209         parameters matching formals of tagged types are objects (or ancestor
12210         type conversions of objects), not general expressions. Issue an error
12211         on view conversions that are not involving ancestor conversion of an
12212         extended type.
12213         (Resolve_Type_Conversion): in formal mode, issue an error on the
12214         operand of an ancestor type conversion which is not an object
12215         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12216         procedure so that it works also for actuals of function calls
12217         (Is_Actual_Tagged_Parameter): new function which determines if its
12218         argument is an actual parameter of a formal of tagged type in a
12219         subprogram call
12220         (Is_SPARK_Object_Reference): new function which determines if the tree
12221         referenced by its argument represents an object in SPARK
12222
12223 2011-08-02  Robert Dewar  <dewar@adacore.com>
12224
12225         * sem_ch3.adb: Minor reformatting
12226         Minor comment addition
12227         Minor error msg text change
12228
12229 2011-08-02  Javier Miranda  <miranda@adacore.com>
12230
12231         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12232         function. Used to be more precise when we generate a variable plus one
12233         assignment to remove side effects in the evaluation of the Bound
12234         expressions.
12235         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12236         of the bound expression to force its re-analysis and thus expand the
12237         associated transient scope (if required). Code cleanup replacing the
12238         previous code that declared the constant entity by an invocation to
12239         routine Force_Evaluation which centralizes this work in the frontend.
12240
12241 2011-08-02  Robert Dewar  <dewar@adacore.com>
12242
12243         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12244         (Base_Type): Now uses improved Is_Base_Type function
12245         * einfo.ads (Base_Type): Inline this function
12246
12247 2011-08-02  Robert Dewar  <dewar@adacore.com>
12248
12249         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12250         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12251
12252 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12253
12254         * gcc-interface/Make-lang.in: Update dependencies.
12255         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12256         targets.
12257
12258 2011-08-02  Yannick Moy  <moy@adacore.com>
12259
12260         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12261         non-simple expression used in delta constraint
12262         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12263         index constraint which is not a subtype mark
12264         * par.adb: With and use Restrict
12265         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12266         mode on component type which is not a subtype mark and default
12267         expression on component
12268         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12269         of string which does not have a lower index bound equal to 1
12270         (Array_Type_Declaration): issue an error in formal mode on index or
12271         component type which is not a subtype mark, and on aliased keyword on
12272         component
12273         (Derived_Type_Declaration): issue an error in formal mode on interface,
12274         limited or abstract type
12275         (Record_Type_Declaration): issue an error in formal mode on interface
12276         (Record_Type_Definition): issue an error in formal mode on tagged types
12277         and type extensions not declared in the specification of a library unit
12278         package; on null non-tagged record; on variant part
12279
12280 2011-08-02  Vincent Celier  <celier@adacore.com>
12281
12282         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12283         not declared for qualified library project when Library_Name is not
12284         declared, but Library_Dir is.
12285
12286 2011-08-02  Robert Dewar  <dewar@adacore.com>
12287
12288         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12289         pragmas (affects aspects [Component_]Default_Value
12290         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12291         component type for the resolution
12292
12293 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12294
12295         * einfo.adb (Base_Type): Tune implementation for speed.
12296
12297 2011-08-02  Robert Dewar  <dewar@adacore.com>
12298
12299         * freeze.adb: Minor reformatting.
12300
12301 2011-08-02  Thomas Quinot  <quinot@adacore.com>
12302
12303         * scos.ads: Update comments.
12304
12305 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12306
12307         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12308         base type, because the parent may be a subtype of a private type whose
12309         convention is established in a private part.
12310
12311 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12312
12313         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12314         statement in a block when the expansion of the return expression has
12315         created a finalization chain.
12316         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12317         with the parent node.
12318         Add N_Extended_Return_Statement to handle the case where a transient
12319         object declaration appears in the Return_Object_Declarations list of
12320         an extended return statement.
12321
12322 2011-08-02  Matthew Gingell  <gingell@adacore.com>
12323
12324         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12325         unused parameter 'name'.
12326
12327 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12328
12329         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12330         inherited operation, check whether its alias, which is the source
12331         operastion that it renames, has been marked eliminated.
12332
12333 2011-08-02  Javier Miranda  <miranda@adacore.com>
12334
12335         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12336         in-mode parameter whose type is an access type since it can be used to
12337         modify its designated object. Enforce code that handles as safe an
12338         access type that is not access-to-constant but it is the result of a
12339         previous removal of side-effects.
12340         (Remove_Side_Effects): Minor code reorganization of cases which require
12341         no action. Done to incorporate documentation on new cases uncovered
12342         working in this ticket: no action needed if this routine was invoked
12343         too early and the nodes are not yet decorated.
12344         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12345         to routine Remove_Side_Effects by calls to Force_Evaluation since they
12346         were issued with actuals that are implicitly provided by
12347         Force_Evaluation.
12348
12349 2011-08-02  Robert Dewar  <dewar@adacore.com>
12350
12351         * sem_ch3.adb, sem_res.adb: Minor reformatting.
12352
12353 2011-08-02  Yannick Moy  <moy@adacore.com>
12354
12355         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12356         to issue an error in formal mode on attribute not supported in this mode
12357         (Analyze_Attribute): issue errors on standard attributes not supported
12358         in formal mode.
12359         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12360         comment, and issue error in formal mode on modulus which is not a power
12361         of 2.
12362         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12363         range.
12364         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12365         subtype mark.
12366         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12367         operator on modular type (except 'not').
12368
12369 2011-08-02  Robert Dewar  <dewar@adacore.com>
12370
12371         * gnat_rm.texi: Minor reformatting.
12372
12373 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12374
12375         * s-osinte-linux.ads: Minor comment update and reformatting.
12376         * i-cexten.ads: Make this unit pure, as for its parent.
12377         Will allow its usage in more contexts if needed.
12378
12379 2011-08-02  Robert Dewar  <dewar@adacore.com>
12380
12381         * s-utf_32.ads: Minor comment fix.
12382
12383 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12384
12385         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12386         operation of a tagged synchronized type, handle the case where the
12387         controlling argument is overloaded.
12388
12389 2011-08-02  Yannick Moy  <moy@adacore.com>
12390
12391         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12392         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12393         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12394         SPARK mode and formal verification mode on processing SPARK restriction
12395         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12396         requiring consistency checking.
12397
12398 2011-08-02  Robert Dewar  <dewar@adacore.com>
12399
12400         * sem_res.adb: Minor reformatting.
12401
12402 2011-08-02  Robert Dewar  <dewar@adacore.com>
12403
12404         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12405         a-cforse.ads: Remove unneeded with of Ada.Containers
12406         Remove commented out pragma Inline's
12407         Move specifications of new subprograms to the actual specs
12408
12409 2011-08-02  Yannick Moy  <moy@adacore.com>
12410
12411         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12412         a-cforse.ads: Update comments.
12413
12414 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12415
12416         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12417
12418 2011-08-02  Robert Dewar  <dewar@adacore.com>
12419
12420         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12421         a-cforse.ads, a-cofove.ads: Minor reformatting.
12422
12423 2011-08-02  Claire Dross  <dross@adacore.com>
12424
12425         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12426         a-cofove.ads: Add comments.
12427
12428 2011-08-02  Yannick Moy  <moy@adacore.com>
12429
12430         * gnat_rm.texi: Document formal containers.
12431
12432 2011-08-02  Emmanuel Briot  <briot@adacore.com>
12433
12434         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12435         are empty sections.
12436
12437 2011-08-02  Robert Dewar  <dewar@adacore.com>
12438
12439         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12440         reformatting.
12441
12442 2011-08-02  Robert Dewar  <dewar@adacore.com>
12443
12444         * aspects.adb: New aspects Default_Value and Default_Component_Value
12445         New format of Aspect_Names table checks for omitted entries
12446         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12447         handling of boolean aspects for derived types.
12448         New aspects Default_Value and Default_Component_Value
12449         New format of Aspect_Names table checks for omitted entries
12450         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12451         (Has_Default_Value): New flag
12452         (Has_Default_Component_Value): New flag
12453         (Has_Default_Value): New flag
12454         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12455         table.
12456         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12457         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12458         Default_Value and Default_Component_Value
12459         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12460         New aspects Default_Value and Default_Component_Value
12461         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12462         * sprint.adb: Print N_Aspect_Specification node when called from gdb
12463
12464 2011-08-02  Vincent Celier  <celier@adacore.com>
12465
12466         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12467         inherit library kind.
12468
12469 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12470
12471         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12472         Minor reformatting.
12473
12474 2011-08-02  Robert Dewar  <dewar@adacore.com>
12475
12476         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12477
12478 2011-08-02  Yannick Moy  <moy@adacore.com>
12479
12480         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12481
12482 2011-08-02  Robert Dewar  <dewar@adacore.com>
12483
12484         * impunit.adb: Add comment.
12485
12486 2011-08-02  Yannick Moy  <moy@adacore.com>
12487
12488         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12489         qualification of aggregates in formal mode
12490         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12491         another aggregate
12492         (Resolve_Aggregate): complete the test that an aggregate is adequately
12493         qualified in formal mode
12494
12495 2011-08-02  Pascal Obry  <obry@adacore.com>
12496
12497         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12498         * mlib-prj.adb: Supress warning when compiling binder generated file.
12499         (Build_Library): Supress all warnings when compiling the binder
12500         generated file.
12501
12502 2011-08-02  Yannick Moy  <moy@adacore.com>
12503
12504         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12505         from here...
12506         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12507         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12508         Add with/use clauses to make Check_Formal_Restriction visible
12509
12510 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12511
12512         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12513         in-parameters when type of the generic formal is private in the generic
12514         spec and non-private in the body.
12515
12516 2011-08-02  Claire Dross  <dross@adacore.com>
12517
12518         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12519         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12520         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12521         * impunit.adb, Makefile.rtl: Take new files into account.
12522
12523 2011-08-02  Robert Dewar  <dewar@adacore.com>
12524
12525         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12526         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12527
12528 2011-08-02  Yannick Moy  <moy@adacore.com>
12529
12530         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12531         formal mode
12532         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12533         matching static array bounds, taking into account the special case of
12534         string literals
12535         * sem_ch3.adb: Typo in comment.
12536
12537 2011-08-02  Yannick Moy  <moy@adacore.com>
12538
12539         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12540         which issues an error in formal mode if its argument node is originally
12541         from source
12542         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12543         has a discriminant specification so that it does not include the case
12544         of derived types
12545         (Derived_Type_Declaration): move here the test that a derived type has a
12546         discriminant specification
12547         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12548         first element of a component association before accessing its choices
12549         (presence of component association is not enough)
12550         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12551         declaration is a library item before accessing the next element in a
12552         list, as library items are not member of lists
12553         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12554         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12555         Check_Formal_Restriction whenever possible.
12556
12557 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12558
12559         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12560         reference when needed.
12561
12562 2011-08-02  Bob Duff  <duff@adacore.com>
12563
12564         * gnat_ugn.texi: Fix typo.
12565
12566 2011-08-02  Vincent Celier  <celier@adacore.com>
12567
12568         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12569         archive file name. Do not use the full path name of archives for Open
12570         VMS.
12571
12572 2011-08-02  Robert Dewar  <dewar@adacore.com>
12573
12574         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12575         Analyze_Aspect_Specifications
12576         * sem_ch13.adb
12577         (Analyze_Aspect_Specifications): New handling for boolean aspects
12578         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12579         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12580         sequence for Analyze_Aspect_Specifications
12581         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12582         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12583
12584 2011-08-02  Robert Dewar  <dewar@adacore.com>
12585
12586         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12587         aspects, since these no longer exist.
12588
12589 2011-08-02  Robert Dewar  <dewar@adacore.com>
12590
12591         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12592         semicolon, do not try to see if there are aspects following it.
12593         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12594         aspect spec.
12595
12596 2011-08-02  Robert Dewar  <dewar@adacore.com>
12597
12598         * sem_ch8.adb, aspects.ads: Minor reformatting.
12599
12600 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12601
12602         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12603         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12604         extracted from...
12605         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
12606
12607 2011-08-02  Yannick Moy  <moy@adacore.com>
12608
12609         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12610         mode on subprogram declaration outside of package specification, unless
12611         it is followed by a pragma Import
12612         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12613         Access_Type_Declaration): issue error in formal mode on access type
12614         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12615         incomplete type
12616         (Analyze_Object_Declaration): issue error in formal mode on object
12617         declaration which does not respect SPARK restrictions
12618         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12619         declaration which does not respect SPARK restrictions
12620         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12621         error in formal mode on digits or delta constraint
12622         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12623         decimal fixed point type
12624         (Derived_Type_Declaration): issue error in formal mode on derived type
12625         other than type extensions of tagged record types
12626         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12627         with check on access definition
12628         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12629         mode on protected definition.
12630         (Analyze_Task_Definition): issue error in formal mode on task definition
12631
12632 2011-08-02  Robert Dewar  <dewar@adacore.com>
12633
12634         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12635
12636 2011-08-02  Javier Miranda  <miranda@adacore.com>
12637
12638         * sem_ch6.adb (Can_Override_Operator): New function.
12639         (Verify_Overriding_Indicator): Add missing code to check overriding
12640         indicator in operators. Fixes regression.
12641         (Check_Overriding_Indicator): Minor reformating after replacing the
12642         code that evaluates if the subprogram can override an operator by
12643         invocations to the above new function.
12644         * einfo.adb
12645         (Write_Field26_Name): Add missing code to ensure that, following
12646         the documentation in einfo.ads, this field is not shown as attribute
12647         "Static_Initialization" on non-dispatching functions.
12648
12649 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
12650
12651         * sem_res.adb (Resolve_Call): A call to
12652         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12653         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12654         i.e., when the second parameter is of type Time_Span.
12655
12656 2011-08-02  Vincent Celier  <celier@adacore.com>
12657
12658         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12659         with an archive instead of -L<library dir> -l<library name>.
12660
12661 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12662
12663         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12664         mark the base types In_Use in addition to making the operations
12665         use_visible.
12666
12667 2011-08-02  Ed Falis  <falis@adacore.com>
12668
12669         * init.c: add and setup __gnat_signal_mask for the exception signals
12670         * s-inmaop-vxworks.adb: new file.
12671         * s-intman-vxworks.adb: remove unnecessary initializations and
12672         simplify remaining
12673         * s-intman-vxworks.ads: remove unnecessary variable
12674         * s-taprop-vxworks.adb: simplify signal initialization
12675
12676 2011-08-02  Robert Dewar  <dewar@adacore.com>
12677
12678         * sem_ch8.adb: Minor code reorganization, comment updates.
12679
12680 2011-08-02  Robert Dewar  <dewar@adacore.com>
12681
12682         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12683         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12684         here from Sem_Res.
12685         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12686         (Matching_Static_Array_Bounds): Moved here from Sem_Res
12687
12688 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12689
12690         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12691         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12692         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12693         use_type_clauses, to handle more efficiently use_type and use_all_type
12694         constructs.
12695         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12696         Ada2012 Use_All_Type clause.
12697         (Use_Class_Wide_Operations): new procedure.
12698
12699 2011-08-02  Robert Dewar  <dewar@adacore.com>
12700
12701         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12702         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12703         expression to expression function.
12704
12705 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12706
12707         * sem_ch4.adb: transform simple Ada2012 membership into equality only
12708         if types are compatible.
12709
12710 2011-08-02  Yannick Moy  <moy@adacore.com>
12711
12712         * sem_res.adb (Matching_Static_Array_Bounds): new function which
12713         returns True if its argument array types have same dimension and same
12714         static bounds at each index.
12715         (Resolve_Actuals): issue an error in formal mode on actuals passed as
12716         OUT or IN OUT paramaters which are not view conversions in SPARK.
12717         (Resolve_Arithmetic_Op): issue an error in formal mode on
12718         multiplication or division with operands of fixed point types which are
12719         not qualified or explicitly converted.
12720         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12721         Boolean or array type (except String) operands.
12722         (Resolve_Equality_Op): issue an error in formal mode on equality
12723         operators for array types other than String with non-matching static
12724         bounds.
12725         (Resolve_Logical_Op): issue an error in formal mode on logical operators
12726         for array types with non-matching static bounds. Factorize the code in
12727         Matching_Static_Array_Bounds.
12728         (Resolve_Qualified_Expression): issue an error in formal mode on
12729         qualified expressions for array types with non-matching static bounds.
12730         (Resolve_Type_Conversion): issue an error in formal mode on type
12731         conversion for array types with non-matching static bounds
12732
12733 2011-08-02  Robert Dewar  <dewar@adacore.com>
12734
12735         * par-ch10.adb: Minor code reorganization (use Nkind_In).
12736
12737 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12738
12739         * par-ch9.adb: save location of entry for proper error message.
12740
12741 2011-08-02  Javier Miranda  <miranda@adacore.com>
12742
12743         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12744         (Use_Full_View) which permits this routine to climb through the
12745         ancestors using the full-view of private parents.
12746         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12747         Use_Full_View to true in calls to Is_Ancestor.
12748         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12749         true in call to Is_Ancestor.
12750         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12751         Use_Full_View to true in call to Is_Ancestor.
12752         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12753         call to Is_Ancestor.
12754         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12755         Use_Full_View to true in calls to Is_Ancestor.
12756         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12757         Make_Select_Specific_Data_Table, Register_Primitive,
12758         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12759         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12760         to true in call to Is_Ancestor.
12761         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12762         Use_Full_View to true in calls to Is_Ancestor.
12763         * exp_cg.adb
12764         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12765         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12766
12767 2011-08-02  Robert Dewar  <dewar@adacore.com>
12768
12769         * gnat_rm.texi: Minor reformatting.
12770         * sem_prag.adb: Minor reformatting.
12771
12772 2011-08-02  Tristan Gingold  <gingold@adacore.com>
12773
12774         * vms_data.ads: Add VMS qualifier for -gnateP.
12775
12776 2011-08-02  Robert Dewar  <dewar@adacore.com>
12777
12778         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12779         * par-ch7.adb (P_Package): Proper placement of aspects for package
12780         decl/instantiation.
12781         * par-endh.adb (Check_End): Ad Is_Sloc parameter
12782         (End_Statements): Add Is_Sloc parameterr
12783         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12784         (Check_End): Ad Is_Sloc parameter
12785         (End_Statements): Add Is_Sloc parameterr
12786
12787 2011-08-02  Vincent Celier  <celier@adacore.com>
12788
12789         * ug_words: Add VMS qualifier equivalent to -gnateP:
12790         /SYMBOL_PREPROCESSING.
12791
12792 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
12793
12794         * gnat-style.texi: For hexadecimal numeric literals the typical
12795         grouping of digits is 4 to represent 2 bytes.
12796         A procedure spec which is split into several lines is indented two
12797         characters.
12798
12799 2011-08-02  Yannick Moy  <moy@adacore.com>
12800
12801         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12802         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12803         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12804         properly qualified
12805         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12806         choice in array aggregate
12807         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12808         mark as ancestor
12809         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12810         positional and named aggregate for record, or others in record
12811         aggregate, or multiple choice in record aggregate
12812         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12813         array operands to logical operations AND, OR and XOR do not have the
12814         same static lower and higher bounds
12815         * sem_ch5.adb, sinfo.ads: Correct typos in comments
12816
12817 2011-08-01  Robert Dewar  <dewar@adacore.com>
12818
12819         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12820         Replaces Last_Source_Node_In_Sequence.
12821         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12822         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12823         parens and blank in string (this was inconsistently implemented).
12824         * errout.ads
12825         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12826         blank in string (this was inconsistently implemented).
12827         * gnat1drv.adb
12828         (Set_Global_Switches): Set formal mode switches appropriately
12829         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12830         * par-prag.adb
12831         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12832         call Set_Error_Msg_Lang to set "spark" as language name.
12833         * par.adb: Remove unnecessary call to set formal language for errout
12834         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12835         appropriately and call Set_Error_Msg_Lang to set "spark" as language
12836         name.
12837         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12838         calls to it, moved after resolution so that types are known
12839         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12840         result of concatenation is not of type String
12841         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12842         concatenation is not properly restricted
12843         * gnat_rm.texi: Add doc on pragma Spark_95.
12844         * gcc-interface/Makefile.in: Remove obsolete target pairs for
12845         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12846         * gcc-interface/Make-lang.in: Update dependencies.
12847
12848 2011-08-01  Javier Miranda  <miranda@adacore.com>
12849
12850         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12851         condition that detects if the overridden operation must replace an
12852         existing entity.
12853
12854 2011-08-01  Javier Miranda  <miranda@adacore.com>
12855
12856         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12857         code declarations inserted by Insert_Actions in each alternative of the
12858         N_Case_Expression node.
12859
12860 2011-08-01  Robert Dewar  <dewar@adacore.com>
12861
12862         * sem_ch6.adb: Minor code reorganization.
12863         * sem_util.adb: Minor reformatting.
12864
12865 2011-08-01  Pascal Obry  <obry@adacore.com>
12866
12867         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12868         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12869
12870 2011-08-01  Yannick Moy  <moy@adacore.com>
12871
12872         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12873         literal or operator symbol which is prefixed
12874         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12875         mode on access attributes.
12876         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12877         that concatenation operands are properly restricted in formal mode
12878         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12879         Analyze_Concatenation_Operand. Issue an error in formal mode if the
12880         result of the concatenation has a type different from String.
12881         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12882         Analyze_Quantified_Expression, Analyze_Slice,
12883         Analyze_Null): issue an error in formal mode on unsupported constructs
12884         * sem_ch5.adb
12885         (Analyze_Block_Statement): only issue error on source block statement
12886         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12887         function which returns the last node in a list of nodes for which
12888         Comes_From_Source returns True, if any
12889         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12890         Last_Source_Node_In_Sequence
12891         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12892         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12893         mode on unsupported constructs
12894         * sem_ch9.adb Do not return after issuing error in formal mode, as the
12895         rest of the actions may be needed later on since the error is marked as
12896         not serious.
12897         * sinfo.ads: Typos in comments.
12898
12899 2011-08-01  Pascal Obry  <obry@adacore.com>
12900
12901         * projects.texi: Minor editing.
12902
12903 2011-08-01  Yannick Moy  <moy@adacore.com>
12904
12905         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12906         insertion character ~~
12907         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12908         (Set_Error_Msg_Lang): new procedure which fixes the language for use
12909         with insertion character ~~
12910         (Set_Msg_Text): treat insertion character ~~
12911         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12912         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12913         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12914         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12915         errors related to the formal language restriction not serious
12916         (insertion character |).
12917         * par.adb (Par): set formal language for error messages if needed
12918         * sem_ch6.adb (Check_Missing_Return): take into account possible
12919         generated statements at the end of the function
12920         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12921         enumeration value to define a new pragma SPARK_95
12922         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12923         SPARK_Version): new type and variables to store the SPARK version
12924         (none by default).
12925         (SPARK_Mode): return True when SPARK_Version is set
12926         * par-prag.adb: Correct indentation
12927         (Prag): take Pragma_SPARK_95 into account
12928         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12929         into account.
12930
12931 2011-08-01  Robert Dewar  <dewar@adacore.com>
12932
12933         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12934         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12935         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12936
12937 2011-08-01  Pascal Obry  <obry@adacore.com>
12938
12939         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12940         Target_Name to Get_Path call.
12941         (Parse_Single_Project): Likewise.
12942         (Post_Parse_Context_Clause): Likewise.
12943         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12944         Call Initialise_Project_Path with the proper Target_Name.
12945         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12946         search path.
12947         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12948         with the proper Target_Name.
12949         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12950         Part.Parse routine.
12951         (Parse_Project_And_Apply_Config): Likewise.
12952         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12953         This is fine as this part of the code is supporting only native
12954         compilation.
12955         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12956         is fine as this part of the code is supporting only native compilation.
12957
12958 2011-08-01  Yannick Moy  <moy@adacore.com>
12959
12960         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12961         of homonym, unless the homonym is one of the cases allowed in SPARK
12962         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12963         package declaration occurring after a body.
12964
12965 2011-08-01  Robert Dewar  <dewar@adacore.com>
12966
12967         * checks.adb, exp_ch4.adb: Minor reformatting.
12968
12969 2011-08-01  Javier Miranda  <miranda@adacore.com>
12970
12971         * einfo.ads (Access_Disp_Table): Fix documentation.
12972         (Dispatch_Table_Wrappers): Fix documentation.
12973
12974 2011-08-01  Pascal Obry  <obry@adacore.com>
12975
12976         * prj-env.adb, prj-env.ads: Minor reformatting.
12977
12978 2011-08-01  Yannick Moy  <moy@adacore.com>
12979
12980         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12981         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12982         procedures out of these packages.
12983         * errout.ads, errout.adb
12984         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12985         procedures in of this package
12986         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12987         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12988         on misplaced later vs initial declarations, like in Ada 83
12989         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12990         formal mode on attribute of private type whose full type declaration
12991         is not visible
12992         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12993         package declaration inside a package specification
12994         (Analyze_Full_Type_Declaration): issue error in formal mode on
12995         controlled type or discriminant type
12996         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12997         user-defined operator means that it should come from the source
12998         (New_Overloaded_Entity): issue error in formal mode on overloaded
12999         entity.
13000         * sem_ch6.ads, sem_ch13.ads: typos in comments.
13001
13002 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13003
13004         * atree.adb: Minor reformatting.
13005         * checks.adb: Minor reformatting.
13006
13007 2011-08-01  Vincent Celier  <celier@adacore.com>
13008
13009         * s-parame-vms-ia64.ads: Fix typo in comment
13010         Minor reformatting
13011         * s-parame-vms-restrict.ads: Removed, unused.
13012
13013 2011-08-01  Javier Miranda  <miranda@adacore.com>
13014
13015         * exp_ch3.adb
13016         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13017         * sem_ch3.adb
13018         (Constrain_Index): Remove side effects in the evaluation of the bounds.
13019         * sem_ch3.ads, sem_ch3.adb
13020         (Is_Constant_Bound): New extended version of the subprogram that was
13021         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13022         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13023         * sem_aux.ads (Constant_Value): Fix typo in comment.
13024         * checks.adb (Generate_Index_Checks): New implementation which, for
13025         array objects with constant bounds, generates the runtime check
13026         referencing the bounds of the array type. For other cases this routine
13027         provides its previous behavior obtaining such values from the array
13028         object.
13029         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13030         parent type.
13031         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13032         we cannot have semantic interpretations of the new node.
13033
13034 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13035
13036         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13037         expressions.
13038
13039 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13040
13041         * sem_ch8.adb: Minor code editing.
13042         * s-vxwext.adb: Remove trailing space.
13043         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13044         consistency with other files.
13045
13046 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13047
13048         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13049
13050 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13051
13052         * par-ch10.adb: reject parameterized expressions as compilation unit.
13053         * sem_ch4.adb: handle properly conditional expression with overloaded
13054         then_clause and no else_clause.
13055
13056 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13057
13058         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13059         like done by System.Aux_DEC.
13060         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13061
13062 2011-08-01  Yannick Moy  <moy@adacore.com>
13063
13064         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13065         missing label at end of declaration (subprogram or package)
13066         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13067         of positional and named parameter association
13068         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13069         Error_Msg_SP which adds a prefix to the error message giving the name
13070         of the formal language analyzed
13071         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13072         access result type in subprogram, unconstrained array as result type,.
13073         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13074         procedure
13075         * sem_ch8.adb: Code clean up.
13076
13077 2011-08-01  Javier Miranda  <miranda@adacore.com>
13078
13079         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13080         * einfo.ads (Access_Disp_Table): Fix documentation.
13081         (Dispatch_Table_Wrappers): Fix documentation.
13082         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13083         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13084         to enforce the documentation of this attribute.
13085         (Set_Is_Interface): Cleanup the assertion.
13086         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13087         the Underlying_Type entity before reading attribute Access_Disp_Table.
13088         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13089         Locate the Underlying_Type before reading attribute Access_Disp_Table.
13090         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13091         the Underlying_Type entity before reading attribute Access_Disp_Table.
13092         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13093         Locate the Underlying_Type entity before reading attribute
13094         Access_Disp_Table.
13095
13096 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13097
13098         * s-poosiz.ads: Additional overriding indicators.
13099
13100 2011-08-01  Yannick Moy  <moy@adacore.com>
13101
13102         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13103         formal mode.
13104         (Analyze_Iteration_Scheme): issue error in formal mode when loop
13105         parameter specification does not include a subtype mark.
13106         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13107         formal mode on abstract subprogram.
13108         (Analyze_Subprogram_Specification): issue error in formal mode on
13109         user-defined operator.
13110         (Process_Formals): issue error in formal mode on access parameter and
13111         default expression.
13112         * sem_ch9.adb (Analyze_Abort_Statement,
13113         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13114         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13115         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13116         Analyze_Requeue, Analyze_Selective_Accept,
13117         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13118         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13119         issue error in formal mode on user-defined raise statement.
13120
13121 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13122
13123         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13124         declaration being hidden when overriding an implicit inherited
13125         subprogram.
13126         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13127         (-gnats), do not complain about a source file that contains only a
13128         pragma No_Body.
13129
13130 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13131
13132         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13133         variable if already set.
13134
13135 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13136
13137         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13138         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13139         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13140         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13141         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13142         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13143         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13144         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13145         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13146         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13147         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13148         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13149         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13150         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13151         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13152         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13153         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13154         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13155         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13156         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13157         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13158         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13159         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13160         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13161         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13162         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13163         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13164         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13165         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13166         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13167         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13168         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13169         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13170         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13171         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13172         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13173         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13174         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13175         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13176         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13177         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13178         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13179         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13180         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13181         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13182         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13183         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13184         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13185         s-osinte-mingw.ads: Update to GPLv3 run-time license.
13186         Use GNAT instead of GNARL.
13187
13188 2011-08-01  Bob Duff  <duff@adacore.com>
13189
13190         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13191         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13192         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13193         reformatting.
13194
13195 2011-08-01  Yannick Moy  <moy@adacore.com>
13196
13197         * debug.adb (d.D) reverve flag for the SPARK mode
13198         (d.E) reverve flag for SPARK generation mode
13199         (d.F) reverve flag for Why generation mode
13200         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13201         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
13202         functions which return True when the corresponding modes are set
13203         (Formal_Language): return "spark" or "alfa" when in formal verification
13204         mode.
13205         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13206         Error_Msg to prefix the error message with a tag giving the formal
13207         language
13208         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13209         message with a tag giving the formal language
13210         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13211         block statement
13212         (Analyze_Case_Statement): issue error in formal mode on case statement
13213         with a single "others" case alternative
13214         (Analyze_Exit_Statement): issue errors in formal mode on exit
13215         statements which do not respect SPARK restrictions
13216         (Analyze_Goto_Statement): issue error in formal mode on goto statement
13217         (Check_Unreachable_Code): always issue an error (not a warning) in
13218         formal mode on unreachable code (concerns both code after an infinite
13219         loop and after an unconditional jump, both not allowed in SPARK)
13220         * sem_ch6.adb (Analyze_Return_Statement): add call to
13221         Set_Return_Present for a procedure containing a return statement
13222         (already done for functions in Analyze_Function_Return)
13223         (Analyze_Function_Return): issue error in formal mode on extended
13224         return or if return is not last statement in function
13225         (Check_Missing_Return): issue error in formal mode if function does
13226         not end with return or if procedure contains a return
13227         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13228         function to detect if there is an inner scope of its parameter S which
13229         is a loop.
13230
13231 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13232
13233         * sem_ch6.ads: Minor reformatting.
13234
13235 2011-08-01  Javier Miranda  <miranda@adacore.com>
13236
13237         * sem_util.adb (Abstract_Interface_List): Complete condition when
13238         processing private type declarations to avoid reading unavailable
13239         attribute.
13240         (Is_Synchronized_Tagged_Type): Complete condition when processing
13241         private extension declaration nodes to avoid reading unavailable
13242         attribute.
13243
13244 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13245
13246         * sem_ch3.adb: Minor reformatting.
13247
13248 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13249
13250         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13251         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13252         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13253         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13254         for VMS, instead parametrize the common implementation with
13255         System.Parameters declarations.
13256
13257 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
13258
13259         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13260
13261 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13262
13263         * seh_init.c: Fix SEH handler installation on win64.
13264
13265 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13266
13267         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13268         double analysis of an anonymous access to subprogram, because it can
13269         lead to improper sharing of profiles and a back-end crash.
13270
13271 2011-08-01  Robert Dewar  <dewar@adacore.com>
13272
13273         * make.adb, sem_ch4.adb: Minor reformatting.
13274         * gcc-interface/Make-lang.in: Update dependencies.
13275         * sem_util.adb, exp_ch5.adb: Minor reformatting.
13276
13277 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13278
13279         * gnat_rm.texi: Fix definition of Long_Integer.
13280
13281 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13282
13283         * exp_aggr.adb: check limit size of static aggregate unconditionally,
13284         to prevent storage exhaustion.
13285         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13286         finalized is a function body, insert the cleanup code before the final
13287         return statement, to prevent spurious warnings.
13288         * s-pooglo.ads: add overriding indicator.
13289
13290 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13291
13292         * sem_ch4.adb (Operator_Check): improve error message when both a
13293         with_clause and a use_clause are needed to make operator usage legal.
13294         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13295         determine whether a compilation unit is visible within an other,
13296         either through a with_clause in the current unit, or a with_clause in
13297         its library unit or one one of its parents.
13298
13299 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13300
13301         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13302         over an arbitrary expression of an array or container type.
13303         * lib-xref.adb: clarify comment.
13304
13305 2011-08-01  Bob Duff  <duff@adacore.com>
13306
13307         * einfo.ads: Minor reformatting.
13308         * debug.adb: Minor comment improvement.
13309
13310 2011-08-01  Javier Miranda  <miranda@adacore.com>
13311
13312         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13313         consider hidden subprograms as valid candidates.
13314
13315 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13316
13317         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13318
13319 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
13320
13321         * gnat_ugn.texi: Fix typo.
13322
13323 2011-08-01  Robert Dewar  <dewar@adacore.com>
13324
13325         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13326         lib-xref.adb: Minor reformatting
13327
13328 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
13329
13330         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13331         when to generate a call to Move_Final_List.
13332         (Has_Controlled_Parts): Remove this function.
13333
13334 2011-08-01  Geert Bosch  <bosch@adacore.com>
13335
13336         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13337         "," in choice list.
13338
13339 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13340
13341         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13342         explicit raise of a predefined exception as Comes_From_Source if the
13343         original N_Raise_Statement comes from source.
13344
13345 2011-08-01  Robert Dewar  <dewar@adacore.com>
13346
13347         * sinfo.ads: Add comment.
13348         * sem_ch6.adb: Minor reformatting.
13349
13350 2011-08-01  Robert Dewar  <dewar@adacore.com>
13351
13352         * freeze.adb (Freeze_Entity): Refine check for bad component size
13353         clause to avoid rejecting confirming clause when atomic/aliased present.
13354
13355 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13356
13357         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13358         better determine whether an entity reference is a write.
13359         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13360         subcomponent.
13361         * lib-xref.adb (Output_References): Do no suppress a read reference at
13362         the same location as an immediately preceeding modify-reference, to
13363         handle properly in-out actuals.
13364
13365 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13366
13367         * env.c (__gnat_setenv) [VMS]: Refine previous change.
13368
13369 2011-08-01  Quentin Ochem  <ochem@adacore.com>
13370
13371         * i-cstrin.adb (New_String): Changed implementation, now uses only the
13372         heap to compute the result.
13373
13374 2011-08-01  Robert Dewar  <dewar@adacore.com>
13375
13376         * atree.ads: Minor reformatting.
13377
13378 2011-08-01  Emmanuel Briot  <briot@adacore.com>
13379
13380         * g-expect.adb (Get_Command_Output): Fix memory leak.
13381
13382 2011-08-01  Geert Bosch  <bosch@adacore.com>
13383
13384         * cstand.adb (P_Float_Type): New procedure to print the definition of
13385         predefined fpt types.
13386         (P_Mixed_Name): New procedure to print a name using mixed case
13387         (Print_Standard): Use P_Float_Type for printing floating point types
13388         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13389         precision IEEE float.
13390
13391 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13392
13393         * sem_ch3.adb: Minor reformatting.
13394
13395 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13396
13397         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13398         the completion of a generic function, insert the new body rather than
13399         rewriting the original.
13400
13401 2011-08-01  Yannick Moy  <moy@adacore.com>
13402
13403         * sinfo.ads, errout.ads: Typos in comments.
13404
13405 2011-08-01  Robert Dewar  <dewar@adacore.com>
13406
13407         * par-endh.adb: Minor reformatting.
13408
13409 2011-08-01  Robert Dewar  <dewar@adacore.com>
13410
13411         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13412         (Pre_Post_Aspects): New subtype.
13413         * par-ch12.adb (P_Generic): New syntax for aspects in packages
13414         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13415         * par-ch7.adb (P_Package): Remove Decl parameter
13416         (P_Package): Handle new syntax for aspects (before IS)
13417         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13418         new aspect syntax
13419         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13420         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13421         (P_Package): Remove Decl parameter
13422         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13423         aspects
13424         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13425         specs
13426         * sem_util.ads, sem_util.adb (Static_Boolean): New function
13427         * sinfo.ads: Document new syntax for aspects in packages etc.
13428         * sprint.adb: Handle new syntax of aspects before IS in package
13429
13430 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13431
13432         * atree.ads: Minor reformatting.
13433         * sem_prag.adb: Minor reformatting.
13434
13435 2011-08-01  Robert Dewar  <dewar@adacore.com>
13436
13437         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13438         case expr alternative.
13439
13440 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13441
13442         * sem_ch12.adb: Fix typo.
13443
13444 2011-08-01  Geert Bosch  <bosch@adacore.com>
13445
13446         * sem_prag.adb (Check_No_Link_Name): New procedure.
13447         (Process_Import_Or_Interface): Use Check_No_Link_Name.
13448         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13449         instead of Standard_Long_Long_Float_Size global. Preparation for
13450         eventual removal of per type constants.
13451         * exp_util.ads (Get_Stream_Size): New function returning the stream
13452         size value of subtype E.
13453         * exp_util.adb (Get_Stream_Size): Implement new function.
13454         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13455         function.
13456         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13457         * einfo.adb:
13458         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13459
13460 2011-08-01  Geert Bosch  <bosch@adacore.com>
13461
13462         * cstand.adb: Fix comments.
13463         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13464         count of arguments.
13465
13466 2011-08-01  Robert Dewar  <dewar@adacore.com>
13467
13468         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13469
13470 2011-08-01  Geert Bosch  <bosch@adacore.com>
13471
13472         * atree.ads: Fix comment.
13473
13474 2011-08-01  Robert Dewar  <dewar@adacore.com>
13475
13476         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13477         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13478         * par.adb: Add with for Namet.Sp.
13479         * par-tchk.adb: Minor reformatting.
13480
13481 2011-08-01  Vincent Celier  <celier@adacore.com>
13482
13483         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13484         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13485         of the init procedure of a SAL.
13486         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13487         New procedure.
13488
13489 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13490
13491         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13492         reformatting.
13493
13494 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13495
13496         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13497
13498 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13499
13500         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13501         conformant with its spec (return True only for types that have
13502         an overriding Initialize primitive operation that prevents them from
13503         having preelaborable initialization).
13504         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13505         initialization for controlled types in Ada 2005 or later mode.
13506
13507 2011-08-01  Robert Dewar  <dewar@adacore.com>
13508
13509         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13510         Postcondition.
13511         (Same_Aspect): New function.
13512         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13513         Type_Invariant, Precondition, Postcondition.
13514         * snames.ads-tmpl: Add Name_Type_Invariant.
13515
13516 2011-08-01  Robert Dewar  <dewar@adacore.com>
13517
13518         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13519         here.
13520         (Freeze_All_Ent): Fix error in handling inherited aspects.
13521         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13522         already analyzed, but don't skip entire processing of a declaration,
13523         that's wrong in some cases of declarations being rewritten.
13524         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13525         Don't delay for integer, string literals
13526         Treat predicates in usual manner for delay, remove special case code,
13527         not needed.
13528         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13529         (Build_Predicate_Function): Update saved expression in aspect
13530         (Build_Invariant_Procedure): Update saved expression in aspect
13531         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13532         of replacement of discriminant references if the reference is simple.
13533
13534 2011-08-01  Robert Dewar  <dewar@adacore.com>
13535
13536         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13537         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13538         Static_Predicate and Dynamic_Predicate.
13539         (Build_Predicate_Function): Add processing for Static_Predicate
13540         and Dynamic_Predicate.
13541         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13542         (From_Static_Predicate): New flag
13543         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13544
13545 2011-08-01  Robert Dewar  <dewar@adacore.com>
13546
13547         * usage.adb: Documentation cleanup for Ada version modes in usage.
13548         * expander.adb: Minor reformatting.
13549
13550 2011-08-01  Robert Dewar  <dewar@adacore.com>
13551
13552         * atree.ads: Minor comment fix.
13553         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13554         a-witeio.ads, sem_prag.adb: Minor reformatting.
13555
13556 2011-08-01  Doug Rupp  <rupp@adacore.com>
13557
13558         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13559         pointers. Use descrip.h header file for convenience. Add some
13560         comments.
13561
13562 2011-08-01  Robert Dewar  <dewar@adacore.com>
13563
13564         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13565         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13566         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13567         New procedure.
13568         (Check_Aspect_At_End_Of_Declarations): New procedure
13569         (Analye_Aspect_Specification): Minor changes for above procedures
13570         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13571         specification node as well.
13572
13573 2011-08-01  Pascal Obry  <obry@adacore.com>
13574
13575         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13576         Windows files. Use GetFilesAttributes() in this case to check for file
13577         existence instead of returning with an error code.
13578
13579 2011-08-01  Vincent Celier  <celier@adacore.com>
13580
13581         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13582         High is above Source length.
13583
13584 2011-08-01  Robert Dewar  <dewar@adacore.com>
13585
13586         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13587
13588 2011-08-01  Robert Dewar  <dewar@adacore.com>
13589
13590         * aspects.ads (Boolean_Aspects): New subtype.
13591         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13592         for derived types in cases where the parent type and derived type have
13593         aspects.
13594         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13595         with aspects when parent type also has aspects.
13596         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13597         boolean expression at this point).
13598         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13599         accordance with final decision on the Ada 2012 feature.
13600         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13601
13602 2011-08-01  Matthew Heaney  <heaney@adacore.com>
13603
13604         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13605
13606 2011-08-01  Pascal Obry  <obry@adacore.com>
13607
13608         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13609         Fix Replace_Slice when High is above current string size.
13610         (Replace_Slice): Fix DL computation when High is above current
13611         string length.
13612
13613 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
13614
13615         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13616
13617 2011-08-01  Matthew Heaney  <heaney@adacore.com>
13618
13619         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13620         of node.
13621
13622 2011-08-01  Pascal Obry  <obry@adacore.com>
13623
13624         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13625         reformatting.
13626
13627 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13628
13629         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13630         access to protected subprograms in generic bodies.
13631         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13632         protected type, indicate that the convention of the subprogram is
13633         Convention_Protected, because it may be used in subsequent declarations
13634         within the protected declaration.
13635
13636 2011-08-01  Vincent Celier  <celier@adacore.com>
13637
13638         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13639         and "final" procedures when the name of the library is "ada", to avoid
13640         duplicate symbols "adainit" and "adafinal" in executables.
13641
13642 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13643
13644         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13645         quantified expression that appears within a postcondition and uses the
13646         Ada2012 'Result attribute.
13647
13648 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13649
13650         * init.c (__gnat_error_handler): Cast reason to int.
13651         (__gnat_install_handler): Explain sa_sigaction use.
13652
13653 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
13654
13655         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13656         subprogram has copy-in copy-out parameters, try to promote the mode of
13657         the return type if it is passed in registers.
13658
13659 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
13660
13661         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13662         left operand as addressable.
13663
13664 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
13665
13666         * gcc-interface/gigi.h (build_function_stub): Remove.
13667         (build_return_expr): Likewise.
13668         (convert_vms_descriptor): Declare.
13669         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13670         (build_function_stub): Move to...
13671         * gcc-interface/utils2.c (build_return_expr): Move to...
13672         * gcc-interface/trans.c (build_function_stub): ...here.
13673         (build_return_expr): ...here.
13674         (Subprogram_Body_to_gnu): Add local variable for language_function.
13675         Disconnect the parameter attributes cache, if any, once done with it.
13676         Call end_subprog_body only after setting the end_locus.
13677         Build the stub associated with the function, if any, at the very end.
13678         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13679         variables and streamline control flow.
13680
13681 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
13682
13683         PR ada/49819
13684         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13685         g-trasym-dwarf.adb.
13686
13687 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13688
13689         PR bootstrap/49794
13690         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13691         Assign to act.sa_sigaction.
13692         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13693         current->return_address to char * before arithmetic.
13694
13695 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13696
13697         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13698         Correct argument types.
13699         Extract code from reason.
13700         (__gnat_install_handler): Assign to act.sa_sigaction.
13701
13702 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
13703
13704         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13705         (GNAT1_OBJS): ...here.
13706
13707 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
13708
13709         PR ada/48711
13710         * g-socthi-mingw.adb (Fill): Fix formatting.
13711
13712         * gcc-interface/gigi.h: Move around comment.
13713
13714 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
13715
13716         PR ada/46350
13717         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13718
13719 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
13720
13721         PR ada/48711
13722         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13723
13724 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
13725
13726         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13727         range comparison if Pmode is SImode.
13728
13729 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
13730             Eric Botcazou  <ebotcazou@adacore.com>
13731
13732         * adadecode.c: Wrap up in extern "C" block.
13733         * adadecode.h: Likewise.
13734         * adaint.c: Likewise.  Remove 'const' keyword.
13735         * adaint.h: Likewise.
13736         * argv.c: Likewise.
13737         * atree.h: Likewise.
13738         * cio.c: Likewise.
13739         * cstreams.c: Likewise.
13740         * env.c: Likewise.
13741         * exit.c: Likewise.
13742         * fe.h: Likewise.
13743         * final.c: Likewise.
13744         * init.c: Likewise.
13745         * initialize.c: Likewise.
13746         * link.c: Likewise.
13747         * namet.h: Likewise.
13748         * nlists.h: Likewise.
13749         * raise.c: Likewise.
13750         * raise.h: Likewise.
13751         * repinfo.h: Likewise.
13752         * seh_init.c: Likewise.
13753         * targext.c: Likewise.
13754         * tracebak.c: Likewise.
13755         * uintp.h: Likewise.
13756         * urealp.h: Likewise.
13757         * xeinfo.adb: Wrap up generated C code in extern "C" block.
13758         * xsinfo.adb: Likewise.
13759         * xsnamest.adb: Likewise.
13760         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13761         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13762         * gcc-interface/misc.c: Likewise.
13763         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13764         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
13765         ada/targext.o here...
13766         (GNAT_ADA_OBJS): ...and not here.
13767         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13768         (GNATBIND_OBJS): Reorder.
13769
13770 2011-07-07  Richard Henderson  <rth@redhat.com>
13771
13772         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13773         dwarf2out_frame_init.
13774
13775 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
13776
13777         * gcc-interface/misc.c (gnat_init): Tweak previous change.
13778
13779 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13780
13781         PR target/39150
13782         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13783
13784 2011-07-06  Richard Guenther  <rguenther@suse.de>
13785
13786         * gcc-interface/misc.c (gnat_init): Merge calls to
13787         build_common_tree_nodes and build_common_tree_nodes_2.
13788         Re-initialize boolean_false_node.
13789
13790 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
13791             Olivier Hainque  <hainque@adacore.com>
13792             Nicolas Setton  <setton@adacore.com>
13793
13794         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13795         the type according to the ARTIFICIAL_P parameter.
13796         (create_type_decl): Likewise.
13797         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13798
13799 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
13800
13801         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13802         (gnatbind): Likewise.
13803
13804 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13805
13806         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13807
13808 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
13809
13810         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13811         local variable throughout.  Remove useless call to Base_Type.
13812         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13813         Take it also into account for the volatileness of the field.  Set the
13814         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
13815
13816 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
13817
13818         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13819         on a dereference built for a by-ref object if it has an address clause.
13820
13821 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
13822
13823         * einfo.ads (Address_Taken): Document use for the second argument of
13824         Asm_Input and Asm_Output attributes.
13825         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13826         argument is an entity name, then set Address_Taken on it.
13827         <Attribute_Asm_Output>: Likewise.
13828         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13829         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13830         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13831         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13832
13833 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
13834
13835         PR middle-end/46500
13836         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13837
13838 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
13839
13840         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13841         (ada/utils.o): Update dependencies.
13842         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13843         ../../../libcpp/libcpp.a.
13844         * gcc-interface/utils.c: Include common/common-target.h.
13845         (process_attributes): Use targetm_common.have_named_sections.
13846
13847 2011-06-07  Richard Guenther  <rguenther@suse.de>
13848
13849         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13850         set_sizetype.
13851
13852 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13853
13854         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13855         TREE_THIS_NOTRAP flag.
13856
13857 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13858
13859         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13860         Fix thinko.
13861
13862 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13863
13864         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13865         constants whose full view has discriminants specially.
13866
13867 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13868
13869         * gcc-interface/utils.c: Include diagnostic.h.
13870         (gnat_write_global_declarations): Output debug information for all
13871         global type declarations before finalizing the compilation unit.
13872         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13873
13874 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
13875
13876         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13877
13878 2011-05-25  Kai Tietz  <ktietz@redhat.com>
13879
13880         * adaint.c (__gnat_to_canonical_file_list_next): Use array
13881         initialization instead of const/none-const pointer assignment.
13882
13883 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
13884
13885         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13886         $(EXTRA_GNAT1_OBJS).
13887         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13888         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13889         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13890         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13891         libcommon-target.a instead of prefix.o.
13892
13893 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
13894
13895         PR ada/49097
13896         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13897
13898 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
13899
13900         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13901         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13902         instead of version.o.
13903
13904 2011-05-18  Kai Tietz  <ktietz@redhat.com>
13905
13906         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13907         boolean_false_node instead of integer_zero_node.
13908         (convert_with_check): Likewise.
13909         * gcc-interface/decl.c (choices_to_gnu): Likewise.
13910
13911 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
13912
13913         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13914         type of the parameter is an unconstrained array, convert the actual to
13915         the type of the formal in the In Out and Out cases as well.
13916
13917 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
13918
13919         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13920         call build_function_type_array or build_varargs_function_type_array
13921         instead.
13922         (create_subprog_type): Don't call build_function_type; call
13923         build_function_type_vec instead.
13924
13925 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
13926
13927         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13928         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13929         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13930
13931 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
13932
13933         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13934
13935         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13936         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13937
13938 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
13939
13940         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13941
13942 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
13943
13944         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13945         instead of accessing TYPE_ARG_TYPES directly.
13946         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13947
13948 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13949
13950         PR ada/48844
13951         * gcc-interface/gigi.h (get_variant_part): Declare.
13952         * gcc-interface/decl.c (get_variant_part): Make global.
13953         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13954         types have the same constant size, are record types and T1 has a
13955         variant part while T2 doesn't.
13956
13957 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13958
13959         * gcc-interface/utils.c (begin_subprog_body): Do not call
13960         get_pending_sizes.
13961         (end_subprog_body): Likewise.
13962
13963 2011-05-04  Richard Guenther  <rguenther@suse.de>
13964
13965         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13966         int_const_binop.
13967         (pos_to_constructor): Likewise.
13968
13969 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
13970             Eric Botcazou  <ebotcazou@adacore.com>
13971
13972         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13973         of build_function_type.  Adjust calls to...
13974         (build_raise_check): ...this.  Do not take a void_tree parameter.
13975         Call build_function_type_list instead of build_function_type.
13976         Fix head comment and swap couple of conditional blocks.
13977
13978 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
13979
13980         * gnatvsn.ads (Library_Version): Bump to 4.7.
13981         (Current_Year): Bump to 2011.
13982
13983 2011-04-29  Michael Matz  <matz@suse.de>
13984
13985         * gcc-interface/misc.c (gnat_handle_option): Set
13986         warn_maybe_uninitialized.
13987
13988 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
13989
13990         * gnat_ugn.texi (Complexity Metrics Control): Update link to
13991         the Watson/McCabe paper.
13992
13993 2011-04-23  Jim Meyering  <meyering@redhat.com>
13994
13995         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13996
13997 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
13998
13999         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14000         onto the new type.
14001
14002 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
14003
14004         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14005         parameter.
14006         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
14007         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14008         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14009         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14010         <all>: Do not set flags on the reused DECL node coming from an alias.
14011         Set DECL_IGNORED_P on the DECL node built for subprograms if they
14012         don't need debug info here...
14013         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14014         (gigi): Adjust calls to create_subprog_decl.
14015         (build_raise_check): Likewise.
14016         (establish_gnat_vms_condition_handler): Likewise.
14017         (Compilation_Unit_to_gnu): Likewise.
14018         (gnat_to_gnu): Likewise.
14019
14020 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
14021
14022         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14023         (NO_REORDER_ADAFLAGS): New variable.
14024         (EXTRA_GNATTOOLS): Always define.
14025         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14026         Clean up and adjust list of files compiled with special options.
14027         * gcc-interface/Make-lang.in: Likewise.
14028         (ada/decl.o): Cosmetical change.
14029         (ada/misc.o): Remove dependency on $(PLUGIN_H).
14030
14031 2011-04-20  Jim Meyering  <meyering@redhat.com>
14032
14033         * initialize.c (__gnat_initialize): Remove useless if-before-free.
14034
14035 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
14036
14037         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14038         $(CFLAGS) on the link line.
14039
14040 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
14041
14042         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14043         padded type built for the return type if it is unconstrained.
14044
14045 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
14046
14047         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14048
14049 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
14050
14051         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14052         before calling TREE_CHAIN.
14053         * gcc-interface/misc.c (gnat_init_ts): New function.
14054         (LANG_HOOKS_INIT_TS): Define.
14055
14056 2011-04-12  Martin Jambor  <mjambor@suse.cz>
14057
14058         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14059         instead of cgraph_node.
14060
14061 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
14062
14063         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14064         alignment on fields of the RETURN type built for the Copy-In Copy-Out
14065         mechanism.
14066
14067 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
14068
14069         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14070         of aggregate types that contain a placeholder.
14071
14072 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
14073
14074         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14075         TYPE_ARG_TYPES.
14076         (handle_type_generic_attribute): Likewise.
14077
14078 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
14079
14080         PR ada/47163
14081         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14082
14083 2011-04-04  Kai Tietz  <ktietz@redhat.com>
14084
14085         PR ada/47163
14086         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14087         to flag value.
14088
14089 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14090
14091         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14092         type case, do not strip a padding type around the array type.
14093
14094 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14095
14096         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14097         types.
14098
14099 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14100
14101         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14102         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14103         code for -feliminate-unused-debug-types.
14104         (gnat_post_options): Likewise.
14105
14106 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14107
14108         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14109         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14110         distinct copy.
14111
14112 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14113
14114         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14115         DECL_ARTIFICIAL flag on enumeration types.
14116
14117 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14118
14119         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14120         fat pointer types artificial unconditionally.
14121         <E_Array_Subtype>: Attach the base array type as a parallel type if it
14122         isn't artificial.
14123
14124 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14125
14126         * gcc-interface/gigi.h (get_dummy_type): Declare.
14127         (build_dummy_unc_pointer_types): Likewise.
14128         (finish_fat_pointer_type): Likewise.
14129         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14130         fat pointer type has been built, complete it in place.
14131         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14132         and thin pointers.  Remove useless variable.
14133         (finish_fat_pointer_type): Make global and move to...
14134         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14135         (get_dummy_type): New function.
14136         (build_dummy_unc_pointer_types): Likewise.
14137         (gnat_pushdecl): Propage the name to the anonymous variants only.
14138         (update_pointer_to): Only adjust the pointer types in the unconstrained
14139         array case.
14140
14141 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14142
14143         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14144         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14145         if this is a Taft amendment type and the full declaration is available.
14146         * gcc-interface/trans.c (process_type): Likewise.
14147         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14148         (process_freeze_entity): Likewise.
14149         * gcc-interface/utils.c (dummy_global): New static variable.
14150         (gnat_write_global_declarations): If there are types declared as used
14151         at the global level, insert them in the global hash table.
14152
14153 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14154
14155         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14156         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14157         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14158         copy.
14159         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
14160         flag of the type accordingly.
14161         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14162
14163 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14164
14165         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14166         finalizing types when updating the pointers to the designated type.
14167         <all>: Finalize the deferred types even if we didn't defer processing
14168         of incomplete types in this invocation.
14169
14170 2011-04-01  Olivier Hainque  <hainque@adacore.com>
14171             Nicolas Setton  <setton@adacore.com>
14172             Eric Botcazou  <ebotcazou@adacore.com>
14173
14174         * gcc-interface/misc.c (gnat_descriptive_type): New function.
14175         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14176
14177 2011-03-28  Kai Tietz  <ktietz@redhat.com>
14178
14179         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14180         Windows targets.
14181         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14182         * system-mingw.ads (System): Change ZCX_By_Default default to True.
14183
14184         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14185
14186 2011-03-28  Tristan Gingold  <gingold@adacore.com>
14187
14188         PR ada/44431
14189         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14190         Use ada output of gnatbind.
14191         (ada/b_gnatb.adb): Ditto.
14192         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14193         (ada.mostlyclean, ada.stage1)
14194         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14195         (ada.stagefeedback): Adjust.
14196         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14197         Use ada output of gnatbind.
14198         (b_gnatm.adb): Ditto.
14199         (b_gnatl.o, b_gnatm.o): New rules.
14200
14201 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14202
14203         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14204         for the padded type built to support a specified size or alignment.
14205
14206 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14207
14208         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14209         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14210         unconditionally to the end of the unit when the designated type is
14211         limited_with'ed.
14212         <all>: Rename local variable.  Attempt to un-defer types only and do it
14213         for limited_with'ed types as well.
14214         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
14215         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14216         consistently and remove redundant call to finalize_from_with_types.
14217
14218 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14219
14220         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14221         subprograms without a previous spec declared in the same unit.
14222         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14223         subprograms at the end of the unit instead of at the beginning.
14224         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14225         isn't public for the special handling of non-inline functions nested
14226         inside inline external functions.
14227
14228 2011-03-25  Jeff Law  <law@redhat.com>
14229
14230         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14231
14232 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
14233
14234         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14235         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14236         to compute Set_Size_Depends_On_Discriminant.
14237         (Layout_Type): Call it on array types in back-end layout mode.
14238         * sem_util.adb (Requires_Transient_Scope): Return true for array
14239         types only if the size depends on the value of discriminants.
14240         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14241         type if the RHS is a call to a function that returns an unconstrained
14242         type with default discriminant.
14243
14244 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
14245
14246         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14247         non-conversion to the nominal result type at the end.
14248
14249 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14250
14251         * gcc-interface/trans.c (create_temporary): New function taken from...
14252         (create_init_temporary): ...here.  Call it.
14253         (call_to_gnu): Create the temporary for the return value early, if any.
14254         Create it for a function with copy-in/copy-out parameters if there is
14255         no target; in other cases of copy-in/copy-out, use another temporary.
14256         Push the new binding level lazily.  Add and rename local variables.
14257
14258 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14259
14260         * gcc-interface/decl.c (validate_size): Improve comments and tweak
14261         error message.
14262         (set_rm_size): Likewise.
14263
14264 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14265
14266         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14267         for the padded type built in order to support a specified alignment.
14268         Fix incorrect formatting.
14269
14270 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14271
14272         PR bootstrap/48216
14273         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14274
14275 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14276
14277         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14278         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14279         to the end of the list.  Adjust recursive call.  Rename local variable.
14280         If REORDER is true, reorder components of the record type.
14281         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14282         components_to_record and adjust the parameter list.
14283
14284 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14285
14286         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14287         disabled, use the variable for bounds of loop iteration scheme.
14288
14289 2011-03-21  Kai Tietz  <ktietz@redhat.com>
14290
14291         PR target/12171
14292         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14293
14294 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
14295
14296         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14297         out whether the expression is read-only.  Short-circuit placeholder
14298         case and rename a couple of local variables.
14299
14300 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
14301
14302         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14303         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14304         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14305         (convert): Deal with conversions from a smaller form type specially.
14306
14307 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
14308
14309         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14310         its argument, except for the special -I- switch.
14311
14312 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
14313
14314         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14315         "Ada Issues".
14316
14317 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
14318
14319         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14320
14321 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
14322
14323         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14324         GNAT_FORMAL.
14325         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14326         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
14327         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
14328         Do not generate the check directly, instead instantiate the template
14329         check present in the descriptor.
14330         (make_descriptor_field): Move around.
14331         (build_vms_descriptor32): Build a template check in the POINTER field.
14332         (build_vms_descriptor): Remove useless suffixes.
14333         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14334
14335 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
14336
14337         PR bootstrap/47467
14338         * targext.c: Include target files if IN_RTS is defined.
14339
14340 2011-01-26  Richard Guenther  <rguenther@suse.de>
14341
14342         PR bootstrap/47467
14343         * targext.c: Include config.h.
14344         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14345         dependency.
14346
14347 2011-01-04  Pascal Obry  <obry@adacore.com>
14348             Eric Botcazou  <ebotcazou@adacore.com>
14349
14350         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14351
14352 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14353
14354         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14355         end-of-case on the end label and its associated gotos, if any.
14356
14357 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14358
14359         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14360         expressions of the parameter cache within the statement group of
14361         the CICO mechanism.
14362
14363 2011-01-04  Olivier Hainque  <hainque@adacore.com>
14364             Eric Botcazou  <ebotcazou@adacore.com>
14365
14366         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14367         (set_end_locus_from_node): New function.
14368         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14369         make and the function end_locus.
14370         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14371         for the elaboration subprogram.
14372         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14373         set the end_locus of the expression as well.
14374
14375 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14376
14377         PR ada/47131
14378         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14379         variables that are referenced in exception handlers volatile.
14380
14381
14382 \f
14383 Copyright (C) 2011 Free Software Foundation, Inc.
14384
14385 Copying and distribution of this file, with or without modification,
14386 are permitted in any medium without royalty provided the copyright
14387 notice and this notice are preserved.
14388
14389         * gnat_rm.texi: Ramification of pragma Eliminate documentation
14390          - fix bugs in the description of Source_Trace;
14391          - get rid of UNIT_NAME;
14392
14393 2011-08-02  Javier Miranda  <miranda@adacore.com>
14394
14395         * exp_ch9.adb
14396         (Build_Dispatching_Requeue): Adding support for VM targets
14397         since we cannot directly reference the Tag entity.
14398         * exp_sel.adb (Build_K): Adding support for VM targets.
14399         (Build_S_Assignment): Adding support for VM targets.
14400         * exp_disp.adb
14401         (Default_Prim_Op_Position): In VM targets do not restrict availability
14402         of predefined interface primitives to compiling in Ada 2005 mode.
14403         (Is_Predefined_Interface_Primitive): In VM targets this service is not
14404         restricted to compiling in Ada 2005 mode.
14405         (Make_VM_TSD): Generate code that declares and initializes the OSD
14406         record. Needed to support dispatching calls through synchronized
14407         interfaces.
14408         * exp_ch3.adb
14409         (Make_Predefined_Primitive_Specs): Enable generation of predefined
14410         primitives associated with synchronized interfaces.
14411         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14412         primitives associated with synchronized interfaces.
14413
14414 2011-08-02  Yannick Moy  <moy@adacore.com>
14415
14416         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14417         statements hidden in SPARK if preceded by the HIDE directive
14418         (Parse_Exception_Handlers): mark each exception handler in a sequence of
14419         exception handlers as hidden in SPARK if preceded by the HIDE directive
14420         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14421         if starting with the HIDE directive
14422         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14423         starting with the HIDE directive; mark the declarations in a private
14424         part as hidden in SPARK if the private part starts with the HIDE
14425         directive
14426         * restrict.adb, restrict.ads
14427         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14428         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14429         argument node belongs to a part which is hidden in SPARK
14430         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14431         parts in SPARK; protect the possibly costly call to
14432         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14433         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14434         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14435         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14436         Tok_SPARK_Hide.
14437         (Scan): recognize special comment starting with '#' and followed by
14438         SPARK keyword "hide" as a HIDE directive.
14439
14440 2011-08-02  Yannick Moy  <moy@adacore.com>
14441
14442         * types.ads, erroutc.ads: Minor reformatting.
14443
14444 2011-08-02  Vincent Celier  <celier@adacore.com>
14445
14446         * link.c: Add response file support for cross platforms.
14447
14448 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14449
14450         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
14451         in an association, set parent field of copy before partial analysis.
14452         * sem_res.adb (Resolve_Slice): create reference to itype only when
14453         expansion is enabled.
14454
14455 2011-08-02  Yannick Moy  <moy@adacore.com>
14456
14457         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
14458         for new flag denoting which subprogram bodies are in ALFA
14459         * restrict.adb, sem_ch7.adb: Update comment
14460         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
14461         sem_ch9.adb, sem_res.adb: Add calls to
14462         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
14463         * sem_ch6.adb (Analyze_Function_Return): add calls to
14464         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
14465         middle of the body, and extended return.
14466         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
14467         False when missing return.
14468         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
14469         to True for subprograms whose spec is in ALFA. Remove later on the flag
14470         on the entity used for a subprogram body when there exists a separate
14471         declaration.
14472         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
14473         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
14474         False, otherwise do nothing.
14475
14476 2011-08-02  Robert Dewar  <dewar@adacore.com>
14477
14478         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14479
14480 2011-08-02  Yannick Moy  <moy@adacore.com>
14481
14482         * sem_ch4.ads: minor formatting.
14483
14484 2011-08-02  Yannick Moy  <moy@adacore.com>
14485
14486         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
14487         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
14488         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
14489         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
14490         opt.ads: cleanup of SPARK mode
14491
14492 2011-08-02  Yannick Moy  <moy@adacore.com>
14493
14494         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
14495         types.
14496         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
14497         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
14498         * sem_ch3.adb
14499         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
14500         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
14501         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
14502         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
14503         types.
14504         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
14505         non-static range.
14506         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
14507         functions whose return type is not in ALFA.
14508         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
14509         specifications.
14510         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
14511         parameter's type is not in ALFA.
14512         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
14513         types are in ALFA.
14514
14515 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14516
14517         * sem_ch6 (Analyze_Expression_Function): treat the function as
14518         Inline_Always, and introduce a subprogram declaration for it when it is
14519         not a completion.
14520         * inline.adb (Add_Inlined_Body): recognize bodies that come from
14521         expression functions, so that the back-end can determine whether they
14522         can in fact be inlined.
14523         * sem_util.adb (Is_Expression_Function): predicate to determine whether
14524         a function body comes from an expression function.
14525
14526 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
14527
14528         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
14529         null exclusions to test Can_Never_Be_Null on the anonymous access types
14530         of the formals rather than testing the formals themselves. Exclude this
14531         check in cases where the Old_Formal is marked as a controlling formal,
14532         to avoid issuing spurious errors for bodies completing dispatching
14533         operations (due to the flag not getting set on controlling access
14534         formals in body specs).
14535         (Find_Corresponding_Spec): When checking full and subtype conformance of
14536         subprogram bodies in instances, pass Designated and E in that order, for
14537         consistency with the expected order of the formals (New_Id followed by
14538         Old_Id).
14539
14540 2011-08-02  Robert Dewar  <dewar@adacore.com>
14541
14542         * sem_ch8.adb: Minor reformatting.
14543
14544 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14545
14546         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
14547         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
14548         primitive operations of class-wide actuals.
14549
14550 2011-08-02  Javier Miranda  <miranda@adacore.com>
14551
14552         * exp_atag.ads, exp_atag.adb
14553         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
14554         since its value is implicitly passed in argument Typ.
14555         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
14556         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
14557         Build_Common_Dispatching_Select_Statements.
14558
14559 2011-08-02  Robert Dewar  <dewar@adacore.com>
14560
14561         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
14562         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
14563         Minor reformatting.
14564
14565 2011-08-02  Robert Dewar  <dewar@adacore.com>
14566
14567         * sem_res.adb: Minor reformatting.
14568         * sem_prag.adb: Minor reformatting.
14569
14570 2011-08-02  Javier Miranda  <miranda@adacore.com>
14571
14572         * exp_atag.adb, exp_atags.ads
14573         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
14574         by the tagged type Entity. Required to use this routine in the VM
14575         targets since we do not have available the Tag entity in the VM
14576         platforms.
14577         * exp_ch6.adb
14578         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
14579         Ada.Tags has not been previously loaded.
14580         * exp_ch7.adb
14581         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
14582         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
14583         * sem_aux.adb
14584         (Enclosing_Dynamic_Scope): Add missing support to handle the full
14585         view of enclosing scopes. Required to handle enclosing scopes that
14586         are synchronized types whose full view is a task type.
14587         * exp_disp.adb
14588         (Build_VM_TSDs): Minor code improvement to avoid generating and
14589         analyzing lists with empty nodes.
14590         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
14591         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
14592         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
14593         (Make_Disp_Timed_Select_Body): Add support for VM targets.
14594         (Make_Select_Specific_Data_Table): Add support for VM targets.
14595         (Make_VM_TSD): Generate code to initialize the SSD structure of
14596         the TSD.
14597
14598 2011-08-02  Yannick Moy  <moy@adacore.com>
14599
14600         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
14601         cross-references section in ALI.
14602         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
14603         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
14604         Sub).
14605         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
14606         subprogram or package entity of a node
14607         (Is_Local_Reference_Type): new function returns True for references
14608         selected in local cross-references.
14609         (Lt): function extracted from Lt in Output_References
14610         (Write_Entity_Name): function extracted from Output_References
14611         (Generate_Definition): generate reference with type 'D' for definition
14612         of objects (object declaration and parameter specification), with
14613         appropriate locations and units, for use in local cross-references.
14614         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
14615         references of type 'I' for initialization in object definition.
14616         (Output_References): move part of function Lt and procedure
14617         Write_Entity_Name outside of the body. Ignore references of types 'D'
14618         and 'I' introduced for local cross-references.
14619         (Output_Local_References): new procedure to output the local
14620         cross-references sections.
14621         (Lref_Entity_Status): new array defining whether an entity is a local
14622         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
14623         with 'I' type when initialization expression is present.
14624         * get_scos.adb, get_scos.ads: Correct comments and typos
14625
14626 2011-08-02  Javier Miranda  <miranda@adacore.com>
14627
14628         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
14629         the JVM target.
14630         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
14631         the JVM target.
14632         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
14633         TSD support.
14634
14635 2011-08-02  Vincent Celier  <celier@adacore.com>
14636
14637         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
14638         (No_Space_Img): New function
14639         (Find_Excluded_Sources): When reading from a file, record the file name
14640         and the line number for each excluded source.
14641         (Mark_Excluded_Sources): When reporting an error, if the excluded
14642         sources were read from a file, include file name and line number in
14643         the error message.
14644
14645 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14646
14647         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
14648
14649 2011-08-02  Robert Dewar  <dewar@adacore.com>
14650
14651         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
14652
14653 2011-08-02  Javier Miranda  <miranda@adacore.com>
14654
14655         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
14656         generation of TSDs to the DOTNET compiler.
14657         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
14658         generation of TSDs to the DOTNET compiler.
14659
14660 2011-08-02  Javier Miranda  <miranda@adacore.com>
14661
14662         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
14663         record of all the tagged types declared inside library level package
14664         declarations, library level package bodies or library level subprograms.
14665         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
14666         associated with a given tagged type.
14667         (Build_VM_TSDs): New subprogram.
14668         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
14669         compilation units that are subprograms.
14670         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
14671         compilation units that are package bodies.
14672         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
14673         units that are a package declaration or a package instantiation.
14674         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
14675         reorganization to improve the error generated by the frontend when the
14676         function Ada.Tags.Secondary_Tag is not available.
14677         * rtsfind.ads (RE_Register_TSD): New runtime entity.
14678         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
14679
14680 2011-08-02  Javier Miranda  <miranda@adacore.com>
14681
14682         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
14683
14684 2011-08-02  Robert Dewar  <dewar@adacore.com>
14685
14686         * s-imenne.ads: Minor reformatting.
14687
14688 2011-08-02  Robert Dewar  <dewar@adacore.com>
14689
14690         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
14691         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
14692         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
14693
14694 2011-08-02  Robert Dewar  <dewar@adacore.com>
14695
14696         * einfo.ads (Materialize_Entity): Document this is only for renamings
14697         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
14698         required debug information in the case where we transform the object
14699         declaration into a renaming declaration.
14700         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
14701         object
14702         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
14703         Materialize_Entity.
14704
14705 2011-08-02  Robert Dewar  <dewar@adacore.com>
14706
14707         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
14708         Suppress_Init_Procs.
14709         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
14710         Suppress_Initialization/Initialization_Suppressed.
14711         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
14712         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
14713         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
14714         * sem_prag.adb: New processing for pragma Suppress_Initialization.
14715
14716 2011-08-02  Robert Dewar  <dewar@adacore.com>
14717
14718         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
14719         Minor reformatting.
14720
14721 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14722
14723         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
14724         only have inheritable classwide pre/postconditions.
14725
14726 2011-08-02  Javier Miranda  <miranda@adacore.com>
14727
14728         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
14729         * rtsfind.ads (RE_Check_TSD): New runtime entity.
14730         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
14731         checks if the external tag of a type is the same as the external tag
14732         of some other declaration.
14733
14734 2011-08-02  Thomas Quinot  <quinot@adacore.com>
14735
14736         * s-taskin.ads: Minor reformatting.
14737
14738 2011-08-02  Emmanuel Briot  <briot@adacore.com>
14739
14740         * g-comlin.adb (Display_Help): swap the order in which it prints the
14741         short help and the general usage.
14742
14743 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14744
14745         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
14746         the aspect declarations and attach them to the generic copy for
14747         subsequent analysis.
14748         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
14749         declarations of the generic tree to the new subprogram declarations.
14750         * sem_attr.adb (Check_Precondition_Postcondition): recognize
14751         conditions that apply to a subprogram instance.
14752
14753 2011-08-02  Robert Dewar  <dewar@adacore.com>
14754
14755         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
14756
14757 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14758
14759         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
14760         private type with a tagged full view is not derived in the immediate
14761         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
14762
14763 2011-08-02  Robert Dewar  <dewar@adacore.com>
14764
14765         * exp_ch4.adb: Minor reformatting.
14766
14767 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14768
14769         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
14770         Ada2012 iterator, the loop will be rewritten during expansion into a
14771         while loop with a cursor and an element declaration. Do not analyze the
14772         body in this case, because if the container is for indefinite types the
14773         actual subtype of the elements will only be determined when the cursor
14774         declaration is analyzed.
14775
14776 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14777
14778         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
14779         size/alignment related attributes in CodePeer_Mode.
14780
14781 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
14782
14783         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
14784         Prepend_Element, since this can result in the operation getting the
14785         wrong slot in the full type's dispatch table if the full type has
14786         inherited operations. The incomplete type's operation will get added
14787         to the proper position in the full type's primitives
14788         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
14789         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
14790         dispatching operations, since there are cases where nonprimitive
14791         subprograms can get added to the list of incomplete dependents (such
14792         as subprograms in nested packages).
14793         * sem_ch6.adb (Process_Formals): First, remove test for being in a
14794         private part when determining whether to add a primitive with a
14795         parameter of a tagged incomplete type to the Private_Dependents list.
14796         Such primitives can also occur in the visible part, and should not have
14797         been excluded from being private dependents.
14798         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
14799         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
14800         list of a Taft-amendment incomplete type is a primitive before issuing
14801         an error that the full type must appear in the same unit. There are
14802         cases where nonprimitives can be in the list (such as subprograms in
14803         nested packages).
14804         * sem_disp.adb (Derives_From): Use correct condition for checking that
14805         a formal's type is derived from the type of the corresponding formal in
14806         the parent subprogram (the condition was completely wrong). Add
14807         checking that was missing for controlling result types being derived
14808         from the result type of the parent operation.
14809
14810 2011-08-02  Yannick Moy  <moy@adacore.com>
14811
14812         * errout.adb (First_Node): minor renaming
14813         * restrict.adb (Check_Formal_Restriction): put restriction warning on
14814         first node.
14815
14816 2011-08-02  Yannick Moy  <moy@adacore.com>
14817
14818         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
14819         before accessing operands.
14820         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
14821         decide whether an initialization expression respects SPARK rules, as
14822         the plain node is the expanded one. This allows for more valid warnings
14823         to be issued.
14824         * gnat_rm.texi: Minor update.
14825
14826 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14827
14828         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
14829         previous change.
14830
14831 2011-08-02  Robert Dewar  <dewar@adacore.com>
14832
14833         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
14834
14835 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14836
14837         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
14838         loop statements and the element renaming declaration with a block when
14839         the element type is controlled.
14840
14841 2011-08-02  Yannick Moy  <moy@adacore.com>
14842
14843         * sinfo.ads: Minor formatting.
14844
14845 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14846
14847         * sem_aggr.adb (Add_Association): if the association has a box and no
14848         expression, use the Sloc of the aggregate itself for the new
14849         association.
14850         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
14851         the Original_Node.
14852
14853 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14854
14855         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
14856         When a container is provided via a function call, generate a renaming
14857         of the function result. This avoids the creation of a transient scope
14858         and the premature finalization of the container.
14859         * exp_ch7.adb (Is_Container_Cursor): Removed.
14860         (Wrap_Transient_Declaration): Remove the supression of the finalization
14861         of the list controller when the declaration denotes a container cursor,
14862         it is not needed.
14863
14864 2011-08-02  Yannick Moy  <moy@adacore.com>
14865
14866         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
14867         node is from source, instead of the original node being from source.
14868         * sem_aggr.adb
14869         (Resolve_Array_Aggregate): refine the check for a static expression, to
14870         recognize also static ranges
14871         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
14872         Array_Type_Declaration): postpone the test for the type being a subtype
14873         mark after the type has been resolved, so that component-selection and
14874         expanded-name are discriminated.
14875         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
14876         to distinguish the case of an iteration scheme, so that an error is
14877         issed on a non-static range in SPARK except in an iteration scheme.
14878         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
14879         In_Iter_Schm = True.
14880         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
14881         user-defined operators so that they are allowed in renaming
14882         * sem_ch8.adb
14883         (Find_Selected_Component): refine the check for prefixing of operators
14884         so that they are allowed in renaming. Move the checks for restrictions
14885         on selector name after analysis discriminated between
14886         component-selection and expanded-name.
14887         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
14888         concatenation argument of string type if it is static.
14889         * sem_util.adb, sem_util.ads
14890         (Check_Later_Vs_Basic_Declarations): add a new function
14891         Is_Later_Declarative_Item to decice which declarations are allowed as
14892         later items, in the two different modes Ada 83 and SPARK. In the SPARK
14893         mode, add that renamings are considered as later items.
14894         (Enclosing_Package): new function to return the enclosing package
14895         (Enter_Name): correct the rule for homonyms in SPARK
14896         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
14897         from source (result of expansion) to avoid issuing wrong warnings.
14898
14899 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14900
14901         * errout.adb: On anything but an expression First_Node returns its
14902         argument.
14903
14904 2011-08-02  Pascal Obry  <obry@adacore.com>
14905
14906         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
14907
14908 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14909
14910         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
14911         Set the associated loop as the related expression of internally
14912         generated cursors.
14913         * exp_ch7.adb (Is_Container_Cursor): New routine.
14914         (Wrap_Transient_Declaration): Supress the finalization of the list
14915         controller when the declaration denotes a container cursor.
14916
14917 2011-08-02  Yannick Moy  <moy@adacore.com>
14918
14919         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
14920         command line now.
14921         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
14922         expression is a simple expression. This check cannot be performed in
14923         the semantics, so just drop it.
14924         (P_Index_Or_Discriminant_Constraint): move check that the index or
14925         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
14926         semantics. Other cases were previously checked in the semantics.
14927         * par-ch4.adb (P_Name): move checks that a selector name is not
14928         character literal or an operator symbol to Find_Selected_Component in
14929         the semantics
14930         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
14931         declarations are not placed after later declarations in a separate
14932         procedure in Sem_Util (possibly not the best choice?), to be used both
14933         during parsing, for Ada 83 mode, and during semantic analysis, for
14934         SPARK mode.
14935         * par-endh.adb (Check_End): move check that end label is not missing
14936         to Process_End_Label in the semantics
14937         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
14938         the special case for SPARK restriction
14939         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
14940         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
14941         parameter Force to issue the error message even on internal node (used
14942         for generated end label). Call Check_Restriction to check when an error
14943         must be issued. In SPARK mode, issue an error message even if the
14944         restriction is not set.
14945         (Check_Restriction): new procedure with an additional out parameter to
14946         inform the caller that a message has been issued
14947         * sem_aggr.adb: Minor modification of message
14948         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
14949         instead of issuing an error message directly
14950         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
14951         declarations are not placed after later declarations, by calling
14952         Check_Later_Vs_Basic_Declarations
14953         (Analyze_Subtype_Declaration): move here the check that an index or
14954         discriminant constraint must be a subtype mark. Change the check that
14955         a subtype of String must start at one so that it works on subtype marks.
14956         * sem_ch4.adb (Analyze_Call): move here the check that a named
14957         association cannot follow a positional one in a call
14958         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
14959         instead of issuing an error message directly
14960         * sem_ch8.adb (Find_Selected_Component): move here the check that a
14961         selector name is not a character literal or an operator symbol. Move
14962         here the check that the prefix of an expanded name cannot be a
14963         subprogram or a loop statement.
14964         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
14965         procedure called from parsing and semantics to check that basic
14966         declarations are not placed after later declarations
14967         (Process_End_Label): move here the check that end label is not missing
14968
14969 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14970
14971         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
14972         representation clause in codepeer mode, since it confuses CodePeer and
14973         does not bring useful info.
14974
14975 2011-08-02  Ed Falis  <falis@adacore.com>
14976
14977         * init.c: initialize fp hw on MILS.
14978
14979 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14980
14981         * errout.adb (First_Node): for bodies, return the node itself (small
14982         optimization). For other nodes, do not check source_unit if the node
14983         comes from Standard.
14984
14985 2011-08-02  Robert Dewar  <dewar@adacore.com>
14986
14987         * exp_ch3.adb: Minor comment additions.
14988         * sem_ch13.adb: Minor reformatting.
14989
14990 2011-08-02  Pascal Obry  <obry@adacore.com>
14991
14992         * make.adb, makeutl.adb: Removes some superfluous directory separator.
14993
14994 2011-08-02  Robert Dewar  <dewar@adacore.com>
14995
14996         * sem_attr.adb: Minor reformatting.
14997
14998 2011-08-02  Robert Dewar  <dewar@adacore.com>
14999
15000         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
15001         (Has_Default_Component_Value): Removed
15002         * einfo.ads Comment updates
15003         (Has_Default_Aspect): Replaces Has_Default_Value
15004         (Has_Default_Component_Value): Removed
15005         * exp_ch13.adb
15006         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
15007         * exp_ch3.adb
15008         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
15009         (Get_Simple_Init_Val): Handle Default_Value aspect
15010         (Needs_Simple_Initialization): Handle Default_Value aspect
15011         * exp_ch3.ads: Needs_Simple_Initialization
15012         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
15013         * par-prag.adb (Pragma_Default[_Component]Value) Removed
15014         * sem_ch13.adb
15015         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
15016         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
15017         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
15018
15019 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15020
15021         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
15022         package containing iteration primitives.
15023         exp_ch5.adb (Expand_Iterator_Loop): ditto.
15024
15025 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15026
15027         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
15028         "of", pre-analyze expression in case it is a function call with
15029         finalization actions that must be placed ahead of the loop.
15030         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
15031         on an Ada2012 iterator, insert them ahead of the rewritten loop.
15032
15033 2011-08-02  Geert Bosch  <bosch@adacore.com>
15034
15035         * cstand.adb (Create_Float_Types): Only consider C's long double for
15036         Long_Long_Float, in addition to double.
15037
15038 2011-08-02  Robert Dewar  <dewar@adacore.com>
15039
15040         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
15041         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
15042         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
15043         Minor reformatting.
15044
15045 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15046
15047         * sem_attr.adb: handle properly 'Result when it is a prefix of an
15048         indexed component.
15049
15050 2011-08-02  Javier Miranda  <miranda@adacore.com>
15051
15052         * einfo.ads, einfo.adb
15053         (Original_Access_Type): Move this attribute to Node26 since there was
15054         an undocumented use of Node21 in E_Access_Subprogram_Type entities
15055         which causes conflicts and breaks the generation of the .NET compiler.
15056         (Interface_Name): Add missing documentation on JGNAT only uses of
15057         this attribute.
15058
15059 2011-08-02  Geert Bosch  <bosch@adacore.com>
15060
15061         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
15062         (Find_Back_End_Float_Type): Likewise
15063         (Create_Back_End_Float_Types): Likewise
15064         (Create_Float_Types): Likewise
15065         (Register_Float_Type): Likewise
15066         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
15067         Nlist and split out type selection in new local Find_Base_Type function.
15068         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
15069         Nlist
15070         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
15071
15072 2011-08-02  Robert Dewar  <dewar@adacore.com>
15073
15074         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
15075         alpha order).
15076         * opt.ads: Minor comment change.
15077         * sem_ch12.adb: Minor code reorganization.
15078
15079 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
15080
15081         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15082         subtype's list of rep items to the list on the full subtype in the case
15083         where the lists are the same.
15084
15085 2011-08-02  Geert Bosch  <bosch@adacore.com>
15086
15087         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15088         using the one from System.Strings, which also deallocates all strings.
15089
15090 2011-08-02  Geert Bosch  <bosch@adacore.com>
15091
15092         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15093         function.
15094         * gcc-interface/Make-lang.in: Update dependencies.
15095
15096 2011-08-02  Olivier Hainque  <hainque@adacore.com>
15097
15098         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15099         end_locus.
15100
15101 2011-08-02  Javier Miranda  <miranda@adacore.com>
15102
15103         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15104         associated with anonymous access to subprograms.
15105
15106 2011-08-02  Geert Bosch  <bosch@adacore.com>
15107
15108         * opt.ads
15109         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15110         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15111         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15112         (Add_Symbol_Definition): Move to switch-c.adb
15113         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15114         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15115         (Add_Symbol_Definition): Move to switch-c.adb.
15116         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15117         * sem_warn.adb
15118         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15119         Move to warnsw.adb.
15120         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15121         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15122         Move to warnsw.adb.
15123         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15124         (Add_Symbol_Definition): Moved from Prepcomp.
15125         * switch-c.ads: Update copyright notice. Use String_List instead of
15126         Argument_List, removing dependency on System.OS_Lib.
15127
15128 2011-08-02  Yannick Moy  <moy@adacore.com>
15129
15130         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15131         mode on initialization expression which does not respect SPARK
15132         restrictions.
15133         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15134         if the tree referenced by its argument represents an initialization
15135         expression in SPARK, suitable for initializing an object in an object
15136         declaration.
15137
15138 2011-08-02  Javier Miranda  <miranda@adacore.com>
15139
15140         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15141         internally generated access to subprogram with its associated protected
15142         subprogram type.
15143         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15144
15145 2011-08-02  Geert Bosch  <bosch@adacore.com>
15146
15147         * cstand.adb (Register_Float_Type): Print information about type to
15148         register, if the Debug_Flag_Dot_B is set.
15149         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15150         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15151         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15152         with a requested precision of more than Max_Digits digits and no more
15153         than Max_Base_Digits digits, if a range specification is present and the
15154         Predefined_Float_Types list has a suitable type to derive from.
15155         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15156         case of type completion with pragma Import
15157         * sem_prag.adb
15158         (Process_Import_Predefined_Type): Processing to complete a type
15159         with pragma Import. Currently supports floating point types only.
15160         (Set_Convention_From_Pragma): Do nothing without underlying type.
15161         (Process_Convention): Guard against absence of underlying type,
15162         which may happen when importing incomplete types.
15163         (Process_Import_Or_Interface): Handle case of importing predefined
15164         types. Tweak error message.
15165
15166 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15167
15168         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15169         functions to previous change.  Reorganize code slightly.
15170
15171 2011-08-02  Geert Bosch  <bosch@adacore.com>
15172
15173         * back_end.ads (Register_Type_Proc): New call back procedure type for
15174         allowing the back end to provide information about available types.
15175         (Register_Back_End_Types): New procedure to register back end types.
15176         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15177         available types.
15178         * cstand.adb (Back_End_Float_Types): New list for floating point types
15179         supported by the back end.
15180         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15181         (Copy_Float_Type): New procedure to make new copies of predefined types.
15182         (Register_Float_Type): New call back procedure to populate the BEFT list
15183         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15184         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15185         (Create_Float_Types): New procedure to create entities for floating
15186         point types predefined in Standard, and put these and any remaining
15187         BEFTs on the Predefined_Float_Types list.
15188         * stand.ads (Predefined_Float_Types): New list for predefined floating
15189         point types that do not have declarations in package Standard.
15190
15191 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15192
15193         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
15194         entity node for the unit containing the parameter.
15195         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15196         (Add_Inlined_Subprogram): Likewise.
15197         * gcc-interface/Make-lang.in: Update dependencies.
15198
15199 2011-08-02  Thomas Quinot  <quinot@adacore.com>
15200
15201         * s-stusta.adb (Print): Make sure Pos is always initialized to a
15202         suitable value.
15203
15204 2011-08-02  Geert Bosch  <bosch@adacore.com>
15205
15206         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15207
15208 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15209
15210         * sem_type.adb (Covers): Move trivial case to the top and reuse the
15211         computed value of Base_Type.
15212
15213 2011-08-02  Yannick Moy  <moy@adacore.com>
15214
15215         * restrict.adb (Check_Restriction): issue an error for any use of
15216         class-wide, even if the No_Dispatch restriction is not set.
15217         * sem_aggr.adb: Correct typos in comments and messages in formal mode
15218         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15219         when completing a private extension, the type named in the private part
15220         is not the same as that named in the visible part.
15221         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15222         of an inherited primitive operations of a tagged type or type extension
15223         that returns the tagged type.
15224         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15225         function which returns True for an implicit operation inherited by the
15226         derived type declaration for the argument type.
15227         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15228         order.
15229
15230 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15231
15232         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15233         Process_Bounds, to perform analysis with expansion of a range or an
15234         expression that is the iteration scheme for a loop.
15235         (Analyze_Iterator_Specification): If domain of iteration is given by a
15236         function call with a controlled result, as is the case if call returns
15237         a predefined container, ensure that finalization actions are properly
15238         generated.
15239         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15240
15241 2011-08-02  Javier Miranda  <miranda@adacore.com>
15242
15243         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15244         * gcc-interface/Make-lang.in: Update dependencies.
15245
15246 2011-08-02  Javier Miranda  <miranda@adacore.com>
15247
15248         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15249         determine if the analysis is performed using N or Original_Node (N).
15250         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15251         functionality of routine Is_Variable avoids code duplication.
15252         * checks.adb (Determine_Range): Handle temporaries generated by
15253         Remove_Side_Effects.
15254
15255 2011-08-02  Javier Miranda  <miranda@adacore.com>
15256
15257         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15258         expansion of the condition. Required since the previous analysis was
15259         done with expansion disabled (see Resolve_Quantified_Expression) and
15260         hence checks were not inserted and record comparisons have not been
15261         expanded.
15262
15263 2011-08-02  Ed Falis  <falis@adacore.com>
15264
15265         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15266         Update header.
15267
15268 2011-08-02  Bob Duff  <duff@adacore.com>
15269
15270         * opt.ads: Minor comment fix.
15271
15272 2011-08-02  Bob Duff  <duff@adacore.com>
15273
15274         * sem_ch12.adb (Analyze_Package_Instantiation,
15275         Analyze_Subprogram_Instantiation): Turn off style checking while
15276         analyzing an instance. Whatever style checks that apply to the generic
15277         unit should apply, so it makes no sense to apply them in an instance.
15278         This was causing trouble when compiling an instance of a runtime
15279         unit that violates the -gnatyO switch.
15280         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15281         one of the two case statements, causing spurious errors.
15282
15283 2011-08-02  Robert Dewar  <dewar@adacore.com>
15284
15285         * uname.adb: Minor reformatting.
15286         * gnatcmd.adb: Minor reformatting.
15287         * exp_attr.adb: Minor reformatting.
15288
15289 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15290
15291         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15292         No_Dispatching_Calls, do not look for the Assign primitive, because
15293         predefined primitives are not created in this case.
15294
15295 2011-08-02  Bob Duff  <duff@adacore.com>
15296
15297         * stylesw.ads: Minor comment fixes.
15298
15299 2011-08-02  Robert Dewar  <dewar@adacore.com>
15300
15301         * freeze.adb (Add_To_Result): New procedure.
15302
15303 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
15304
15305         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15306         time, if the specific run-time routines for handling streams of strings
15307         are not available, use the default mechanism.
15308
15309 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15310
15311         * s-regpat.ads: Fix typo.
15312
15313 2011-08-02  Vincent Celier  <celier@adacore.com>
15314
15315         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15316         not null, call it to create the in memory config project file without
15317         parsing an existing default config project file.
15318
15319 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15320
15321         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15322
15323 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15324
15325         * sem_elim.adb: an abstract subprogram does not need an eliminate
15326         pragma for its descendant to be eliminable.
15327
15328 2011-08-02  Ed Falis  <falis@adacore.com>
15329
15330         * init.c: revert to handling before previous checkin for VxWorks
15331         * s-intman-vxworks.adb: delete unnecessary declarations related to
15332         using Ada interrupt facilities for handling signals.
15333         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15334         * s-intman-vxworks.ads: Import __gnat_install_handler as
15335         Initialize_Interrupts.
15336         * s-taprop-vxworks.adb: Delete Signal_Mask.
15337         (Abort_Handler): change construction of mask to unblock exception
15338         signals.
15339
15340 2011-08-02  Jerome Guitton  <guitton@adacore.com>
15341
15342         * a-except-2005.adb (Raise_From_Signal_Handler): Call
15343         Debug_Raise_Exception before propagation starts.
15344
15345 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15346
15347         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15348         to Restriction_Check_Required.
15349         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15350         * sem_res.adb (Resolve_Call): Likewise.
15351         * sem_attr.adb (Check_Stream_Attribute): Likewise.
15352
15353 2011-08-02  Bob Duff  <duff@adacore.com>
15354
15355         * stylesw.ads: Update comment.
15356         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15357         * errout.ads: Remove obsolete comment.
15358
15359 2011-08-02  Javier Miranda  <miranda@adacore.com>
15360
15361         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15362         (Set_Is_Safe_To_Reevaluate): new procedure.
15363         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15364         assignment is allowed on safe-to-reevaluate variables.
15365         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15366         temporary created to remove side effects in expressions that use
15367         the secondary stack as safe-to-reevaluate.
15368         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15369         variables that are not true constants.
15370
15371 2011-08-02  Robert Dewar  <dewar@adacore.com>
15372
15373         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15374         sem_res.adb, sem_ch6.adb: Minor reformatting.
15375
15376 2011-08-02  Jerome Guitton  <guitton@adacore.com>
15377
15378         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15379
15380 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15381
15382         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15383         not set Overridden_Operation if subprogram is an initialization
15384         procedure.
15385
15386 2011-08-02  Yannick Moy  <moy@adacore.com>
15387
15388         * par-ch6.adb: Correct obsolete name in comments
15389         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15390         which takes two message arguments (existing function takes one), with
15391         second message used for continuation.
15392         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15393         block statements that originate from a source block statement, not
15394         generated block statements
15395         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15396         symmetry with procedure case
15397         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15398         function to issue an error in formal mode if a package specification
15399         contains more than one tagged type or type extension.
15400         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15401         parameters matching formals of tagged types are objects (or ancestor
15402         type conversions of objects), not general expressions. Issue an error
15403         on view conversions that are not involving ancestor conversion of an
15404         extended type.
15405         (Resolve_Type_Conversion): in formal mode, issue an error on the
15406         operand of an ancestor type conversion which is not an object
15407         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15408         procedure so that it works also for actuals of function calls
15409         (Is_Actual_Tagged_Parameter): new function which determines if its
15410         argument is an actual parameter of a formal of tagged type in a
15411         subprogram call
15412         (Is_SPARK_Object_Reference): new function which determines if the tree
15413         referenced by its argument represents an object in SPARK
15414
15415 2011-08-02  Robert Dewar  <dewar@adacore.com>
15416
15417         * sem_ch3.adb: Minor reformatting
15418         Minor comment addition
15419         Minor error msg text change
15420
15421 2011-08-02  Javier Miranda  <miranda@adacore.com>
15422
15423         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15424         function. Used to be more precise when we generate a variable plus one
15425         assignment to remove side effects in the evaluation of the Bound
15426         expressions.
15427         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15428         of the bound expression to force its re-analysis and thus expand the
15429         associated transient scope (if required). Code cleanup replacing the
15430         previous code that declared the constant entity by an invocation to
15431         routine Force_Evaluation which centralizes this work in the frontend.
15432
15433 2011-08-02  Robert Dewar  <dewar@adacore.com>
15434
15435         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15436         (Base_Type): Now uses improved Is_Base_Type function
15437         * einfo.ads (Base_Type): Inline this function
15438
15439 2011-08-02  Robert Dewar  <dewar@adacore.com>
15440
15441         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
15442         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
15443
15444 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15445
15446         * gcc-interface/Make-lang.in: Update dependencies.
15447         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
15448         targets.
15449
15450 2011-08-02  Yannick Moy  <moy@adacore.com>
15451
15452         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
15453         non-simple expression used in delta constraint
15454         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
15455         index constraint which is not a subtype mark
15456         * par.adb: With and use Restrict
15457         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
15458         mode on component type which is not a subtype mark and default
15459         expression on component
15460         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
15461         of string which does not have a lower index bound equal to 1
15462         (Array_Type_Declaration): issue an error in formal mode on index or
15463         component type which is not a subtype mark, and on aliased keyword on
15464         component
15465         (Derived_Type_Declaration): issue an error in formal mode on interface,
15466         limited or abstract type
15467         (Record_Type_Declaration): issue an error in formal mode on interface
15468         (Record_Type_Definition): issue an error in formal mode on tagged types
15469         and type extensions not declared in the specification of a library unit
15470         package; on null non-tagged record; on variant part
15471
15472 2011-08-02  Vincent Celier  <celier@adacore.com>
15473
15474         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
15475         not declared for qualified library project when Library_Name is not
15476         declared, but Library_Dir is.
15477
15478 2011-08-02  Robert Dewar  <dewar@adacore.com>
15479
15480         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
15481         pragmas (affects aspects [Component_]Default_Value
15482         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
15483         component type for the resolution
15484
15485 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15486
15487         * einfo.adb (Base_Type): Tune implementation for speed.
15488
15489 2011-08-02  Robert Dewar  <dewar@adacore.com>
15490
15491         * freeze.adb: Minor reformatting.
15492
15493 2011-08-02  Thomas Quinot  <quinot@adacore.com>
15494
15495         * scos.ads: Update comments.
15496
15497 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15498
15499         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
15500         base type, because the parent may be a subtype of a private type whose
15501         convention is established in a private part.
15502
15503 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
15504
15505         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
15506         statement in a block when the expansion of the return expression has
15507         created a finalization chain.
15508         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
15509         with the parent node.
15510         Add N_Extended_Return_Statement to handle the case where a transient
15511         object declaration appears in the Return_Object_Declarations list of
15512         an extended return statement.
15513
15514 2011-08-02  Matthew Gingell  <gingell@adacore.com>
15515
15516         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
15517         unused parameter 'name'.
15518
15519 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15520
15521         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
15522         inherited operation, check whether its alias, which is the source
15523         operastion that it renames, has been marked eliminated.
15524
15525 2011-08-02  Javier Miranda  <miranda@adacore.com>
15526
15527         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
15528         in-mode parameter whose type is an access type since it can be used to
15529         modify its designated object. Enforce code that handles as safe an
15530         access type that is not access-to-constant but it is the result of a
15531         previous removal of side-effects.
15532         (Remove_Side_Effects): Minor code reorganization of cases which require
15533         no action. Done to incorporate documentation on new cases uncovered
15534         working in this ticket: no action needed if this routine was invoked
15535         too early and the nodes are not yet decorated.
15536         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
15537         to routine Remove_Side_Effects by calls to Force_Evaluation since they
15538         were issued with actuals that are implicitly provided by
15539         Force_Evaluation.
15540
15541 2011-08-02  Robert Dewar  <dewar@adacore.com>
15542
15543         * sem_ch3.adb, sem_res.adb: Minor reformatting.
15544
15545 2011-08-02  Yannick Moy  <moy@adacore.com>
15546
15547         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
15548         to issue an error in formal mode on attribute not supported in this mode
15549         (Analyze_Attribute): issue errors on standard attributes not supported
15550         in formal mode.
15551         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
15552         comment, and issue error in formal mode on modulus which is not a power
15553         of 2.
15554         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
15555         range.
15556         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
15557         subtype mark.
15558         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
15559         operator on modular type (except 'not').
15560
15561 2011-08-02  Robert Dewar  <dewar@adacore.com>
15562
15563         * gnat_rm.texi: Minor reformatting.
15564
15565 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15566
15567         * s-osinte-linux.ads: Minor comment update and reformatting.
15568         * i-cexten.ads: Make this unit pure, as for its parent.
15569         Will allow its usage in more contexts if needed.
15570
15571 2011-08-02  Robert Dewar  <dewar@adacore.com>
15572
15573         * s-utf_32.ads: Minor comment fix.
15574
15575 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15576
15577         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
15578         operation of a tagged synchronized type, handle the case where the
15579         controlling argument is overloaded.
15580
15581 2011-08-02  Yannick Moy  <moy@adacore.com>
15582
15583         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
15584         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
15585         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
15586         SPARK mode and formal verification mode on processing SPARK restriction
15587         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
15588         requiring consistency checking.
15589
15590 2011-08-02  Robert Dewar  <dewar@adacore.com>
15591
15592         * sem_res.adb: Minor reformatting.
15593
15594 2011-08-02  Robert Dewar  <dewar@adacore.com>
15595
15596         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15597         a-cforse.ads: Remove unneeded with of Ada.Containers
15598         Remove commented out pragma Inline's
15599         Move specifications of new subprograms to the actual specs
15600
15601 2011-08-02  Yannick Moy  <moy@adacore.com>
15602
15603         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15604         a-cforse.ads: Update comments.
15605
15606 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15607
15608         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
15609
15610 2011-08-02  Robert Dewar  <dewar@adacore.com>
15611
15612         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15613         a-cforse.ads, a-cofove.ads: Minor reformatting.
15614
15615 2011-08-02  Claire Dross  <dross@adacore.com>
15616
15617         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
15618         a-cofove.ads: Add comments.
15619
15620 2011-08-02  Yannick Moy  <moy@adacore.com>
15621
15622         * gnat_rm.texi: Document formal containers.
15623
15624 2011-08-02  Emmanuel Briot  <briot@adacore.com>
15625
15626         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
15627         are empty sections.
15628
15629 2011-08-02  Robert Dewar  <dewar@adacore.com>
15630
15631         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
15632         reformatting.
15633
15634 2011-08-02  Robert Dewar  <dewar@adacore.com>
15635
15636         * aspects.adb: New aspects Default_Value and Default_Component_Value
15637         New format of Aspect_Names table checks for omitted entries
15638         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
15639         handling of boolean aspects for derived types.
15640         New aspects Default_Value and Default_Component_Value
15641         New format of Aspect_Names table checks for omitted entries
15642         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
15643         (Has_Default_Value): New flag
15644         (Has_Default_Component_Value): New flag
15645         (Has_Default_Value): New flag
15646         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
15647         table.
15648         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
15649         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
15650         Default_Value and Default_Component_Value
15651         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
15652         New aspects Default_Value and Default_Component_Value
15653         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
15654         * sprint.adb: Print N_Aspect_Specification node when called from gdb
15655
15656 2011-08-02  Vincent Celier  <celier@adacore.com>
15657
15658         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
15659         inherit library kind.
15660
15661 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15662
15663         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
15664         Minor reformatting.
15665
15666 2011-08-02  Robert Dewar  <dewar@adacore.com>
15667
15668         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
15669
15670 2011-08-02  Yannick Moy  <moy@adacore.com>
15671
15672         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
15673
15674 2011-08-02  Robert Dewar  <dewar@adacore.com>
15675
15676         * impunit.adb: Add comment.
15677
15678 2011-08-02  Yannick Moy  <moy@adacore.com>
15679
15680         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
15681         qualification of aggregates in formal mode
15682         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
15683         another aggregate
15684         (Resolve_Aggregate): complete the test that an aggregate is adequately
15685         qualified in formal mode
15686
15687 2011-08-02  Pascal Obry  <obry@adacore.com>
15688
15689         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
15690         * mlib-prj.adb: Supress warning when compiling binder generated file.
15691         (Build_Library): Supress all warnings when compiling the binder
15692         generated file.
15693
15694 2011-08-02  Yannick Moy  <moy@adacore.com>
15695
15696         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
15697         from here...
15698         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
15699         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
15700         Add with/use clauses to make Check_Formal_Restriction visible
15701
15702 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15703
15704         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
15705         in-parameters when type of the generic formal is private in the generic
15706         spec and non-private in the body.
15707
15708 2011-08-02  Claire Dross  <dross@adacore.com>
15709
15710         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
15711         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
15712         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
15713         * impunit.adb, Makefile.rtl: Take new files into account.
15714
15715 2011-08-02  Robert Dewar  <dewar@adacore.com>
15716
15717         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
15718         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15719
15720 2011-08-02  Yannick Moy  <moy@adacore.com>
15721
15722         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
15723         formal mode
15724         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
15725         matching static array bounds, taking into account the special case of
15726         string literals
15727         * sem_ch3.adb: Typo in comment.
15728
15729 2011-08-02  Yannick Moy  <moy@adacore.com>
15730
15731         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
15732         which issues an error in formal mode if its argument node is originally
15733         from source
15734         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
15735         has a discriminant specification so that it does not include the case
15736         of derived types
15737         (Derived_Type_Declaration): move here the test that a derived type has a
15738         discriminant specification
15739         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
15740         first element of a component association before accessing its choices
15741         (presence of component association is not enough)
15742         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
15743         declaration is a library item before accessing the next element in a
15744         list, as library items are not member of lists
15745         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
15746         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
15747         Check_Formal_Restriction whenever possible.
15748
15749 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15750
15751         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
15752         reference when needed.
15753
15754 2011-08-02  Bob Duff  <duff@adacore.com>
15755
15756         * gnat_ugn.texi: Fix typo.
15757
15758 2011-08-02  Vincent Celier  <celier@adacore.com>
15759
15760         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
15761         archive file name. Do not use the full path name of archives for Open
15762         VMS.
15763
15764 2011-08-02  Robert Dewar  <dewar@adacore.com>
15765
15766         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
15767         Analyze_Aspect_Specifications
15768         * sem_ch13.adb
15769         (Analyze_Aspect_Specifications): New handling for boolean aspects
15770         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
15771         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
15772         sequence for Analyze_Aspect_Specifications
15773         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
15774         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
15775
15776 2011-08-02  Robert Dewar  <dewar@adacore.com>
15777
15778         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
15779         aspects, since these no longer exist.
15780
15781 2011-08-02  Robert Dewar  <dewar@adacore.com>
15782
15783         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
15784         semicolon, do not try to see if there are aspects following it.
15785         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
15786         aspect spec.
15787
15788 2011-08-02  Robert Dewar  <dewar@adacore.com>
15789
15790         * sem_ch8.adb, aspects.ads: Minor reformatting.
15791
15792 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15793
15794         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
15795         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
15796         extracted from...
15797         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
15798
15799 2011-08-02  Yannick Moy  <moy@adacore.com>
15800
15801         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
15802         mode on subprogram declaration outside of package specification, unless
15803         it is followed by a pragma Import
15804         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
15805         Access_Type_Declaration): issue error in formal mode on access type
15806         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
15807         incomplete type
15808         (Analyze_Object_Declaration): issue error in formal mode on object
15809         declaration which does not respect SPARK restrictions
15810         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
15811         declaration which does not respect SPARK restrictions
15812         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
15813         error in formal mode on digits or delta constraint
15814         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
15815         decimal fixed point type
15816         (Derived_Type_Declaration): issue error in formal mode on derived type
15817         other than type extensions of tagged record types
15818         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
15819         with check on access definition
15820         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
15821         mode on protected definition.
15822         (Analyze_Task_Definition): issue error in formal mode on task definition
15823
15824 2011-08-02  Robert Dewar  <dewar@adacore.com>
15825
15826         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
15827
15828 2011-08-02  Javier Miranda  <miranda@adacore.com>
15829
15830         * sem_ch6.adb (Can_Override_Operator): New function.
15831         (Verify_Overriding_Indicator): Add missing code to check overriding
15832         indicator in operators. Fixes regression.
15833         (Check_Overriding_Indicator): Minor reformating after replacing the
15834         code that evaluates if the subprogram can override an operator by
15835         invocations to the above new function.
15836         * einfo.adb
15837         (Write_Field26_Name): Add missing code to ensure that, following
15838         the documentation in einfo.ads, this field is not shown as attribute
15839         "Static_Initialization" on non-dispatching functions.
15840
15841 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
15842
15843         * sem_res.adb (Resolve_Call): A call to
15844         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
15845         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
15846         i.e., when the second parameter is of type Time_Span.
15847
15848 2011-08-02  Vincent Celier  <celier@adacore.com>
15849
15850         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
15851         with an archive instead of -L<library dir> -l<library name>.
15852
15853 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15854
15855         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
15856         mark the base types In_Use in addition to making the operations
15857         use_visible.
15858
15859 2011-08-02  Ed Falis  <falis@adacore.com>
15860
15861         * init.c: add and setup __gnat_signal_mask for the exception signals
15862         * s-inmaop-vxworks.adb: new file.
15863         * s-intman-vxworks.adb: remove unnecessary initializations and
15864         simplify remaining
15865         * s-intman-vxworks.ads: remove unnecessary variable
15866         * s-taprop-vxworks.adb: simplify signal initialization
15867
15868 2011-08-02  Robert Dewar  <dewar@adacore.com>
15869
15870         * sem_ch8.adb: Minor code reorganization, comment updates.
15871
15872 2011-08-02  Robert Dewar  <dewar@adacore.com>
15873
15874         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
15875         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
15876         here from Sem_Res.
15877         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
15878         (Matching_Static_Array_Bounds): Moved here from Sem_Res
15879
15880 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15881
15882         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
15883         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
15884         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
15885         use_type_clauses, to handle more efficiently use_type and use_all_type
15886         constructs.
15887         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
15888         Ada2012 Use_All_Type clause.
15889         (Use_Class_Wide_Operations): new procedure.
15890
15891 2011-08-02  Robert Dewar  <dewar@adacore.com>
15892
15893         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
15894         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
15895         expression to expression function.
15896
15897 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15898
15899         * sem_ch4.adb: transform simple Ada2012 membership into equality only
15900         if types are compatible.
15901
15902 2011-08-02  Yannick Moy  <moy@adacore.com>
15903
15904         * sem_res.adb (Matching_Static_Array_Bounds): new function which
15905         returns True if its argument array types have same dimension and same
15906         static bounds at each index.
15907         (Resolve_Actuals): issue an error in formal mode on actuals passed as
15908         OUT or IN OUT paramaters which are not view conversions in SPARK.
15909         (Resolve_Arithmetic_Op): issue an error in formal mode on
15910         multiplication or division with operands of fixed point types which are
15911         not qualified or explicitly converted.
15912         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
15913         Boolean or array type (except String) operands.
15914         (Resolve_Equality_Op): issue an error in formal mode on equality
15915         operators for array types other than String with non-matching static
15916         bounds.
15917         (Resolve_Logical_Op): issue an error in formal mode on logical operators
15918         for array types with non-matching static bounds. Factorize the code in
15919         Matching_Static_Array_Bounds.
15920         (Resolve_Qualified_Expression): issue an error in formal mode on
15921         qualified expressions for array types with non-matching static bounds.
15922         (Resolve_Type_Conversion): issue an error in formal mode on type
15923         conversion for array types with non-matching static bounds
15924
15925 2011-08-02  Robert Dewar  <dewar@adacore.com>
15926
15927         * par-ch10.adb: Minor code reorganization (use Nkind_In).
15928
15929 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15930
15931         * par-ch9.adb: save location of entry for proper error message.
15932
15933 2011-08-02  Javier Miranda  <miranda@adacore.com>
15934
15935         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
15936         (Use_Full_View) which permits this routine to climb through the
15937         ancestors using the full-view of private parents.
15938         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
15939         Use_Full_View to true in calls to Is_Ancestor.
15940         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
15941         true in call to Is_Ancestor.
15942         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
15943         Use_Full_View to true in call to Is_Ancestor.
15944         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
15945         call to Is_Ancestor.
15946         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
15947         Use_Full_View to true in calls to Is_Ancestor.
15948         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
15949         Make_Select_Specific_Data_Table, Register_Primitive,
15950         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
15951         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
15952         to true in call to Is_Ancestor.
15953         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
15954         Use_Full_View to true in calls to Is_Ancestor.
15955         * exp_cg.adb
15956         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
15957         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
15958
15959 2011-08-02  Robert Dewar  <dewar@adacore.com>
15960
15961         * gnat_rm.texi: Minor reformatting.
15962         * sem_prag.adb: Minor reformatting.
15963
15964 2011-08-02  Tristan Gingold  <gingold@adacore.com>
15965
15966         * vms_data.ads: Add VMS qualifier for -gnateP.
15967
15968 2011-08-02  Robert Dewar  <dewar@adacore.com>
15969
15970         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
15971         * par-ch7.adb (P_Package): Proper placement of aspects for package
15972         decl/instantiation.
15973         * par-endh.adb (Check_End): Ad Is_Sloc parameter
15974         (End_Statements): Add Is_Sloc parameterr
15975         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
15976         (Check_End): Ad Is_Sloc parameter
15977         (End_Statements): Add Is_Sloc parameterr
15978
15979 2011-08-02  Vincent Celier  <celier@adacore.com>
15980
15981         * ug_words: Add VMS qualifier equivalent to -gnateP:
15982         /SYMBOL_PREPROCESSING.
15983
15984 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
15985
15986         * gnat-style.texi: For hexadecimal numeric literals the typical
15987         grouping of digits is 4 to represent 2 bytes.
15988         A procedure spec which is split into several lines is indented two
15989         characters.
15990
15991 2011-08-02  Yannick Moy  <moy@adacore.com>
15992
15993         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
15994         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
15995         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
15996         properly qualified
15997         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
15998         choice in array aggregate
15999         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
16000         mark as ancestor
16001         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
16002         positional and named aggregate for record, or others in record
16003         aggregate, or multiple choice in record aggregate
16004         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
16005         array operands to logical operations AND, OR and XOR do not have the
16006         same static lower and higher bounds
16007         * sem_ch5.adb, sinfo.ads: Correct typos in comments
16008
16009 2011-08-01  Robert Dewar  <dewar@adacore.com>
16010
16011         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
16012         Replaces Last_Source_Node_In_Sequence.
16013         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
16014         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
16015         parens and blank in string (this was inconsistently implemented).
16016         * errout.ads
16017         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
16018         blank in string (this was inconsistently implemented).
16019         * gnat1drv.adb
16020         (Set_Global_Switches): Set formal mode switches appropriately
16021         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
16022         * par-prag.adb
16023         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
16024         call Set_Error_Msg_Lang to set "spark" as language name.
16025         * par.adb: Remove unnecessary call to set formal language for errout
16026         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
16027         appropriately and call Set_Error_Msg_Lang to set "spark" as language
16028         name.
16029         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
16030         calls to it, moved after resolution so that types are known
16031         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
16032         result of concatenation is not of type String
16033         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
16034         concatenation is not properly restricted
16035         * gnat_rm.texi: Add doc on pragma Spark_95.
16036         * gcc-interface/Makefile.in: Remove obsolete target pairs for
16037         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
16038         * gcc-interface/Make-lang.in: Update dependencies.
16039
16040 2011-08-01  Javier Miranda  <miranda@adacore.com>
16041
16042         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
16043         condition that detects if the overridden operation must replace an
16044         existing entity.
16045
16046 2011-08-01  Javier Miranda  <miranda@adacore.com>
16047
16048         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
16049         code declarations inserted by Insert_Actions in each alternative of the
16050         N_Case_Expression node.
16051
16052 2011-08-01  Robert Dewar  <dewar@adacore.com>
16053
16054         * sem_ch6.adb: Minor code reorganization.
16055         * sem_util.adb: Minor reformatting.
16056
16057 2011-08-01  Pascal Obry  <obry@adacore.com>
16058
16059         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
16060         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
16061
16062 2011-08-01  Yannick Moy  <moy@adacore.com>
16063
16064         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
16065         literal or operator symbol which is prefixed
16066         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
16067         mode on access attributes.
16068         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
16069         that concatenation operands are properly restricted in formal mode
16070         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
16071         Analyze_Concatenation_Operand. Issue an error in formal mode if the
16072         result of the concatenation has a type different from String.
16073         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
16074         Analyze_Quantified_Expression, Analyze_Slice,
16075         Analyze_Null): issue an error in formal mode on unsupported constructs
16076         * sem_ch5.adb
16077         (Analyze_Block_Statement): only issue error on source block statement
16078         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16079         function which returns the last node in a list of nodes for which
16080         Comes_From_Source returns True, if any
16081         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16082         Last_Source_Node_In_Sequence
16083         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16084         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16085         mode on unsupported constructs
16086         * sem_ch9.adb Do not return after issuing error in formal mode, as the
16087         rest of the actions may be needed later on since the error is marked as
16088         not serious.
16089         * sinfo.ads: Typos in comments.
16090
16091 2011-08-01  Pascal Obry  <obry@adacore.com>
16092
16093         * projects.texi: Minor editing.
16094
16095 2011-08-01  Yannick Moy  <moy@adacore.com>
16096
16097         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16098         insertion character ~~
16099         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16100         (Set_Error_Msg_Lang): new procedure which fixes the language for use
16101         with insertion character ~~
16102         (Set_Msg_Text): treat insertion character ~~
16103         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16104         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16105         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16106         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16107         errors related to the formal language restriction not serious
16108         (insertion character |).
16109         * par.adb (Par): set formal language for error messages if needed
16110         * sem_ch6.adb (Check_Missing_Return): take into account possible
16111         generated statements at the end of the function
16112         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16113         enumeration value to define a new pragma SPARK_95
16114         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16115         SPARK_Version): new type and variables to store the SPARK version
16116         (none by default).
16117         (SPARK_Mode): return True when SPARK_Version is set
16118         * par-prag.adb: Correct indentation
16119         (Prag): take Pragma_SPARK_95 into account
16120         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16121         into account.
16122
16123 2011-08-01  Robert Dewar  <dewar@adacore.com>
16124
16125         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16126         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16127         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16128
16129 2011-08-01  Pascal Obry  <obry@adacore.com>
16130
16131         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16132         Target_Name to Get_Path call.
16133         (Parse_Single_Project): Likewise.
16134         (Post_Parse_Context_Clause): Likewise.
16135         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16136         Call Initialise_Project_Path with the proper Target_Name.
16137         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16138         search path.
16139         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16140         with the proper Target_Name.
16141         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16142         Part.Parse routine.
16143         (Parse_Project_And_Apply_Config): Likewise.
16144         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16145         This is fine as this part of the code is supporting only native
16146         compilation.
16147         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16148         is fine as this part of the code is supporting only native compilation.
16149
16150 2011-08-01  Yannick Moy  <moy@adacore.com>
16151
16152         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16153         of homonym, unless the homonym is one of the cases allowed in SPARK
16154         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16155         package declaration occurring after a body.
16156
16157 2011-08-01  Robert Dewar  <dewar@adacore.com>
16158
16159         * checks.adb, exp_ch4.adb: Minor reformatting.
16160
16161 2011-08-01  Javier Miranda  <miranda@adacore.com>
16162
16163         * einfo.ads (Access_Disp_Table): Fix documentation.
16164         (Dispatch_Table_Wrappers): Fix documentation.
16165
16166 2011-08-01  Pascal Obry  <obry@adacore.com>
16167
16168         * prj-env.adb, prj-env.ads: Minor reformatting.
16169
16170 2011-08-01  Yannick Moy  <moy@adacore.com>
16171
16172         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16173         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16174         procedures out of these packages.
16175         * errout.ads, errout.adb
16176         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16177         procedures in of this package
16178         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16179         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16180         on misplaced later vs initial declarations, like in Ada 83
16181         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16182         formal mode on attribute of private type whose full type declaration
16183         is not visible
16184         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16185         package declaration inside a package specification
16186         (Analyze_Full_Type_Declaration): issue error in formal mode on
16187         controlled type or discriminant type
16188         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16189         user-defined operator means that it should come from the source
16190         (New_Overloaded_Entity): issue error in formal mode on overloaded
16191         entity.
16192         * sem_ch6.ads, sem_ch13.ads: typos in comments.
16193
16194 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16195
16196         * atree.adb: Minor reformatting.
16197         * checks.adb: Minor reformatting.
16198
16199 2011-08-01  Vincent Celier  <celier@adacore.com>
16200
16201         * s-parame-vms-ia64.ads: Fix typo in comment
16202         Minor reformatting
16203         * s-parame-vms-restrict.ads: Removed, unused.
16204
16205 2011-08-01  Javier Miranda  <miranda@adacore.com>
16206
16207         * exp_ch3.adb
16208         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16209         * sem_ch3.adb
16210         (Constrain_Index): Remove side effects in the evaluation of the bounds.
16211         * sem_ch3.ads, sem_ch3.adb
16212         (Is_Constant_Bound): New extended version of the subprogram that was
16213         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16214         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16215         * sem_aux.ads (Constant_Value): Fix typo in comment.
16216         * checks.adb (Generate_Index_Checks): New implementation which, for
16217         array objects with constant bounds, generates the runtime check
16218         referencing the bounds of the array type. For other cases this routine
16219         provides its previous behavior obtaining such values from the array
16220         object.
16221         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16222         parent type.
16223         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16224         we cannot have semantic interpretations of the new node.
16225
16226 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16227
16228         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16229         expressions.
16230
16231 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16232
16233         * sem_ch8.adb: Minor code editing.
16234         * s-vxwext.adb: Remove trailing space.
16235         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16236         consistency with other files.
16237
16238 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16239
16240         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16241
16242 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16243
16244         * par-ch10.adb: reject parameterized expressions as compilation unit.
16245         * sem_ch4.adb: handle properly conditional expression with overloaded
16246         then_clause and no else_clause.
16247
16248 2011-08-01  Tristan Gingold  <gingold@adacore.com>
16249
16250         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16251         like done by System.Aux_DEC.
16252         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16253
16254 2011-08-01  Yannick Moy  <moy@adacore.com>
16255
16256         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16257         missing label at end of declaration (subprogram or package)
16258         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16259         of positional and named parameter association
16260         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16261         Error_Msg_SP which adds a prefix to the error message giving the name
16262         of the formal language analyzed
16263         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16264         access result type in subprogram, unconstrained array as result type,.
16265         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16266         procedure
16267         * sem_ch8.adb: Code clean up.
16268
16269 2011-08-01  Javier Miranda  <miranda@adacore.com>
16270
16271         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16272         * einfo.ads (Access_Disp_Table): Fix documentation.
16273         (Dispatch_Table_Wrappers): Fix documentation.
16274         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16275         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16276         to enforce the documentation of this attribute.
16277         (Set_Is_Interface): Cleanup the assertion.
16278         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16279         the Underlying_Type entity before reading attribute Access_Disp_Table.
16280         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16281         Locate the Underlying_Type before reading attribute Access_Disp_Table.
16282         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16283         the Underlying_Type entity before reading attribute Access_Disp_Table.
16284         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16285         Locate the Underlying_Type entity before reading attribute
16286         Access_Disp_Table.
16287
16288 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16289
16290         * s-poosiz.ads: Additional overriding indicators.
16291
16292 2011-08-01  Yannick Moy  <moy@adacore.com>
16293
16294         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16295         formal mode.
16296         (Analyze_Iteration_Scheme): issue error in formal mode when loop
16297         parameter specification does not include a subtype mark.
16298         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16299         formal mode on abstract subprogram.
16300         (Analyze_Subprogram_Specification): issue error in formal mode on
16301         user-defined operator.
16302         (Process_Formals): issue error in formal mode on access parameter and
16303         default expression.
16304         * sem_ch9.adb (Analyze_Abort_Statement,
16305         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16306         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16307         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16308         Analyze_Requeue, Analyze_Selective_Accept,
16309         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16310         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16311         issue error in formal mode on user-defined raise statement.
16312
16313 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16314
16315         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16316         declaration being hidden when overriding an implicit inherited
16317         subprogram.
16318         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16319         (-gnats), do not complain about a source file that contains only a
16320         pragma No_Body.
16321
16322 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16323
16324         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16325         variable if already set.
16326
16327 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16328
16329         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16330         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16331         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16332         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16333         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16334         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16335         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16336         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16337         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16338         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16339         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16340         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16341         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16342         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16343         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16344         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16345         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16346         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16347         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16348         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16349         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16350         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16351         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16352         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16353         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16354         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16355         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16356         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16357         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16358         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16359         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16360         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16361         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16362         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16363         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16364         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16365         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16366         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16367         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16368         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16369         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16370         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16371         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16372         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16373         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16374         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16375         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16376         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16377         s-osinte-mingw.ads: Update to GPLv3 run-time license.
16378         Use GNAT instead of GNARL.
16379
16380 2011-08-01  Bob Duff  <duff@adacore.com>
16381
16382         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16383         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16384         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16385         reformatting.
16386
16387 2011-08-01  Yannick Moy  <moy@adacore.com>
16388
16389         * debug.adb (d.D) reverve flag for the SPARK mode
16390         (d.E) reverve flag for SPARK generation mode
16391         (d.F) reverve flag for Why generation mode
16392         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16393         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
16394         functions which return True when the corresponding modes are set
16395         (Formal_Language): return "spark" or "alfa" when in formal verification
16396         mode.
16397         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16398         Error_Msg to prefix the error message with a tag giving the formal
16399         language
16400         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16401         message with a tag giving the formal language
16402         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16403         block statement
16404         (Analyze_Case_Statement): issue error in formal mode on case statement
16405         with a single "others" case alternative
16406         (Analyze_Exit_Statement): issue errors in formal mode on exit
16407         statements which do not respect SPARK restrictions
16408         (Analyze_Goto_Statement): issue error in formal mode on goto statement
16409         (Check_Unreachable_Code): always issue an error (not a warning) in
16410         formal mode on unreachable code (concerns both code after an infinite
16411         loop and after an unconditional jump, both not allowed in SPARK)
16412         * sem_ch6.adb (Analyze_Return_Statement): add call to
16413         Set_Return_Present for a procedure containing a return statement
16414         (already done for functions in Analyze_Function_Return)
16415         (Analyze_Function_Return): issue error in formal mode on extended
16416         return or if return is not last statement in function
16417         (Check_Missing_Return): issue error in formal mode if function does
16418         not end with return or if procedure contains a return
16419         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16420         function to detect if there is an inner scope of its parameter S which
16421         is a loop.
16422
16423 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16424
16425         * sem_ch6.ads: Minor reformatting.
16426
16427 2011-08-01  Javier Miranda  <miranda@adacore.com>
16428
16429         * sem_util.adb (Abstract_Interface_List): Complete condition when
16430         processing private type declarations to avoid reading unavailable
16431         attribute.
16432         (Is_Synchronized_Tagged_Type): Complete condition when processing
16433         private extension declaration nodes to avoid reading unavailable
16434         attribute.
16435
16436 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16437
16438         * sem_ch3.adb: Minor reformatting.
16439
16440 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16441
16442         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
16443         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
16444         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
16445         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
16446         for VMS, instead parametrize the common implementation with
16447         System.Parameters declarations.
16448
16449 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
16450
16451         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
16452
16453 2011-08-01  Tristan Gingold  <gingold@adacore.com>
16454
16455         * seh_init.c: Fix SEH handler installation on win64.
16456
16457 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16458
16459         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
16460         double analysis of an anonymous access to subprogram, because it can
16461         lead to improper sharing of profiles and a back-end crash.
16462
16463 2011-08-01  Robert Dewar  <dewar@adacore.com>
16464
16465         * make.adb, sem_ch4.adb: Minor reformatting.
16466         * gcc-interface/Make-lang.in: Update dependencies.
16467         * sem_util.adb, exp_ch5.adb: Minor reformatting.
16468
16469 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16470
16471         * gnat_rm.texi: Fix definition of Long_Integer.
16472
16473 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16474
16475         * exp_aggr.adb: check limit size of static aggregate unconditionally,
16476         to prevent storage exhaustion.
16477         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
16478         finalized is a function body, insert the cleanup code before the final
16479         return statement, to prevent spurious warnings.
16480         * s-pooglo.ads: add overriding indicator.
16481
16482 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16483
16484         * sem_ch4.adb (Operator_Check): improve error message when both a
16485         with_clause and a use_clause are needed to make operator usage legal.
16486         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
16487         determine whether a compilation unit is visible within an other,
16488         either through a with_clause in the current unit, or a with_clause in
16489         its library unit or one one of its parents.
16490
16491 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16492
16493         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
16494         over an arbitrary expression of an array or container type.
16495         * lib-xref.adb: clarify comment.
16496
16497 2011-08-01  Bob Duff  <duff@adacore.com>
16498
16499         * einfo.ads: Minor reformatting.
16500         * debug.adb: Minor comment improvement.
16501
16502 2011-08-01  Javier Miranda  <miranda@adacore.com>
16503
16504         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
16505         consider hidden subprograms as valid candidates.
16506
16507 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16508
16509         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
16510
16511 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
16512
16513         * gnat_ugn.texi: Fix typo.
16514
16515 2011-08-01  Robert Dewar  <dewar@adacore.com>
16516
16517         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
16518         lib-xref.adb: Minor reformatting
16519
16520 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
16521
16522         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
16523         when to generate a call to Move_Final_List.
16524         (Has_Controlled_Parts): Remove this function.
16525
16526 2011-08-01  Geert Bosch  <bosch@adacore.com>
16527
16528         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
16529         "," in choice list.
16530
16531 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16532
16533         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
16534         explicit raise of a predefined exception as Comes_From_Source if the
16535         original N_Raise_Statement comes from source.
16536
16537 2011-08-01  Robert Dewar  <dewar@adacore.com>
16538
16539         * sinfo.ads: Add comment.
16540         * sem_ch6.adb: Minor reformatting.
16541
16542 2011-08-01  Robert Dewar  <dewar@adacore.com>
16543
16544         * freeze.adb (Freeze_Entity): Refine check for bad component size
16545         clause to avoid rejecting confirming clause when atomic/aliased present.
16546
16547 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16548
16549         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
16550         better determine whether an entity reference is a write.
16551         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
16552         subcomponent.
16553         * lib-xref.adb (Output_References): Do no suppress a read reference at
16554         the same location as an immediately preceeding modify-reference, to
16555         handle properly in-out actuals.
16556
16557 2011-08-01  Tristan Gingold  <gingold@adacore.com>
16558
16559         * env.c (__gnat_setenv) [VMS]: Refine previous change.
16560
16561 2011-08-01  Quentin Ochem  <ochem@adacore.com>
16562
16563         * i-cstrin.adb (New_String): Changed implementation, now uses only the
16564         heap to compute the result.
16565
16566 2011-08-01  Robert Dewar  <dewar@adacore.com>
16567
16568         * atree.ads: Minor reformatting.
16569
16570 2011-08-01  Emmanuel Briot  <briot@adacore.com>
16571
16572         * g-expect.adb (Get_Command_Output): Fix memory leak.
16573
16574 2011-08-01  Geert Bosch  <bosch@adacore.com>
16575
16576         * cstand.adb (P_Float_Type): New procedure to print the definition of
16577         predefined fpt types.
16578         (P_Mixed_Name): New procedure to print a name using mixed case
16579         (Print_Standard): Use P_Float_Type for printing floating point types
16580         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
16581         precision IEEE float.
16582
16583 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16584
16585         * sem_ch3.adb: Minor reformatting.
16586
16587 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16588
16589         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
16590         the completion of a generic function, insert the new body rather than
16591         rewriting the original.
16592
16593 2011-08-01  Yannick Moy  <moy@adacore.com>
16594
16595         * sinfo.ads, errout.ads: Typos in comments.
16596
16597 2011-08-01  Robert Dewar  <dewar@adacore.com>
16598
16599         * par-endh.adb: Minor reformatting.
16600
16601 2011-08-01  Robert Dewar  <dewar@adacore.com>
16602
16603         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
16604         (Pre_Post_Aspects): New subtype.
16605         * par-ch12.adb (P_Generic): New syntax for aspects in packages
16606         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
16607         * par-ch7.adb (P_Package): Remove Decl parameter
16608         (P_Package): Handle new syntax for aspects (before IS)
16609         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
16610         new aspect syntax
16611         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
16612         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
16613         (P_Package): Remove Decl parameter
16614         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
16615         aspects
16616         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
16617         specs
16618         * sem_util.ads, sem_util.adb (Static_Boolean): New function
16619         * sinfo.ads: Document new syntax for aspects in packages etc.
16620         * sprint.adb: Handle new syntax of aspects before IS in package
16621
16622 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16623
16624         * atree.ads: Minor reformatting.
16625         * sem_prag.adb: Minor reformatting.
16626
16627 2011-08-01  Robert Dewar  <dewar@adacore.com>
16628
16629         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
16630         case expr alternative.
16631
16632 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16633
16634         * sem_ch12.adb: Fix typo.
16635
16636 2011-08-01  Geert Bosch  <bosch@adacore.com>
16637
16638         * sem_prag.adb (Check_No_Link_Name): New procedure.
16639         (Process_Import_Or_Interface): Use Check_No_Link_Name.
16640         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
16641         instead of Standard_Long_Long_Float_Size global. Preparation for
16642         eventual removal of per type constants.
16643         * exp_util.ads (Get_Stream_Size): New function returning the stream
16644         size value of subtype E.
16645         * exp_util.adb (Get_Stream_Size): Implement new function.
16646         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
16647         function.
16648         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
16649         * einfo.adb:
16650         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
16651
16652 2011-08-01  Geert Bosch  <bosch@adacore.com>
16653
16654         * cstand.adb: Fix comments.
16655         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
16656         count of arguments.
16657
16658 2011-08-01  Robert Dewar  <dewar@adacore.com>
16659
16660         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
16661
16662 2011-08-01  Geert Bosch  <bosch@adacore.com>
16663
16664         * atree.ads: Fix comment.
16665
16666 2011-08-01  Robert Dewar  <dewar@adacore.com>
16667
16668         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
16669         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
16670         * par.adb: Add with for Namet.Sp.
16671         * par-tchk.adb: Minor reformatting.
16672
16673 2011-08-01  Vincent Celier  <celier@adacore.com>
16674
16675         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
16676         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
16677         of the init procedure of a SAL.
16678         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
16679         New procedure.
16680
16681 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16682
16683         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
16684         reformatting.
16685
16686 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16687
16688         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
16689
16690 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16691
16692         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
16693         conformant with its spec (return True only for types that have
16694         an overriding Initialize primitive operation that prevents them from
16695         having preelaborable initialization).
16696         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
16697         initialization for controlled types in Ada 2005 or later mode.
16698
16699 2011-08-01  Robert Dewar  <dewar@adacore.com>
16700
16701         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
16702         Postcondition.
16703         (Same_Aspect): New function.
16704         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
16705         Type_Invariant, Precondition, Postcondition.
16706         * snames.ads-tmpl: Add Name_Type_Invariant.
16707
16708 2011-08-01  Robert Dewar  <dewar@adacore.com>
16709
16710         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
16711         here.
16712         (Freeze_All_Ent): Fix error in handling inherited aspects.
16713         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
16714         already analyzed, but don't skip entire processing of a declaration,
16715         that's wrong in some cases of declarations being rewritten.
16716         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
16717         Don't delay for integer, string literals
16718         Treat predicates in usual manner for delay, remove special case code,
16719         not needed.
16720         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
16721         (Build_Predicate_Function): Update saved expression in aspect
16722         (Build_Invariant_Procedure): Update saved expression in aspect
16723         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
16724         of replacement of discriminant references if the reference is simple.
16725
16726 2011-08-01  Robert Dewar  <dewar@adacore.com>
16727
16728         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
16729         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
16730         Static_Predicate and Dynamic_Predicate.
16731         (Build_Predicate_Function): Add processing for Static_Predicate
16732         and Dynamic_Predicate.
16733         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
16734         (From_Static_Predicate): New flag
16735         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
16736
16737 2011-08-01  Robert Dewar  <dewar@adacore.com>
16738
16739         * usage.adb: Documentation cleanup for Ada version modes in usage.
16740         * expander.adb: Minor reformatting.
16741
16742 2011-08-01  Robert Dewar  <dewar@adacore.com>
16743
16744         * atree.ads: Minor comment fix.
16745         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
16746         a-witeio.ads, sem_prag.adb: Minor reformatting.
16747
16748 2011-08-01  Doug Rupp  <rupp@adacore.com>
16749
16750         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
16751         pointers. Use descrip.h header file for convenience. Add some
16752         comments.
16753
16754 2011-08-01  Robert Dewar  <dewar@adacore.com>
16755
16756         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
16757         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
16758         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
16759         New procedure.
16760         (Check_Aspect_At_End_Of_Declarations): New procedure
16761         (Analye_Aspect_Specification): Minor changes for above procedures
16762         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
16763         specification node as well.
16764
16765 2011-08-01  Pascal Obry  <obry@adacore.com>
16766
16767         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
16768         Windows files. Use GetFilesAttributes() in this case to check for file
16769         existence instead of returning with an error code.
16770
16771 2011-08-01  Vincent Celier  <celier@adacore.com>
16772
16773         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
16774         High is above Source length.
16775
16776 2011-08-01  Robert Dewar  <dewar@adacore.com>
16777
16778         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
16779
16780 2011-08-01  Robert Dewar  <dewar@adacore.com>
16781
16782         * aspects.ads (Boolean_Aspects): New subtype.
16783         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
16784         for derived types in cases where the parent type and derived type have
16785         aspects.
16786         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
16787         with aspects when parent type also has aspects.
16788         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
16789         boolean expression at this point).
16790         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
16791         accordance with final decision on the Ada 2012 feature.
16792         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
16793
16794 2011-08-01  Matthew Heaney  <heaney@adacore.com>
16795
16796         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
16797
16798 2011-08-01  Pascal Obry  <obry@adacore.com>
16799
16800         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
16801         Fix Replace_Slice when High is above current string size.
16802         (Replace_Slice): Fix DL computation when High is above current
16803         string length.
16804
16805 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
16806
16807         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
16808
16809 2011-08-01  Matthew Heaney  <heaney@adacore.com>
16810
16811         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
16812         of node.
16813
16814 2011-08-01  Pascal Obry  <obry@adacore.com>
16815
16816         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
16817         reformatting.
16818
16819 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16820
16821         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
16822         access to protected subprograms in generic bodies.
16823         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
16824         protected type, indicate that the convention of the subprogram is
16825         Convention_Protected, because it may be used in subsequent declarations
16826         within the protected declaration.
16827
16828 2011-08-01  Vincent Celier  <celier@adacore.com>
16829
16830         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
16831         and "final" procedures when the name of the library is "ada", to avoid
16832         duplicate symbols "adainit" and "adafinal" in executables.
16833
16834 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16835
16836         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
16837         quantified expression that appears within a postcondition and uses the
16838         Ada2012 'Result attribute.
16839
16840 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16841
16842         * init.c (__gnat_error_handler): Cast reason to int.
16843         (__gnat_install_handler): Explain sa_sigaction use.
16844
16845 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
16846
16847         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
16848         subprogram has copy-in copy-out parameters, try to promote the mode of
16849         the return type if it is passed in registers.
16850
16851 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
16852
16853         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
16854         left operand as addressable.
16855
16856 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
16857
16858         * gcc-interface/gigi.h (build_function_stub): Remove.
16859         (build_return_expr): Likewise.
16860         (convert_vms_descriptor): Declare.
16861         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
16862         (build_function_stub): Move to...
16863         * gcc-interface/utils2.c (build_return_expr): Move to...
16864         * gcc-interface/trans.c (build_function_stub): ...here.
16865         (build_return_expr): ...here.
16866         (Subprogram_Body_to_gnu): Add local variable for language_function.
16867         Disconnect the parameter attributes cache, if any, once done with it.
16868         Call end_subprog_body only after setting the end_locus.
16869         Build the stub associated with the function, if any, at the very end.
16870         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
16871         variables and streamline control flow.
16872
16873 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
16874
16875         PR ada/49819
16876         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
16877         g-trasym-dwarf.adb.
16878
16879 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16880
16881         PR bootstrap/49794
16882         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
16883         Assign to act.sa_sigaction.
16884         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
16885         current->return_address to char * before arithmetic.
16886
16887 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16888
16889         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
16890         Correct argument types.
16891         Extract code from reason.
16892         (__gnat_install_handler): Assign to act.sa_sigaction.
16893
16894 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
16895
16896         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
16897         (GNAT1_OBJS): ...here.
16898
16899 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
16900
16901         PR ada/48711
16902         * g-socthi-mingw.adb (Fill): Fix formatting.
16903
16904         * gcc-interface/gigi.h: Move around comment.
16905
16906 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
16907
16908         PR ada/46350
16909         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
16910
16911 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
16912
16913         PR ada/48711
16914         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
16915
16916 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
16917
16918         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
16919         range comparison if Pmode is SImode.
16920
16921 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
16922             Eric Botcazou  <ebotcazou@adacore.com>
16923
16924         * adadecode.c: Wrap up in extern "C" block.
16925         * adadecode.h: Likewise.
16926         * adaint.c: Likewise.  Remove 'const' keyword.
16927         * adaint.h: Likewise.
16928         * argv.c: Likewise.
16929         * atree.h: Likewise.
16930         * cio.c: Likewise.
16931         * cstreams.c: Likewise.
16932         * env.c: Likewise.
16933         * exit.c: Likewise.
16934         * fe.h: Likewise.
16935         * final.c: Likewise.
16936         * init.c: Likewise.
16937         * initialize.c: Likewise.
16938         * link.c: Likewise.
16939         * namet.h: Likewise.
16940         * nlists.h: Likewise.
16941         * raise.c: Likewise.
16942         * raise.h: Likewise.
16943         * repinfo.h: Likewise.
16944         * seh_init.c: Likewise.
16945         * targext.c: Likewise.
16946         * tracebak.c: Likewise.
16947         * uintp.h: Likewise.
16948         * urealp.h: Likewise.
16949         * xeinfo.adb: Wrap up generated C code in extern "C" block.
16950         * xsinfo.adb: Likewise.
16951         * xsnamest.adb: Likewise.
16952         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
16953         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
16954         * gcc-interface/misc.c: Likewise.
16955         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
16956         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
16957         ada/targext.o here...
16958         (GNAT_ADA_OBJS): ...and not here.
16959         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
16960         (GNATBIND_OBJS): Reorder.
16961
16962 2011-07-07  Richard Henderson  <rth@redhat.com>
16963
16964         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
16965         dwarf2out_frame_init.
16966
16967 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
16968
16969         * gcc-interface/misc.c (gnat_init): Tweak previous change.
16970
16971 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16972
16973         PR target/39150
16974         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
16975
16976 2011-07-06  Richard Guenther  <rguenther@suse.de>
16977
16978         * gcc-interface/misc.c (gnat_init): Merge calls to
16979         build_common_tree_nodes and build_common_tree_nodes_2.
16980         Re-initialize boolean_false_node.
16981
16982 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
16983             Olivier Hainque  <hainque@adacore.com>
16984             Nicolas Setton  <setton@adacore.com>
16985
16986         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
16987         the type according to the ARTIFICIAL_P parameter.
16988         (create_type_decl): Likewise.
16989         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
16990
16991 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
16992
16993         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
16994         (gnatbind): Likewise.
16995
16996 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16997
16998         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
16999
17000 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17001
17002         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
17003         local variable throughout.  Remove useless call to Base_Type.
17004         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
17005         Take it also into account for the volatileness of the field.  Set the
17006         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
17007
17008 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17009
17010         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
17011         on a dereference built for a by-ref object if it has an address clause.
17012
17013 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17014
17015         * einfo.ads (Address_Taken): Document use for the second argument of
17016         Asm_Input and Asm_Output attributes.
17017         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
17018         argument is an entity name, then set Address_Taken on it.
17019         <Attribute_Asm_Output>: Likewise.
17020         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
17021         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
17022         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
17023         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
17024
17025 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
17026
17027         PR middle-end/46500
17028         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
17029
17030 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
17031
17032         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
17033         (ada/utils.o): Update dependencies.
17034         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
17035         ../../../libcpp/libcpp.a.
17036         * gcc-interface/utils.c: Include common/common-target.h.
17037         (process_attributes): Use targetm_common.have_named_sections.
17038
17039 2011-06-07  Richard Guenther  <rguenther@suse.de>
17040
17041         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
17042         set_sizetype.
17043
17044 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17045
17046         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
17047         TREE_THIS_NOTRAP flag.
17048
17049 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17050
17051         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
17052         Fix thinko.
17053
17054 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17055
17056         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
17057         constants whose full view has discriminants specially.
17058
17059 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17060
17061         * gcc-interface/utils.c: Include diagnostic.h.
17062         (gnat_write_global_declarations): Output debug information for all
17063         global type declarations before finalizing the compilation unit.
17064         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
17065
17066 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
17067
17068         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
17069
17070 2011-05-25  Kai Tietz  <ktietz@redhat.com>
17071
17072         * adaint.c (__gnat_to_canonical_file_list_next): Use array
17073         initialization instead of const/none-const pointer assignment.
17074
17075 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
17076
17077         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
17078         $(EXTRA_GNAT1_OBJS).
17079         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17080         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17081         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17082         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17083         libcommon-target.a instead of prefix.o.
17084
17085 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
17086
17087         PR ada/49097
17088         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17089
17090 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
17091
17092         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17093         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17094         instead of version.o.
17095
17096 2011-05-18  Kai Tietz  <ktietz@redhat.com>
17097
17098         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17099         boolean_false_node instead of integer_zero_node.
17100         (convert_with_check): Likewise.
17101         * gcc-interface/decl.c (choices_to_gnu): Likewise.
17102
17103 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
17104
17105         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17106         type of the parameter is an unconstrained array, convert the actual to
17107         the type of the formal in the In Out and Out cases as well.
17108
17109 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
17110
17111         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17112         call build_function_type_array or build_varargs_function_type_array
17113         instead.
17114         (create_subprog_type): Don't call build_function_type; call
17115         build_function_type_vec instead.
17116
17117 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
17118
17119         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17120         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17121         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17122
17123 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
17124
17125         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17126
17127         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17128         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17129
17130 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
17131
17132         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17133
17134 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
17135
17136         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17137         instead of accessing TYPE_ARG_TYPES directly.
17138         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17139
17140 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17141
17142         PR ada/48844
17143         * gcc-interface/gigi.h (get_variant_part): Declare.
17144         * gcc-interface/decl.c (get_variant_part): Make global.
17145         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17146         types have the same constant size, are record types and T1 has a
17147         variant part while T2 doesn't.
17148
17149 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17150
17151         * gcc-interface/utils.c (begin_subprog_body): Do not call
17152         get_pending_sizes.
17153         (end_subprog_body): Likewise.
17154
17155 2011-05-04  Richard Guenther  <rguenther@suse.de>
17156
17157         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17158         int_const_binop.
17159         (pos_to_constructor): Likewise.
17160
17161 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
17162             Eric Botcazou  <ebotcazou@adacore.com>
17163
17164         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17165         of build_function_type.  Adjust calls to...
17166         (build_raise_check): ...this.  Do not take a void_tree parameter.
17167         Call build_function_type_list instead of build_function_type.
17168         Fix head comment and swap couple of conditional blocks.
17169
17170 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
17171
17172         * gnatvsn.ads (Library_Version): Bump to 4.7.
17173         (Current_Year): Bump to 2011.
17174
17175 2011-04-29  Michael Matz  <matz@suse.de>
17176
17177         * gcc-interface/misc.c (gnat_handle_option): Set
17178         warn_maybe_uninitialized.
17179
17180 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
17181
17182         * gnat_ugn.texi (Complexity Metrics Control): Update link to
17183         the Watson/McCabe paper.
17184
17185 2011-04-23  Jim Meyering  <meyering@redhat.com>
17186
17187         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17188
17189 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
17190
17191         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17192         onto the new type.
17193
17194 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
17195
17196         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17197         parameter.
17198         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
17199         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17200         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17201         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17202         <all>: Do not set flags on the reused DECL node coming from an alias.
17203         Set DECL_IGNORED_P on the DECL node built for subprograms if they
17204         don't need debug info here...
17205         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17206         (gigi): Adjust calls to create_subprog_decl.
17207         (build_raise_check): Likewise.
17208         (establish_gnat_vms_condition_handler): Likewise.
17209         (Compilation_Unit_to_gnu): Likewise.
17210         (gnat_to_gnu): Likewise.
17211
17212 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
17213
17214         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17215         (NO_REORDER_ADAFLAGS): New variable.
17216         (EXTRA_GNATTOOLS): Always define.
17217         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17218         Clean up and adjust list of files compiled with special options.
17219         * gcc-interface/Make-lang.in: Likewise.
17220         (ada/decl.o): Cosmetical change.
17221         (ada/misc.o): Remove dependency on $(PLUGIN_H).
17222
17223 2011-04-20  Jim Meyering  <meyering@redhat.com>
17224
17225         * initialize.c (__gnat_initialize): Remove useless if-before-free.
17226
17227 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
17228
17229         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17230         $(CFLAGS) on the link line.
17231
17232 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
17233
17234         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17235         padded type built for the return type if it is unconstrained.
17236
17237 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
17238
17239         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17240
17241 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
17242
17243         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17244         before calling TREE_CHAIN.
17245         * gcc-interface/misc.c (gnat_init_ts): New function.
17246         (LANG_HOOKS_INIT_TS): Define.
17247
17248 2011-04-12  Martin Jambor  <mjambor@suse.cz>
17249
17250         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17251         instead of cgraph_node.
17252
17253 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
17254
17255         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17256         alignment on fields of the RETURN type built for the Copy-In Copy-Out
17257         mechanism.
17258
17259 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
17260
17261         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17262         of aggregate types that contain a placeholder.
17263
17264 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
17265
17266         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17267         TYPE_ARG_TYPES.
17268         (handle_type_generic_attribute): Likewise.
17269
17270 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
17271
17272         PR ada/47163
17273         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17274
17275 2011-04-04  Kai Tietz  <ktietz@redhat.com>
17276
17277         PR ada/47163
17278         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17279         to flag value.
17280
17281 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17282
17283         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17284         type case, do not strip a padding type around the array type.
17285
17286 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17287
17288         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17289         types.
17290
17291 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17292
17293         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17294         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17295         code for -feliminate-unused-debug-types.
17296         (gnat_post_options): Likewise.
17297
17298 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17299
17300         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17301         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17302         distinct copy.
17303
17304 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17305
17306         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17307         DECL_ARTIFICIAL flag on enumeration types.
17308
17309 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17310
17311         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17312         fat pointer types artificial unconditionally.
17313         <E_Array_Subtype>: Attach the base array type as a parallel type if it
17314         isn't artificial.
17315
17316 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17317
17318         * gcc-interface/gigi.h (get_dummy_type): Declare.
17319         (build_dummy_unc_pointer_types): Likewise.
17320         (finish_fat_pointer_type): Likewise.
17321         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17322         fat pointer type has been built, complete it in place.
17323         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17324         and thin pointers.  Remove useless variable.
17325         (finish_fat_pointer_type): Make global and move to...
17326         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17327         (get_dummy_type): New function.
17328         (build_dummy_unc_pointer_types): Likewise.
17329         (gnat_pushdecl): Propage the name to the anonymous variants only.
17330         (update_pointer_to): Only adjust the pointer types in the unconstrained
17331         array case.
17332
17333 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17334
17335         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17336         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17337         if this is a Taft amendment type and the full declaration is available.
17338         * gcc-interface/trans.c (process_type): Likewise.
17339         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17340         (process_freeze_entity): Likewise.
17341         * gcc-interface/utils.c (dummy_global): New static variable.
17342         (gnat_write_global_declarations): If there are types declared as used
17343         at the global level, insert them in the global hash table.
17344
17345 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17346
17347         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17348         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17349         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17350         copy.
17351         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
17352         flag of the type accordingly.
17353         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17354
17355 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17356
17357         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17358         finalizing types when updating the pointers to the designated type.
17359         <all>: Finalize the deferred types even if we didn't defer processing
17360         of incomplete types in this invocation.
17361
17362 2011-04-01  Olivier Hainque  <hainque@adacore.com>
17363             Nicolas Setton  <setton@adacore.com>
17364             Eric Botcazou  <ebotcazou@adacore.com>
17365
17366         * gcc-interface/misc.c (gnat_descriptive_type): New function.
17367         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17368
17369 2011-03-28  Kai Tietz  <ktietz@redhat.com>
17370
17371         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17372         Windows targets.
17373         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17374         * system-mingw.ads (System): Change ZCX_By_Default default to True.
17375
17376         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17377
17378 2011-03-28  Tristan Gingold  <gingold@adacore.com>
17379
17380         PR ada/44431
17381         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17382         Use ada output of gnatbind.
17383         (ada/b_gnatb.adb): Ditto.
17384         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17385         (ada.mostlyclean, ada.stage1)
17386         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17387         (ada.stagefeedback): Adjust.
17388         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17389         Use ada output of gnatbind.
17390         (b_gnatm.adb): Ditto.
17391         (b_gnatl.o, b_gnatm.o): New rules.
17392
17393 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17394
17395         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17396         for the padded type built to support a specified size or alignment.
17397
17398 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17399
17400         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17401         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17402         unconditionally to the end of the unit when the designated type is
17403         limited_with'ed.
17404         <all>: Rename local variable.  Attempt to un-defer types only and do it
17405         for limited_with'ed types as well.
17406         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
17407         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17408         consistently and remove redundant call to finalize_from_with_types.
17409
17410 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17411
17412         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17413         subprograms without a previous spec declared in the same unit.
17414         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17415         subprograms at the end of the unit instead of at the beginning.
17416         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17417         isn't public for the special handling of non-inline functions nested
17418         inside inline external functions.
17419
17420 2011-03-25  Jeff Law  <law@redhat.com>
17421
17422         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17423
17424 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
17425
17426         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17427         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17428         to compute Set_Size_Depends_On_Discriminant.
17429         (Layout_Type): Call it on array types in back-end layout mode.
17430         * sem_util.adb (Requires_Transient_Scope): Return true for array
17431         types only if the size depends on the value of discriminants.
17432         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17433         type if the RHS is a call to a function that returns an unconstrained
17434         type with default discriminant.
17435
17436 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
17437
17438         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17439         non-conversion to the nominal result type at the end.
17440
17441 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
17442
17443         * gcc-interface/trans.c (create_temporary): New function taken from...
17444         (create_init_temporary): ...here.  Call it.
17445         (call_to_gnu): Create the temporary for the return value early, if any.
17446         Create it for a function with copy-in/copy-out parameters if there is
17447         no target; in other cases of copy-in/copy-out, use another temporary.
17448         Push the new binding level lazily.  Add and rename local variables.
17449
17450 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
17451
17452         * gcc-interface/decl.c (validate_size): Improve comments and tweak
17453         error message.
17454         (set_rm_size): Likewise.
17455
17456 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
17457
17458         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17459         for the padded type built in order to support a specified alignment.
17460         Fix incorrect formatting.
17461
17462 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
17463
17464         PR bootstrap/48216
17465         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
17466
17467 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
17468
17469         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
17470         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
17471         to the end of the list.  Adjust recursive call.  Rename local variable.
17472         If REORDER is true, reorder components of the record type.
17473         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
17474         components_to_record and adjust the parameter list.
17475
17476 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
17477
17478         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
17479         disabled, use the variable for bounds of loop iteration scheme.
17480
17481 2011-03-21  Kai Tietz  <ktietz@redhat.com>
17482
17483         PR target/12171
17484         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
17485
17486 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
17487
17488         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
17489         out whether the expression is read-only.  Short-circuit placeholder
17490         case and rename a couple of local variables.
17491
17492 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
17493
17494         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
17495         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
17496         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
17497         (convert): Deal with conversions from a smaller form type specially.
17498
17499 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
17500
17501         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
17502         its argument, except for the special -I- switch.
17503
17504 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
17505
17506         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
17507         "Ada Issues".
17508
17509 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
17510
17511         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
17512
17513 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
17514
17515         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
17516         GNAT_FORMAL.
17517         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
17518         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
17519         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
17520         Do not generate the check directly, instead instantiate the template
17521         check present in the descriptor.
17522         (make_descriptor_field): Move around.
17523         (build_vms_descriptor32): Build a template check in the POINTER field.
17524         (build_vms_descriptor): Remove useless suffixes.
17525         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
17526
17527 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
17528
17529         PR bootstrap/47467
17530         * targext.c: Include target files if IN_RTS is defined.
17531
17532 2011-01-26  Richard Guenther  <rguenther@suse.de>
17533
17534         PR bootstrap/47467
17535         * targext.c: Include config.h.
17536         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
17537         dependency.
17538
17539 2011-01-04  Pascal Obry  <obry@adacore.com>
17540             Eric Botcazou  <ebotcazou@adacore.com>
17541
17542         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
17543
17544 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
17545
17546         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
17547         end-of-case on the end label and its associated gotos, if any.
17548
17549 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
17550
17551         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
17552         expressions of the parameter cache within the statement group of
17553         the CICO mechanism.
17554
17555 2011-01-04  Olivier Hainque  <hainque@adacore.com>
17556             Eric Botcazou  <ebotcazou@adacore.com>
17557
17558         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
17559         (set_end_locus_from_node): New function.
17560         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
17561         make and the function end_locus.
17562         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
17563         for the elaboration subprogram.
17564         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
17565         set the end_locus of the expression as well.
17566
17567 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
17568
17569         PR ada/47131
17570         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
17571         variables that are referenced in exception handlers volatile.
17572
17573
17574 \f
17575 Copyright (C) 2011 Free Software Foundation, Inc.
17576
17577 Copying and distribution of this file, with or without modification,
17578 are permitted in any medium without royalty provided the copyright
17579 notice and this notice are preserved.