OSDN Git Service

2011-12-05 Bob Duff <duff@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-12-05  Bob Duff  <duff@adacore.com>
2
3         * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
4         to the Comes_From_Source check, to deal properly with the case
5         of indirect inheritance of "=".
6
7 2011-12-05  Thomas Quinot  <quinot@adacore.com>
8
9         PR ada/51307
10         * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
11         not a macro.
12
13 2011-12-05  Thomas Quinot  <quinot@adacore.com>
14
15         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
16         information in SCOs.
17
18 2011-12-02  Eric Botcazou  <ebotcazou@adacore.com>
19             Thomas Quinot <quinot@adacore.com>
20
21         * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
22         (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
23         Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
24         which allows the file to be installed in adainclude.
25         * gcc-interface/Make-lang.in: Update dependencies.
26
27 2011-12-02  Javier Miranda  <miranda@adacore.com>
28
29         * sem_ch3.adb (Constrain_Access): Undo previous
30         patch for this routine. Required since the RM rule 3.7.1(7/3)
31         applies to all access types.
32
33 2011-12-02  Bob Duff  <duff@adacore.com>
34
35         * sem_ch6.adb: Minor comment fix.
36
37 2011-12-02  Joel Sherrill <joel.sherrill@oarcorp.com>
38
39         * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
40         for consistency with other ports.
41         * s-osinte-rtems.adb: Add body for dummy implementation of
42         pthread_rwlockattr_setkind_np().
43         * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
44         * terminals.c: Add __rtems__ conditionals to account for differences
45         in termios implementation.
46
47 2011-12-02  Robert Dewar  <dewar@adacore.com>
48
49         * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
50         a-cbmutr.ads: Minor reformatting.
51
52 2011-12-02  Hristian Kirtchev  <kirtchev@adacore.com>
53
54         * exp_dbug.adb: Comment reformatting.
55         (Get_External_Name): Use Reset_Buffers to reset the contents of
56         Name_Buffer and Homonym_Numbers.
57         (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
58         Homonym_Numbers before creating a new qualified name for a particular
59         entity.
60         (Reset_Buffers): New routine.
61
62 2011-12-02  Matthew Heaney  <heaney@adacore.com>
63
64         * a-cbmutr.ads (No_Node): Moved declaration from body to spec
65         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
66         from Root_Iterator.
67         (Child_Iterator): Derives from Root_Iterator.
68         (Finalize): Implemented as an override operation for Root_Iterator.
69         (First): Return value depends on Subtree component.
70         (Last): Component was renamed from Parent to Subtree.
71         (Next): Checks parameter value, and uses simplified loop.
72         (Iterate): Forwards to Iterate_Subtree.
73         (Iterate_Children): Component was renamed from Parent to Subtree.
74         (Iterate_Subtree): Checks parameter value
75
76 2011-12-02  Robert Dewar  <dewar@adacore.com>
77
78         * usage.adb: Add lines for -gnatw.n and -gnatw.N
79         (atomic sync info msgs).
80
81 2011-12-02  Steve Baird  <baird@adacore.com>
82
83         * sem_ch3.adb (Check_Completion): An Ada 2012
84         generic formal type doesn't require a completion.
85
86 2011-12-02  Eric Botcazou  <ebotcazou@adacore.com>
87
88         * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
89         packed array type if it is to be set on the array type used to
90         represent it.
91
92 2011-12-02  Robert Dewar  <dewar@adacore.com>
93
94         * gnat_rm.texi: Eliminate confusing use of type name.
95
96 2011-12-02  Thomas Quinot  <quinot@adacore.com>
97
98         * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
99         body that acts as spec, do not create a shallow copy of the context
100         clause for the synthetized spec (instead, use the same list as
101         in the body).
102
103 2011-12-02  Bob Duff  <duff@adacore.com>
104
105         * gnat_ugn.texi: Clarify usage of -p binder switch.
106
107 2011-12-02  Javier Miranda  <miranda@adacore.com>
108
109         * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
110         (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
111         (In_Generic_Body): Moved to sem_aux.
112         (Unit_Declaration_Node): Moved to sem_aux.
113         * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
114         documentation.
115         * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
116         rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
117         exp_ch13.adb: Add with-clause on Sem_Aux.
118
119 2011-12-02  Yannick Moy  <moy@adacore.com>
120
121         * sem_util.adb (Unique_Name): Reach through Unique_Entity to
122         get the name of the entity.
123         (Unique_Entity): Correct case for subprogram stubs.
124
125 2011-12-02  Yannick Moy  <moy@adacore.com>
126
127         * sem_ch3.adb (Check_Initialization): Do not emit warning on
128         initialization of limited type object in Alfa mode.
129
130 2011-12-02  Robert Dewar  <dewar@adacore.com>
131
132         * sinfo.ads: Minor reformatting.
133         * gnat_ugn.texi: Fix confusion in use of term "type name".
134
135 2011-12-02  Robert Dewar  <dewar@adacore.com>
136
137         * sem_ch6.adb: Minor change in error message.
138
139 2011-12-02  Robert Dewar  <dewar@adacore.com>
140
141         * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
142         reformatting.
143
144 2011-12-02  Javier Miranda  <miranda@adacore.com>
145
146         * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
147         static check of the rule of general access types whose designated
148         type has discriminants.
149         * sem_util.ads, sem_util.adb
150         (Effectively_Has_Constrained_Partial_View): New subprogram.
151         (In_Generic_Body): New subprogram.
152         * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
153         * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
154         subprogram In_Generic_Body.
155         * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
156         sem_ch4.adb: In addition, this patch replaces the occurrences of
157         Has_Constrained_Partial_View by
158         Effectively_Has_Constrained_Partial_View.
159
160 2011-12-02  Matthew Heaney  <heaney@adacore.com>
161
162         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
163         Position component.
164         (Finalize): Remove unnecessary access check.
165         (First): Forward to First_Child.
166         (Last): Forward to Last_Child.
167         (Iterate): Check preconditions for parent node parameter.
168         (Next): Forward to Next_Sibling.
169         (Previous): Forward to Previous_Sibling.
170
171 2011-12-02  Robert Dewar  <dewar@adacore.com>
172
173         * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
174         a-coormu.adb, a-convec.adb: Minor reformatting.
175
176 2011-12-02  Matthew Heaney  <heaney@adacore.com>
177
178         * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
179         * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
180         Iterator type.
181         (Finalize): Decrement busy counter.
182         (First, Last): Cursor return value depends on iterator node value.
183         (Iterate): Use start position as iterator node value.
184         (Next, Previous): Forward to corresponding cursor-based operation.
185
186 2011-12-02  Robert Dewar  <dewar@adacore.com>
187
188         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
189         a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
190         a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
191         a-ciorma.adb, a-cobove.adb: Minor reformatting.
192
193 2011-12-01  Jakub Jelinek  <jakub@redhat.com>
194
195         PR bootstrap/51201
196         * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
197
198 2011-11-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
199
200         * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
201
202 2011-11-23  Thomas Quinot  <quinot@adacore.com>
203
204         * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
205         only on platforms where this is required, as determined by
206         s-oscons.h.
207
208 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
209
210         * sem_ch9.adb: No check on entry index if error on index.
211
212 2011-11-23  Gary Dismukes  <dismukes@adacore.com>
213
214         * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
215         return statements nested inside an extended_return_statement.
216         * gcc-interface/Make-lang.in: Update dependencies.
217         * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
218
219 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
220
221         * freeze.adb (Freeze_All_Ent): An incomplete type is not
222         frozen by a subprogram body that does not come from source.
223
224 2011-11-23  Pascal Obry  <obry@adacore.com>
225
226         * s-oscons-tmplt.c: Add PTY_Library constant. It contains
227         the library for pseudo terminal support.
228         * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
229         pragma.
230
231 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
232
233         * sem_ch9.adb: No check on entry family index if generic.
234
235 2011-11-23  Thomas Quinot  <quinot@adacore.com>
236
237         * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
238         s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
239         s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
240         System.OS_Constants from shared spec of
241         System.Tasking.Primitive_Operations to the specific body variants
242         that really require this dependency.
243
244 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
245
246         * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
247         If the declaration has aspects, analyze them so they can be
248         properly rejected.
249
250 2011-11-23  Hristian Kirtchev  <kirtchev@adacore.com>
251
252         * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
253         a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
254         a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
255         a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
256         Add with and use clause for Ada.Finalization. Type
257         Iterator and Child_Iterator are now derived from Limited_Controlled.
258         (Finalize): New routine.
259         (Iterate): Add a renaming of counter Busy and
260         increment it. Update the return aggregate.
261         (Iterate_Children): Add a renaming of
262         counter Busy and increment it. Update the return aggregate.
263         (Iterate_Subtree): Add a renaming of counter Busy and increment
264         it. Update the return aggregate.
265         * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
266         type.
267         * a-cihama.ads: Type Map_Access is now a general access type.
268         * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
269         associated with the tree.
270         * a-cohama.ads: Type Map_Access is now a general access type.
271         * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
272         access type.
273         * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
274         to wrap the loop as this is done at an earlier step, during
275         analysis. The declarations of the iterator and the cursor use
276         the usual Insert_Action mechanism when added into the tree.
277         * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
278         Loop_Statement and replace all respective uses by N. Add local
279         constant Loc. Preanalyze the loop iterator to discover whether
280         it is a container iterator and if it is, wrap the loop in a
281         block. This ensures that any controlled temporaries produced
282         by the iteration scheme share the same lifetime of the loop.
283         (Is_Container_Iterator): New routine.
284         (Is_Wrapped_In_Block): New routine.
285         (Pre_Analyze_Range): Move spec and body to the library level.
286
287 2011-11-23  Sergey Rybin  <rybin@adacore.com frybin>
288
289         * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
290         that controls casing of type and subtype names.
291
292 2011-11-23  Yannick Moy  <moy@adacore.com>
293
294         * sem_ch3.adb: Minor addition of comments.
295
296 2011-11-23  Thomas Quinot  <quinot@adacore.com>
297
298         * prj-part.adb (Extension_Withs): New global variable,
299         contains the head of the list of WITH clauses from the EXTENDS
300         ALL projects for which virtual packages are being created.
301         (Look_For_Virtual_Projects_For): When recursing through
302         an EXTENDS ALL, add the WITH clauses of the extending
303         project to Extension_Withs.  When adding a project to the
304         Virtual_Hash, record the associated Extension_Withs list.
305         (Create_Virtual_Extending_Project): Add a copy of the appropriate
306         Extension_Withs to the virtual project.
307
308 2011-11-23  Thomas Quinot  <quinot@adacore.com>
309
310         * mlib-tgt-specific-vxworks.adb: Minor reformatting.
311
312 2011-11-23  Thomas Quinot  <quinot@adacore.com>
313
314         * Make-generated.in (Sdefault.Target_Name): Set to
315         $(target_noncanonical) instead of $(target) for consistency.
316
317 2011-11-23  Matthew Heaney  <heaney@adacore.com>
318
319         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
320         Iterator type as limited (First, Last): Cursor return value
321         depends on iterator node value (Iterate): Use start position as
322         iterator node value (Next, Previous): Forward to corresponding
323         cursor-based operation.
324
325 2011-11-23  Matthew Heaney  <heaney@adacore.com>
326
327         * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
328         Renamed from Ordered_Set_Iterator_Interfaces.
329         * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
330         Iterator type as limited (First, Last): Cursor return value
331         depends on iterator node value (Iterate): Use start position as
332         iterator node value (Next, Previous): Forward to corresponding
333         cursor-based operation.
334         * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
335         * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
336         node component (First, Next): Forward call to corresponding
337         cursor-based operation (Iterate): Representation of iterator no
338         longer has node component
339
340 2011-11-23  Hristian Kirtchev  <kirtchev@adacore.com>
341
342         * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
343         dereference has a proper type before the side effect removal
344         mechanism kicks in.
345         * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
346         where the base type of the subtype is a private itype created
347         to act as the partial view of a constrained record type. This
348         scenario manifests with equivalent class-wide types for records
349         with unknown discriminants.
350
351 2011-11-23  Jerome Guitton  <guitton@adacore.com>
352
353         * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
354
355 2011-11-23  Thomas Quinot  <quinot@adacore.com>
356
357         * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
358         reformatting/reorganization.
359
360 2011-11-23  Thomas Quinot  <quinot@adacore.com>
361
362         * g-htable.ads: Remove old comments.
363
364 2011-11-23  Thomas Quinot  <quinot@adacore.com>
365
366         * exp_imgv.adb: Minor reformatting.
367
368 2011-11-23  Robert Dewar  <dewar@adacore.com>
369
370         * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
371         family bounds out of range.
372
373 2011-11-23  Matthew Heaney  <heaney@adacore.com>
374
375         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
376         type as limited, and remove node component.
377         (First, Next): Forward call to corresponding cursor-based operation.
378         (Iterate): Representation of iterator no longer has node component.
379
380 2011-11-23  Yannick Moy  <moy@adacore.com>
381
382         * exp_util.adb: Revert previous change to remove side-effects in Alfa
383         mode, which is not the correct thing to do for renamings.
384
385 2011-11-23  Thomas Quinot  <quinot@adacore.com>
386
387         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
388         s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
389         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
390         s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
391         s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
392         s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
393         s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
394         s-taprop-posix.adb: Remove hard-coded clock ids;
395         instead, generate them in System.OS_Constants.
396         (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
397         id of the clock providing Ada.Real_Time.Monotonic_Clock.
398         * thread.c: New file.
399         (__gnat_pthread_condattr_setup): New function. For platforms where
400         CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
401         variable attribute.
402
403 2011-11-23  Yannick Moy  <moy@adacore.com>
404
405         * sem_ch3.adb: Restore the use of Expander_Active instead of
406         Full_Expander_Active, so that the evaluation is forced in Alfa
407         mode too. Otherwise, we end up with an unexpected insertion in a
408         place where it is not supposed to happen, on default parameters
409         of a call.
410
411 2011-11-23  Thomas Quinot  <quinot@adacore.com>
412
413         * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
414         for Pretty_Print, for use from within gdb.
415
416 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
417
418         * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
419         and the cursor declarations in a block, so that the loop variable
420         is local to the construct.
421
422 2011-11-23  Matthew Heaney  <heaney@adacore.com>
423
424         * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
425         type Reversible_Iterator'Class.
426         * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
427         Declare type as limited.
428         (First, Last): Return value depends on iterator's start node value.
429         (Next, Previous): Call corresponding Cursor-based operation.
430         (Iterate): Indicate whether complete or partial iteration
431
432 2011-11-23  Robert Dewar  <dewar@adacore.com>
433
434         * errout.adb: Minor reformattin (Finalize): Take templates into
435         account for warning suppression.
436         * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
437         * erroutc.adb: Minor reformatting (Finalize): Take generic
438         templates into account for warning suppress.
439         * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
440         * sem_prag.adb: Minor reformatting (Analyze_Pragma,
441         case Warnings): Provide Used parameter in call to
442         Set_Specific_Warnings_Off (to deal with generic template case).
443
444 2011-11-23  Pascal Obry  <obry@adacore.com>
445
446         * sem_prag.adb (Process_Convention): Better error message for
447         stdcall convention on dispatching calls.
448
449 2011-11-23  Gary Dismukes  <dismukes@adacore.com>
450
451         * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
452
453 2011-11-23  Javier Miranda  <miranda@adacore.com>
454
455         * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
456         implicit type conversion when the returned object is allocated
457         in the secondary stack and the type of the returned object is
458         an interface. Done to force generation of displacement of the
459         "this" pointer.
460
461 2011-11-23  Pascal Obry  <obry@adacore.com>
462
463         * impunit.adb: Add g-exptty and g-tty units.
464
465 2011-11-23  Robert Dewar  <dewar@adacore.com>
466
467         * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
468
469 2011-11-23  Robert Dewar  <dewar@adacore.com>
470
471         * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
472         reformatting.
473
474 2011-11-23  Yannick Moy  <moy@adacore.com>
475
476         * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
477         line of precondition/ postcondition/invariant.
478
479 2011-11-23  Pascal Obry  <obry@adacore.com>
480
481         * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
482         terminals.c: New files.
483         Makefile.rtl: Add these new files.
484         * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
485         * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
486         * gcc-interface/Make-lang.in: Update dependencies.
487
488 2011-11-21  Robert Dewar  <dewar@adacore.com>
489
490         * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
491         * sem_attr.adb (Eval_Attribute, case Width): Ditto.
492
493 2011-11-21  Thomas Quinot  <quinot@adacore.com>
494
495         * sinfo.ads: Minor reformatting.
496
497 2011-11-21  Yannick Moy  <moy@adacore.com>
498
499         * exp_util.adb: Minor reformatting. Update comments.
500
501 2011-11-21  Robert Dewar  <dewar@adacore.com>
502
503         * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
504         sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
505         sem_ch6.adb: Minor reformatting.
506
507 2011-11-21  Arnaud Charlet  <charlet@adacore.com>
508
509         * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
510         Unrestricted_Access to deal with fact that we properly detect the
511         error if Access is used.
512         * gcc-interface/Make-lang.in: Update dependencies.
513
514 2011-11-21  Yannick Moy  <moy@adacore.com>
515
516         * exp_prag.adb (Expand_Pragma_Check): Place error on first character
517         of expression.
518         * sem_res.adb (Resolve_Short_Circuit): Place error on first
519         character of expression.
520
521 2011-11-21  Yannick Moy  <moy@adacore.com>
522
523         * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
524
525 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
526
527         * exp_attr.adb (Expand_N_Attribute_Reference, case
528         Max_Size_In_Storage_Elements): Account for the size of the
529         hidden list header which precedes controlled objects allocated
530         on the heap.
531         * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
532         tables.
533         * sinfo.adb (Header_Size_Added): New routine.
534         (Set_Header_Size_Added): New routine.
535         * sinfo.ads: Add flag Controlled_Header_Added along with
536         associated comment.
537         (Header_Size_Added): New inlined routine.
538         (Set_Header_Size_Added): New inlined routine.
539         * s-stposu.adb (Allocate_Any_Controlled): Use
540         Header_Size_With_Padding to calculate the proper
541         size of the header.
542         (Deallocate_Any_Controlled): Use
543         Header_Size_With_Padding to calculate the proper size
544         of the header.  (Header_Size_With_Padding): New routine.
545         (Nearest_Multiple_Rounded_Up): Removed along with its uses.
546         * s-stposu.ads (Header_Size_With_Padding): New routine.
547
548 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
549
550         * aspects.adb: Aspect specifications are allowed on renaming
551         declarations
552         * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
553         subprogram renaming declaration
554
555 2011-11-21  Tristan Gingold  <gingold@adacore.com>
556
557         * env.c: Remove unused declaration.
558
559 2011-11-21  Pascal Obry  <obry@adacore.com>
560
561         * s-os_lib.ads: Minor style fix.
562
563 2011-11-21  Pascal Obry  <obry@adacore.com>
564
565         * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
566         identical, do nothing on Windows XP.
567
568 2011-11-21  Yannick Moy  <moy@adacore.com>
569
570         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
571         Use Full_Expander_Active instead of Expander_Active to control
572         the forced evaluation of expressions for the sake of generating
573         checks.
574
575 2011-11-21  Thomas Quinot  <quinot@adacore.com>
576
577         * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
578
579 2011-11-21  Tristan Gingold  <gingold@adacore.com>
580
581         * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
582         mode_read_binary, mode_write_binary, mode_append_binary,
583         mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
584         mode_read_binary_plus, mode_write_binary_plus,
585         mode_append_binary_plus): Remove unused declarations.
586
587 2011-11-21  Yannick Moy  <moy@adacore.com>
588
589         * gnat_rm.texi: Minor rewording.
590
591 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
592
593         * exp_imgv.adb (Expand_Width_Attribute): Emit
594         an error message rather than a warning when pragma Discard_Names
595         prevents the computation of 'Width. Do not emit an error through
596         the use of RE_Null.
597
598 2011-11-21  Javier Miranda  <miranda@adacore.com>
599
600         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
601         implicit type conversion when the type of the allocator is an
602         interface. Done to force generation of displacement of the "this"
603         pointer when required.
604
605 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
606
607         * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
608         functions, and is set when the expression is a completion of a
609         previous declaration.
610         * sem_ch6.adb (Analyze_Expression_Function): To determine properly
611         whether an expression function completes a previous declaration,
612         use Find_Corresponding_Spec, as when analyzing a subprogram body.
613
614 2011-11-21  Steve Baird  <baird@adacore.com>
615
616         * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
617         (Type_Access_Level): Improve comment.
618
619 2011-11-21  Eric Botcazou  <ebotcazou@adacore.com>
620
621         * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
622         means of -iquote unconditionally.
623
624 2011-11-21  Robert Dewar  <dewar@adacore.com>
625
626         * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
627         reformatting.
628
629 2011-11-21  Arnaud Charlet  <charlet@adacore.com>
630
631         * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
632         to deal with fact that we properly detect the error if Access
633         is used.
634
635 2011-11-21  Steve Baird  <baird@adacore.com>
636
637         * sem_util.ads: Update comment describing function
638         Deepest_Access_Level.
639         * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
640         generic formal type.
641         (Type_Access_Level): Return library level
642         for a generic formal type.
643         * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
644         calls with calls to Deepest_Type_Access_Level.
645         * sem_ch3.adb (Analyze_Component_Declaration): replace a
646         Type_Access_Level call with a call to Deepest_Type_Access_Level.
647         * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
648         Replace three Type_Access_Level calls with calls to
649         Deepest_Type_Access_Level.
650         (Resolve_Allocator): Replace a Type_Access_Level call with a call to
651         Deepest_Type_Access_Level.
652         (Valid_Conversion.Valid_Array_Conversion): Replace a
653         Type_Access_Level call with a call to Deepest_Type_Access_Level.
654
655 2011-11-21  Robert Dewar  <dewar@adacore.com>
656
657         * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
658
659 2011-11-21  Robert Dewar  <dewar@adacore.com>
660
661         * sinput.ads: Minor comment fix.
662
663 2011-11-21  Robert Dewar  <dewar@adacore.com>
664
665         * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
666         Last_Bit, Position): Handle 2005 case.
667
668 2011-11-21  Robert Dewar  <dewar@adacore.com>
669
670         * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
671         to deal with fact that we properly detect the error if Access
672         is used.
673         (Increment): Same fix.
674         * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
675         to deal with fact that we properly detect the error if Access
676         is used.
677         * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
678         volatile if the B component is volatile. This affects the check
679         for passing such a by reference volatile actual to a non-volatile
680         formal (which should be illegal)
681
682 2011-11-21  Robert Dewar  <dewar@adacore.com>
683
684         * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
685         size and alignment for foreign convention enumeration types.
686         * layout.adb (Set_Elem_Alignment): Redo setting of alignment
687         when size is set.
688
689 2011-11-21  Yannick Moy  <moy@adacore.com>
690
691         * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
692         Apply_Discriminant_Check, Apply_Divide_Check,
693         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
694         Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
695         Selected_Range_Checks): Replace reference to Expander_Active
696         with reference to Full_Expander_Active, so that expansion of
697         checks is not performed in Alfa mode
698
699 2011-11-21  Tristan Gingold  <gingold@adacore.com>
700
701         * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
702         fact that we properly detect the error if Access is used.
703
704 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
705
706         * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
707
708 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
709
710         * exp_imgv.adb: Add with and use clause for Errout.
711         (Expand_Width_Attribute): Emit a warning when in
712         configurable run-time mode to provide a better diagnostic message.
713
714 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
715
716         * s-finmas.adb (Finalize): Add comment concerning double finalization.
717
718 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
719
720         * sem_ch3.adb (Access_Definition): If the access definition
721         is itself the return type of an access to function definition
722         which is ultimately the return type of an access to subprogram
723         declaration, its scope is the enclosing scope of the ultimate
724         access to subprogram.
725
726 2011-11-21  Steve Baird  <baird@adacore.com>
727
728         * sem_res.adb (Valid_Conversion): If a conversion was legal
729         in the body of a generic, then the corresponding conversion is
730         legal in the expanded body of an instance of the generic.
731
732 2011-11-21  Robert Dewar  <dewar@adacore.com>
733
734         * sem_ch3.adb: Minor reformatting.
735
736 2011-11-21  Robert Dewar  <dewar@adacore.com>
737
738         * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
739         line terminator.
740         * sinput.ads: Add section on Handling of Source Line Terminators.
741         * types.ads (Line_Terminator): Adjust comments.
742
743 2011-11-21  Robert Dewar  <dewar@adacore.com>
744
745         * frontend.adb (Frontend): Capture restrictions from config files
746         * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
747         information
748         * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
749         references. This was noticed during debugging, but it is not
750         known if it causes real bugs.
751         * restrict.ads, restrict.adb: New routines to save/set/restore
752         non-partition-wide restrictions.
753         * s-rident.ads: Comment changes for new handling of
754         No_Elaboration_Code
755         * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
756         * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
757         attempt to save/restore non-partition-wide restrictions (now
758         this work is all done in Sem).
759         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
760         Special handling for restriction No_Elaboration_Code.
761
762 2011-11-21  Robert Dewar  <dewar@adacore.com>
763
764         * gnat_ugn.texi: Document new handling of restrictions pragmas.
765
766 2011-11-21  Pascal Obry  <obry@adacore.com>
767
768         * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
769         attribute as not needed.
770
771 2011-11-21  Robert Dewar  <dewar@adacore.com>
772
773         * sem_prag.adb: Minor reformatting.
774
775 2011-11-21  Pascal Obry  <obry@adacore.com>
776
777         * gnat_rm.texi: Document restriction for stdcall convention on
778         dispatching calls.
779
780 2011-11-21  Pascal Obry  <obry@adacore.com>
781
782         * sem_prag.adb (Process_Convention): A dispatching call cannot
783         have a stdcall calling convention.
784
785 2011-11-21  Pascal Obry  <obry@adacore.com>
786
787         * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
788         mutex attribute as not needed.
789         (Initialize_TCB): Likewise.
790         (Initialize): Likewise.
791
792 2011-11-21  Robert Dewar  <dewar@adacore.com>
793
794         * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
795         (Process_PPCs): Invariants only apply to public subprograms.
796
797 2011-11-21  Robert Dewar  <dewar@adacore.com>
798
799         * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
800         restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
801
802 2011-11-21  Robert Dewar  <dewar@adacore.com>
803
804         * a-finali.ads: Use pragma Pure_12 for this unit
805         * aspects.adb: Add aspect Pure_12
806         * aspects.ads: Add aspect Pure_12
807         * opt.ads: Add note on Pure_12
808         * par-prag.adb: Add dummy entry for Pure_12
809         * sem_prag.adb: Implement Pure_12 pragma
810         * snames.ads-tmpl: Add Entry for Pure_12
811
812 2011-11-21  Sergey Rybin  <rybin@adacore.com frybin>
813
814         * vms_data.ads: Add qualifiers for new gnatpp options
815         '--call_threshold' and '--par_threshold".
816         * gnat_ugn.texi: Add description for new gnatpp options
817         '--call_threshold' and '--par_threshold".
818
819 2011-11-21  Robert Dewar  <dewar@adacore.com>
820
821         * lib.ads: Minor reformatting.
822
823 2011-11-21  Robert Dewar  <dewar@adacore.com>
824
825         * lib-load.ads: Add comment.
826
827 2011-11-21  Gary Dismukes  <dismukes@adacore.com>
828
829         * sem_elab.adb: Minor reformatting
830
831 2011-11-21  Robert Dewar  <dewar@adacore.com>
832
833         * exp_ch6.adb: Minor reformatting.
834
835 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
836
837         * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
838         subprogram of the formal package is covered by an others
839         association with a box initialization, no check is needed
840         against the actual in the instantiation of the formal package.
841
842 2011-11-21  Robert Dewar  <dewar@adacore.com>
843
844         * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
845         elab warning from within precondition/postcondition etc.
846
847 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
848
849         * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
850         with out parameters may generate assignments to force constraint
851         checks. These checks must be properly placed in the code after the
852         declaration or statement that contains the call.
853
854 2011-11-21  Fedor Rybin  <frybin@adacore.com>
855
856         * gnat_ugn.texi: Adding info on current gnattest limitations an
857         support of -X option.
858
859 2011-11-21  Robert Dewar  <dewar@adacore.com>
860
861         * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
862
863 2011-11-20  Robert Dewar  <dewar@adacore.com>
864
865         * exp_ch6.adb, exp_util.adb: Minor reformatting
866
867 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
868
869         * sinfo.ads (Reference): Document that it is OK to set
870         Is_Known_Non_Null on a temporary initialized to a N_Reference
871         node.
872
873 2011-11-20  Matthew Heaney  <heaney@adacore.com>
874
875         * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
876         for Source list.
877
878 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
879
880         * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
881         Declare NEW_EXPR local variable and attach the
882         temporary to it.  Set Is_Known_Non_Null on the temporary.
883         (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
884         * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
885         the temporary created to hold the 'Reference of the expression,
886         if any.
887         * checks.adb (Install_Null_Excluding_Check): Bail out for the
888         Get_Current_Excep.all.all idiom generated by the expander.
889
890 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
891
892         * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
893         (f_gnat_ret): New macro.
894         (struct nrv_data): Add GNAT_RET.
895         (finalize_nrv_unc_r): New helper function.
896         (finalize_nrv): Add GNAT_RET parameter.  Copy it into DATA.  If the
897         function returns unconstrained, use finalize_nrv_unc_r as callback.
898         (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
899         RET_OBJ is non-null.
900         (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
901         (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
902         if optimization is enabled, record candidates for the Named Return
903         Value optimization.
904
905 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
906
907         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
908         (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
909         test.  Tweak default case.
910         <N_Goto_Statement>: Use better formatting.
911         * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
912         MODIFY_EXPR to initialize the storage.
913         (build_allocator): Likewise.
914
915 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
916
917         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
918         call to components_to_record.
919         (components_to_record): Add FIRST_FREE_POS parameter.  For the variant
920         part, reuse enclosing union even if there is a representation clause
921         on the Unchecked_Union.  If there is a variant part, compute the new
922         first free position, if any.  Adjust call to self.  Use a single field
923         directly only if it hasn't got a representation clause or is placed at
924         offset zero.  Create the variant part at offset 0 if all the fields
925         down to this level have a rep clause.  Do not chain the variant part
926         immediately and adjust downstream.
927         Do not test ALL_REP before moving the fields without rep clause to the
928         previous level.  Call create_rep_part to create the REP part and force
929         a minimum size on it if necessary.  Do not chain it immediately.
930         Create a fake REP part if there are fields without rep clause that need
931         to be laid out starting from FIRST_FREE_POS.
932         At the end, chain the REP part and then the variant part.
933         (create_rep_part): New function.
934         (get_rep_part): Minor tweak.
935         * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
936
937 2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
938
939         PR target/50678
940         * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
941         bug filed as radar #10302855 from __gnat_error_handler to...
942         (__gnat_adjust_context_for_raise) [Darwin]: ...here.  New function.
943         (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
944
945 2011-11-18  Tristan Gingold  <gingold@adacore.com>
946             Iain Sandoe  <iains@gcc.gnu.org>
947
948         PR target/49992
949         * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
950         * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
951
952 2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
953
954         * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
955         s-oscons.ads.
956         (OSCONS_CPP, OSCONS_EXTRACT): New.
957         (./bldtools/oscons/xoscons): New target.
958         ($(RTSDIR)/s-oscons.ads): Likewise.
959         (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
960         * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
961         * Make-generated.in: Remove machinery to generate xoscons and
962         ada/s-oscons.ads.
963
964 2011-11-10  Eric Botcazou  <ebotcazou@adacore.com>
965
966         * fe.h (Serious_Errors_Detected): New macro.
967         * gcc-interface/gigi.h (build_atomic_load): Declare.
968         (build_atomic_store): Likewise.
969         * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
970         (call_to_gnu): Add ATOMIC_SYNC parameter.  Use local variable.
971         Build an atomic load for an In or In Out parameter if needed.
972         Build an atomic store for the assignment of an Out parameter if needed.
973         Build an atomic store to the target if ATOMIC_SYNC is true.
974         (present_in_lhs_or_actual_p): New predicate.
975         (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
976         <N_Explicit_Dereference>: Likewise.
977         <N_Indexed_Component>: Likewise.
978         <N_Selected_Component>: Likewise.
979         <N_Assignment_Statement>: Adjust call to call_to_gnu.
980         Build an atomic store to the LHS if needed.
981         <N_Function_Call>:  Adjust call to call_to_gnu.
982         * gcc-interface/utils2.c: Include toplev.h.
983         (resolve_atomic_size): New static function.
984         (build_atomic_load): New function.
985         (build_atomic_store): Likewise.
986         * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
987
988 2011-11-07  Olivier Hainque  <hainque@adacore.com>
989
990         * sigtramp-ppcvxw.c: Add general comments.
991         (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
992         rules for r2 to r13, plus CTR and XER.
993         (CFA_REG): New, register number used to hold the local CFA.
994         (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
995         Make that 15, not 14, with documentation.
996         (TCR): Undef before definition, preventing conflict with reg number in
997         VxWorks headers.
998
999 2011-11-07  Robert Dewar  <dewar@adacore.com>
1000
1001         * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1002         aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1003         * gcc-interface/Make-lang.in: Update dependencies.
1004
1005 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1006
1007         * exp_ch6.adb: A tagged type is a legal actual for an aliased
1008         formal.
1009
1010 2011-11-07  Pascal Obry  <obry@adacore.com>
1011
1012         * g-socket.adb, g-socket.ads: Minor reformatting.
1013
1014 2011-11-07  Robert Dewar  <dewar@adacore.com>
1015
1016         * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1017
1018 2011-11-07  Robert Dewar  <dewar@adacore.com>
1019
1020         * gnat_ugn.texi: Add discussion of default mode handling of
1021         source representation with no -gnatW option given, in particular
1022         noting that NEL (next line) is not recognized in this context.
1023
1024 2011-11-07  Yannick Moy  <moy@adacore.com>
1025
1026         * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1027         generate a reference for a modification even when the modification
1028         does not come from source.
1029
1030 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1031
1032         * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1033         use the indexing attributes rather than the Element function,
1034         to obtain variable references.
1035         * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1036         Find_Aspect rather than iterating over representation
1037         items. Improve error message.
1038         * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1039         of Reference functions.
1040
1041 2011-11-07  Yannick Moy  <moy@adacore.com>
1042
1043         * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1044         body that has a corresponding parameter on the subprogram
1045         declaration, define the unique entity as being the declaration
1046         one.
1047
1048 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1049
1050         * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1051         return type of a function is the class-wide type of an incomplete
1052         type T, T can be a Taft-amendment type and does not have to be
1053         completed in the current private part.
1054
1055 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1056
1057         * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1058         that are inherited by default, and apply to the class-wide type
1059         as well.
1060         * aspects.adb (Find_Aspect): If the entity is class-wide and the
1061         aspect is inherited, use the aspect of the specific type.
1062
1063 2011-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
1064
1065         * exp_alfa.adb: Remove with and use clause for
1066         Exp_Ch8. Add with and use clause for Exp_Util.
1067         Remove local constant Disable_Processing_Of_Renamings.
1068         (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1069         object renamings has been reenabled.
1070         (Expand_Possible_Renaming):
1071         The expansion of identifier and expanded names has been
1072         reenabled. Perform the substitutions only for entities that
1073         denote an object.
1074         * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1075         * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1076         (Remove_Side_Effects): Alphabetize local variables. Add a guard
1077         to avoid the infinite expansion of an expression in Alfa mode. Add
1078         processing for function calls in Alfa mode.
1079         * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1080
1081 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1082
1083         * freeze.adb (Freeze_Entity): If the entity is an access to
1084         subprogram whose designated type is itself a subprogram type,
1085         its own return type must be decorated with size information.
1086
1087 2011-11-04  Arnaud Charlet  <charlet@adacore.com>
1088
1089         * gcc-interface/Make-lang.in: Update dependencies.
1090
1091 2011-11-04  Robert Dewar  <dewar@adacore.com>
1092
1093         * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1094         Avoid junk semicolon after argument of machine code Asm operand.
1095
1096 2011-11-04  Robert Dewar  <dewar@adacore.com>
1097
1098         * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1099         CodePeer mode or if restriction No_Exception_Handlers is present.
1100         * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1101         nodes in CodePeer mode or if restriction No_Exception_Handlers
1102         is present.
1103
1104 2011-11-04  Robert Dewar  <dewar@adacore.com>
1105
1106         * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1107
1108 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1109
1110         * sem_ch6.adb (Analyze_Subprogram_Specification): The
1111         specification is legal if it is a function that returns an
1112         abstract type, if it comes from an attribute renaming of a stream
1113         attribute of an abstract type.
1114
1115 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1116
1117         * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1118         components, check whether recursively check whether the prefix
1119         denotes an unaligned object.
1120
1121 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1122
1123         * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1124         the pragma is legal if it is an expanded name that denotes a
1125         procedure that be can called without parameters.
1126
1127 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1128
1129         * gnat_ugn.texi (Performance Considerations) <Vectorization
1130         of loops>: New sub-section.  <Other Optimization Switches>:
1131         Minor tweak.
1132
1133 2011-11-04  Robert Dewar  <dewar@adacore.com>
1134
1135         * gnat_rm.texi: Minor reformatting.
1136
1137 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1138
1139         * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1140         when Target and Source denote same non-empty object
1141         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1142
1143 2011-11-04  Robert Dewar  <dewar@adacore.com>
1144
1145         * exp_attr.adb: Minor reformatting.
1146
1147 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1148
1149         * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1150         discriminant assignment within an initialization proc if the
1151         record is an unchecked union, as it can only come from the
1152         initialization of an unchecked union component.
1153
1154 2011-11-04  Robert Dewar  <dewar@adacore.com>
1155
1156         * gnat_ugn.texi: Minor reformatting.
1157
1158 2011-11-04  Robert Dewar  <dewar@adacore.com>
1159
1160         * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1161         warning message.
1162
1163 2011-11-04  Robert Dewar  <dewar@adacore.com>
1164
1165         * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1166         var Save_Space).
1167
1168 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1169
1170         * exp_alfa.adb: Add local constant
1171         Disable_Processing_Of_Renamings;
1172         (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1173         the name evaluation of object renamings for now.
1174         (Expand_Potential_Renaming): Do not perform the substitution
1175         for now.
1176         * exp_util.adb (Remove_Side_Effects): Remove processing for
1177         functions with side effects in Alfa mode.
1178
1179 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1180
1181         * bindgen.adb (Gen_Elab_Calls): In the case
1182         of the AAMP target, set elaboration entities to 1 rather than
1183         incrementing.
1184
1185 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1186
1187         * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1188         proper entities on the ancestors of a child unit that appear
1189         in a limited_with clause, follow the unit links because the
1190         units are not analyzed and scope information is incomplete.
1191
1192 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1193
1194         * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1195         setting the Atomic_Sync_Required flag to detect one more case.
1196         * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1197         setting the Atomic_Sync_Required flag to exclude more cases,
1198         depending on the parent of the node to be examined.
1199
1200 2011-11-04  Bob Duff  <duff@adacore.com>
1201
1202         * g-excact.adb: Minor: use named notation.
1203
1204 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1205
1206         * sem_ch5.adb: Improve error messages for illegal iterators.
1207
1208 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1209
1210         * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1211         Sem_Util.
1212         (Expand_Alfa): Alphabetize cases on first choice. Add
1213         processing for object renaming declarations, identifiers and
1214         expanded names.
1215         (Expand_Alfa_N_In): Remove useless return.
1216         (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1217         (Expand_Potential_Renaming): New routine.
1218         * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1219         (Expand_N_Object_Declaration): Alphabetize local variables. Move
1220         Evaluate_Name out to the top level.
1221         * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1222         * exp_util.adb (Remove_Side_Effects): Add processing for
1223         functions with side effects in Alfa mode.
1224
1225 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1226
1227         * gnat_rm.texi: Add entries for
1228         restrictions No_Relative_Delay, No_Requeue_Statements and
1229         No_Stream_Optimizations.
1230
1231 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1232
1233         * sem_ch4.adb: Set type of entity in prefixed call, for
1234         completeness in a generic context.
1235
1236 2011-11-04  Yannick Moy  <moy@adacore.com>
1237
1238         * sem_prag.adb: Minor refactoring (renaming of a parameter).
1239
1240 2011-11-04  Robert Dewar  <dewar@adacore.com>
1241
1242         * atree.ads: Minor reformatting.
1243
1244 2011-11-04  Robert Dewar  <dewar@adacore.com>
1245
1246         * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1247         and -gnatd.e here
1248         * exp_ch2.adb (Expand_Entity_Reference): Use
1249         Activate_Atomic_Synchronization
1250         * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1251         Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1252         Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1253         Use Activate_Atomic_Synchronization
1254         * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1255         procedure.
1256         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1257         N_Selected_Component node
1258
1259 2011-11-04  Robert Dewar  <dewar@adacore.com>
1260
1261         * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1262
1263 2011-11-04  Yannick Moy  <moy@adacore.com>
1264
1265         * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1266         * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1267         In ASIS mode, no splitting of aspects between conjuncts.
1268         (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1269         expressions refer to the original aspect expressions through
1270         the Original_Node link. This is used in semantic analysis for
1271         ASIS mode, so that the original expression also gets analyzed.
1272         * sem_prag.adb (Preanalyze_TC_Args,
1273         Check_Precondition_Postcondition,
1274         Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1275         generated from a source aspect, also analyze the original aspect
1276         expression.
1277         (Check_Expr_Is_Static_Expression): New procedure
1278         similar to existing procedure Check_Arg_Is_Static_Expression,
1279         except called on expression inside pragma.
1280
1281 2011-11-04  Tristan Gingold  <gingold@adacore.com>
1282
1283         * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1284         Find_Project.Try_Path_Name.
1285         (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1286
1287 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1288
1289         * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1290
1291 2011-11-04  Pascal Obry  <obry@adacore.com>
1292
1293         * projects.texi: Add short description for qualifiers aggregate
1294         and aggregate library.
1295
1296 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1297
1298         * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1299         * a-cgaaso.adb: Replaced implementation with instantiation
1300         of Generic_Sort.
1301         * a-cogeso.ad[sb] This is the new Ada 2012 unit
1302         Ada.Containers.Generic_Sort
1303
1304 2011-11-04  Robert Dewar  <dewar@adacore.com>
1305
1306         * exp_ch2.adb (Expand_Entity_Reference): Do not set
1307         Atomic_Sync_Required for the case of a prefix of an attribute.
1308         * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1309         atomic synchronization
1310         (Expand_N_Indexed_Component): Ditto.
1311         (Expand_B_Selected_Component): Ditto.
1312         * sem_prag.adb (Process_Suppress_Unsuppress):
1313         Disable/Enable_Atomic_Synchronization can now occur for array
1314         types with pragma Atomic_Components.
1315         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1316         N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1317
1318 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1319
1320         * gnat_ugn.texi: Editorial corrections for gnattest section.
1321
1322 2011-11-04  Robert Dewar  <dewar@adacore.com>
1323
1324         * sem_prag.adb: Minor reformatting.
1325         * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1326         "***") usage.
1327         * exp_ch2.adb (Expand_Entity_Reference): Only set
1328         Atomic_Sync_Required on entities that are variables. Doesn't
1329         make any sense on anything else.
1330
1331 2011-11-04  Robert Dewar  <dewar@adacore.com>
1332
1333         * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1334         atomic sync to type case.
1335         * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1336         apply to types.
1337
1338 2011-11-04  Robert Dewar  <dewar@adacore.com>
1339
1340         * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1341         for call vs assign.
1342         * gcc-interface/Make-lang.in: Update dependencies.
1343
1344 2011-11-04  Robert Dewar  <dewar@adacore.com>
1345
1346         * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1347         compile time.
1348
1349 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1350
1351         * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1352         * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1353         a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1354         * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1355         a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1356         a-sulcin.ad[sb]: New files.
1357
1358 2011-11-04  Geert Bosch  <bosch@adacore.com>
1359
1360         * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1361         s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1362         i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
1363         s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
1364         * gcc-interface/Makefile.in: Remove libgnala and related objects.
1365
1366 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1367
1368         * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
1369         a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
1370         a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
1371         a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
1372         added to package.
1373
1374 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1375
1376         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
1377         that the type of the parameters isn't dummy in type_annotate_only mode.
1378
1379 2011-11-04  Robert Dewar  <dewar@adacore.com>
1380
1381         * sem_ch12.adb: Minor reformatting
1382
1383 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1384
1385         * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
1386         initialize elaboration entities to zero when specs are processed.
1387
1388 2011-10-28  Iain Sandoe  <iains@gcc.gnu.org>
1389             Eric Botcazou  <ebotcazou@adacore.com>
1390
1391         PR target/50678
1392         * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
1393         bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
1394
1395 2011-10-28  Eric Botcazou  <ebotcazou@adacore.com>
1396
1397         PR ada/50842
1398         * gcc-interface/Makefile.in (SYMDEPS): Delete.
1399         (LIBICONV): New variable.
1400         (LIBICONV_DEP): Likewise.
1401         (LIBS): Add $(LIBICONV).
1402         (LIBDEPS): Add $(LIBICONV_DEP).
1403         (EXTRA_GNATTOOLS_OBJS): Merge into...
1404         (TOOLS_LIBS): ...this.  Add $(LIBICONV).
1405
1406 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
1407
1408         * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
1409         variable.  Always create the elaboration variable, if any, as constant.
1410
1411 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
1412
1413         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
1414         make a packable type for fields of union types as well.
1415         <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
1416         (gnat_to_gnu_component_type): Try to make a packable type for fields
1417         of union types as well.
1418         (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
1419         (maybe_pad_type): Try to make a packable type for fields of union types
1420         as well.
1421         (gnat_to_gnu_field): Likewise.
1422         (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
1423         (set_rm_size): Likewise.
1424         (rm_size): Likewise.
1425         * gcc-interface/misc.c (gnat_type_max_size): Likewise.
1426         * gcc-interface/trans.c (add_decl_expr): Likewise.
1427         * gcc-interface/utils.c (finish_record_type): Likewise.
1428         * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
1429
1430 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
1431
1432         * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
1433         declared as atomic.  Move around conditionally executed code.
1434
1435 2011-10-24  Robert Dewar  <dewar@adacore.com>
1436
1437         * sem.adb (Initialize): Fix bug that blew up if called a second time.
1438
1439 2011-10-24  Robert Dewar  <dewar@adacore.com>
1440
1441         * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
1442         tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
1443
1444 2011-10-24  Robert Dewar  <dewar@adacore.com>
1445
1446         * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
1447         name in error msg.
1448
1449 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
1450
1451         * gnat_rm.texi: Add an entry for restriction No_Finalization.
1452
1453 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
1454
1455         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
1456         current instance is within the one that contains the generic,
1457         the freeze node for the current one must appear in the current
1458         declarative part. Ditto if the current instance is within another
1459         package instance. In both of these cases the freeze node of the
1460         previous instance is not relevant.
1461
1462 2011-10-24  Gary Dismukes  <dismukes@adacore.com>
1463
1464         * switch-m.adb (Normalize_Compiler_Switches): Add recognition
1465         of AAMP-specific switches -univ and -aamp_target.
1466
1467 2011-10-24  Robert Dewar  <dewar@adacore.com>
1468
1469         * a-tienau.adb (Put): Deal properly with limited line length.
1470
1471 2011-10-24  Robert Dewar  <dewar@adacore.com>
1472
1473         * sem_warn.adb, sem_ch12.adb: Minor reformatting.
1474
1475 2011-10-24  Tristan Gingold  <gingold@adacore.com>
1476
1477         * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
1478         on AIX.
1479
1480 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
1481
1482         * sem_ch12.adb (Earlier): make available globally. If both
1483         nodes have the same sloc, the freeze node that does not come
1484         from source is the later one.
1485         (True_Parent): Make available globally.
1486         (Previous_Instance): Subsidiary of
1487         Insert_Freeze_Node_For_Instance, to check whether the generic
1488         parent of the current instance is declared within a previous
1489         instance in the same unit or declarative  part, in which case the
1490         freeze nodes of both instances must appear in order to prevent
1491         elaboration problems in gigi.
1492         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
1493         freeze point, and the freeze node of a preceding instantiation
1494         must be inserted before it.
1495
1496 2011-10-24  Robert Dewar  <dewar@adacore.com>
1497
1498         * checks.ads, checks.adb: Add handling of Synchronization_Check
1499         * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
1500         atomic sync).
1501         * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
1502         flag Minor code reorganization.
1503         * opt.ads (Warn_On_Atomic_Synchronization): New switch.
1504         * par-prag.adb: Add dummy entries for pragma
1505         Disable/Enable_Atomic_Synchronization.
1506         * sem_prag.adb (Process_Suppress_Unsuppress): Handle
1507         case of Atomic_Synchronization specially (not suppressed
1508         by All_Checks, cannot be set from Source).
1509         (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
1510         * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
1511         * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
1512         entry for pragma Disable/Enable_Atomic_Synchronization
1513         * switch-c.adb: The -gnatp switch does not disable
1514         Atomic_Synchronization Add -gnatep switch to disable
1515         Atomic_Synchronization.
1516         * types.ads: Add entry for Synchronization_Check
1517         * usage.adb: Add line for -gnated switch
1518         * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
1519
1520 2011-10-24  Geert Bosch  <bosch@adacore.com>
1521
1522         * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
1523         at Integer'First.
1524
1525 2011-10-24  Robert Dewar  <dewar@adacore.com>
1526
1527         * sem_ch12.adb, s-gearop.adb: Minor reformatting.
1528
1529 2011-10-24  Robert Dewar  <dewar@adacore.com>
1530
1531         * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
1532         * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
1533
1534 2011-10-24  Emmanuel Briot  <briot@adacore.com>
1535
1536         * prj-proc.adb (Process_Expression_Variable_Decl): No special
1537         handling for Project_Path unless it is an attribute.
1538
1539 2011-10-24  Javier Miranda  <miranda@adacore.com>
1540
1541         * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
1542         (Install_Hidden_Primitives): New subprogram.
1543         (Restore_Hidden_Primitives): New subprogram.
1544         (Analyze_Formal_Package_Declaration,
1545         Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
1546         Invoke Check_Hidden_Primitives after every call to
1547         Analyze_Associations, and invoke Restore_Hidden_Primitives to
1548         restore their visibility after processing the instantiation.
1549         (Instantiate_Package_Body): Install visible primitives before
1550         analyzing the instantiation and uninstall them to restore their
1551         visibility when the instantiation has been analyzed.
1552         * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
1553         (Remove_Suffix): New subprogram
1554         * sem_ch3.adb (Derive_Subprogram): When handling
1555         a derived subprogram for the instantiation of a formal derived
1556         tagged type, inherit the dispatching attributes from the actual
1557         subprogram (not from the parent type).
1558
1559 2011-10-24  Vasiliy Fofanov  <fofanov@adacore.com>
1560
1561         * gnat_ugn.texi: Document explicit use of XDECGNAT library.
1562
1563 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
1564
1565         * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
1566         update its uses.
1567         (Build_Discriminant_Assignments): Add local variable D_Loc and update
1568         its uses.
1569         (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
1570         Var_Loc and update their uses.
1571         (Build_Record_Init_Proc): Code reformatting.
1572         (Increment_Counter): Add formal parameter Loc.
1573         (Make_Counter): Add formal parameter Loc.
1574
1575 2011-10-24  Eric Botcazou  <ebotcazou@adacore.com>
1576
1577         * sem_disp.adb (Covers_Some_Interface): Fix typo.
1578
1579 2011-10-24  Matthew Heaney  <heaney@adacore.com>
1580
1581         * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
1582         of predicate.
1583
1584 2011-10-24  Yannick Moy  <moy@adacore.com>
1585
1586         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
1587         Translate arguments in positional notation into pragma argument
1588         association arguments for the generated pragma.
1589
1590 2011-10-24  Arnaud Charlet  <charlet@adacore.com>
1591
1592         * exp_ch5.adb: Fix minor typo.
1593
1594 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
1595
1596         * sem_ch3.adb (Is_Visible_Component): Refine predicate for
1597         the case of a component reference in an instance body, when the
1598         enclosing type is private.
1599
1600 2011-10-24  Sergey Rybin  <rybin@adacore.com frybin>
1601
1602         * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
1603         driver for getting the project support into gnatelim section.
1604
1605 2011-10-24  Robert Dewar  <dewar@adacore.com>
1606
1607         * gnat_rm.texi: Minor correction to documentation on address clause.
1608
1609 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
1610
1611         * s-finmas.adb (Attach): Synchronize and call the unprotected version.
1612         (Attach_Unprotected): New routine.
1613         (Delete_Finalize_Address): Removed.
1614         (Delete_Finalize_Address_Unprotected): New routine.
1615         (Detach): Synchronize and call the unprotected version.
1616         (Detach_Unprotected): Remove locking.
1617         (Finalize): Add various comment on synchronization. Lock the critical
1618         region and call the unprotected versions of routines.
1619         (Finalize_Address): Removed.
1620         (Finalize_Address_Unprotected): New routine.
1621         (Set_Finalize_Address): Synchronize and call
1622         the unprotected version.
1623         (Set_Finalize_Address_Unprotected): New routine.
1624         (Set_Heterogeneous_Finalize_Address): Removed.
1625         (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
1626         (Set_Is_Heterogeneous): Add comment on synchronization and
1627         locking.
1628         * s-finmas.ads: Flag Finalization_Started is no longer atomic
1629         because synchronization uses task locking / unlocking.
1630         (Attach): Add comment on usage.
1631         (Attach_Unprotected): New routine.
1632         (Delete_Finalize_Address): Renamed to
1633         Delete_Finalize_Address_Unprotected.
1634         (Detach): Add comment on usage.
1635         (Detach_Unprotected): New routine.
1636         (Finalize_Address): Renamed to Finalize_Address_Unprotected.
1637         (Set_Finalize_Address): Add comment on usage.
1638         (Set_Finalize_Address_Unprotected): New routine.
1639         (Set_Heterogeneous_Finalize_Address): Renamed to
1640         Set_Heterogeneous_Finalize_Address_Unprotected.
1641         * s-stposu.adb (Allocate_Any_Controlled): Add local variable
1642         Allocation_Locked. Add various comments on synchronization. Lock
1643         the critical region and call the unprotected version of
1644         routines.
1645         (Deallocate_Any_Controlled): Add various comments on
1646         synchronization. Lock the critical region and call the unprotected
1647         version of routines.
1648
1649 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
1650
1651         * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
1652         are universal and must carry the corresponding type.
1653         * sem_eval.adb (Check_Non_Static_Context): If the type of the
1654         expression is universal real, as may be the case for a fixed point
1655         expression with constant operands in the context of a conversion,
1656         there is nothing to check.
1657         * s-finmas.adb: Minor reformatting
1658
1659 2011-10-23  Eric Botcazou  <ebotcazou@adacore.com>
1660
1661         * gcc-interface/decl.c (create_concat_name): Add explicit cast.
1662
1663 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1664
1665         * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
1666         TRACE): Reintroduce.
1667         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
1668         ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
1669
1670 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1671
1672         * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
1673         (unchecked_conversion_nop): Use it.
1674         (gnat_to_gnu): Likewise.
1675
1676 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1677
1678         * back_end.adb (Call_Back_End): Pass the maximum logical line number
1679         instead of the maximum physical line number to gigi.
1680         * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
1681
1682 2011-10-16  Tom Tromey  <tromey@redhat.com>
1683             Dodji Seketeli  <dodji@redhat.com>
1684
1685         * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
1686         public ordinary map interface.
1687
1688 2011-10-16  Tristan Gingold  <gingold@adacore.com>
1689
1690         * link.c (_AIX): Add support for GNU ld.
1691
1692 2011-10-16  Fedor Rybin  <frybin@adacore.com>
1693
1694         * gnat_ugn.texi: Fixing gnattest example names in the doc.
1695         Adding explanation to additional tests usage.
1696
1697 2011-10-16  Robert Dewar  <dewar@adacore.com>
1698
1699         * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
1700
1701 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
1702
1703         * a-convec.adb: Fix minor inconsistencies.
1704
1705 2011-10-16  Matthew Heaney  <heaney@adacore.com>
1706
1707         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
1708         Implementation): Specify pragma Implementation_Defined.
1709
1710 2011-10-15  Nicolas Roche  <roche@adacore.com>
1711
1712         * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
1713         either rtp-smp or ravenscar-cert-rtp runtimes.
1714
1715 2011-10-15  Bob Duff  <duff@adacore.com>
1716
1717         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1718         Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
1719         is available.
1720         (Expand_N_Extended_Return_Statement): Do not create a renaming of the
1721         build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
1722         available.
1723         (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
1724         pool only if RE_Root_Storage_Pool_Ptr is available.
1725         (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
1726         pool actual unless RE_Root_Storage_Pool_Ptr is available.
1727         * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
1728         formal only if RE_Root_Storage_Pool_Ptr is available.
1729
1730 2011-10-15  Matthew Heaney  <heaney@adacore.com>
1731
1732         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
1733         type): Specify Priority aspect for protected type.
1734
1735 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
1736
1737         * exp_disp.adb (Check_Premature_Freezing): If an untagged type
1738         is a generic actual, it is a subtype of a type that was frozen
1739         by the instantiation, and even if not marked frozen it does not
1740         affect the construction of the dispatch table.
1741
1742 2011-10-14  Robert Dewar  <dewar@adacore.com>
1743
1744         * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
1745         reformatting.
1746         * s-rident.ads: Add missing Compiler_Unit pragma.
1747
1748 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
1749
1750         * sem_res.adb: Minor reformatting.
1751
1752 2011-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
1753
1754         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1755         Code and comment reformatting. Use BIP_Task_Master
1756         when creating a _master.
1757         (BIP_Formal_Suffix): Code reformatting. Correct the case for
1758         BIP_Task_Master.
1759         (Make_Build_In_Place_Call_In_Object_Declaration): Use
1760         BIP_Task_Master when creating a reference to the enclosing
1761         function's _master formal.
1762         (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
1763         to the _master.
1764         * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
1765         (Needs_BIP_Finalization_Master): Alphabetized.
1766         * sem_ch6.adb (Create_Extra_Formals): Update the usage of
1767         BIP_Task_Master.
1768
1769 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
1770
1771         * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
1772         reject an aliased keyword on the object declaration of an extended
1773         return statement. In older versions of the language indicate
1774         that this is illegal in the standard.
1775
1776 2011-10-14  Pascal Obry  <obry@adacore.com>
1777
1778         * sem_util.adb, sem_ch4.adb: Minor reformatting.
1779
1780 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
1781
1782         * sem_ch13.adb: Recognize properly procedure calls that are
1783         transformed into code statements.
1784
1785 2011-10-14  Vincent Celier  <celier@adacore.com>
1786
1787         * projects.texi: Minor fix in project example.
1788
1789 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
1790
1791         * sem_util.adb: Return objects are aliased if their type is
1792         immutably limited as per AI05-0053.
1793
1794 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
1795
1796         * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
1797         expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
1798         Short_Circuit_And_Or expansion code (moved to sem_res).
1799         * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
1800         "and" and "or" operators as short-circuit "and then" and "or
1801         else", when pragma Short_Circuit_And_Or is active.
1802
1803 2011-10-13  Robert Dewar  <dewar@adacore.com>
1804
1805         * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
1806         sem_ch6.adb, exp_ch3.adb: Minor reformatting.
1807
1808 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
1809
1810         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
1811
1812 2011-10-13  Jerome Guitton  <guitton@adacore.com>
1813
1814         * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
1815
1816 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1817
1818         * a-convec.ads (Cursor): Minor reformatting.
1819         * a-convec.adb (Next): Fix minor inconsistencies.
1820         (Previous): Likewise.
1821
1822 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1823
1824         * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
1825         New predicate to determine whether some operations on an array
1826         type are available when the full view of its component may differ
1827         from the view of the point of the array declaration.
1828         * sem_ch4.adb (Find_Equality_Types): Use
1829         Available_Full_View_Of_Component.
1830         * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
1831
1832 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1833
1834         * sem_ch9.adb: Analyze aspects while discriminants of protected
1835         type are visible.
1836
1837 2011-10-13  Geert Bosch  <bosch@adacore.com>
1838
1839         * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
1840         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
1841         longer depend on an external library.
1842         * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
1843         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
1844         Update dependencies.
1845         * gcc-interface/Make-lang.in: Update dependencies. 
1846
1847 2011-10-13  Cyrille Comar  <comar@adacore.com>
1848
1849         * gnat_ugn.texi: Minor editing.
1850
1851 2011-10-13  Vincent Celier  <celier@adacore.com>
1852
1853         * projects.texi: Add documentation on packages and attributes
1854         that are inherited from a project being extended into the
1855         extended project.
1856
1857 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
1858
1859         * exp_ch3.adb (Build_Master): Rewritten.
1860         (Expand_N_Full_Type_Declaration): Reformat the declarative
1861         region. Update the call to Build_Master_Renaming.
1862         (Expand_Previous_Access_Type): Rewritten.
1863         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1864         Add local constant Result_Subt and update related usage.
1865         (Expand_N_Extended_Return_Statement): Add local constant
1866         Result_Subt and update related usage.
1867         * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
1868         new context detection mechanism.
1869         (Build_Class_Wide_Master):
1870         Use Insert_Action to add the renaming into the tree.
1871         (Build_Master_Entity): Rewritten to use the new context detection
1872         mechanism.
1873         (Build_Master_Renaming): Add formal parameter Ins_Nod
1874         and related usage. Use Insert_Action to add the renaming into the
1875         tree.
1876         (Find_Enclosing_Context): New subsidiary routine. Rather
1877         than relying on enclosing scopes, this routine looks at the
1878         tree structure to figure out the proper context for a _master
1879         or a _chain. This approach eliminates the issues with transient
1880         scopes which have not been converted into blocks.
1881         * exp_ch9.ads (Build_Master_Entity): Change parameter profile
1882         to better reflect the new usage. Update the related comment.
1883         (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
1884         the comment on usage.
1885         * sem_ch3.adb (Access_Definition): Update the calls to
1886         Build_Master_Entity and Build_Master_Renaming.
1887         * sem_ch6.adb (Create_Extra_Formals): Add local variable
1888         Full_Subt. Code reformatting.
1889         * sem_util.adb (Is_Iterator): Alphabetized.
1890         (Is_LHS): Alphabetized.
1891         (Is_Limited_Class_Wide_Type): New routine.
1892         * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
1893
1894 2011-10-13  Geert Bosch  <bosch@adacore.com>
1895
1896         * a-ngrear.adb (Solve): Make generic and move to
1897         System.Generic_Array_Operations.
1898         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1899         New generic solvers to  compute a vector resp. matrix Y such
1900         that A * Y = X, approximately.
1901         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1902         Implement using Forward_Eliminate and Back_Substitute
1903         * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
1904         on BLAS and LAPACK.
1905         * a-ngcoar.ads ("abs"): Fix return type to be real.
1906
1907 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1908
1909         PR ada/50589
1910         * s-linux-alpha.ads: Do not "with" Interfaces.C.
1911         * s-linux-sparc.ads: Likewise.
1912
1913 2011-10-13  Geert Bosch  <bosch@adacore.com>
1914
1915         * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
1916         returning a Real.
1917         * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
1918         and use formal.
1919         * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
1920         new profile.
1921
1922 2011-10-13  Geert Bosch  <bosch@adacore.com>
1923
1924         * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
1925         move to System.Generic_Array_Operations.
1926
1927 2011-10-13  Geert Bosch  <bosch@adacore.com>
1928
1929         * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
1930         * s-gearop.ads (L2_Norm): Change profile to be suitable for
1931         Complex_Vector
1932         * s-gearop.adb (L2_Norm): Reimplement using direct definition,
1933         not inner product
1934
1935 2011-10-13  Robert Dewar  <dewar@adacore.com>
1936
1937         * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
1938         prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
1939         sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
1940         par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
1941         par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
1942         exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
1943
1944 2011-10-13  Geert Bosch  <bosch@adacore.com>
1945
1946         * s-gearop.adb: Minor comment additions.
1947
1948 2011-10-13  Fedor Rybin  <frybin@adacore.com>
1949
1950         * gnat_ugn.texi: Add gnattest section.
1951
1952 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1953
1954         * freeze.adb: Do not create body of renaming if declaration has
1955         errors.
1956
1957 2011-10-13  Olivier Hainque  <hainque@adacore.com>
1958
1959         * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
1960         further, to the ppc+kernel case only.
1961
1962 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
1963
1964         * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
1965         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1966         Do not create a pool formal on .NET/JVM.
1967         (Expand_N_Extended_Return_Statement): Alphabetize local
1968         variables. Do not create a renaming of the build-in-place pool
1969         parameter on .NET/JVM.  (Make_Build_In_Place_Call_In_Allocator):
1970         Add the user-defined pool only on non-VM targets.
1971         (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
1972         local variables.  Do not add a pool actual on .NET/JVM.
1973         * sem_ch6.adb: Add with and use clause for Targparm.
1974         (Create_Extra_Formals): Add build-in-place pool formal only on
1975         non-VM targets.
1976         * rtsfind.ads: Alphabetize entries.
1977
1978 2011-10-13  Sergey Rybin  <rybin@adacore.com>
1979
1980         * gnat_ugn.texi: Minor correction.
1981
1982 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1983
1984         * sem_ch8.adb: Minor error message improvement.
1985
1986 2011-10-13  Robert Dewar  <dewar@adacore.com>
1987
1988         * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
1989
1990 2011-10-13  Gary Dismukes  <dismukes@adacore.com>
1991
1992         * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
1993         of a for loop for an enumeration type with an enumeration rep
1994         clause, which involves moving the original loop parameter into
1995         a nested block, the loop parameter's entity must be removed from
1996         the entity list of the loop scope.
1997
1998 2011-10-13  Bob Duff  <duff@adacore.com>
1999
2000         * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2001         that gets passed in the same cases where BIP_Alloc_Form is passed
2002         (caller-unknown-size results). BIP_Storage_Pool is used when
2003         BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
2004         to the user-defined storage pool is passed at the call site,
2005         and this pool is used in callee to allocate the result.
2006         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2007         version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2008         the additional BIP_Storage_Pool actual.
2009         (Expand_N_Extended_Return_Statement): Allocate the function
2010         result using the user-defined storage pool, if BIP_Alloc_Form =
2011         User_Storage_Pool.
2012         * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2013         * exp_ch4.adb: Don't overwrite storage pool set by
2014         Expand_N_Extended_Return_Statement.
2015         * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2016         for use in build-in-place function calls within allocators
2017         where the access type has a user-defined storage pool.
2018
2019 2011-10-13  Sergey Rybin  <rybin@adacore.com>
2020
2021         * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2022         literal casing.
2023
2024 2011-10-13  Nicolas Roche  <roche@adacore.com>
2025
2026         * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2027         with 'rtp'.
2028
2029 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2030
2031         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2032         account that an unchecked union type can be limited.
2033
2034 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2035
2036         * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2037         the use of the signal trampoline for PPC in the sjlj case as well.
2038         Add legitimate casts, preventing compile time warnings on the
2039         (sighandler *) profile.
2040
2041 2011-10-13  Yannick Moy  <moy@adacore.com>
2042
2043         * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2044         in Alfa mode.
2045
2046 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2047
2048         * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2049         expressions are legal limited return values if each one of their
2050         dependent expressions are legal.
2051
2052 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2053
2054         * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2055         if the prefix of the call is a qualified expression, rewrite as
2056         a code statement.
2057         * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2058         code statement is legal if it is a rewriting of a procedure call.
2059
2060 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2061
2062         * exp_aggr.adb (Flatten): If a component association has a box,
2063         assume that aggregate is not static.
2064         (Safe_Aggregate): If a component association in a non-limited
2065         aggregate has a box, assume that it cannot be expanded in place.
2066
2067 2011-10-13  Vincent Celier  <celier@adacore.com>
2068
2069         * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2070         Process_Project_Tree_Phase_1 with Packages_To_Check.
2071         (Process_Project_And_Apply_Config): Ditto
2072         * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2073         Remove default for argument Packages_To_Check.
2074         * prj-proc.adb (Recursive_Process): New argument
2075         Packages_To_Check.
2076         (Process): Ditto.
2077         (Process_Project_Tree_Phase_1): Ditto.
2078         (Recursive_Project.Process_Aggregated_Projects): Call
2079         Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2080         Packages_To_Check.
2081         * prj-proc.ads (Process): New argument Packages_To_Check
2082         (Process_Project_Tree_Phase_1): Ditto
2083
2084 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
2085
2086         * gcc-interface/Makefile.in: Fix typo.
2087
2088 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2089
2090         * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2091         Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
2092         Use sloc of defining identifier of farmal type declaration,
2093         as sloc of generated internal entity, to prevent misplaced
2094         references in ali.
2095
2096 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2097
2098         * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2099         is fully defined before checking that it is a numeric type.
2100
2101 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2102
2103         * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2104         association for component X has a box, then X is covered in the
2105         aggregate even if there is not default value for X in the type
2106         declaration, and X has to be default-initialized.
2107
2108 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2109
2110         * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2111         literals as referenced only if reference is in current source unit.
2112
2113 2011-10-13  Matthew Heaney  <heaney@adacore.com>
2114
2115         * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2116
2117 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2118
2119         * sigtramp.h: New file.  Prototype and spec of the signal
2120         trampoline to be called by an established handler to provide
2121         dwarf call frame info before the real signal processing code.
2122         * sigtramp-ppcvxw.c: New file.  Implementation of the signal
2123         trampoline for ppc-vxworks.
2124         * init.c (vxworks section): Use it for ppc.
2125
2126 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2127
2128         * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2129         (Check_Future_Identifier): New subprogram,
2130         factors duplicated code from Par.Ch2.P_Identifier and
2131         Par.Ch3.P_Defining_Identifier.
2132
2133 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2134
2135         * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2136         if we fail to initialize CV attributes or CV.
2137
2138 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2139
2140         * s-tasren.adb (Timed_Selective_Wait, case
2141         Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2142         we know abortion is already deferred.
2143
2144 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
2145
2146         * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2147         (Build_Master_Renaming (function)): Removed.
2148         (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2149         (Expand_Full_Type_Declaration): Alphabetize
2150         variables. Reformatting of code and comments. Rewrite the
2151         section on processing of anonymous access-to-task types in
2152         record components.
2153         * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2154         (Build_Master_Renaming): Moved to exp_ch9.
2155         * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2156         (Build_Master_Entity): Add formal parameter
2157         Use_Current. Reformatting of code and comments.
2158         (Build_Master_Renaming): Moved from exp_ch3.
2159         * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2160         exp_ch3. Update comment on usage.
2161         (Build_Master_Entity):
2162         Add formal parameter Use_Current. Update comment on usage.
2163         (Build_Master_Renaming): Moved from exp_ch3.
2164         * sem_ch3.adb (Access_Definition): Remove redundant code to
2165         create a _master and a renaming.
2166
2167 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2168
2169         * lib-xref.adb: Do no emit reference to overridden operation,
2170         if it is internally generated.
2171
2172 2011-10-13  Vincent Celier  <celier@adacore.com>
2173
2174         * bindgen.adb: Remove any processing related to g-trasym
2175         * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2176         * mlib-prj.adb: Remove any processing related to g-trasym.
2177
2178 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2179
2180         * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2181         * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2182         (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2183         (ADA_FLAGS_TO_PASS): Likewise.
2184         (COMMON_FLAGS_TO_PASS): New.
2185         (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
2186         native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2187         (gnatlib): Use COMMON_FLAGS_TO_PASS.
2188         (ada.install-common): Likewise.
2189         (install-gnatlib): Likewise.
2190         (install-gnatlib-obj): Likewise.
2191         (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2192         (gnat-cross): Delete.
2193         (gnatboot): Likewise.
2194         (gnatboot2): Likewise.
2195         (gnatboot3): Likewise.
2196         (gnatstage1): Likewise.
2197         (gnatstage2): Likewise.
2198         * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2199         (MOST_ADAFLAGS): Likewise.
2200         (LOOSE_CFLAGS): Likewise.
2201         (gnat-cross): Likewise.
2202         (GNATLIBFLAGS): Add -W -Wall.
2203         (GNATLIBCFLAGS_FOR_C): Likewise.
2204         * gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
2205         * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2206
2207 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2208
2209         * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2210         (push_range_check_info): Likewise.
2211         (gnat_to_gnu) <N_Code_Statement>: Likewise.
2212         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2213         (gnat_invariant_expr): Likewise.
2214         * gcc-interface/utils.c (compute_related_constant): Likewise.
2215         (max_size): Fix handling of SAVE_EXPR.
2216         (remove_conversions): Fix formatting.
2217
2218 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2219
2220         * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2221         (DECL_INDUCTION_VAR): New macro.
2222         (SET_DECL_INDUCTION_VAR): Likewise.
2223         * gcc-interface/gigi.h (convert_to_index_type): Declare.
2224         (gnat_invariant_expr): Likewise.
2225         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2226         parameter, set DECL_LOOP_PARM_P on it.
2227         * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2228         is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2229         * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2230         (struct range_check_info_d): New type.
2231         (struct loop_info_d): Likewise.
2232         (gnu_loop_stack): New stack.
2233         (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2234         built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
2235         is set, do not test DECL_RENAMED_OBJECT.
2236         (push_range_check_info): New function.
2237         (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2238         the label.  Reference the label and the iteration variable from it.
2239         Build the special induction variable in the unsigned version of the
2240         size type, if it is larger than the base type.  And attach it to the
2241         iteration variable if the latter isn't by-ref.  In the iteration scheme
2242         case, initialize the invariant conditions in front of the loop if
2243         deemed profitable.  Use gnu_loop_stack.
2244         (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2245         <N_Raise_Constraint_Error>: Always process the reason.  In the range
2246         check and related cases, and if loop unswitching is enabled, compute
2247         invariant conditions and push this information onto the stack.
2248         Do not translate again the condition if it has been already translated.
2249         * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2250         DECL_LOOP_PARM_P isn't set.
2251         (convert_to_index_type): New function.
2252         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2253         to convert the index from the base index type to sizetype.
2254         (gnat_invariant_expr): New function.
2255
2256 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2257
2258         * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2259         two parallel arrays to hold standard builtin declarations, and
2260         replace it with a function based interface that can support
2261         creating builtins on the fly in the future.
2262         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2263         (gnat_to_gnu): Ditto.
2264
2265 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
2266
2267         PR lto/50492
2268         * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2269         * gcc-interface/utils.c (global_context): New variable.
2270         (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2271         that are either public external or at top level.  Use "No" macro.
2272         (end_subprog_body): Call decl_function_context.
2273         (rest_of_subprog_body_compilation): Likewise.
2274
2275 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
2276
2277         * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2278         (rest_of_subprog_body_compilation): Likewise.
2279         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2280         test for useless conversions by means of gnat_useless_type_conversion.
2281         * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2282         (language_function): Add named_ret_val and other_ret_val.
2283         (f_named_ret_val): New macro.
2284         (f_other_ret_val): Likewise.
2285         (gigi): Call rest_of_subprog_body_compilation.
2286         (struct nrv_data): New structure.
2287         (is_nrv_p): New predicate.
2288         (prune_nrv_r): New helper function.
2289         (prune_nrv_in_block): New function.
2290         (finalize_nrv_r): New helper function.
2291         (finalize_nrv): New function.
2292         (return_value_ok_for_nrv_p): New predicate.
2293         (build_return_expr): If optimization is enabled, record candidates for
2294         the Named Return Value optimization.
2295         (build_function_stub): Call rest_of_subprog_body_compilation.
2296         (Subprogram_Body_to_gnu): If optimization is enabled and there are
2297         candidates, finalize the Named Return Value optimization.
2298         Call rest_of_subprog_body_compilation.
2299         (call_to_gnu): At the end, if a return value is needed, simplify the
2300         result before wrapping it up in a COMPOUND_EXPR.
2301         * gcc-interface/utils.c (end_subprog_body): Split into...
2302         (rest_of_subprog_body_compilation): ...this.  New function.
2303         (gnat_useless_type_conversion): Likewise.
2304
2305 2011-10-06  Thomas Quinot  <quinot@adacore.com>
2306
2307         * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2308         exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2309         g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2310         par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2311         sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2312         sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2313         s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2314         * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2315
2316 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
2317
2318         * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2319         references.
2320
2321 2011-10-06  Matthew Heaney  <heaney@adacore.com>
2322
2323         * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2324         (Dequeue_Only_High_Priority): Protected procedure now implemented.
2325
2326 2011-10-06  Vincent Celier  <celier@adacore.com>
2327
2328         * g-trasym.adb: Replace old implementation with the default
2329         implementation that returns list of addresses as "0x...".
2330         * g-trasym.ads: Update the list of platforms with the full
2331         capability.  Indicate that there is a default implementation
2332         for other platforms.
2333         * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2334         * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2335         is now a default implementation for all platforms without the full
2336         capability.
2337
2338 2011-10-06  Robert Dewar  <dewar@adacore.com>
2339
2340         * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2341         a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2342         a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2343         reorganization (use conditional expressions).
2344
2345 2011-10-06  Robert Dewar  <dewar@adacore.com>
2346
2347         * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2348         floating divide by zero.
2349
2350 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
2351
2352         * sem_ch6.adb: Limited interfaces that are not immutably limited
2353         are OK in return statements.
2354
2355 2011-09-30  Iain Sandoe  <iains@gcc.gnu.org>
2356
2357         * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2358         change to powerpc section.
2359
2360 2011-09-29  Iain Sandoe  <iains@gcc.gnu.org>
2361
2362         * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
2363         across the port.
2364
2365 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2366
2367         * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
2368         a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
2369         a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
2370         indefinite sets.
2371         * a-coorma.ads: Minor reformmating.
2372         * einfo.ads: Improve the comment describing the
2373         Directly_Designated_Type function.
2374         * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
2375         ordered maps.
2376         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
2377         dependencies.
2378
2379 2011-09-27  Robert Dewar  <dewar@adacore.com>
2380
2381         * a-comutr.ads: Minor reformatting.
2382
2383 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2384
2385         * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
2386         iterators to multiway trees.
2387
2388 2011-09-27  Yannick Moy  <moy@adacore.com>
2389
2390         * debug.adb (d.D): New option for strict Alfa mode.
2391         * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
2392         permissions as strictly as possible.
2393         * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
2394         Alfa mode, now, interpret ranges of base types like GNAT does; in
2395         strict mode, simply change the range of the implicit base Itype.
2396         * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
2397
2398 2011-09-27  Robert Dewar  <dewar@adacore.com>
2399
2400         * exp_ch9.adb: Minor comment fixes.
2401
2402 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2403
2404         * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
2405         trees.
2406
2407 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
2408
2409         * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
2410         instead of Directly_Designated_Type in the indirect array case.
2411
2412 2011-09-27  Robert Dewar  <dewar@adacore.com>
2413
2414         * exp_util.adb, exp_aggr.adb: Minor reformatting.
2415
2416 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2417
2418         * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
2419         on subtype declarations.
2420         * exp_aggr.adb: Minor comment update.
2421
2422 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
2423
2424         * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
2425         test in the N_Explicit_Dereference case.  Fold double logical
2426         negation in the special loop case and conditionalize it on
2427         Variable_Ref being true.
2428
2429 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
2430
2431         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
2432         single protected object and the selector is a discriminant or an
2433         entry family, this is a non-overloaded candidate interpretation,
2434         and possible primitive operations of the type must not be
2435         examined.
2436
2437 2011-09-27  Arnaud Charlet  <charlet@adacore.com>
2438
2439         * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
2440
2441 2011-09-27  Pascal Obry  <obry@adacore.com>
2442
2443         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
2444         s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
2445         Add dummy definitions for pthread_rwlock_t
2446         and pthread_rwlockattr_t on all POSIX platforms.
2447         * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
2448         reference.
2449         (Finalize_Lock): Likewise.
2450         (Write_Lock): Likewise.
2451         (Unlock): Likewise.
2452
2453 2011-09-27  Tristan Gingold  <gingold@adacore.com>
2454
2455         * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
2456         windows 64.
2457
2458 2011-09-27  Pascal Obry  <obry@adacore.com>
2459
2460         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
2461         s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
2462         s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
2463         s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
2464         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2465         s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
2466         s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
2467         s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
2468         s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
2469         s-taprop-posix.adb: Revert previous changes.
2470         (Lock): Now a record containing the two possible lock
2471         (mutex and read/write) defined in OS_Interface.
2472         * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
2473         'R' locking policy.
2474         (Initialize_Protection): Likewise.
2475         (Lock): Likewise.
2476         (Lock_Read_Only): Likewise.
2477         (Unlock): Likewise.
2478
2479 2011-09-27  Pascal Obry  <obry@adacore.com>
2480
2481         * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
2482         OS_Interface.pthread_rwlock_t.
2483
2484 2011-09-27  Robert Dewar  <dewar@adacore.com>
2485
2486         * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
2487         a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
2488         sem_ch5.adb, sem_util.adb: Minor reformatting.
2489
2490 2011-09-27  Pascal Obry  <obry@adacore.com>
2491
2492         * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
2493         (Finalize_Lock)[RW_Lock]: Likewise.
2494         (Write_Lock)[RW_Lock]: Likewise.
2495         (Unlock)[RW_Lock]: Likewise.
2496         (Read_Lock): Define L as RW_Lock (instead of Lock).
2497         * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
2498         routine for r/w lock.
2499         (Finalize_Lock)[RW_Lock]: Likewise.
2500         (Write_Lock)[RW_Lock]: Likewise.
2501         (Unlock)[RW_Lock]: Likewise.
2502         (Read_Lock): Define L as RW_Lock (instead of Lock).
2503
2504         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2505         s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
2506         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2507         (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
2508         routine for standard lock.
2509         (Finalize_Lock)[RW_Lock]: Likewise.
2510         (Write_Lock)[RW_Lock]: Likewise.
2511         (Unlock)[RW_Lock]: Likewise.
2512         (Read_Lock): Define L as RW_Lock (instead of Lock).
2513         * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
2514         in the record definition.
2515         * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
2516         lock for 'R' locking policy.
2517         (Initialize_Protection): Likewise.
2518         (Lock): Likewise.
2519         (Lock_Read_Only): Likewise.
2520         (Unlock): Likewise.
2521         * s-taspri-posix.ads (RW_Lock): New type defined as
2522         OS_Interface.pthread_rwlock_t.
2523
2524         * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
2525         s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
2526         s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
2527         s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
2528
2529 2011-09-27  Pascal Obry  <obry@adacore.com>
2530
2531         * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
2532
2533 2011-09-27  Pascal Obry  <obry@adacore.com>
2534
2535         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2536         s-osinte-hpux.ads, s-osinte-irix.ads,
2537         s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
2538         pthread_mutex_t.
2539         (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
2540         * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
2541         pthread_rwlockattr_init, pthread_rwlockattr_destroy,
2542         pthread_rwlockattr_setkind_np, pthread_rwlock_init,
2543         pthread_rwlock_destroy, pthread_rwlock_rdlock,
2544         pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
2545
2546 2011-09-27  Pascal Obry  <obry@adacore.com>
2547
2548         * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
2549         (RE_Id): Add RE_Lock_Read_Only.
2550         (RE_Unit_Table): Likewise.
2551         * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
2552         to lift restriction on first character. Handle now the
2553         Name_Concurrent_Readers_Locking where policy character is set to
2554         'R'.
2555         * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
2556         constant.
2557         * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
2558         read only lock for function in protected object.
2559         * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
2560         this routine is now used.
2561
2562 2011-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2563
2564         * s-atocou-x86.adb (Decrement): Use %;.
2565         (Increment): Likewise.
2566
2567 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2568
2569         * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
2570         dereference of the pointer to the storage area.  Remove useless type
2571         conversions and factor out common code.
2572
2573 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2574
2575         * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
2576         variable and use it throughout.
2577         <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
2578         <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
2579         first step.  Also convert to the unpadded type as a last step.
2580
2581 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2582
2583         * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
2584         DECL_CHAIN in comment.
2585         * gcc-interface/trans.c (gigi): Likewise.
2586         (Attribute_to_gnu): Likewise.
2587         (build_function_stub): Likewise.
2588         (gnat_to_gnu): Likewise.
2589         * gcc-interface/utils.c (create_subprog_decl): Likewise.
2590         (convert_vms_descriptor64): Likewise.
2591         (convert_vms_descriptor32): Likewise.
2592
2593 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2594
2595         * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
2596         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
2597         issues.  Use COMPLETE_TYPE_P in assertion.  Also set TREE_READONLY if
2598         the type of the record is TYPE_READONLY.
2599
2600 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2601             Robert Dewar  <dewar@adacore.com>
2602
2603         * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
2604         OUT formal parameter which is of an null-exclusion access subtype.
2605
2606 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2607
2608         * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
2609         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
2610         (gnat_to_gnu_param): Likewise.
2611         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
2612         maybe_unconstrained_array instead of doing the work manually.
2613         (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
2614         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
2615         is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
2616         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
2617         (gnat_stabilize_reference): Likewise.
2618
2619 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2620
2621         * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
2622         (SET_TYPE_NULL_BOUNDS): Likewise.
2623         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
2624         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
2625         * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
2626         pointer types.
2627         * gcc-interface/utils.c (create_var_decl_1): If the object is external,
2628         check that the initializer is a valid constant expression for use in
2629         initializing a static variable.  Add missing guard.
2630         (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
2631         (convert_to_fat_pointer): In the null fat pointer case, build a valid
2632         pointer for the bounds.
2633         * gcc-interface/utils2.c (compare_fat_pointers): New function.
2634         (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
2635
2636 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2637
2638         * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
2639         * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
2640         the by-ref case.  Do not set TREE_READONLY on a renamed object.  Set
2641         TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
2642         (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
2643         to the indirect case.
2644         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
2645         the TREE_THIS_NOTRAP flag.
2646
2647 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2648
2649         * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
2650         iteration scheme, always generate the do-while form if optimization
2651         is enabled.  Use more straightforward test at the end.
2652
2653 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2654
2655         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
2656         XNEW instead of xmalloc.  Do not build useless pointer type.
2657         <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
2658         * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
2659         * gcc-interface/utils2.c (build_unary_op): Remove local variable.
2660
2661 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2662
2663         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
2664         the alignment if this doesn't prevent BLKmode access to the object.
2665
2666 2011-09-24  Iain Sandoe  <iains@gcc.gnu.org>
2667
2668         * gcc-interface/Makefile.in (darwin): Do not issue the
2669         '-flat_namespace' linker flag during Ada build.
2670         * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
2671         default shared library options.
2672
2673 2011-09-19  Alexandre Oliva  <aoliva@redhat.com>
2674
2675         * gcc-interface/decl.c (annotate_value): Look up expression for
2676         insertion in the cache at the end.
2677
2678 2011-09-19  Arnaud Charlet  <charlet@adacore.com>
2679
2680         * gcc-interface/Make-lang.in: Update dependencies.
2681
2682 2011-09-19  Steve Baird  <baird@adacore.com>
2683
2684         * snames.ads-tmpl: Move declaration of Name_Annotate into range of
2685         configuration pragma names so that Is_Configuration_Pragma_Name
2686         will return True for Name_Annotate.  Make corresponding change in
2687         Pragma_Id enumeration type.  This is needed to allow an Annotate
2688         pragma to occur in a configuration pragma file (typically,
2689         a gnat.adc file).
2690         * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
2691         * gnat_rm.texi: Note that pragma Annotate may be used as a
2692         configuration pragma.
2693
2694 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
2695
2696         * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
2697         a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
2698
2699 2011-09-19  Yannick Moy  <moy@adacore.com>
2700
2701         * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
2702         for expansion of set membership.
2703         (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
2704         * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
2705         visible for use in Alfa expansion.
2706         * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
2707         variable in Alfa mode.
2708
2709 2011-09-19  Thomas Quinot  <quinot@adacore.com>
2710
2711         * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
2712
2713 2011-09-19  Thomas Quinot  <quinot@adacore.com>
2714
2715         * exp_ch9.adb: Minor reformatting.
2716
2717 2011-09-19  Hristian Kirtchev  <kirtchev@adacore.com>
2718
2719         * freeze.adb (Build_Renamed_Body): Generic subprograms
2720         instantiations cannot be poperly inlined by the compiler, do
2721         not set the Body_To_Inline attribute in such cases.
2722         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
2723         inlining-related flags from the generic subprogram declaration.
2724
2725 2011-09-19  Thomas Quinot  <quinot@adacore.com>
2726
2727         * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
2728         (Build_Stub_Type): Remove, instead copy components from
2729         System.Partition_Interface.RACW_Stub_Type.
2730         (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
2731         (Copy_Component_List): New subprogram.
2732
2733 2011-09-19  Yannick Moy  <moy@adacore.com>
2734
2735         * lib-xref.adb (Generate_Reference): Ignore references to
2736         constants in Standard.
2737
2738 2011-09-19  Robert Dewar  <dewar@adacore.com>
2739
2740         * err_vars.ads, errout.ads: Minor reformatting.
2741
2742 2011-09-19  Robert Dewar  <dewar@adacore.com>
2743
2744         * aspects.ads (Impl_Defined_Aspects): New array
2745         * lib-writ.adb (No_Dependences): New name for No_Dependence
2746         * restrict.adb (No_Dependences): New name for No_Dependence
2747         (Check_Restriction_No_Specification_Of_Aspect): New
2748         procedure.
2749         (Set_Restriction_No_Specification_Of_Aspect): New procedure
2750         (Restricted_Profile_Result): New variable
2751         (No_Specification_Of_Aspects): New variable
2752         (No_Specification_Of_Aspect_Warning): New variable
2753         * restrict.ads (No_Dependences): New name for No_Dependence
2754         (Check_Restriction_No_Specification_Of_Aspect): New procedure
2755         (Set_Restriction_No_Specification_Of_Aspect): New procedure
2756         * s-rident.ads: Add restriction
2757         No_Implementation_Aspect_Specifications, this is also added to
2758         the No_Implementation_Extensions profile.
2759         * sem_ch13.adb (Analyze_Aspect_Specifications): Check
2760         No_Implementation_Defined_Aspects
2761         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2762         * sem_prag.adb (Analyze_Aspect_Specifications): Check
2763         No_Implementation_Aspects
2764         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
2765         * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
2766
2767 2011-09-19  Yannick Moy  <moy@adacore.com>
2768
2769         * lib-xref.adb (Generate_Reference): Take into account multiple
2770         renamings for Alfa refs.
2771
2772 2011-09-19  Thomas Quinot  <quinot@adacore.com>
2773
2774         * g-socthi-mingw.adb: Minor reformatting.
2775
2776 2011-09-19  Yannick Moy  <moy@adacore.com>
2777
2778         * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
2779         expansion to False in mode Alfa
2780
2781 2011-09-19  Pascal Obry  <obry@adacore.com>
2782
2783         * mingw32.h: Remove obsolete code needed for old versions
2784         of MingW.
2785
2786 2011-09-19  Robert Dewar  <dewar@adacore.com>
2787
2788         * errout.ads: Minor reformatting.
2789
2790 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
2791
2792         * sem_ch6.adb (Analyze_Expression_Function): When the expression
2793         function is transformed into a declaration and a body, insert
2794         body at the end of the declarative part, to prevent premature
2795         freeze actions, and preserve original specification in the
2796         subprogram declaration.
2797
2798 2011-09-19  Vincent Celier  <celier@adacore.com>
2799
2800         * projects.texi: Minor editing.
2801
2802 2011-09-19  Robert Dewar  <dewar@adacore.com>
2803
2804         * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
2805         exp_aggr.adb: Minor reformatting.
2806
2807 2011-09-19  Yannick Moy  <moy@adacore.com>
2808
2809         * lib-xref.adb (Generate_Reference): Change entity referenced
2810         to underlying object if any, or else reference to the HEAP.
2811
2812 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
2813
2814         * gcc-interface/Make-lang.in: Update dependencies.
2815
2816 2011-09-15  Robert Dewar  <dewar@adacore.com>
2817
2818         * tree_io.ads: Minor reformatting.
2819         * a-intnam.ads: Fix bad header.
2820
2821 2011-09-15  Thomas Quinot  <quinot@adacore.com>
2822
2823         * a-exexpr-gcc.adb: Minor reformatting.
2824
2825 2011-09-15  Yannick Moy  <moy@adacore.com>
2826
2827         * sem_ch6.adb: Propagate information that an expression function comes
2828         from source (otherwise references to this entity are not stored).
2829
2830 2011-09-15  Robert Dewar  <dewar@adacore.com>
2831
2832         * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
2833         a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
2834         a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2835
2836 2011-09-15  Ed Schonberg  <schonberg@adacore.com>
2837
2838         * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
2839         if the expression function is not a completion, create a
2840         new specification for the generated declaration, and keep the
2841         original specification in the generated body. Shorter code also
2842         ensures that proper warnings are generated for unused formals
2843         in all cases.
2844
2845 2011-09-15  Sergey Rybin  <rybin@adacore.com>
2846
2847         * tree_io.ads: Update ASIS_Version_Number because of the changes
2848         in the tree structures for expression functions.
2849
2850 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
2851
2852         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2853         s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
2854         s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
2855         (CLOCK_REALTIME): Fix wrong value on some OSes.
2856         * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
2857
2858 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2859
2860         * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
2861         to unconstrained array case, deal with each branch of a COND_EXPR.
2862         * gcc-interface/utils2.c (build_allocator): Deal with each branch of
2863         a COND_EXPR in the initializer, if present.
2864
2865 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2866
2867         * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
2868         of an addressable type.
2869         * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
2870         Deal with those cases for which creating a temporary is mandatory.
2871
2872 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2873
2874         * gcc-interface/trans.c (call_to_gnu): Use local variable.  Make sure
2875         this is a real formal parameter before testing whether it is by ref.
2876
2877 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2878
2879         * gcc-interface/gigi.h (build_call_0_expr): Delete.
2880         (build_call_1_expr): Likewise.
2881         (build_call_2_expr): Likewise.
2882         (build_call_n_expr): New prototype.
2883         * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
2884         * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
2885         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2886         (Exception_Handler_to_gnu_zcx): Likewise.
2887         (gnat_to_gnu): Likewise.
2888         (build_binary_op_trapv): Likewise.
2889         * gcc-interface/utils2.c (build_call_0_expr): Delete.
2890         (build_call_1_expr): Likewise.
2891         (build_call_2_expr): Likewise.
2892         (build_call_n_expr): New function.
2893         (build_call_raise): Use build_call_n_expr.
2894         (build_call_raise_range): Likewise.
2895         (build_call_raise_column): Likewise.
2896         (build_call_alloc_dealloc_proc): Likewise.
2897         (maybe_wrap_malloc): Likewise.
2898         (maybe_wrap_free): Likewise.
2899
2900 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2901
2902         * gcc-interface/trans.c (build_return_expr): Use void_type_node for
2903         MODIFY_EXPR.
2904         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
2905         the result type is null if ENABLE_CHECKING.  Set operation_type at the
2906         end unconditionally if not set in the previous cases.
2907         Use build2 and void_type_node for MODIFY_EXPR.
2908         (build_allocator): Use NULL_TREE for MODIFY_EXPR.
2909
2910 2011-09-08  Eric Botcazou  <ebotcazou@adacore.com>
2911
2912         * gcc-interface/utils.c (unchecked_convert): Use a field of the right
2913         precision when converting to or from an integral type whose precision
2914         is not equal to its size.
2915
2916 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
2917
2918         * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
2919
2920 2011-09-07  Iain Sandoe  <iains@gcc.gnu.org>
2921
2922         * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
2923         implementation.
2924         * system-darwin-ppc64.ads: New file.
2925
2926 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
2927
2928         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
2929         reference to "-lm".
2930
2931 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
2932
2933         * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
2934         size switches to the link phase for shared libs.
2935
2936 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
2937
2938         * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
2939         LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
2940
2941 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2942
2943         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
2944         (gnattools, regnattools, cross-gnattools, canadian-gnattools,
2945         gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
2946         New targets.
2947         (TOOLS_FLAGS_TO_PASS): New.
2948         (../stamp-tools): Reintroduce, to avoid merge conflicts.
2949
2950 2011-09-06  Robert Dewar  <dewar@adacore.com>
2951
2952         * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
2953         name for Is_RM_Defined_Unit. Also several fixes to this unit.
2954
2955 2011-09-06  Robert Dewar  <dewar@adacore.com>
2956
2957         * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
2958         * s-rident.ads: New restriction No_Implementation_Units
2959         (this restriction is also part of the profile
2960         No_Implementation_Extensions)
2961         * sem_ch10.adb (Analyze_With_Clause): Add check for
2962         No_Implementation_Units restriction.
2963
2964 2011-09-06  Jerome Guitton  <guitton@adacore.com>
2965
2966         * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
2967         on vThreads.
2968
2969 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2970
2971         * s-solita.adb: Minor reformatting.
2972
2973 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2974
2975         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
2976         is a rewriting of an expression function does not freeze previous
2977         entities.
2978
2979 2011-09-06  Robert Dewar  <dewar@adacore.com>
2980
2981         * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
2982
2983 2011-09-06  Tristan Gingold  <gingold@adacore.com>
2984
2985         * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
2986         powerpc-wrs-vxworksae.
2987
2988 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2989
2990         * s-os_lib.ads (Spawn): Minor documentation clarification,
2991         Success is True for a zero exit status.
2992
2993 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2994
2995         * sem_ch5.adb: Add message for common iterator error.
2996
2997 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2998
2999         * exp_ch3.adb (Build_Initialization_Call): If the target is a
3000         selected component discriminated by a current instance, replace
3001         the constraint with a reference to the target object, regardless
3002         of whether the context is an init_proc.
3003
3004 2011-09-06  Robert Dewar  <dewar@adacore.com>
3005
3006         * exp_attr.adb: Descriptor_Size is never static.
3007
3008 2011-09-06  Robert Dewar  <dewar@adacore.com>
3009
3010         * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3011
3012 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3013
3014         * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3015         non-static.
3016
3017 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3018
3019         * sem_res.adb (Resolve): An expression that is the body of an
3020         expression function does not freeze.
3021
3022 2011-09-06  Matthew Heaney  <heaney@adacore.com>
3023
3024         * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3025         a-cuprqu.adb: Changed copyright notice to indicate current
3026         year only.
3027
3028 2011-09-06  Vincent Celier  <celier@adacore.com>
3029
3030         * prj.adb: Minor spelling error fix in comment
3031         * sem_res.adb: Minor reformatting
3032
3033 2011-09-06  Pascal Obry  <obry@adacore.com>
3034
3035         * sysdep.c (winflush_nt): Removed as not needed anymore.
3036         (winflush_95): Likewise.
3037         (winflush_init): Likewise.
3038         (winflush_function): Likewise.
3039         (getc_immediate_common): Remove call to winflush_function.
3040
3041 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3042
3043         * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3044         processing for Descriptor_Size.
3045         * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3046         to account for its broader usage.
3047         * sem_attr.adb (Analyze_Attribute): Change the error detection
3048         circuitry for Descriptor_Size as the attribute is now applicable
3049         to all types.
3050
3051 2011-09-06  Robert Dewar  <dewar@adacore.com>
3052
3053         * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3054
3055 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3056
3057         * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3058         in a parameter association must not set the Referenced flag on
3059         the formal.
3060         * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3061
3062 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3063
3064         * gnat_rm.texi: Add a section on attribute Descriptor_Size
3065
3066 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3067
3068         * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3069         gnatlink-re): Speed up by using -j0.
3070
3071 2011-09-06  Yannick Moy  <moy@adacore.com>
3072
3073         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3074         Set_Corresponding_Aspect when creating pragma from aspect.
3075         (Add_Predicates): Use new field Corresponding_Aspect.
3076         * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3077         name when present, for the purpose of issuing error messages;
3078         remove local procedure Error_Pragma_Arg_Alternate_Name.
3079         * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3080         N_Pragma node.
3081         (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3082         N_Pragma node.
3083
3084 2011-09-06  Robert Dewar  <dewar@adacore.com>
3085
3086         * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3087
3088 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3089
3090         * exp_ch6.adb (Build_Heap_Allocator): Add new
3091         local variable Desig_Typ. Code and comment reformatting. Add
3092         machinery to ensure that the allocation uses a fat pointer when
3093         the type of the return object is a constrained array and the
3094         function return type is an unconstrained array.
3095
3096 2011-09-06  Vincent Celier  <celier@adacore.com>
3097
3098         * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3099         parameters in subprograms.
3100
3101 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3102
3103         * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3104
3105 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3106
3107         * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3108         (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3109         subprogram.
3110         (System.Tasking.Primitive_Operations.Specific.Set): If argument
3111         is null, destroy task specific data, to make API consistent with
3112         other platforms, and thus compatible with the shared version
3113         of s-tpoaal.adb.
3114         (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3115         Document the above assumption.
3116
3117 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3118
3119         * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3120         variable for type of return value when return type is
3121         unconstrained and context is an assignment.
3122
3123 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3124
3125         * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3126         class-wide operation if expansion is not enabled.
3127
3128 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3129
3130         * checks.adb (Apply_Scalar_Range_Check): Deal with access
3131         type prefix.
3132
3133 2011-09-06  Yannick Moy  <moy@adacore.com>
3134
3135         * sem_ch13.adb (Analyze_Aspect_Specifications, case
3136         Aspect_Invariant): Do not issue error at this point on illegal
3137         pragma placement, as this is checked later on when analyzing
3138         the corresponding pragma.
3139         * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3140         similar to Error_Pragma_Arg, except the source name of the
3141         aspect/pragma to use in warnings may be equal to parameter
3142         Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3143         message to distinguish source name of pragma/aspect, and whether
3144         the illegality resides in the type being public, or being private
3145         without a public declaration
3146
3147 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3148
3149         * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3150         size check (fd_set is implemented differently on that platform).
3151
3152 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3153
3154         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3155         s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3156         s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3157         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3158         (ATCB_Allocation): New subpackage of
3159         System.Tasking.Primitive_Operations, shared across all targets
3160         with full tasking runtime.
3161         (ATCB_Allocation.New_ATCB): Moved there (from target specific
3162         s-taprop bodies).
3163         (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3164         taking care of establishing a local temporary ATCB if the one
3165         being deallocated is Self, to avoid a reference to the freed
3166         ATCB in Abort_Undefer.
3167
3168 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3169
3170         * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3171         terminated, mark it for deallocation upon termination.
3172         (Terminate_Task): Call Free_Task again if the task is marked
3173         for automatic deallocation upon termination.
3174
3175 2011-09-06  Robert Dewar  <dewar@adacore.com>
3176
3177         * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3178         a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3179         a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3180         a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3181         a-intnam-solaris.ads, a-intnam-tru64.ads,
3182         a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3183         cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3184         * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3185         * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3186         * s-rident.ads: Add new restriction No_Implementation_Identifiers
3187         Add new profile No_Implementation_Extensions
3188         * sem_prag.adb: Implement pragma Implementation_Defined Implement
3189         profile No_Implementation_Extensions
3190         * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3191         Check violation of restriction No_Implementation_Identifiers
3192         * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3193         Add entry for Name_No_Implementation_Extensions
3194
3195 2011-09-06  Robert Dewar  <dewar@adacore.com>
3196
3197         * impunit.ads: Minor reformatting.
3198
3199 2011-09-06  Robert Dewar  <dewar@adacore.com>
3200
3201         * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3202
3203 2011-09-06  Pascal Obry  <obry@adacore.com>
3204
3205         * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3206         types.
3207
3208 2011-09-06  Robert Dewar  <dewar@adacore.com>
3209
3210         * g-socket.adb: Minor reformatting
3211
3212 2011-09-06  Javier Miranda  <miranda@adacore.com>
3213
3214         * ali.adb (Scan_ALI): Add missing support to load references of
3215         entities imported from other languages.
3216         * ali.ads (Xref_Record): Adding new fields to store the language and
3217         name of an imported entity.
3218         * lib-xref.adb (Output_Import_Export_Info): Fix typo
3219         in comment.
3220
3221 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3222
3223         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3224         is allowed on a full type declaration if it is the completion of
3225         a private declarations.
3226         * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3227         aspect is allowed on a full type declaration in the private part
3228         of a package.
3229
3230 2011-09-06  Robert Dewar  <dewar@adacore.com>
3231
3232         * sem_ch8.ads: Minor reformatting
3233
3234 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3235
3236         * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3237         Guard against socket values that are not in [0;FD_SETSIZE[
3238
3239 2011-09-06  Robert Dewar  <dewar@adacore.com>
3240
3241         * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3242         reformatting.
3243
3244 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3245
3246         * s-linux-alpha.ads: Minor reformatting
3247         * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3248         Use sizeof instead of corresponding C defines in s-oscons template.
3249
3250 2011-09-06  Vadim Godunko  <godunko@adacore.com>
3251
3252         * a-convec.ads, a-iteint.ads: Minor reformatting.
3253
3254 2011-09-06  Vincent Celier  <celier@adacore.com>
3255
3256         * projects.texi: Add menus and @node lines.
3257
3258 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3259
3260         * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3261         where the return type is an unconstrained array and the context
3262         is an assignment. Optimize the case when the target of the
3263         assignment is a selected component.
3264
3265 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3266
3267         * s-solita.adb: Update comments.
3268
3269 2011-09-06  Pascal Obry  <obry@adacore.com>
3270
3271         * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3272         s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3273         * s-oscons-tmplt.c: Add support for generating pthread related
3274         types size on GNU/Linux as done for Darwin.
3275         * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3276
3277 2011-09-06  Robert Dewar  <dewar@adacore.com>
3278
3279         * exp_ch6.adb: Fix minor typo.
3280
3281 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3282
3283         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3284         (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3285         (Double_Size_Of): Alphabetized. Update the comment on usage.
3286         (Make_Finalize_Address_Stmts): Update comments and reformat code.
3287         (Nearest_Multiple_Rounded_Up): New routine.
3288         (Size_Of): Update comment on usage. The generated expression now
3289         accounts for alignment gaps by rounding the size of the type to the
3290         nearest multiple rounded up of the type's alignment.
3291
3292 2011-09-06  Robert Dewar  <dewar@adacore.com>
3293
3294         * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3295
3296 2011-09-06  Steve Baird  <baird@adacore.com>
3297
3298         * exp_ch4.adb (Expand_Allocator_Expression): Look through
3299         derived subprograms in checking for presence of an
3300         Extra_Accessibility_Of_Result formal parameter.
3301         * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3302         checking for presence of an Extra_Accessibility_Of_Result formal
3303         parameter.
3304         (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3305         case where the Parameter_Associatiations attribute is already set,
3306         but set to an empty list.
3307         (Needs_Result_Accessibility_Level):
3308         Unconditionally return False. This is a temporary
3309         change, disabling the Extra_Accessibility_Of_Result
3310         mechanism.
3311         (Expand_Simple_Function_Return): Check for
3312         Extra_Accessibility_Of_Result parameter's presence instead of
3313         testing Ada_Version when generating a runtime accessibility
3314         check which makes use of the parameter.
3315
3316 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3317
3318         * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3319         expression in a given case alternative must be attached to the
3320         statement list of the ccrresponding case statement alternative
3321         They cannot be propagated ahead of the case statement, because
3322         the validity of the expression that generated the action may
3323         hold only for that alternative.
3324
3325 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3326
3327         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3328         (Alignment_Of): Remove the code for strict alignment targets.
3329         (Double_Alignment_Of): Removed.
3330         (Double_Size_Of): New routine.
3331         (Make_Finalize_Address_Stmts): Change the
3332         calculation of the dope's size.  Update relevant comments.
3333         (Size_Of): New routine.
3334
3335 2011-09-06  Steve Baird  <baird@adacore.com>
3336
3337         * einfo.ads (Extra_Accessibility): Update associated comment to use
3338         the term "present" correctly ("present" just means that it is not
3339         an error to query the value of the attribute - it does not imply
3340         that the value must be non-null).
3341         (Extra_Constrained): Ditto.
3342         (Is_Visible_Formal): Ditto.
3343         (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3344         (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3345         * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3346         * exp_ch6.adb (Expand_Call): The callee may require an
3347         Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3348         < Ada_2012. This can occur if the callee is exported from a Gnat
3349         runtimes unit. Also improve a comment.
3350
3351 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3352
3353         * exp_ch7.adb: Add with and use clauses for Get_Targ.
3354         (Alignment_Of): Rename formal parameter Some_Typ
3355         to Typ, update related comment. Use the allocator alignment on
3356         strict alignment targets such as SPARC.
3357         (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3358         related comment.
3359
3360 2011-09-06  Gary Dismukes  <dismukes@adacore.com>
3361
3362         * sem_ch9.adb (Check_Interfaces): Test
3363         Is_Limited_Type rather than Is_Limited_Record when checking that
3364         the partial view of a synchronized full view must be limited.
3365
3366 2011-09-06  Emmanuel Briot  <briot@adacore.com>
3367
3368         * g-comlin.adb (Free): Fix memory leak.
3369
3370 2011-09-06  Robert Dewar  <dewar@adacore.com>
3371
3372         * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
3373
3374 2011-09-06  Steve Baird  <baird@adacore.com>
3375
3376         * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
3377         (Ada2012) cases described in AI05-0234 where the accessibility
3378         level of a function result is "determined by the point of
3379         call", an implicit parameter representing that accessibility
3380         level is passed in. Extra_Accessibilty_Of_Result yields this
3381         additional formal parameter. Extra_Accessibility_Of_Result
3382         is analogous to the existing Extra_Accessibility
3383         function used in the implementation of access parameters.
3384         (Set_Extra_Accessibility_Of_Result): New procedure; sets
3385         Extra_Accessibility_Of_Result attribute.
3386         * einfo.adb (Extra_Accessibility_Of_Result): New function.
3387         (Set_Extra_Accessibility_Of_Result): New procedure.
3388         (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
3389         * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
3390         an accessibility level literal to Natural; introduce a nested
3391         function, Make_Level_Literal, to do this.
3392         * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
3393         determines whether a given function (or access-to-function
3394         type) needs to have an implicitly-declared accessibility-level
3395         parameter added to its profile.
3396         (Add_Extra_Actual_To_Call): Export an existing procedure which was
3397         previously declared in the body of Exp_Ch6.
3398         * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
3399         it to exp_ch6.ads.
3400         (Has_Unconstrained_Access_Discriminants): New Function; a
3401         predicate on subtype entities which returns True if the given
3402         subtype is unconstrained and has one or more access discriminants.
3403         (Expand_Call): When expanding a call to a function which takes an
3404         Extra_Accessibility_Of_Result parameter, pass in the appropriate
3405         actual parameter value. In the case of a function call which is
3406         used to initialize an allocator, this may not be possible because
3407         the Etype of the allocator may not have been set yet. In this
3408         case, we defer passing in the parameter and handle it later in
3409         Expand_Allocator_Expression.
3410         (Expand_Simple_Function_Return): When returning from a function which
3411         returns an unconstrained subtype having at least one access
3412         discriminant, generate the accessibility check needed to ensure that
3413         the function result will not outlive any objects designated by its
3414         discriminants.
3415         (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
3416         description.
3417         * exp_ch4.adb (Expand_Allocator_Expression): When a function call
3418         is used to initialize an allocator, we may need to pass in "the
3419         accessibility level determined by the point of call" (AI05-0234)
3420         to the function. Expand_Call, where such actual parameters are
3421         usually generated, is too early in this case because the Etype of
3422         the allocator (which is used in determining the level to be passed
3423         in) may not have been set yet when Expand_Call executes. Instead,
3424         we generate code to pass in the appropriate actual parameter
3425         in Expand_Allocator_Expression.
3426         * sem_ch6.adb (Create_Extra_Formals): Create
3427         the new Extra_Accessibility_Of_Result formal if
3428         Needs_Result_Accessibility_Level returns True. This includes the
3429         introduction of a nested procedure, Check_Against_Result_Level.
3430
3431 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3432
3433         * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
3434         declaration.
3435
3436 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3437
3438         * s-finmas.adb (Set_Finalize_Address): Explain the reason
3439         for the synchronization. Move the test for null from
3440         s-stposu.Allocate_Any_Controlled to this routine since the check
3441         needs to be protected too.
3442         (Set_Heterogeneous_Finalize_Address): Explain the reason for the
3443         synchronization code.
3444         * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
3445         explaining the context in which this routine is used.
3446         * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
3447         to s-finmas.Set_Finalize_Address.
3448
3449 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3450
3451         * einfo.ads: Document that itypes have no parent field.
3452
3453 2011-09-05  Robert Dewar  <dewar@adacore.com>
3454
3455         * rtsfind.adb (Check_CRT): Check for overloaded entity
3456         * rtsfind.ads: Document that entities to be found by rtsfind
3457         cannot be overloaded
3458         * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
3459         (Lock_Entries_With_Status): New name for Lock_Entries with two
3460         arguments (changed to meet rtsfind no overloading rule).
3461
3462 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3463
3464         * s-finmas.adb (Set_Finalize_Address (Address,
3465         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3466         (Set_Finalize_Address (in out Finalization_Master,
3467         Finalize_Address_Ptr): Add synchronization code.
3468         * s-finmas.ads (Set_Finalize_Address (Address,
3469         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
3470         * s-stposu.adb (Allocate_Any_Controlled): Update the call to
3471         Set_Finalize_Address for the heterogeneous case.
3472
3473 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3474
3475         * sem_ch3.adb: Undo previous change, not suitable after all.
3476
3477 2011-09-05  Robert Dewar  <dewar@adacore.com>
3478
3479         * einfo.ads: Minor comment clarification.
3480
3481 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3482
3483         * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
3484         no longer needs to search through the entities of the return
3485         statement scope to find the _chain.
3486         * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
3487         (Analyze_Block_Statement): Add local variable
3488         Is_BIP_Return_Statement. Add machinery to install all entities
3489         produced by the expansion of the return object declaration.
3490         (Install_Return_Entities): New routine.
3491         * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
3492
3493 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3494
3495         * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
3496         of subunit is incomplete.
3497         (Analyze_Proper_Body): If parent spec is not available, do not
3498         attempt analysis.
3499
3500 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3501
3502         * sem_disp.adb (Find_Controlling_Arg): Add checks for
3503         interface type conversions, that are expanded into dereferences.
3504
3505 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3506
3507         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
3508         Examine the parameter and return profile of a subprogram and swap
3509         any incomplete types coming from a limited context with their
3510         corresponding non-limited views.
3511         (Exchange_Limited_Views): New routine.
3512
3513 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3514
3515         * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
3516         of internal entity to the subtype declaration, so that when
3517         entities are subsequently exchanged in a package body, the tree
3518         remains properly formatted for ASIS.
3519
3520 2011-09-05  Johannes Kanig  <kanig@adacore.com>
3521
3522         * g-comlin.adb (Set_Usage): Additional optional argument to set help
3523         message.
3524         (Display_Help): display the user given help message, if available.
3525
3526 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3527
3528         * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
3529         is legal if the original node is an identifier that is a
3530         parameterless function call.
3531
3532 2011-09-05  Pascal Obry  <obry@adacore.com>
3533
3534         * prj-nmsc.adb: Minor reformatting.
3535         Add support for standalone aggregate library.
3536         (Check_Stand_Alone_Library): Handle standalone aggregate library.
3537         * projects.texi: Fix documentation for aggregate library projects.
3538
3539 2011-09-05  Robert Dewar  <dewar@adacore.com>
3540
3541         * sem_ch6.adb: Minor reformatting.
3542
3543 2011-09-05  Matthew Gingell  <gingell@adacore.com>
3544
3545         * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
3546         stack guard page on PPC Linux. This patch ensures the 64K guard page at
3547         the bottom of the stack is not overwritten.
3548
3549 2011-09-05  Thomas Quinot  <quinot@adacore.com>
3550
3551         * exp_intr.adb, s-tasini.adb: Minor reformatting.
3552
3553 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3554
3555         * sem_ch3.adb (Access_Definition): If an access type declaration
3556         appears in a child unit, the scope of whatever anonymous type
3557         may be generated is the child unit itself.
3558
3559 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3560
3561         * sem_ch6.adb (Analyze_Expression_Function): Do not set
3562         Comes_From_Source on rewritten body.
3563         (Analyze_Subprogram_Body_Helper): Check that the original node for
3564         the body comes from source, when determining whether expansion
3565         of a protected operation is needed.
3566
3567 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3568
3569         * exp_aggr.adb (Replace_Type): If the target of the assignment is
3570         a selected component and the right-hand side is a self-referential
3571         access, the proper prefix of the rewritten attribute is a copy
3572         of the left-hand side, not of its prefix.
3573
3574 2011-09-05  Robert Dewar  <dewar@adacore.com>
3575
3576         * sem_ch5.adb: Minor reformatting.
3577         * sem_ch3.adb: Minor code clean up.
3578
3579 2011-09-05  Jose Ruiz  <ruiz@adacore.com>
3580
3581         * exp_ch9.adb (Make_Initialize_Protection): The fact that
3582         restriction No_Dynamic_Attachment is in effect or not should
3583         not influence the default priority associated to a protected
3584         object. With this change, when the restriction is in effect (as
3585         is the case for the Ravenscar profile) the default priority of
3586         a protected object with an interrupt handler is in the range of
3587         interrupt priorities (Default_Interrupt_Priority) as required
3588         by D.3(10).
3589
3590 2011-09-05  Arnaud Charlet  <charlet@adacore.com>
3591
3592         * a-iteint.ads: Fix header.
3593
3594 2011-09-05  Vincent Celier  <celier@adacore.com>
3595
3596         * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
3597         with a directory separator to avoid output such as:
3598           "/path/to/objauto.cgpr" has been deleted.
3599
3600 2011-09-05  Robert Dewar  <dewar@adacore.com>
3601
3602         * sem_ch3.adb: Minor reformatting.
3603
3604 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3605
3606         * sem_ch5.adb: Better error message.
3607
3608 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3609
3610         * exp_aggr.adb: Add with and use clause for Exp_Ch6.
3611         (Expand_Array_Aggregate): Detect a special case of an aggregate
3612         which contains tasks in the context of an unexpanded return
3613         statement of a build-in-place function.
3614         * exp_ch6.adb: Add with and use clause for Exp_Aggr.
3615         (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
3616         which contains tasks and expand it now that the original simple
3617         return statement has been rewritten.
3618         * exp_ch9.adb (Build_Activation_Chain_Entity): Code
3619         reformatting. Do not create a chain for an extended return
3620         statement if one is already available.
3621         (Has_Activation_Chain): New routine.
3622
3623 2011-09-05  Marc Sango  <sango@adacore.com>
3624
3625         * sem_ch3.adb (Analyze_Object_Declaration): Remove
3626         the wrong test and add the correct test to detect the violation
3627         of illegal use of unconstrained string type in SPARK mode.
3628
3629 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3630
3631         * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
3632         message on an iterator over an array.
3633
3634 2011-09-05  Robert Dewar  <dewar@adacore.com>
3635
3636         * lib-xref-alfa.adb: Minor reformatting.
3637
3638 2011-09-05  Robert Dewar  <dewar@adacore.com>
3639
3640         * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
3641         exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
3642
3643 2011-09-05  Gary Dismukes  <dismukes@adacore.com>
3644
3645         * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
3646
3647 2011-09-05  Johannes Kanig  <kanig@adacore.com>
3648
3649         * lib-xref-alfa.adb: Update comments.
3650
3651 2011-09-05  Thomas Quinot  <quinot@adacore.com>
3652
3653         * sem_res.adb: Minor reformatting
3654
3655 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3656
3657         * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
3658         present, create them now.  Needed in case the return type was
3659         a limited view in the function declaration.
3660         (Make_Build_In_Place_Call_In_Allocator): If return type contains
3661         tasks, build the activation chain for it.  Pass a reference to
3662         the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
3663         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
3664         with build_in_place calls.
3665         * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
3666         incomplete, inatialize its Corresponding_Record_Type component.
3667         * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
3668         of limited views.
3669
3670 2011-09-05  Johannes Kanig  <kanig@adacore.com>
3671
3672         * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
3673         information.
3674
3675 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3676
3677         * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
3678         appears within a package specification and the token after "IS"
3679         is not a parenthesis, assume that this is an unparenthesized
3680         expression function, even if the token appears in a line by
3681         itself.
3682         * par.adb: Clarify use of Labl field of scope stack in error
3683         recovery.
3684
3685 2011-09-05  Bob Duff  <duff@adacore.com>
3686
3687         * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
3688         conversions instead of normal type conversions in all cases where a
3689         type conversion would be illegal. In particular, use unchecked
3690         conversions when the operand types are private.
3691
3692 2011-09-05  Johannes Kanig  <kanig@adacore.com>
3693
3694         * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
3695         objects of task type or protected type.
3696
3697 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
3698
3699         * sem_ch6.adb (Analyze_Expression_Function): If the expression
3700         function comes from source, indicate that so does its rewriting,
3701         so it is compatible with any subsequent expansion of the
3702         subprogram body (e.g. when it is a protected operation).
3703         * sem_ch4.adb: minor reformatting
3704
3705 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
3706
3707         * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
3708         Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
3709         may lead to wrong ancestor package in the case of instantiated subunit
3710         bodies. If a subunit is instantiated, follow the chain of instantiations
3711         rather than the stub structure.
3712
3713 2011-09-02  Robert Dewar  <dewar@adacore.com>
3714
3715         * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
3716         * gcc-interface/Make-lang.in: Update dependencies.
3717
3718 2011-09-02  Marc Sango  <sango@adacore.com>
3719
3720         * sem_ch3.adb (Analyze_Object_Declaration): Change
3721         comment and add additional check to differentiate constant of
3722         type string from others unconstrained type.
3723
3724 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3725
3726         * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
3727         present in incomplete type declarations to refine the error
3728         message the full declaration is in the same unit.
3729         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
3730         an incomplete type, set the Premature_Use for additional message.
3731         * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
3732         and Premature_Use is set, place additional information at the
3733         point of premature use.
3734
3735 2011-09-02  Bob Duff  <duff@adacore.com>
3736
3737         * sem_ch6.adb: (Check_Post_State): Suppress warning
3738         "postcondition refers only to pre-state" when the expression has not
3739         yet been analyzed, because it causes false alarms. This can happen when
3740         the postcondition contains a quantified expression, because those are
3741         analyzed later. This is a temporary/partial fix.
3742         (Process_Post_Conditions): Minor: change wording of warning.
3743
3744 2011-09-02  Marc Sango  <sango@adacore.com>
3745
3746         * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
3747         illegal use of unconstrained string type in SPARK mode.
3748         * sem_res.adb (Analyze_Operator_Symbol): Set the
3749         right place where the string operand of concatenation should be
3750         violate in SPARK mode.
3751
3752 2011-09-02  Robert Dewar  <dewar@adacore.com>
3753
3754         * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
3755         exp_ch3.adb: Minor reformatting.
3756
3757 2011-09-02  Vincent Celier  <celier@adacore.com>
3758
3759         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
3760         as the compiler driver so Is_Compilable returns True for sources.
3761         * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
3762         for the body.
3763
3764 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3765
3766         * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
3767         condition, a reference to a controlling formal must be interpreted
3768         as having the class-wide type (or an access to such) so that the
3769         inherited condition can be properly applied to any overriding
3770         operation (see ARM12 6.6.1 (7)).
3771
3772 2011-09-02  Tristan Gingold  <gingold@adacore.com>
3773
3774         * init.c (__gnat_is_vms_v7): Fix case and add prototype
3775         for LIB$GETSYI.
3776
3777 2011-09-02  Javier Miranda  <miranda@adacore.com>
3778
3779         * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
3780         initializing expression of a class-wide interface object declaration
3781         if its type is limited.
3782
3783 2011-09-02  Johannes Kanig  <kanig@adacore.com>
3784
3785         * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
3786         literals, take into account the type name; the type is *not*
3787         the scope for an enumeration literal.
3788
3789 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3790
3791         * sem_ch6.adb (Check_Overriding_Indicator): add special check
3792         to reject an overriding indicator on a user-defined Adjust
3793         subprogram for a limited controlled type.
3794
3795 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3796
3797         * sem_res.adb (Resolve_Actuals): add missing call to Resolve
3798         for an actual that is a function call returning an unconstrained
3799         limited controlled type.
3800
3801 2011-09-02  Tristan Gingold  <gingold@adacore.com>
3802
3803         * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
3804
3805 2011-09-02  Johannes Kanig  <kanig@adacore.com>
3806
3807         * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
3808         from "HEAP" to __HEAP Change comment that refers to that variable
3809         * put_alfa.adb: Change comment that refers to that variable
3810
3811 2011-09-02  Robert Dewar  <dewar@adacore.com>
3812
3813         * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
3814
3815 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3816
3817         * exp_util.adb (Extract_Renamed_Object): Renamed to
3818         Find_Renamed_Object. This routine has been reimplemented and now uses
3819         tree traversal to locate a renamed object.
3820         (Is_Aliased): Replace call to Extract_Renamed_Object with
3821         Find_Renamed_Object.
3822
3823 2011-09-02  Tristan Gingold  <gingold@adacore.com>
3824
3825         * init.c: (__gnat_is_vms_v7): New function.
3826
3827 2011-09-02  Olivier Hainque  <hainque@adacore.com>
3828
3829         * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
3830         that have a misaligned backchain, necessarily bogus.
3831
3832 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3833
3834         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
3835         TSS routine Finalize_Address when compiling in Alfa mode.
3836         (Expand_Freeze_Record_Type): Do not create TSS routine
3837         Finalize_Address when compiling in Alfa mode.
3838         * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
3839         call to Set_Finalize_Address in Alfa mode because Finalize_Address is
3840         not built.
3841         (Expand_N_Allocator): Do not produce a call to
3842         Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
3843         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
3844         produce a call to primitive Set_Finalize_Address in Alfa mode because
3845         Finalize_Address is not built.
3846         * exp_ch7.adb (Build_Finalization_Master): Do not create
3847         finalization masters in Afa mode since they are not needed.
3848         (Build_Finalizer): Do not create scope and library-level
3849         finalizers in Alfa mode since they are not needed.
3850         * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
3851         "new" and "free" when applied to controlled objects in Alfa mode since
3852         this is not needed.
3853
3854 2011-09-02  Vincent Celier  <celier@adacore.com>
3855
3856         * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
3857         only library names with the syntax of Ada identifiers, to avoid errors
3858         when compiling the binder generated files.
3859         * projects.texi: Document restriction on SAL library names
3860
3861 2011-09-02  Thomas Quinot  <quinot@adacore.com>
3862
3863         * a-chtgbo.adb: Minor comment fix.
3864
3865 2011-09-02  Robert Dewar  <dewar@adacore.com>
3866
3867         * lib-xref.adb: Minor reformatting
3868
3869 2011-09-02  Vincent Celier  <celier@adacore.com>
3870
3871         * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
3872         gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
3873         --version and --help in usage.
3874         * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
3875
3876 2011-09-02  Bob Duff  <duff@adacore.com>
3877
3878         * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
3879         compilers don't understand it.
3880
3881 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
3882
3883         * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
3884         underlying subtype rather than its base type on the call to
3885         Build_Record_Or_Elementary_Input_Function, so that any
3886         constraints on a discriminated subtype will be available for
3887         doing the check required by AI05-0192.
3888         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3889         If the prefix subtype of the 'Input attribute is a constrained
3890         discriminated subtype, then check each constrained discriminant value
3891         against the corresponding value read from the stream.
3892
3893 2011-09-02  Yannick Moy  <moy@adacore.com>
3894
3895         * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
3896         warnings on suspicious contracts, and enable them with -gnatwa.
3897
3898 2011-09-02  Robert Dewar  <dewar@adacore.com>
3899
3900         * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
3901         reformatting.
3902
3903 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3904
3905         * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
3906         which ensure that restriction No_Dynamic_Attachment has not been
3907         violated.
3908         (Make_Initialize_Protection): Protected types with attach or
3909         interrupt handlers must not violate restriction No_Dynamic_Attachment.
3910         * exp_util.adb (Corresponding_Runtime_Package): Add a guard
3911         which ensures that restriction No_Dynamic_Attachment has not been
3912         violated.
3913         * sem_attr.adb: (Eval_Attribute): Transform
3914         VAX_Float_Type'First and 'Last into references to
3915         the temporaries which store the corresponding bounds. The
3916         transformation is needed since the back end cannot evaluate
3917         'First and 'Last on VAX.
3918         (Is_VAX_Float): New routine.
3919
3920 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3921
3922         * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
3923         generic unit is not intrinsic and has an explicit convention,
3924         the instance inherits it.
3925
3926 2011-09-02  Robert Dewar  <dewar@adacore.com>
3927
3928         * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
3929         prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
3930
3931 2011-09-02  Thomas Quinot  <quinot@adacore.com>
3932
3933         * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
3934         Guard against a prefix that is an N_Has_Entity but has no
3935         associated entity.
3936
3937 2011-09-02  Yannick Moy  <moy@adacore.com>
3938
3939         * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
3940         references.
3941
3942 2011-09-02  Yannick Moy  <moy@adacore.com>
3943
3944         * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
3945         * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
3946         contracts.
3947         * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
3948         procedure looking for suspicious postconditions.
3949         * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
3950         * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
3951         options -gnatw.t and -gnatw.T.
3952
3953 2011-09-02  Pascal Obry  <obry@adacore.com>
3954
3955         * prj.adb: Minor code refactoring. Move check for null project in
3956         Project_Changed.
3957         * projects.texi: Fix minor typos.
3958
3959 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3960
3961         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
3962         of iteration is an expression, its value must be captured in a
3963         renaming declaration, so that modification of the elements is
3964         propagated to the original container.
3965
3966 2011-09-02  Pascal Obry  <obry@adacore.com>
3967
3968         * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
3969         prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
3970         prj-tree.adb: Minor reformatting and style fixes.
3971
3972 2011-09-02  Robert Dewar  <dewar@adacore.com>
3973
3974         * s-rident.ads: Add new restriction No_Implicit_Aliasing
3975         * sem_attr.adb: (Analyze_Access_Attribute): Deal with
3976         No_Implicit_Aliasing
3977         (Analyze_Attribute, case Address): ditto
3978         (Analyze_Attribute, case Unrestricted_Access): ditto
3979         * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
3980         No_Implicit_Aliasing restriction.
3981         * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
3982
3983 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3984
3985         * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
3986         is an unchecked conversion, apply test to its expression.
3987
3988 2011-09-02  Javier Miranda  <miranda@adacore.com>
3989
3990         * sem_ch3.adb (Check_Abstract_Overriding): When
3991         traversing the chain of aliased subprograms avoid reporting a
3992         redundant error on the current entity.
3993
3994 2011-09-02  Sergey Rybin  <rybin@adacore.com>
3995
3996         * gnat_ugn.texi: Minor clean up.
3997
3998 2011-09-02  Bob Duff  <duff@adacore.com>
3999
4000         * s-htable.adb (Set_If_Not_Present): Use renaming
4001         instead of ":=", because the type Key is limited in the generic (even
4002         if not in the instances).
4003
4004 2011-09-02  Robert Dewar  <dewar@adacore.com>
4005
4006         * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4007         g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4008         reformatting.
4009
4010 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4011
4012         * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4013         inherited component with the enclosing derived type. Code reformatting.
4014
4015 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4016
4017         * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4018         return done when overflow checks are enabled, since comparisons against
4019         Lor and Hir should not be done when OK1 is False.
4020
4021 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4022
4023         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4024         Add new formal Master_Exp. When present, add that expression to the
4025         call as an extra actual.
4026         (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4027         Fmaster_Actual and in the case of a BIP call initializing a return
4028         object of an enclosing BIP function set it to a
4029         new reference to the implicit finalization master
4030         formal of the enclosing function. Fmaster_Actual is
4031         then passed to the new formal Master_Exp on the call to
4032         Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4033         initializations of Enclosing_Func to its declaration.
4034
4035 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4036
4037         * csets.ads: Minor reformatting
4038
4039 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4040
4041         * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4042         the full view of a private type coming from an instantiation.
4043         * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4044         loop to iterate over the declarations rather than use the
4045         First_Entity / Next_Entity scheme.
4046
4047 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4048
4049         * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4050         X'range (N) into X'First (N) ..  X'Last (N), do not share the
4051         dimension indicator N, if present. Even though it is a static
4052         constant, its source location may be modified when printing
4053         expanded code under -gnatDL, and node sharing will lead to chaos
4054         in Sprint on large files, by generating a sloc value that does
4055         not correspond to any source file.
4056
4057 2011-09-02  Bob Duff  <duff@adacore.com>
4058
4059         * einfo.adb: (Has_Xref_Entry): Do not call
4060         Implementation_Base_Type. Lib.Xref has been
4061         rewritten to avoid the need for it, and it was costly.
4062         * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4063         functions in support of efficient xref.
4064         * lib-xref-alfa.adb: Misc changes related to Key component of
4065         type Xref_Entry.
4066         * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4067         (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4068         no longer does. This is the one place where it is needed.
4069
4070 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4071
4072         * g-comlin.adb (Getopt): New optional argument Concatenate to have
4073         similar interface as the other Getopt function.
4074
4075 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4076
4077         * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4078         a call to Set_Finalize_Address if there is no allocator available.
4079         * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4080         a case of allocator expansion where the allocator is not expanded but
4081         needs a custom allocate routine. Code reformatting.
4082         (Is_Finalizable_Transient): Remove local variables Has_Rens and
4083         Ren_Obj. Code reformatting.
4084         (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4085         through the use of 'reference.
4086         * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4087         as part of build-in-place expansion. They are intentionally marked as
4088         coming from source, but their parents are not.
4089
4090 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4091
4092         * sem_ch10.adb (Analyze_With_Clause): If the library unit
4093         is the generated subprogram declaration for a child unit body
4094         that acts as spec, use the original body in the with_clause,
4095         to prevent binding errors.
4096
4097 2011-09-02  Vincent Celier  <celier@adacore.com>
4098
4099         * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4100         qualifier /MULTI_UNIT_INDEX=
4101
4102 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4103
4104         * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4105         instead of calling the callback function
4106
4107 2011-09-02  Robert Dewar  <dewar@adacore.com>
4108
4109         * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4110         prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4111
4112 2011-09-02  Vincent Celier  <celier@adacore.com>
4113
4114         * prj-nmsc.adb: (Find_Sources): When the list of sources is
4115         explicitly declared in an extending project, do not warn if a source
4116         for an inherited naming exception is not found.
4117
4118 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4119
4120         * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4121         expansion is inactive.
4122
4123 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4124
4125         * sem_util.adb (Note_Possible_Modification): If the entity
4126         being modified is the renaming generated for an Ada2012 iterator
4127         element, the enclosing container or array is modified as well.
4128
4129 2011-09-02  Jose Ruiz  <ruiz@adacore.com>
4130
4131         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4132         Initialize): Define and initialize the
4133         mutex attributes and condition variable attributes locally.
4134
4135 2011-09-02  Vincent Celier  <celier@adacore.com>
4136
4137         * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4138         exception replaced in an extending project.
4139         (Check_Object): No error when the other source is locally removed.
4140
4141 2011-09-02  Yannick Moy  <moy@adacore.com>
4142
4143         * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4144         unresolved calls.
4145
4146 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
4147
4148         * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4149         run-time files.
4150         * gcc-interface/Make-lang.in: Update dependencies.
4151
4152 2011-09-01  Robert Dewar  <dewar@adacore.com>
4153
4154         * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4155
4156 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4157
4158         * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4159         * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4160         __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4161         specific for systems where their glibc version does not define the
4162         routines to handle dynamically allocated CPU sets.
4163
4164 2011-09-01  Vincent Celier  <celier@adacore.com>
4165
4166         * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4167         prj-env.adb: Implement inheritance of naming exceptions in extending
4168         projects.
4169
4170 2011-09-01  Romain Berrendonner  <berrendo@adacore.com>
4171
4172         * gnatls.adb: Display simple message instead of content of
4173         gnatlic.adl.
4174
4175 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4176
4177         * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4178         access discriminant and anonymous access component scopes.
4179         (Inherit_Component): Reuse the itype of an access discriminant
4180         or anonymous access component by copying it in order to set the proper
4181         scope. This is done only when the parent and the derived type
4182         are in different scopes.
4183         (Set_Anonymous_Etype): New routine.
4184
4185 2011-09-01  Robert Dewar  <dewar@adacore.com>
4186
4187         * a-convec.adb: Minor reformatting throughout.
4188
4189 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4190
4191         * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4192         __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4193         CPU_ALLOC_SIZE and CPU_FREE linux macros.
4194         (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4195         CPU_SET_S respectively because we are now using dynamically allocated
4196         CPU sets which are more portable across different glibc versions.
4197         * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4198         CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4199         masks dynamically according to the number of processors in the target
4200         platform.
4201         (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4202         respectively, so we need to pass the size of the masks as
4203         parameters.
4204         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4205         created cpu_set_t masks
4206         with the number of processors available in the target platform,
4207         instead of static bit arrays. It enhances portability because
4208         it uses the information from the target platform.
4209         * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4210         are using a restricted run-time library, use the flag
4211         Configurable_Run_Time_Mode instead of Restricted_Profile.
4212
4213 2011-09-01  Vincent Celier  <celier@adacore.com>
4214
4215         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4216         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4217
4218 2011-09-01  Nicolas Roche  <roche@adacore.com>
4219
4220         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4221         on VxWorks in kernel mode.
4222
4223 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4224
4225         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4226         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4227         directly the bit array.
4228         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4229         the linux macros with the same name.
4230         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4231         wrappers around the CPU_ZERO and CPU_SET linux macros.
4232
4233 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4234
4235         * exp_ch7.adb (Find_Insertion_List): Removed.
4236         (Process_Transient_Objects): Insert the declarations of the hook
4237         access type and the hook object before the associated transient object.
4238
4239 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4240
4241         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4242         package System.Aux_Dec when using restricted run-time libraries which
4243         do not have this package.
4244
4245 2011-09-01  Tristan Gingold  <gingold@adacore.com>
4246
4247         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4248
4249 2011-09-01  Bob Duff  <duff@adacore.com>
4250
4251         * sem_attr.adb (Analyze_Access_Attribute): Do not call
4252         Kill_Current_Values for P'Unrestricted_Access, where P is library level
4253
4254 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4255
4256         * exp_ch5.adb: Minor reformatting
4257         * gnat_ugn.texi: Fix minor typos.
4258         * gcc-interface/Make-lang.in: Update dependencies.
4259
4260 2011-09-01  Robert Dewar  <dewar@adacore.com>
4261
4262         * inline.adb, sem_aggr.adb: Minor reformatting.
4263
4264 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4265
4266         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4267
4268 2011-09-01  Robert Dewar  <dewar@adacore.com>
4269
4270         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4271
4272 2011-09-01  Bob Duff  <duff@adacore.com>
4273
4274         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4275         body" the same as "in inlined body", because visibility shouldn't
4276         apply there.
4277
4278 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
4279
4280         * inline.adb (Add_Inlined_Body): Refine previous change.
4281
4282 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
4283
4284         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4285         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4286         Test for case where call
4287         initializes an object of a return statement before testing for
4288         a constrained call, to ensure that all such cases get handled
4289         by simply passing on the caller's parameters. Also, in that
4290         case call Needs_BIP_Alloc_Form to determine whether to pass on
4291         the BIP_Alloc_Form parameter of the enclosing function rather
4292         than testing Is_Constrained. Add similar tests for the return
4293         of a BIP call to later processing to ensure consistent handling.
4294         (Needs_BIP_Alloc_Form): New utility function.
4295         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4296         a BIP_Alloc_Form formal with call to new utility function
4297         Needs_BIP_Alloc_Form.
4298
4299 2011-09-01  Pascal Obry  <obry@adacore.com>
4300
4301         * prj-part.adb: Minor reformatting.
4302
4303 2011-09-01  Vincent Celier  <celier@adacore.com>
4304
4305         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4306         half character in the unit name.
4307
4308 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4309
4310         * exp_ch4.adb: Minor code and comment reformatting.
4311
4312 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4313
4314         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4315         for Is_Limited_Type and Is_Tagged_Type in condition checking
4316         for by-reference type.
4317         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4318         subprograms may have a completion because of a previous
4319         Inline_Always clause, but the enclosing package must be marked
4320         inlined for the subprogram body to become visible to the backend.
4321
4322 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4323
4324         * sem_aux.adb, exp_ch4.adb: Minor reformatting
4325
4326 2011-09-01  Pascal Obry  <obry@adacore.com>
4327
4328         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4329
4330 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4331
4332         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4333         the formals of a subprogram stub that acts as a spec.
4334
4335 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4336
4337         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4338         type, declare a renaming for it, not an object declaration.
4339
4340 2011-09-01  Yannick Moy  <moy@adacore.com>
4341
4342         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4343         Ignore_Errors to ignore failures to read ALI files when True.
4344
4345 2011-09-01  Javier Miranda  <miranda@adacore.com>
4346
4347         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4348         constructor calls associated with non-tagged record types.
4349
4350 2011-09-01  Robert Dewar  <dewar@adacore.com>
4351
4352         * g-socthi-vms.adb: Minor reformatting.
4353
4354 2011-09-01  Nicolas Roche  <roche@adacore.com>
4355
4356         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4357         in order to avoid impact of imcompatible changes.
4358         * cstreams.c: Likewise
4359         * cio.c: Likewise
4360         * aux-io.c: Likewise
4361
4362 2011-09-01  Yannick Moy  <moy@adacore.com>
4363
4364         * lib-writ.adb (Write_With_Lines): Always output complete information
4365         on "with" line in Alfa mode, as this is required by formal verification
4366         back-end.
4367
4368 2011-09-01  Tristan Gingold  <gingold@adacore.com>
4369
4370         * g-socthi-vms.adb: Add comments.
4371
4372 2011-09-01  Pascal Obry  <obry@adacore.com>
4373
4374         * prj.ads: Minor reformatting.
4375
4376 2011-09-01  Vincent Celier  <celier@adacore.com>
4377
4378         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
4379         exceptions in the config pragmas file.
4380
4381 2011-09-01  Tristan Gingold  <gingold@adacore.com>
4382
4383         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
4384
4385 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4386
4387         * exp_ch7.adb (Find_Insertion_List): New routine.
4388         (Process_Transient_Objects): Add code to handle the abnormal
4389         finalization of a controlled transient associated with a subprogram
4390         call. Since transients are cleaned up right after the associated
4391         context, an exception raised during a subprogram call may bypass the
4392         finalization code.
4393
4394 2011-09-01  Robert Dewar  <dewar@adacore.com>
4395
4396         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
4397         aliased.
4398
4399 2011-09-01  Robert Dewar  <dewar@adacore.com>
4400
4401         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
4402
4403 2011-09-01  Robert Dewar  <dewar@adacore.com>
4404
4405         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
4406
4407 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4408
4409         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
4410         GNATRTL_NONTASKING_OBJS.
4411
4412 2011-09-01  Robert Dewar  <dewar@adacore.com>
4413
4414         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
4415         possibility of this flag being set for formals in Ada 2012 mode.
4416         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
4417         2012.
4418         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
4419         mode.
4420         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
4421         Ada 2012.
4422         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
4423         Ada 2012.
4424
4425 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4426
4427         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
4428         insertion node in a tree of nested Expression_With_Actions nodes.
4429         (Process_Transient_Object): In the case where a complex if statement
4430         has been converted into nested Expression_With_Actions nodes, the
4431         "hook" object and the associated access type must be inserted before
4432         the top most Expression_With_Actions.
4433
4434 2011-09-01  Robert Dewar  <dewar@adacore.com>
4435
4436         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
4437         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
4438
4439 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4440
4441         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
4442
4443 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4444
4445         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
4446         aspect.
4447         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
4448         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
4449         in a similar way as we do for the Priority or Dispatching_Domain aspect.
4450         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
4451         Dispatching_Domains_Frozen): Move this local data to package
4452         System.Tasking because with the CPU aspect we need to have access
4453         to this data when creating the task in System.Tasking.Stages.Create_Task
4454         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
4455         Move these variables from the body of
4456         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
4457         we need to have access to this data when creating the task in
4458         System.Tasking.Stages.Create_Task.
4459         * s-taskin.adb (Initialize): Signal the allocation of the environment
4460         task to a CPU, if any, so that we know whether the CPU can be
4461         transferred to a different dispatching domain.
4462         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
4463         is being allocated belongs to the dispatching domain where the task
4464         lives. Signal the allocation of the task to a CPU, if any, so that we
4465         know whether the CPU can be transferred to a different dispatching
4466         domain.
4467
4468 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4469
4470         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
4471         attributes Same_Storage and Overlaps_Storage.
4472
4473 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4474
4475         * exp_strm.adb: Remove with and use clause for Opt.
4476         (Build_Array_Input_Function): Remove the version-dependent generation
4477         of the return statement. The Ada 2005 tree is now the default.
4478
4479 2011-09-01  Yannick Moy  <moy@adacore.com>
4480
4481         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
4482         it is never empty when compiling in Alfa mode.
4483
4484 2011-09-01  Robert Dewar  <dewar@adacore.com>
4485
4486         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
4487         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
4488         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
4489         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
4490
4491 2011-09-01  Matthew Heaney  <heaney@adacore.com>
4492
4493         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
4494         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
4495         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
4496         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
4497         unbounded queue container.
4498         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
4499         bounded queue container.
4500         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
4501         unbounded priority queue container.
4502         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
4503         bounded priority queue container.
4504
4505 2011-08-31  Pascal Obry  <obry@adacore.com>
4506
4507         * a-direct.adb: Do not try to create an UNC path on Windows.
4508         (Create_Path): Skip leading computer name in UNC path if any.
4509
4510 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4511
4512         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
4513         version-dependent generation of the return statement. The Ada 2005 tree
4514         is now the default.
4515
4516 2011-08-31  Thomas Quinot  <quinot@adacore.com>
4517
4518         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
4519         types Stream_Element_Offset and Storage_Offset have a different native
4520         type depending on whether the platform is 32 or 64 bits. When
4521         exchanging them, always convert to 64 bits.
4522
4523 2011-08-31  Yannick Moy  <moy@adacore.com>
4524
4525         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
4526         --force-alfa to gnat2why.
4527
4528 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4529
4530         * sem_ch12.adb (Save_References): If the node has aspects, save
4531         references within the corresponding expressions in a separate step,
4532         because the aspects are not directly in the tree for the declaration
4533         to which they belong.
4534
4535 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
4536
4537         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
4538         in CodePeer mode, since representation clauses are partially ignored.
4539         * gcc-interface/Make-lang.in: Update dependencies.
4540
4541 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4542
4543         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4544         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
4545         to any dispatching domain.
4546
4547 2011-08-31  Thomas Quinot  <quinot@adacore.com>
4548
4549         * exp_ch4.adb: Minor reformatting.
4550
4551 2011-08-31  Bob Duff  <duff@adacore.com>
4552
4553         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
4554         on nodes for which it is not defined.
4555         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
4556         parent type.
4557
4558 2011-08-31  Bob Duff  <duff@adacore.com>
4559
4560         * sem_ch3.adb (Process_Full_View): Disable legality check if
4561         In_Instance, to avoid spurious errors.
4562         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
4563         if In_Instance, to avoid spurious errors.
4564
4565 2011-08-31  Pascal Obry  <obry@adacore.com>
4566
4567         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
4568         directory speparators.
4569         (Compose): Use Dir_Seps to handle both forms.
4570         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
4571         changes.
4572         (Extension): Use Dir_Seps to handle both forms.
4573
4574 2011-08-31  Pascal Obry  <obry@adacore.com>
4575
4576         * prj-conf.adb: Minor reformatting.
4577
4578 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4579
4580         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
4581         dispatching domain aspect.
4582         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
4583         aspect.
4584         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
4585         Dispatching_Domain aspect in a similar way as we do for the Priority
4586         aspect.
4587         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
4588         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
4589         is present.
4590         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
4591         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
4592         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
4593         Dispatching_Domain and add it to the task definition.
4594         (Sig_Flags): Add Pragma_Dispatching_Domain.
4595         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
4596         support to find the types Dispatching_Domain and
4597         Dispatching_Domain_Access.
4598         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
4599         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
4600         query the availability of a pragma Dispatching_Domain.
4601         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
4602         the expander to pass the Dispatching_Domain when creating a task.
4603         (Name_Dispatching_Domain): Add this new name for a pragma.
4604         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
4605         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
4606         task has been allocated at creation time.
4607         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
4608         Ravenscar is always null.
4609         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
4610         the task has been allocated at creation time.
4611         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
4612         a specific dispatching domain.
4613         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
4614         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
4615         and CPU are specified for the task, and the CPU value is not contained
4616         within the range of processors for the domain.
4617
4618 2011-08-31  Vincent Celier  <celier@adacore.com>
4619
4620         * make.adb (Original_Gcc) : New constant String_Access.
4621         (Gnatmake): For VM targets, do not use VM version of the compiler if
4622         --GCC= has been specified.
4623
4624 2011-08-31  Thomas Quinot  <quinot@adacore.com>
4625
4626         * sem_ch5.adb: Minor reformatting.
4627
4628 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4629
4630         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
4631         not reanalyze it.
4632
4633 2011-08-31  Bob Duff  <duff@adacore.com>
4634
4635         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
4636         the access type is private; we don't care about privacy in expansion.
4637
4638 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4639
4640         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
4641         subcomponents tnat may be limited, because they originate in view
4642         conflicts. If the original aggregate is legal and the actuals are
4643         legal, the aggregate itself is legal.
4644
4645 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4646
4647         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
4648         status.
4649
4650 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4651
4652         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
4653         errors in B tests.
4654
4655 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4656
4657         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
4658         Interrupt_Priority aspects, force the analysis of the aspect expression
4659         (when building the equivalent pragma). Otherwise, its analysis is done
4660         too late, after the task or protected object has been created.
4661         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
4662         Analyze_Single_Task_Declaration): Remove the code to move the aspects
4663         to the object declaration because they are needed in the type
4664         declaration.
4665
4666 2011-08-31  Robert Dewar  <dewar@adacore.com>
4667
4668         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
4669         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
4670         reformatting.
4671
4672 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4673
4674         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
4675         if the corresponding type is malformed due to restriction violations.
4676
4677 2011-08-31  Robert Dewar  <dewar@adacore.com>
4678
4679         * s-ransee.ads, s-ransee.adb: Minor reformatting.
4680
4681 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4682
4683         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
4684         would cause the generation of Set_Finalize_Address if the target is a
4685         VM and the designated type is not derived from [Limited_]Controlled.
4686
4687 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
4688
4689         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
4690         subprogram.
4691         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
4692         case of a compilation error.
4693
4694 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4695
4696         * init.c (__gnat_error_handler): Standardize the stack overflow or
4697         erroneous memory access message.
4698         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
4699         or erroneous memory access message.
4700
4701 2011-08-31  Robert Dewar  <dewar@adacore.com>
4702
4703         * sem_ch4.adb: Minor reformatting.
4704         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
4705
4706 2011-08-31  Thomas Quinot  <quinot@adacore.com>
4707
4708         * scos.ads: Minor documentation clarification.
4709         * put_scos.adb: Do not generate SCO unit header line for a unit that
4710         has no SCO lines.
4711
4712 2011-08-31  Robert Dewar  <dewar@adacore.com>
4713
4714         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
4715
4716 2011-08-31  Tristan Gingold  <gingold@adacore.com>
4717
4718         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
4719         hold variables between these following subprograms.
4720         (Build_Exception_Handler, Build_Object_Declarations,
4721         Build_Raise_Statement): Use the above type as parameter.
4722         Make the above adjustments.
4723         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
4724
4725 2011-08-31  Pascal Obry  <obry@adacore.com>
4726
4727         * projects.texi: Minor reformatting.
4728
4729 2011-08-31  Tristan Gingold  <gingold@adacore.com>
4730
4731         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
4732         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
4733
4734 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4735
4736         * exp_ch5.adb: Minor code cleanup.
4737         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
4738         prevent cascaded errors.
4739         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
4740         variable of an iterator specification in current scope.
4741         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
4742         postconditions on the stack, as they contain no return statements.
4743
4744 2011-08-31  Yannick Moy  <moy@adacore.com>
4745
4746         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
4747         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
4748         call Qualify_Entity_Names.
4749         (Expand_Alfa): call Qualify_Entity_Names in more cases
4750         * lib-xref-alfa.adb: Take into account system package.
4751         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
4752         CodePeer mode in which we are interested in finding bugs even if
4753         compiler cannot compile source.
4754         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
4755         deferred constant.
4756
4757 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4758
4759         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
4760         denoted by the subtype mark to ensure getting the concurrent type in
4761         the case where the subtype mark denotes a private subtype of a
4762         concurrent type (needed when using -gnatc).
4763         (Process_Subtype): For the processing specific to type kinds, case on
4764         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
4765         subtype denotes a private subtype whose base type is nonprivate (needed
4766         for subtypes of private fulfilled by task types when compiling with
4767         -gnatc).
4768
4769 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4770
4771         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
4772         late primitives that override interface operations when the full
4773         expander is not active, to avoid blowups in Register_Primitive when
4774         types don't have associated secondary dispatch tables.
4775
4776 2011-08-31  Yannick Moy  <moy@adacore.com>
4777
4778         * alfa_test.adb: Code clean up.
4779
4780 2011-08-31  Marc Sango  <sango@adacore.com>
4781
4782         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
4783         by Comes_From_Source (Original_Node (N)) in order to treat also the
4784         nodes which have been rewritten.
4785         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
4786         explicit dereference and slice violation in spark mode on the nodes 
4787         coming only from the source code.
4788
4789 2011-08-31  Robert Dewar  <dewar@adacore.com>
4790
4791         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
4792         lib-xref-alfa.adb: Minor reformatting.
4793
4794 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4795
4796         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
4797
4798 2011-08-31  Javier Miranda  <miranda@adacore.com>
4799
4800         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
4801         only for class-wide subprograms conflicting with entities of concurrent
4802         tagged types.
4803
4804 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4805
4806         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
4807         node to null value.
4808
4809 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4810
4811         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
4812         general description of the routine.
4813
4814 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4815
4816         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
4817         doubly-linked lists.
4818
4819 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4820
4821         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
4822         check is needed for a left-hand side that is a dereference, and the
4823         base type is private without discriminants (whereas the full type does
4824         have discriminants), an extra retrieval of the underlying type may be
4825         needed in the case where the subtype is a record subtype whose base
4826         type is private. Update comments.
4827
4828 2011-08-31  Javier Miranda  <miranda@adacore.com>
4829
4830         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
4831         found check if there is a class-wide subprogram covering the primitive.
4832         
4833 2011-08-31  Yannick Moy  <moy@adacore.com>
4834
4835         * sem_res.adb: Further cases where full expansion test is needed,
4836         rather than expansion test.
4837
4838 2011-08-31  Pascal Obry  <obry@adacore.com>
4839
4840         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
4841
4842 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4843
4844         * exp_ch5.adb: Handle iterators over derived container types.
4845
4846 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4847
4848         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
4849         (Has_Anonymous_Master): New routine.
4850         (Set_Has_Anonymous_Master): New routine.
4851         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
4852         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
4853         (Current_Anonymous_Master): New routine.
4854         (Current_Unit_First_Declaration): Removed.
4855         (Current_Unit_Scope): Removed.
4856         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
4857         their objects on a per-unit heterogeneous finalization master.
4858
4859 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4860
4861         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
4862         array.
4863
4864 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4865
4866         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
4867         when not needed.
4868
4869 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4870
4871         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
4872         where the actual is an unexpanded call to 'Input.
4873
4874 2011-08-31  Yannick Moy  <moy@adacore.com>
4875
4876         * sem_ch4.adb: Code clean up.
4877
4878 2011-08-31  Yannick Moy  <moy@adacore.com>
4879
4880         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
4881
4882 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4883
4884         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
4885         and TSS primitive Finalize_Address if finalization is suppressed.
4886         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
4887         primitive Finalize_Address if finalization is suppressed.
4888
4889 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4890
4891         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
4892         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
4893         sure that the underlying task has already been created before trying
4894         to change its affinity.
4895         (Set_CPU): Use the term processor instead of CPU, as we do in
4896         Assign_Task.
4897
4898 2011-08-31  Vincent Celier  <celier@adacore.com>
4899
4900         * prj-attr.adb: New Compiler attribute Source_File_Switches.
4901         * prj-nmsc.adb (Process_Compiler): Process attribute
4902         Source_File_Switches.
4903         * prj.ads (Language_Config): New name list component
4904         Name_Source_File_Switches.
4905         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
4906
4907 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4908
4909         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
4910         discriminated component of an actual, expand at once to prevent
4911         ouf-of-order references with generated subtypes.
4912
4913 2011-08-31  Yannick Moy  <moy@adacore.com>
4914
4915         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
4916         reference to operator in Alfa xrefs.
4917
4918 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4919
4920         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
4921         where the parent instance was frozen before the current instance due to
4922         the presence of a source body. Update calls to Insert_After_Last_Decl.
4923         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
4924         Update the comment which illustrates the purpose of the routine.
4925         Package instances are now frozen by source bodies which appear after
4926         the instance. This ensures that entities coming from within the
4927         instance are available for use in the said bodies.
4928         (Install_Body): Add code to handle the case where the parent instance
4929         was frozen before the current instance due to the presence of a source
4930         body. Update calls to Insert_After_Last_Decl.
4931
4932 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4933
4934         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
4935         access types.
4936         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
4937
4938 2011-08-31  Yannick Moy  <moy@adacore.com>
4939
4940         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
4941         full-expander test.
4942         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
4943         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
4944         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
4945         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
4946         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
4947         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4948         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
4949         ALFA in Alfa (we dropped acronym).
4950         * einfo.adb (Primitive_Operations): Correctly return list of primitive
4951         operations in a case where it returned previously No_Elist.
4952
4953 2011-08-31  Robert Dewar  <dewar@adacore.com>
4954
4955         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
4956         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
4957         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4958         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
4959         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
4960         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
4961         reformatting.
4962
4963 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4964
4965         * sem_ch12 (Check_Private_View): Revert previous change.
4966         * sem_res.adb (Conversion_Check): Do not emit the error message if the
4967         conversion is in a generic instance.
4968
4969 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4970
4971         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
4972         * a-chtgbo.adb (Free): Allow 0 as index value.
4973
4974 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4975
4976         * a-cborma.adb (Insert): Add comment to explain why no element
4977         assignment.
4978
4979 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4980
4981         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
4982         spec discriminant is already a concurrent type, in which case just use
4983         it, otherwise fetch the Corresponding_Concurrent_Type as before.
4984
4985 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4986
4987         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
4988         system-linux-mips.ads, system-linux-mipsel.ads,
4989         system-linux-mips64el.ads, system-linux-ppc64.ads,
4990         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
4991
4992 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4993
4994         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
4995         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
4996         (build_unary_op): Likewise.
4997
4998 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4999
5000         * raise-gcc.c: Do not include coretypes.h and tm.h.
5001         (setup_to_install): Remove test for compiler macro.
5002         * targext.c: Document use for the library.
5003         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5004
5005 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5006
5007         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5008         the expression to the nominal type if the latter is a record type with
5009         a variant part and the type of the former is a record type without one.
5010
5011 2011-08-30  Yannick Moy  <moy@adacore.com>
5012
5013         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5014         expansion in Alfa mode.
5015         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5016         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5017         Alfa mode.
5018         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5019         * sem_res.adb: Ditto.
5020         * gcc-interface/Make-lang.in: Update dependencies.
5021
5022 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5023
5024         * g-socket.ads: Minor documentation adjustment.
5025
5026 2011-08-30  Robert Dewar  <dewar@adacore.com>
5027
5028         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5029
5030 2011-08-30  Yannick Moy  <moy@adacore.com>
5031
5032         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5033         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5034         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5035         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5036         Revert change which introduced files for "light"
5037         expansion, to be replaced by a single file for Alfa expansion.
5038
5039 2011-08-30  Robert Dewar  <dewar@adacore.com>
5040
5041         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5042         Minor code reorg/reformatting.
5043
5044 2011-08-30  Yannick Moy  <moy@adacore.com>
5045
5046         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5047         common shorthand for (Expander_Active and not ALFA_Mode) that can be
5048         used for testing full expansion, that is active expansion not in the
5049         reduced mode for Alfa
5050         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5051         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5052         of the verbose (Expander_Active and not ALFA_Mode)
5053
5054 2011-08-30  Tristan Gingold  <gingold@adacore.com>
5055
5056         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5057         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5058         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5059         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5060
5061 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
5062
5063         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5064         access conversions to check that the conversion is a rewritten node,
5065         rather than just having Comes_From_Source set to False, which wasn't
5066         sufficient.
5067
5068 2011-08-30  Robert Dewar  <dewar@adacore.com>
5069
5070         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5071         g-socket.ads: Minor reformatting.
5072
5073 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5074
5075         * sem_util.adb: Minor reformatting.
5076
5077 2011-08-30  Tristan Gingold  <gingold@adacore.com>
5078
5079         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5080         to be compliant with the ABI.
5081
5082 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
5083
5084         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5085         of a designated type when the related access type is an actual in an
5086         instance. This ensures that the full view of designated type is
5087         available when inside the body of the instance.
5088
5089 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5090
5091         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5092         in a position to be modified, a slice is treated like an indexed
5093         component.
5094
5095 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5096
5097         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5098         field tv_sec in struct timeval.
5099
5100 2011-08-30  Yannick Moy  <moy@adacore.com>
5101
5102         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5103         blocks of code doing full expansion, previously only guarded by
5104         Expander_Active, by anding the test that ALFA_Mode is not set
5105
5106 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5107
5108         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5109         add the function to the list of private dependents, for subsequent
5110         legality check on Taft amendment types.
5111         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5112         Private_Dependents, as for other incomplete types.
5113         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5114         Taft-amendment type is used as the return type of a function.
5115
5116 2011-08-30  Javier Miranda  <miranda@adacore.com>
5117
5118         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5119         which emits an error by a call to a new routine which report the error.
5120         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5121         entity does not cover an existing interface.
5122         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5123         code.
5124         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5125         protected procedures or entries whose mode is not conformant.
5126         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5127         an error by a call to a new routine which report the error.
5128
5129 2011-08-30  Robert Dewar  <dewar@adacore.com>
5130
5131         * gnat_rm.texi: Minor change.
5132         * exp_attr_light.adb: Minor reformatting.
5133
5134 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5135
5136         * sem_ch3.adb: Patch inheritance of aspects in
5137         Complete_Private_Subtype, to avoid infinite loop.
5138
5139 2011-08-30  Javier Miranda  <miranda@adacore.com>
5140
5141         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5142         been reported and a subprogram covering an interface primitive is not
5143         found then skip generating the internal entity. Done to avoid crashing
5144         the frontend.
5145         (Check_Abstract_Overriding): Change text of error of wrong formal of
5146         protected subprogram or entry. Done for consistency to emit exactly the
5147         same error reported by Check_Synchronized_Overriding. In addition, the
5148         error is restricted to protected types (bug found working on AI05-0090)
5149
5150 2011-08-30  Yannick Moy  <moy@adacore.com>
5151
5152         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5153         expansion in Alfa mode.
5154         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5155         * exp_light.adb, exp_light.ads: New package defining light expansion.
5156         * expander.adb (Expand): Call light expansion in Alfa mode
5157         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5158         constructs.
5159         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5160         constructs.
5161         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5162         * gnat1drv.adb (Adjust_Global_Switches): Comment
5163
5164 2011-08-30  Yannick Moy  <moy@adacore.com>
5165
5166         * lib-xref-alfa.adb: Minor refactoring.
5167
5168 2011-08-30  Yannick Moy  <moy@adacore.com>
5169
5170         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5171         mode.
5172         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5173         expansion in Alfa mode.
5174         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5175         mode.
5176
5177 2011-08-30  Robert Dewar  <dewar@adacore.com>
5178
5179         * debug_a.adb: Update comment.
5180
5181 2011-08-30  Robert Dewar  <dewar@adacore.com>
5182
5183         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5184         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5185         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5186         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5187
5188 2011-08-30  Robert Dewar  <dewar@adacore.com>
5189
5190         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5191         volatile.
5192
5193 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
5194
5195         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5196         Build_Finalization_Master by supplying an insertion node and enclosing
5197         scope. In its old version, the call did not generate a finalization
5198         master.
5199         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5200         recognize anonymous access-to-controlled components. Rewrite the
5201         machinery which creates finalization masters to service anonymous
5202         access-to-controlled components of a record type. In its current state,
5203         only one heterogeneous master is necessary to handle multiple anonymous
5204         components.
5205         (Freeze_Type): Comment reformatting.
5206         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5207         RE_Unit_Table.
5208         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5209         associates TSS primitive Finalize_Address with either the master itself
5210         or with the internal hash table depending on the mode of operation of
5211         the master.
5212
5213 2011-08-30  Javier Miranda  <miranda@adacore.com>
5214
5215         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5216         interface type then do not generate code to compare this component.
5217         Required since they have no components and their equality operator is
5218         abstract.
5219
5220 2011-08-30  Steve Baird  <baird@adacore.com>
5221
5222         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5223         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5224         returns the (static) accessibility level of the object. Otherwise, the
5225         same as Type_Access_Level.
5226         (Dynamic_Accessibility_Level): New function; given an expression which
5227         could occur as the rhs of an assignment to a saooaaat (i.e., an
5228         expression of an access-to-object type), return the new value for the
5229         saooaaat's associated Extra_Accessibility object.
5230         (Effective_Extra_Accessibility): New function; same as
5231         Einfo.Extra_Accessibility except that object renames are looked through.
5232         * sem_util.adb 
5233         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5234         (Dynamic_Accessibility_Level): New function; see sem_util.ads
5235         description.
5236         (Effective_Extra_Accessibility): New function; see sem_util.ads
5237         description.
5238         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5239         (Extra_Accessibility): Update comments.
5240         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5241         except RM_Size field (which is only for types) is unaffected.
5242         * einfo.adb
5243         (Extra_Accessibility): Expand domain to allow objects, not just formals.
5244         (Set_Extra_Accessibility): Expand domain to allow objects, not just
5245         formals.
5246         (Init_Size): Add assertion that we are not trashing the
5247         Extra_Accessibility attribute of an object.
5248         (Init_Size_Align): Add assertion that we are not trashing the
5249         Extra_Accessibility attribute of an object.
5250         (Init_Object_Size_Align): New procedure; see einfo.ads description.
5251         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5252         differently for the type of a (non-library-level) saooaaat depending
5253         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5254         is queried in this set of changes - everything else (in particular,
5255         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5256         driven off of the setting of the Is_Local_Anonymous_Access attribute.
5257         The special treatment of library-level saooaaats is an optimization,
5258         not required for correctnesss. This is based on the observation that the
5259         Ada2012 rules (static and dynamic) for saooaaats turn out to be
5260         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5261         * exp_ch3.adb
5262         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5263         false for the type of a saooaaat, declare and initialize its
5264         accessibility level object and set the Extra_Accessibility attribute
5265         of the saooaaat to refer to this object.
5266         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5267         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5268         calls to Effective_Extra_Accessibility in order to support
5269         renames of saooaaats.
5270         (Expand_N_Type_Conversion): Add new local function,
5271         Has_Extra_Accessibility, and call it when determining whether an
5272         accessibility check is needed.
5273         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5274         evaluate to True (without raising an exception).
5275         * exp_ch5.adb
5276         (Expand_N_Assignment_Statement): When assigning to an Ada2012
5277         saooaaat, update its associated Extra_Accessibility object (if
5278         it has one). This includes an accessibility check.
5279         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5280         a saooaaat, update its Extra_Accessibility object too (if it
5281         has one).
5282         (Expand_Call): Replace a couple of calls to Type_Access_Level
5283         with calls to Dynamic_Access_Level to handle cases where
5284         passing a literal (any literal) is incorrect.
5285         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5286         checks associated with "Saooaat := Some_Object'Access;"; this must
5287         be rejected if Some_Object is declared in a more nested scope
5288         than Saooaat.
5289         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5290         assignment to a saooaaat even if Is_Local_Anonymous_Access
5291         returns False for its type (indicating a 2012-style saooaaat).
5292         * sem_ch8.adb
5293         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5294         (which is only appropriate for objects, not types) with a call
5295         of Init_Object_Size_Align in order to avoid trashing the
5296         Extra_Accessibility attribute of a rename (the two attributes
5297         share storage).
5298         * sem_res.adb
5299         (Valid_Conversion) Replace six calls to Type_Access_Level with
5300         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5301         Ada2012 non-library-level saooaaat, the former returns library level
5302         while the latter returns the (static) accessibility level of the
5303         saooaaat. A type conversion to the anonymous type of a saooaaat
5304         can only occur as part of an assignment to the saooaaat, so we
5305         know that such a conversion must be in a lhs context, so Deepest
5306         yields the result that we need. If such a conversion could occur,
5307         say, as the operand of an equality operator, then this might not
5308         be right. Also add a test so that static accessibilty checks are
5309         performed for converting to a saooaaat's type even if
5310         Is_Local_Anonymous_Access yields False for the type.
5311
5312 2011-08-30  Javier Miranda  <miranda@adacore.com>
5313
5314         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5315         controls generation of a warning associated with late declaration of
5316         dispatching functions. Required to avoid generating spurious
5317         warnings.
5318
5319 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
5320
5321         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5322         return object has an anonymous access type and the function's type is
5323         a named access type.
5324         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5325         conversions on implicit conversions, since such conversions can occur
5326         for anonymous access cases due to expansion. Issue error for attempt
5327         to rename an anonymous expression as an object of a named access type.
5328         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5329         to indicate whether this function should report errors on invalid
5330         conversions.
5331         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5332         the expression is of an anonymous access type and the expected type is
5333         a named general access type, rewrite the expression as a type
5334         conversion, unless this is an expression of a membership test.
5335         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5336         calling of Error_Msg_N on new formal Report_Errs.
5337         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5338         calling of Error_Msg_NE on new formal Report_Errs.
5339         (Valid_Conversion): Move declaration of this function to the package
5340         spec, to allow calls from membership test processing. For Ada 2012,
5341         enforce legality restrictions on implicit conversions of anonymous
5342         access values to general access types, disallowing such conversions in
5343         cases where the expression has a dynamic accessibility level (access
5344         parameters, stand-alone anonymous access objects, or a component of a
5345         dereference of one of the first two cases).
5346         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5347         in the context of a named general access expected type.
5348         * exp_ch4.adb Add with and use of Exp_Ch2.
5349         (Expand_N_In): Add processing for membership tests applied to
5350         expressions of an anonymous access type. First, Valid_Conversion is
5351         called to check whether the test is statically False, and then the
5352         conversion is expanded to test that the expression's accessibility
5353         level is no deeper than that of the tested type. In the case of
5354         anonymous access-to-tagged types, a tagged membership test is applied
5355         as well.
5356         (Tagged_Membership): Extend to handle access type cases, applying the
5357         test to the designated types.
5358         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5359         accessibility level, and the actual is a 'Access applied to a current
5360         instance, pass the accessibility level of the type of the current
5361         instance rather than applying Object_Access_Level to the prefix. Add a
5362         ??? comment, since this level isn't quite right either (will eventually
5363         need to pass an implicit level parameter to init procs).
5364
5365 2011-08-30  Bob Duff  <duff@adacore.com>
5366
5367         * s-taskin.ads: Minor comment fix.
5368
5369 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5370
5371         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
5372         component and the selector is a dispatching operation, check if it is
5373         a prefixed call before rewriting as a parameterless function call.
5374
5375 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
5376
5377         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
5378         tsystem.h into $(RTSDIR) instead of rts.
5379
5380 2011-08-29  Robert Dewar  <dewar@adacore.com>
5381
5382         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
5383         reformatting.
5384         * gcc-interface/Make-lang.in: Update dependencies.
5385
5386 2011-08-29  Yannick Moy  <moy@adacore.com>
5387
5388         * alfa.ads (Name_Of_Heap_Variable): New constant name.
5389         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
5390         table to hold dereferences.
5391         (Add_ALFA_Xrefs): Take into account dereferences as special
5392         reads/writes to the variable "HEAP".
5393         (Enclosing_Subprogram_Or_Package): Move subprogram here.
5394         (Generate_Dereference): New procedure to store a read/write dereferencew
5395         in the table Drefs.
5396         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
5397         the special "HEAP" var.
5398         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
5399         in ALFA mode.
5400         * sem_util.adb (Note_Possible_Modification): Store write dereference
5401         in ALFA mode.
5402
5403 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5404
5405         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
5406         ensures that the level of the subpool access type is not deeper than
5407         that of the pool object.
5408         * sem_util.adb (Object_Access_Level): Expand to handle defining
5409         identifiers.
5410         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
5411         subpool handle name of a rewritten allocator.
5412
5413 2011-08-29  Robert Dewar  <dewar@adacore.com>
5414
5415         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
5416
5417 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5418
5419         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
5420         values, we generate multiple triples of parameters in the TypeCode.
5421         Bump Choice_Index for each such triple so that a subsequent default
5422         choice is associated with the correct index in the typecode.
5423
5424 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5425
5426         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
5427         container.
5428         (First, Last): Handle properly an iterator over a null container.
5429
5430 2011-08-29  Bob Duff  <duff@adacore.com>
5431
5432         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
5433         processing if we run across a node with no Scope. This can happen if
5434         we're with-ing an library-level instance, and that instance got errors
5435         that caused "instantiation abandoned".
5436         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
5437         an exception instead of using Assert, so it won't go into an infinite
5438         loop, even when assertions are turned off.
5439
5440 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5441
5442         * a-coorse.adb: Proper handling of empty ordered sets.
5443
5444 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5445
5446         * debug.adb: Add comments.
5447
5448 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5449
5450         * a-except.adb, a-except-2005.adb: Minor comment rewording and
5451         reformatting.
5452
5453 2011-08-29  Yannick Moy  <moy@adacore.com>
5454
5455         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
5456         declaration for Itypes in Alfa mode.
5457
5458 2011-08-29  Robert Dewar  <dewar@adacore.com>
5459
5460         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
5461         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
5462         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
5463         reformatting.
5464
5465 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5466
5467         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
5468         package spec.
5469         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
5470         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
5471         while raising PE.
5472
5473 2011-08-29  Robert Dewar  <dewar@adacore.com>
5474
5475         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
5476
5477 2011-08-29  Javier Miranda  <miranda@adacore.com>
5478
5479         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
5480         renamings of formal subprograms when the actual for a formal type is
5481         class-wide.
5482
5483 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5484
5485         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
5486         to Target.
5487
5488 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5489
5490         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
5491         components of record type.
5492         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
5493         to Target.
5494
5495 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5496
5497         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
5498         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
5499         container packages.
5500
5501 2011-08-29  Robert Dewar  <dewar@adacore.com>
5502
5503         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
5504         reformatting.
5505
5506 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5507
5508         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
5509         components of record type.
5510
5511 2011-08-29  Bob Duff  <duff@adacore.com>
5512
5513         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
5514         by the termination handler.
5515
5516 2011-08-29  Yannick Moy  <moy@adacore.com>
5517
5518         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
5519         created in Alfa mode, instead of inserting artificial declarations of
5520         non-Itypes in the tree.
5521         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
5522         know if an Itype has a corresponding declaration, as defined in
5523         itypes.ads.
5524
5525 2011-08-29  Yannick Moy  <moy@adacore.com>
5526
5527         * gnat1drv.adb: Minor rewrite.
5528
5529 2011-08-29  Bob Duff  <duff@adacore.com>
5530
5531         * s-tasuti.adb (Make_Passive): Work around race condition in
5532         Make_Independent, which can cause Wait_Count to be zero. So instead of
5533         asserting that Wait_Count > 0, and then decrementing it, decrement it
5534         only if Wait_Count > 0.
5535         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
5536         should be nonnegative, so declare them Natural instead of Integer.
5537
5538 2011-08-29  Robert Dewar  <dewar@adacore.com>
5539
5540         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
5541         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
5542         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
5543         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
5544         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
5545
5546 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5547
5548         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
5549
5550 2011-08-29  Vadim Godunko  <godunko@adacore.com>
5551
5552         * s-parint.ads: Minor comment clarification.
5553
5554 2011-08-29  Vincent Celier  <celier@adacore.com>
5555
5556         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
5557         may be used as identifiers.
5558
5559 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5560
5561         * a-coinho.ads: Minor reformating.
5562
5563 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5564
5565         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
5566         container of a derived type.
5567
5568 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5569
5570         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
5571         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
5572
5573 2011-08-29  Pascal Obry  <obry@adacore.com>
5574
5575         * exp_disp.adb: Minor comment fix.
5576         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
5577         to avoid warnings when compiling with -Wall.
5578         (Make_Disp_Conditional_Select_Body): Likewise.
5579         (Make_Disp_Timed_Select_Body): Likewise.
5580
5581 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5582
5583         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
5584         an entity name, generate reference for it.
5585
5586 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5587
5588         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
5589         iterator form.
5590         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
5591         the class-wide type.
5592         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
5593
5594 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5595
5596         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
5597         subtype for an object whose type is an unconstrained union.
5598
5599 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5600
5601         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
5602         is allowed in a component definition, by AI95-406.
5603
5604 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5605
5606         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
5607
5608 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5609
5610         * a-except-2005.adb: Alphabetize all routines.
5611         (Triggered_By_Abort): New routine.
5612         * a-except-2005.ads (Triggered_By_Abort): New routine.
5613         * a-except.adb Alphabetize all routines.
5614         (Triggered_By_Abort): New routine.
5615         * a-except.ads (Triggered_By_Abort): New routine.
5616         * exp_ch7.adb: Update all comments involving the detection of aborts in
5617         finalization code.
5618         (Build_Object_Declarations): Do not generate code to detect the
5619         presence of an abort at the start of finalization code, use a runtime
5620         routine istead.
5621         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
5622         RE_Unit_Table.
5623         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
5624         allocate a task on a subpool.
5625         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
5626         The flag disables all actions related to the maintenance of
5627         Finalize_Address_Table when subpools are not in use.
5628         (Allocate_Any_Controlled): Signal the machinery that subpools are in
5629         use.
5630         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
5631         performs costly task locking when subpools are not in use.
5632
5633 2011-08-29  Yannick Moy  <moy@adacore.com>
5634
5635         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
5636         types and dispatching calls in Alfa mode.
5637         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
5638         correspondance between body and spec scopes, to reuse utility functions
5639         (Traverse_Declarations_Or_Statements): Protect access to body for stub
5640         by testing the presence of the library unit for the body
5641         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
5642         mode the expansion of accept statements is skipped
5643         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
5644         the unique entity corresponding to the one returned by
5645         Unique_Defining_Entity applied to the enclosing declaration of the
5646         argument.
5647
5648 2011-08-29  Bob Duff  <duff@adacore.com>
5649
5650         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
5651         gdb when x is not a node (it can be a node list, name_id, etc). pp is
5652         an alias for pn. ppp is an alias for pt.
5653
5654 2011-08-29  Javier Miranda  <miranda@adacore.com>
5655
5656         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
5657         aggregate to take a consistent decision on the need to convert into
5658         assignments aggregates that initialize constant objects.
5659
5660 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5661
5662         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
5663         Build_Allocate_Deallocate_Proc in order to handle allocation of
5664         non-controlled objects on subpools.
5665         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
5666         to be end-user visible.
5667         * s-finmas.adb: Add with and use clause for System.HTable.
5668         Add an instantiation of Simple_HTable which provides a mapping between
5669         the address of a controlled object and the corresponding
5670         Finalize_Address used to clean up the object. The table is used when a
5671         master is operating in heterogeneous mode.
5672         (Attach): Explain why the input node is not verified on being already
5673         attached.
5674         (Delete_Finalize_Address): New routine.
5675         (Detach): Add pragma Assert which ensures that a node is already
5676         attached.
5677         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
5678         since nodes are no longer removed on traversal. Explain why node
5679         detachment is undesirable in this case.
5680         (Get_Finalize_Address): New routine.
5681         (Hash): New routine.
5682         (Is_Empty_List): Removed.
5683         (pm): Renamed to Print_Master. Add output for discriminant
5684         Is_Homogeneous.
5685         Comment reformatting.
5686         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5687         * s-finmas.ads: Various comments additions / improvements.
5688         Type Finalization_Master has a discriminant which determines the mode of
5689         operation.
5690         (Delete_Finalize_Address): New routine.
5691         (Get_Finalize_Address): New routine.
5692         (pm): Renamed to Print_Master.
5693         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
5694         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
5695         use clause for System.IO.
5696         (Allocate_Any_Controlled): Add machinery to set TSS primitive
5697         Finalize_Address depending on the mode of allocation and the mode of
5698         the master.
5699         (Deallocate_Any_Controlled): Remove the relation pair object -
5700         Finalize_Address regardless of the master mode. Add comment explaining
5701         the reason.
5702         (Detach): Ensure that fields Prev and Next are null after detachment.
5703         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
5704         scheme to check whether the list of subpools is empty. There is no
5705         longer need to store the next subpool or advance the current pointer.
5706         (Is_Empty_List): New routine.
5707         (Print_Pool): New routine.
5708         (Print_Subpool): New routine.
5709         * s-stposu.ads: Various comments additions / improvements.
5710         Field Master of type Root_Subpool is now a heterogeneous collection.
5711         (Print_Pool): New routine.
5712         (Print_Subpool): New routine.
5713
5714 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5715
5716         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
5717         forms, using aspects of container types.
5718         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
5719         Has_Implicit_Dereference flags, that may be set on the partial view.
5720         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
5721         container type with an indexing aspect.
5722         (Analyze_Quantified_Expression): Analyze construct with expansion
5723         disabled, because it will be rewritten as a loop during expansion.
5724         (Try_Container_Indexing): The prefix itself may be a container type
5725         with an indexing aspect, as with a vector of vectors.
5726         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
5727         the original doamin of iteration, for name capture.
5728         (Analyze_Iterator_Specification): If the domain is an expression that
5729         needs finalization, create a separate declaration for it.
5730         For an iterator with "of" retrieve default iterator info from aspect of
5731         container type. For "in" iterator, retrieve type of Iterate function.
5732         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
5733         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
5734         analysis, to prevent spurious errors about late attributes.
5735         * sprint.adb: Handle quantified expression with either loop or iterator
5736         specification.
5737         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
5738         iterator.
5739
5740 2011-08-29  Vincent Celier  <celier@adacore.com>
5741
5742         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
5743         Binder or Linker of the main project file.
5744
5745 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5746
5747         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
5748         unit.
5749
5750 2011-08-29  Yannick Moy  <moy@adacore.com>
5751
5752         * exp_ch9.adb: Partial revert of previous change for Alfa mode
5753
5754 2011-08-29  Yannick Moy  <moy@adacore.com>
5755
5756         * exp_ch11.adb: Minor expansion of comment.
5757
5758 2011-08-29  Yannick Moy  <moy@adacore.com>
5759
5760         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
5761
5762 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5763
5764         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
5765         interpretation, set the type before resolving the operands, because
5766         legality checks on an exponention operand need to know the type of the
5767         context.
5768
5769 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5770
5771         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
5772         cleanups on a master if the instance is within a generic unit.
5773         Complement to the corresponding fix to inline.adb for K520-030.
5774
5775 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5776
5777         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
5778         occurrence.
5779         * exp_intr.adb: Minor comment fix.
5780
5781 2011-08-29  Bob Duff  <duff@adacore.com>
5782
5783         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
5784         Delay_Required was used as an uninitialized variable.
5785
5786 2011-08-29  Robert Dewar  <dewar@adacore.com>
5787
5788         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
5789         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
5790         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
5791
5792 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5793
5794         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
5795         Remove unused variables.
5796
5797 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5798
5799         * sem_res.adb: Remove Build_Explicit_Dereference.
5800         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
5801         from sem_res.adb, used in analysis of additional constructs.
5802         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
5803         expansion of iterators.
5804         (Is_Object_Reference): Recognize variables rewritten as explicit
5805         dereferences in Ada2012.
5806         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
5807         Reversible_Iterator names, for expansion of Ada2012 iterators.
5808         * aspects.ads, aspects.adb (Find_Aspect): Utility.
5809         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
5810         linked list container.
5811         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
5812         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
5813
5814 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5815
5816         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
5817         containers.
5818
5819 2011-08-29  Vincent Celier  <celier@adacore.com>
5820
5821         * make.adb (Gnatmake): Get the maximum number of simultaneous
5822         compilation processes after the Builder switches has been scanned, as
5823         there may include -jnn.
5824
5825 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5826
5827         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
5828
5829 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5830
5831         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
5832         GNAT_DRIVER_COMMAND_LINE to 255.
5833
5834 2011-08-29  Pascal Obry  <obry@adacore.com>
5835
5836         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
5837         reformatting and style fix (class attribute casing).
5838
5839 2011-08-29  Yannick Moy  <moy@adacore.com>
5840
5841         * exp_ch11.adb: Yet another case where expansion should be common
5842         between CodePeer and Alfa.
5843
5844 2011-08-29  Yannick Moy  <moy@adacore.com>
5845
5846         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
5847
5848 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5849
5850         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
5851         incomplete type and its completion match.
5852
5853 2011-08-29  Yannick Moy  <moy@adacore.com>
5854
5855         * exp_ch13.adb: Adjust previous change.
5856
5857 2011-08-29  Robert Dewar  <dewar@adacore.com>
5858
5859         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
5860         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
5861         Minor reformatting.
5862
5863 2011-08-29  Emmanuel Briot  <briot@adacore.com>
5864
5865         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
5866         initialize aggregated projects.
5867
5868 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5869
5870         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
5871         depth of candidates to resolve a potentially spurious ambiguity between
5872         two visible subprograms.
5873
5874 2011-08-29  Yannick Moy  <moy@adacore.com>
5875
5876         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5877         Requires/Ensures.
5878         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
5879         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
5880         Requires/Ensures.
5881
5882 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5883
5884         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
5885         Add comment.
5886
5887 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5888
5889         * sem_res.adb: Minor reformatting.
5890
5891 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5892
5893         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
5894         mode.
5895         * gnat1drv.adb (Adjust_Global_Switches): Set
5896         Use_Expressions_With_Actions to False in ALFA mode.
5897         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
5898         ALFA mode.
5899
5900 2011-08-29  Yannick Moy  <moy@adacore.com>
5901
5902         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
5903         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
5904         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
5905         tagged types and dispatching calls in Alfa mode.
5906
5907 2011-08-29  Javier Miranda  <miranda@adacore.com>
5908
5909         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
5910         we do not report an error on an Empty node.
5911
5912 2011-08-29  Geert Bosch  <bosch@adacore.com>
5913
5914         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
5915         a-nlrear.o and a-nurear.o.
5916
5917 2011-08-29  Robert Dewar  <dewar@adacore.com>
5918
5919         * freeze.adb: Minor code reorganization.
5920         Minor reformatting.
5921         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
5922         sem_ch6.adb: Minor reformatting
5923
5924 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5925
5926         * s-except.ads, s-except.adb: Provide dummy body.
5927
5928 2011-08-29  Yannick Moy  <moy@adacore.com>
5929
5930         * sem_warn.adb (Within_Postcondition): Take into account the case of
5931         an Ensures component in a Test_Case.
5932
5933 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5934
5935         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
5936         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
5937         System_Exceptions_Debug
5938         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
5939         * a-except.adb: With and use System.Exceptions_Debug instead of
5940         System.Exceptions.
5941         * a-except-2005.adb: Likewise.
5942         * s-assert.adb: Likewise.
5943         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
5944         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
5945         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
5946         s-excdeb. Update dependencies.
5947         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
5948         as these no longer need external libraries.
5949
5950 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5951
5952         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
5953         exponentiation operator on universal values in a context that requires
5954         a fixed-point type.
5955
5956 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5957
5958         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
5959         before calling notify_handled_exception.
5960         * a-exextr.adb: Fix comment.
5961
5962 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5963
5964         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
5965         Finalize_Address of the access type's finalization master.
5966         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
5967         access type's finalization master. Add a guard to prevent
5968         Associated_Storage_Pool from being set on .NET/JVM.
5969         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
5970         attribute Finalize_Address of the access type's finalization master.
5971         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
5972         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
5973         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
5974         RE_Unit_Table.
5975         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
5976         use clause for System.IO
5977         (Detach): Relax the assertion, to be reinstated later.
5978         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
5979         Relax the assertion on Finalize_Address, to be reinstated later.
5980         (Is_Empty_List): New routine.
5981         (pm): New debug routine.
5982         (Set_Finalize_Address): New routine.
5983         * s-finmas.ads (pm): New debug routine.
5984         (Set_Finalize_Address): New routine.
5985         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
5986
5987 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5988
5989         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
5990         Remove convention C.
5991
5992 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5993
5994         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
5995         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
5996         (Finalize_TCB): Remove its finalization.
5997         (Initialize): Remove assignment of GET_Exc_Stack_Addr
5998         * s-soflin.adb (NT_Exc_Stack): Remove
5999         (Get_Exc_Stack_Addr_NT): Likewise.
6000         (Get_Exc_Stack_Addr_Soft): Likewise.
6001         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6002         (Get_Exc_Stack_Addr): Likewise.
6003         (Get_Exc_Stack_Addr_Soft): Likewise
6004         * s-taspri-vms.ads (Exc_Stack_T): Remove.
6005         (Exc_Stack_Ptr_T): Likewise.
6006         (Private_Data): Remove Exc_Stack_Ptr component.
6007
6008 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6009
6010         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6011
6012 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6013
6014         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6015
6016 2011-08-29  Geert Bosch  <bosch@adacore.com>
6017
6018         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6019         L2_Norm, Swap_Column): New generic subprograms
6020         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6021         L2_Norm, Swap_Column): Implement new subprograms in order to
6022         eliminate dependency on BLAS and LAPACK libraries in
6023         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6024         version. Forward_Eliminate/Back_Substitute can be used to put a
6025         matrix in row echelon or reduced row echelon form using partial
6026         pivoting.
6027         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6028         Swap_Column): Instantiate from System.Generic_Array_Operations.
6029         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6030         (Sqrt): Local function for simple computation of square root without
6031         adding dependencies on Generic_Elementary_Functions.
6032         (Swap): New subprogram to exchange floating point numbers.
6033         (Inverse): Reimplement using Jordan-Gauss elimination.
6034         (Jacobi): New procedure implementing Jacobi's method for computation
6035         of eigensystems, based on Rutishauser's implementation.
6036         (L2_Norm): Implement directly using the inner product.
6037         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6038         decreasing eigenvalue as required by the Ada RM.
6039         (Swap_Column): New helper procedure for Sort_Eigensystem.
6040         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6041         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6042         Sort_Eigensystems.
6043
6044 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6045
6046         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6047         statements line.
6048
6049 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6050
6051         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6052         than the current node.
6053         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6054         Finalization_Master. The list headers have two fields instead of three.
6055         This should fix alignment issue but subpool allocations are now
6056         unusable. Alphabetize subprograms.
6057         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6058         the size of the header when converting the beginning of the object to
6059         a FM_Node. Set the master's Finalize_Address attribute if not already
6060         set.
6061         (Deallocate_Any_Controlled): Use the offset rather than the size of the
6062         header when converting the beginning of the object to a FM_Node.
6063
6064 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6065
6066         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6067         reraise when compiling for CodePeer.
6068
6069 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6070
6071         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6072         now needed by a-convec.adb. Fix warning.
6073
6074 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6075
6076         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6077         processing of TSS routine Finalize_Address when compiling in
6078         CodePeer_Mode.
6079
6080 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6081
6082         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6083         sem_warn.adb: Minor reformatting.
6084
6085 2011-08-29  Emmanuel Briot  <briot@adacore.com>
6086
6087         * prj-conf.adb (Get_Config_Switches): Also collect the list of
6088         languages from aggregated projects.
6089
6090 2011-08-29  Yannick Moy  <moy@adacore.com>
6091
6092         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6093         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6094         Traverse_Package_Declaration, Traverse_Subprogram_Body,
6095         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6096         for stubs are traversed too when parameter is set
6097         (Traverse_All_Compilation_Units): Traverse without going inside stubs
6098         (Traverse_Declarations_Or_Statements): Do the special traversing for
6099         stubs when required.
6100         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6101         return subprogram or package body from stub.
6102         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6103         stubs without prior subprogram decl.
6104
6105 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
6106
6107         * gnat_ugn.texi: Fix typo.
6108
6109 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6110
6111         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6112         which accounts for size vs alignment issues and calculates the size of
6113         the list header.
6114         (Deallocate_Any_Controlled): Ditto.
6115         (Nearest_Multiple_Rounded_Up): New routine.
6116
6117 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6118
6119         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6120         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6121         (Set_Exception_Msg): Ditto.
6122         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
6123         Private_Data.
6124         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6125         Use Save_Occurrence instead of Save_Occurrence_No_Private.
6126         (Raise_With_Msg): Remove Cleanup_Flag.
6127         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6128         Clean_Flag and Private_Data components.
6129
6130 2011-08-29  Yannick Moy  <moy@adacore.com>
6131
6132         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6133         in CodePeer mode.
6134         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6135         of an explicitly declared type, so that the base types of the original
6136         type and this generated type are the same, and a "type" (not a subtype
6137         like previously).
6138         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6139         small" in Alfa mode, like in CodePeer mode.
6140         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6141         clauses in Alfa mode.
6142
6143 2011-08-29  Javier Miranda  <miranda@adacore.com>
6144
6145         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6146         function to the package spec.
6147         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6148         internally generated bodies of null procedures locate the internally
6149         generated spec enforcing mode conformance.
6150         (Is_Interface_Conformant): Ensure that the controlling formal of the
6151         primitives match.
6152
6153 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6154
6155         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6156         reject the pragma if it appears to apply to a formal subprogram.
6157
6158 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6159
6160         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6161         inner expression, to prevent double evaluation.
6162
6163 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6164
6165         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6166         they were unused.
6167         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6168         * a-except-2005.adb (Propagate_Exception): Adjust spec.
6169         (Raise_Current_Excep): Adjust call.
6170         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6171
6172 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6173
6174         * exp_disp.adb: Minor reformatting.
6175
6176 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6177
6178         * a-exexpr.adb (Setup_Exception): Removed.
6179         * a-exexpr-gcc.adb (Setup_Exception): Removed.
6180         * a-except.adb (Exception_Propagation): Removed.
6181         * a-except-2005.adb (Setup_Exception): Removed.
6182         (Reraise): Remove call to Setup_Exception.
6183         (Reraise_Occurrence): Ditto.
6184         (Reraise_Occurrence_Always): Ditto.
6185         (Reraise_Occurrence_No_Defer): Ditto.
6186         (Transfer_Occurrence): Ditto.
6187         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6188         (Set_Exception_Msg): Ditto.
6189
6190 2011-08-29  Robert Dewar  <dewar@adacore.com>
6191
6192         * a-convec.adb, exp_disp.adb: Minor reformatting.
6193
6194 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6195
6196         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6197
6198 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6199
6200         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6201         Exception_Handlers to No_List instead of Empty_List in the case where
6202         there are no handlers.
6203
6204 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6205
6206         * gcc-interface/gigi.h (enum standard_datatypes): Add
6207         ADT_reraise_zcx_decl
6208         (reraise_zcx_decl): New macro.
6209         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6210         (gigi): Set reraise_zcx_decl.
6211         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6212         (gnat_to_gnu): Handle N_Raise_Statement.
6213
6214 2011-08-29  Robert Dewar  <dewar@adacore.com>
6215
6216         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6217         a-undesu.adb: Minor reformatting.
6218
6219 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6220
6221         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6222         table, accept an unfrozen untagged component if it is an actual for a
6223         formal incomplete type.
6224         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6225         provide new iterator forms over vectors.
6226         Introduce type Iterator in package body to implement operations of
6227         Reversible_Iterator interface.
6228         * a-iteint.ads: Make package pure so it is usable with new container
6229         packages, that are categorized Remote_Types.
6230
6231 2011-08-29  Robert Dewar  <dewar@adacore.com>
6232
6233         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6234
6235 2011-08-29  Bob Duff  <duff@adacore.com>
6236
6237         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6238         of <>, because this is the routine that checks for dimensionality
6239         errors (for example, for a two-dimensional array, (others => <>) should
6240         be (others => (others => <>)).
6241
6242 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6243
6244         * impunit.adb: Add new run-time units.
6245         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6246         s-stposu.ads, s-stposu.adb: Code clean up.
6247         Handle protected class-wide or task class-wide types
6248         Handle C/C++/CIL/Java types.
6249         * s-spsufi.adb, s-spsufi.ads: New files.
6250
6251 2011-08-29  Yannick Moy  <moy@adacore.com>
6252
6253         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6254         library-level subprogram.
6255         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6256         placement.
6257         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6258         component.
6259         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6260         component.
6261         * gnat_rm.texi: Update doc for Test_Case pragma.
6262
6263 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6264
6265         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6266         convention C.
6267         (GCC_Exception_Access): New type.
6268         (Unwind_DeleteException): New imported procedure
6269         (Foreign_Exception): Import it.
6270         (GNAT_GCC_Exception): Simply have the occurrence inside.
6271         (To_GCC_Exception): New function.
6272         (To_GNAT_GCC_Exception): New function.
6273         (GNAT_GCC_Exception_Cleanup): New procedure..
6274         (Propagate_GCC_Exception): New procedure.
6275         (Reraise_GCC_Exception): New procedure.
6276         (Setup_Current_Excep): New procedure.
6277         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6278         (Unwind_RaiseException): Ditto.
6279         (Unwind_ForcedUnwind): Ditto.
6280         (Remove): Removed.
6281         (Begin_Handler): Change type of parameter.
6282         (End_Handler): Ditto. Now delete the exception if still present.
6283         (Setup_Key): Removed.
6284         (Is_Setup_And_Not_Propagated): Removed.
6285         (Set_Setup_And_Not_Propagated): Ditto.
6286         (Clear_Setup_And_Not_Propagated): Ditto.
6287         (Save_Occurrence_And_Private): Ditto.
6288         (EID_For): Add 'not null' constraint on parameter.
6289         (Setup_Exception): Does nothing.
6290         (Propagate_Exception): Simplified.
6291         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6292         re-raise is not expanded anymore.
6293         * s-except.ads (Foreign_Exception): New exception - placeholder for
6294         non Ada exceptions.
6295         * raise-gcc.c (__gnat_setup_current_excep): Declare
6296         (CXX_EXCEPTION_CLASS): Define (not yet used)
6297         (GNAT_EXCEPTION_CLASS): Define.
6298         (is_handled_by): Handle foreign exceptions.
6299         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6300
6301 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6302
6303         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6304
6305 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6306
6307         * a-synbar-posix.adb: Minor reformatting.
6308
6309 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6310
6311         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6312         a-exetim-default.ads (Interrupt_Clocks_Supported,
6313         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6314         definitions to be compliant with AI-0171. The target systems do not
6315         support separate account for the execution time of interrupt handlers.
6316
6317 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6318
6319         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6320         in the barrier to put first the easiest to evaluate (and the one which
6321         will be True more often). More efficient.
6322
6323 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
6324
6325         * s-atocou-x86.adb: Fix constraint in machine code insertion.
6326
6327 2011-08-29  Bob Duff  <duff@adacore.com>
6328
6329         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6330         attributes that are now aspects, as specified by AI05-0229-1.
6331         * sem_ch13.adb (Analyze_Aspect_Specifications,
6332         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6333         pragmas or attribute references, as appropriate.
6334
6335 2011-08-29  Robert Dewar  <dewar@adacore.com>
6336
6337         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6338         a-synbar-posix.ads: Minor reformatting.
6339
6340 2011-08-29  Yannick Moy  <moy@adacore.com>
6341
6342         * snames.ads-tmpl: Add name Force.
6343
6344 2011-08-29  Pascal Obry  <obry@adacore.com>
6345
6346         * prj-nmsc.adb: Minor reformatting.
6347
6348 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6349
6350         * a-exetim.ads (Interrupt_Clocks_Supported,
6351         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6352         definitions to be compliant with AI-0171.
6353
6354 2011-08-29  Robert Dewar  <dewar@adacore.com>
6355
6356         * a-ngelfu.adb: Add comments.
6357
6358 2011-08-29  Geert Bosch  <bosch@adacore.com>
6359
6360         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6361         the closest machine number to Pi / 2.0.
6362
6363 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6364
6365         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
6366         package Ada.Synchronous_Barriers.
6367         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
6368         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
6369         default implementation using protected objects and another one
6370         a-synbar-posix using POSIX barriers as the underlying support.
6371         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
6372         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
6373         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
6374         Clean up dependencies.
6375         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
6376
6377 2011-08-29  Robert Dewar  <dewar@adacore.com>
6378
6379         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
6380         exp_dist.adb: Minor code reorganization.
6381         Minor reformatting.
6382
6383 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6384
6385         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
6386         primitive operation must support external streaming if it is not a
6387         controlling access result.
6388
6389 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6390
6391         * sinfo.ads, sem_ch7.adb: Minor reformatting.
6392
6393 2011-08-29  Bob Duff  <duff@adacore.com>
6394
6395         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
6396         restriction on allocators, as required by AI05-0013-1.
6397         * restrict.ads: Minor comment fix.
6398
6399 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6400
6401         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
6402         (To_Jmpbuf_Address): Ditto
6403         (builtin_longjmp): Ditto
6404
6405 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6406
6407         * sem_res.adb: Minor reformatting.
6408
6409 2011-08-29  Vincent Celier  <celier@adacore.com>
6410
6411         * make.adb (Gnatmake): Move special processing for VM targets after the
6412         call to Get_Target_Parameters.
6413
6414 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6415
6416         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
6417
6418 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6419
6420         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
6421         where an anonymous access discriminant of a limited designated type
6422         appears in a non-immutably limited discriminated type and issue an
6423         error message. Add local variable Desig_T and replace all occurrences
6424         of Designated_Type.
6425
6426 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6427
6428         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
6429         implementation is compliant to RM D.15(15/2) after the modification
6430         imposed by AI05-0094-1 (binding interpretation).
6431
6432 2011-08-29  Robert Dewar  <dewar@adacore.com>
6433
6434         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
6435         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
6436
6437 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6438
6439         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
6440         the scope name, do not report a missing label as a style violation (it
6441         will be diagnosed as an illegality).
6442         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
6443         variant records: Get_Enum_Lit_From_Pos already returns a usage
6444         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
6445         on Expr in Integer_Literal case so that it can be used by
6446         Build_To_Any_Call.
6447
6448 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6449
6450         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
6451         Adjust comment.
6452         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
6453         (Build_Abort_Block_Handler): New function to build an Abort_Signal
6454         exception handler.
6455         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
6456         Build_Abort_Block_Handler to build the exception handler. Do not
6457         undefer aborts for the Abort_Signal exception handler if back-end
6458         exception mechanism.
6459         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
6460         back_end exceptions for all others and abort_signal.
6461         * s-except.ads (ZCX_By_Default): New constant.
6462         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
6463         (Raise_Exception_Always): Ditto.
6464         (Raise_From_Signal_Handler): Ditto.
6465         (Raise_With_Location_And_Msg): Ditto.
6466         (Raise_With_Msg): Ditto.
6467         (Reraise): Ditto.
6468         (Reraise_Occurence): Ditto.
6469         (Reraise_Occurrence_Always): Ditto.
6470         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
6471         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
6472
6473 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6474
6475         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
6476
6477 2011-08-29  Robert Dewar  <dewar@adacore.com>
6478
6479         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
6480         Minor code reorganization.
6481
6482 2011-08-29  Bob Duff  <duff@adacore.com>
6483
6484         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
6485         2012, not just Ada 2005.
6486
6487 2011-08-29  Vincent Celier  <celier@adacore.com>
6488
6489         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
6490         with a project file or with gprbuid, if -gnatep= is specified, the
6491         builder may need to be invoked with -x.
6492
6493 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6494
6495         * a-exexpr-gcc.adb: Minor comment fix.
6496
6497 2011-08-29  Robert Dewar  <dewar@adacore.com>
6498
6499         * sem_ch8.adb: Minor reformatting.
6500
6501 2011-08-29  Bob Duff  <duff@adacore.com>
6502
6503         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
6504         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
6505         treating "some" as unreserved in earlier Ada versions. This is now
6506         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
6507         rather than Name_Some, since Tok_Some is now recognized as reserved.
6508         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
6509         reserved word.
6510         * scans.ads: Minor comment fixes.
6511         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
6512         for other language versions.
6513         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
6514         treating "some" as unreserved in earlier Ada versions. This is now
6515         handled in Snames.Is_Keyword_Name.
6516         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
6517         Ada 2012.
6518         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
6519         unreserved in earlier Ada versions. This is now handled in
6520         Snames.Is_Keyword_Name.
6521         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
6522         words as for other language versions.
6523         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
6524         Ada 2012, not just Ada 2005.
6525
6526 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6527
6528         * sem_ch13.adb: Additional semantic checks for aspects involved in
6529         iterators.
6530
6531 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6532
6533         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
6534         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
6535         Container parameter.
6536         (Ancestor_Find): ditto.
6537
6538 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6539
6540         * par-endh.adb: Minor reformatting.
6541
6542 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6543
6544         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
6545         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
6546         (Adjust_N_CLeanups_For): Remove.
6547         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
6548         stack is reached.
6549         (Propgate_Exception): Adjust.
6550         * raise-gcc.c: Add a few static/const.
6551         (Adjust_N_Cleanups_For): Remove declaration.
6552         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
6553
6554 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6555
6556         * sem_ch8.adb: Use type of function return when rewriting as object
6557         declaration.
6558
6559 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6560
6561         * sem_type.adb: Minor reformatting.
6562
6563 2011-08-29  Robert Dewar  <dewar@adacore.com>
6564
6565         * makeutl.adb: Minor reformatting.
6566
6567 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6568
6569         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
6570         function call of a limited type, the expansion of the renaming is
6571         complicated by the presence of various temporaries and subtypes that
6572         capture constraints of the renamed object.
6573         Rewrite node as an object declaration, whose expansion is simpler.
6574         Given that the object is limited there is no copy involved and no
6575         performance hit.
6576
6577 2011-08-29  Robert Dewar  <dewar@adacore.com>
6578
6579         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
6580         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
6581
6582 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6583
6584         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
6585         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
6586         system-linux-hppa.ads, system-linux-s390.ads,
6587         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
6588         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
6589         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
6590         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
6591         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
6592         system-solaris-sparc.ads, system-lynxos-x86.ads,
6593         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
6594         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
6595         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
6596         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
6597         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
6598         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
6599         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
6600         * opt.ads: Adjust comment.
6601         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
6602         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
6603         * system.ads: Move GCC_ZCX_Support to obsolete entries.
6604
6605 2011-08-29  Emmanuel Briot  <briot@adacore.com>
6606
6607         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
6608         file name is specified on the gnatmake or gprbuild command line, and
6609         before we search for that file in the project.
6610
6611 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6612
6613         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
6614         used to determine whether a possible interpretation for an overloadable
6615         entity is declared within the current instantiation and should be
6616         included in the candidate set.
6617
6618 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
6619
6620         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
6621
6622 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6623
6624         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
6625         access subtype is access_to_subprogram, when applying checks for
6626         RM 3.10.2 (27).
6627
6628 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6629
6630         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
6631         for sibling when common parent.
6632
6633 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6634
6635         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
6636         "pragma_".
6637
6638 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6639
6640         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
6641         for the return type when in ASIS mode.
6642
6643 2011-08-29  Vincent Celier  <celier@adacore.com>
6644
6645         * make.adb (Gnatmake): Get the default search dirs, then the target
6646         parameters after getting the Builder switches, as the Builder switches
6647         may include --RTS= and that could change the default search dirs.
6648
6649 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6650
6651         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
6652         Make_Final_Call. Move the processing for class-wide types before the
6653         processing for derivations from [Limited_]Controlled.
6654         (Make_Final_Call): Move the processing for class-wide types before the
6655         processing for derivations from [Limited_]Controlled.
6656         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
6657         Add code to account for alignments larger than the list header. Add a
6658         comment illustrating the structure of the allocated object + padding +
6659         header.
6660         (Deallocate_Any_Controlled): Add code to account for alignments larger
6661         than the list header.
6662
6663 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6664
6665         * sinfo.ads, sinfo.adb: New node kind
6666         N_Formal_Incomplete_Type_Definition, related flags.
6667         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
6668         Parse formal incomplete types.
6669         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
6670         sem_ch12.
6671         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
6672         Formal incomplete types do not need completion.
6673         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
6674         Validate_Incomplete_Type_Instance): New procedures to handle formal
6675         incomplete types.
6676         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
6677         that corresponds to a formal incomplete type.
6678         * sprint.adb: Handle formal incomplete type declarations.
6679         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
6680         an insertion point.
6681
6682 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6683
6684         * a-fihema.ads, a-fihema.adb: Unit removed.
6685         * a-undesu.ads, a-undesu.adb: New unit implementing
6686         Ada.Unchecked_Deallocate_Subpool.
6687         * einfo.adb: Remove Associated_Collection from the node usage.
6688         Add Finalization_Master to the node usage.
6689         (Associated_Collection): Removed.
6690         (Finalization_Master): New routine.
6691         (Set_Associated_Collection): Removed.
6692         (Set_Finalization_Master): New routine.
6693         (Write_Field23_Name): Remove Associated_Collection from the output. Add
6694         Finalization_Master to the output.
6695         * einfo.ads: Remove attribute Associated_Collection and its uses in
6696         entities.
6697         Add new attribute Finalization_Master along with its uses in entitites.
6698         (Associated_Collection): Removed along with its pragma import.
6699         (Finalization_Master): New routine along with a pragma import.
6700         (Set_Associated_Collection): Removed along with its pragma import.
6701         (Set_Finalization_Master): New routine along with a pragma import.
6702         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
6703         Build_Finalization_Collection with Build_Finalization_Master.
6704         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
6705         before the bodies of the predefined routines. Add comment explaining
6706         this. Replace call to Build_Finalization_Collection with
6707         Build_Finalization_Master.
6708         (Freeze_Type): Replace call to Build_Finalization_Collection with
6709         Build_Finalization_Master.
6710         (Make_Finalize_Address_Body): Comment reformatting.
6711         (Make_Predefined_Primitive_Specs): Code reformatting.
6712         (Stream_Operation_OK): Update comment mentioning finalization
6713         collections. Replace RE_Finalization_Collection with
6714         RE_Finalization_Master.
6715         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
6716         Associated_Collection with Finalization_Master. Replace call to
6717         Build_Finalization_Collection with Build_Finalization_Master.
6718         (Expand_Allocator_Expression): Replace call to Associated_Collection
6719         with Finalization_Master. Replace call to Set_Associated_Collection with
6720         Set_Finalization_Master. Remove the generation of
6721         Set_Finalize_Address_Ptr.
6722         (Expand_N_Allocator): Replace call to Associated_Collection with
6723         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
6724         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
6725         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
6726         comment on usage. Replace call to Needs_BIP_Collection with
6727         Needs_BIP_Finalization_Master Remplace BIP_Collection with
6728         BIP_Finalization_Master. Update all comments which mention finalization
6729         collections. Replace Associated_Collection with
6730         Finalization_Master. Replace Build_Finalization_Collection with
6731         Build_Finalization_Master.
6732         (BIP_Formal_Suffix): Update BIP_Collection's case.
6733         (Build_Heap_Allocator): Update the related comment. Rename local
6734         variable Collect to Fin_Mas_Id and update its occurrences. Update
6735         comments which mention finalization collections. Replace
6736         Set_Associated_Collection with Set_Finalization_Master.
6737         (Expand_Call): Update the code which detects a special piece of library
6738         code for .NET/JVM.
6739         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
6740         Add_Collection_Actual_To_Build_In_Place_Call with
6741         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
6742         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
6743         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
6744         Add_Collection_Actual_To_Build_In_Place_Call with
6745         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6746         (Make_Build_In_Place_Call_In_Assignment): Replace call to
6747         Add_Collection_Actual_To_Build_In_Place_Call with
6748         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
6749         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6750         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
6751         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
6752         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
6753         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
6754         Replace call to Set_Associated_Collection with Set_Finalization_Master.
6755         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
6756         Replace the call to Associated_Collection with Finalization_Master.
6757         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
6758         Update the way finalization master names are generated. Update the
6759         retrieval of the correct access type which will carry the pool and
6760         master attributes.
6761         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
6762         (Make_Finalize_Address_Body): Abstract types do not need
6763         Finalize_Address. Code reformatting.
6764         (Make_Finalize_Address_Stmts): Update comment on usage.
6765         (Make_Set_Finalize_Address_Ptr_Call): Removed.
6766         (Process_Declarations): Update comments.
6767         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
6768         Build_Finalization_Master. Update associated comment.
6769         (Make_Set_Finalize_Address_Ptr_Call): Removed.
6770         * exp_ch13.adb: Update comments which mention finalization collections.
6771         (Expand_N_Free_Statement): Replace the call to Associated_Collection
6772         with Finalization_Master.
6773         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
6774         create calls to routines Allocate_Any_Controlled and
6775         Deallocate_Any_Controlled.
6776         (Find_Finalize_Address): New routine.
6777         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
6778         comparison.
6779         (Requires_Cleanup_Actions): Update the comment on freeze node
6780         inspection.
6781         * exp_util.ads: Remove comment on generated code for
6782         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
6783         is better to simply look in the body.
6784         * freeze.adb (Freeze_All): Update the comment of finalization
6785         collections. Replace the call to Associated_Collection with
6786         Finalization_Master. Replace the call to Build_Finalization_Collection
6787         with Build_Finalization_Master.
6788         * impunit.adb: Add a-undesu and s-stposu to the list of units.
6789         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
6790         a-fihema.
6791         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
6792         Ada.Finalization. Add processing for children of System.Storage_Pools.
6793         * rtsfind.ads: Remove the naming of second level children of
6794         Ada.Finalization.
6795         Remove Ada_Finalization_Heap_Management from the list of units.
6796         Remove subtype Ada_Finalization_Child.
6797         Remove the following subprogram entities:
6798         
6799            RE_Allocate
6800            RE_Deallocate
6801            RE_Finalization_Collection
6802            RE_Finalization_Collection_Ptr
6803            RE_Set_Finalize_Address_Ptr
6804         
6805         Add the naming of second level children of System.Storage_Pools.
6806         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
6807         the list of units.
6808         Add subtype System_Storage_Pools_Child.
6809         Add the following subprogram entities to System.Finalization_Masters:
6810         
6811            RE_Finalization_Master
6812            RE_Finalization_Master_Ptr
6813         
6814         Add the following subprogram entities to System.Storage_Pools.Subpools:
6815         
6816            RE_Allocate_Any_Controlled
6817            RE_Deallocate_Any_Controlled
6818            RE_Root_Storage_Pool_With_Subpools
6819            RE_Root_Subpool
6820            RE_Subpool_Handle
6821         
6822         Move the following subprogram entities from
6823         Ada.Finalization.Heap_Management to System.Finalization_Masters:
6824         
6825            RE_Add_Offset_To_Address
6826            RE_Attach
6827            RE_Base_Pool
6828            RE_Detach
6829         
6830         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
6831         Set_Associated_Collection with Set_Finalization_Master.
6832         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
6833         BIP_Finalization_Master is created.
6834         * s-finmas.adb: New unit System.Finalization_Masters.
6835         * s-finmas.ads: New unit System.Finalization_Masters.
6836         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
6837         * s-stposu.ads, s-stposu.adb: New unit implementing
6838         System.Storage_Pools.Subpools.
6839
6840 2011-08-29  Bob Duff  <duff@adacore.com>
6841
6842         * tbuild.adb: Add assertion.
6843
6844 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6845
6846         * s-pooglo.adb: Minor reformatting.
6847
6848 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6849
6850         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
6851         an indexed component of a packed array whose element type is a record
6852         with a representation clause different from that of the right-hand
6853         side, generate a temporary to minimuze the number of bit-field
6854         operations generated.
6855
6856 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6857
6858         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
6859         declarations, and thus are likely insertion points for actions.
6860
6861 2011-08-29  Bob Duff  <duff@adacore.com>
6862
6863         * einfo.ads: Minor comment fix.
6864
6865 2011-08-29  Robert Dewar  <dewar@adacore.com>
6866
6867         * frontend.adb, gnat1drv.adb: Minor reformatting.
6868
6869 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6870
6871         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
6872         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
6873         space in front of the header.
6874
6875 2011-08-29  Johannes Kanig  <kanig@adacore.com>
6876
6877         * frontend.adb (Frontend): Exit after creating Standard package when
6878         -gnatd.H is present.
6879         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
6880         present.
6881
6882 2011-08-29  Robert Dewar  <dewar@adacore.com>
6883
6884         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
6885         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
6886         snames.ads-tmpl: Minor reformatting.
6887
6888 2011-08-29  Philippe Gil  <gil@adacore.com>
6889
6890         * prj.adb (Reset_Units_In_Table): New procedure.
6891         Reset units to avoid access to freed memory.
6892
6893 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6894
6895         * get_scos.adb: When reading a P statement SCO without a pragma name
6896         (from an older ALI file), ensure that the Pragma_Name component is set
6897         to Unknown_Pragma (not left uninitialized).
6898
6899 2011-08-29  Vincent Celier  <celier@adacore.com>
6900
6901         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
6902         modified to compute correctly the object path of a SAL project that is
6903         extending another library project.
6904         (Write_Path_File): New procedure.
6905         * makeutl.ads (Directories): New table moved from Buildgpr
6906         (Get_Directories): New procedure moved from Buildgpr
6907         (Write_Path_File): New procedure
6908         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
6909         paths before binding SALs, instead of Set_Ada_Paths.
6910         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
6911         Prj.
6912         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
6913         (Current_Source_Path_File_Of): New function
6914         (Set_Current_Object_Path_File_Of): New procedure
6915         (Current_Source_Object_File_Of): New function
6916         (Set_Current_Object_Path_File_Of): New procedure
6917         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
6918         (Current_Source_Path_File_Of): New function
6919         (Set_Current_Object_Path_File_Of): New procedure
6920         (Current_Source_Object_File_Of): New function
6921         (Set_Current_Object_Path_File_Of): New procedure
6922
6923 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6924
6925         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
6926         packed entity, use a bit-field assignment only if there is no change of
6927         representation.
6928
6929 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6930
6931         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
6932         Is_RTU instead of using Chars comparisons.
6933
6934 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6935
6936         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
6937         temporary object if the actual is constrained, and the discriminants
6938         read from the stream don't match.
6939
6940 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6941
6942         * sem_attr.adb, exp_attr.adb: Add handling of
6943         Attribute_System_Allocator_Alignment
6944         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
6945         Attribute_System_Allocator_Alignment.
6946         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
6947         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
6948         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
6949         get_target_system_allocator_alignment.
6950
6951 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6952
6953         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
6954         dependencies.
6955
6956 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6957
6958         * exp_ch3.adb (In_Runtime): Fix typo.
6959
6960 2011-08-29  Bob Duff  <duff@adacore.com>
6961
6962         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
6963
6964 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6965
6966         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
6967         and a separate tag assignment is generated, ensure that the tag
6968         assignment is analyzed.
6969
6970 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6971
6972         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
6973         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
6974         of statement lists that may contain local declarations.
6975         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
6976         duplicate the triggering statements needed for the expansion of this
6977         construct, when the trigger is a dispatching call to a synchronized
6978         primitive.
6979
6980 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6981
6982         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
6983         * bindgen.adb: Add comments.
6984         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
6985         in CodePeer mode.
6986
6987 2011-08-29  Robert Dewar  <dewar@adacore.com>
6988
6989         * exp_attr.adb: Minor reformatting.
6990         Minor code reorganization and commenting.
6991         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
6992         reformatting.
6993
6994 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6995
6996         * get_scos.adb: Ignore chaining indicators not currently supported
6997         by Ada.
6998
6999 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7000
7001         * system.ads: Minor editing.
7002
7003 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7004
7005         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7006         CodePeer mode.
7007         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7008         Attribute_Elab_Subp_Body.
7009         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7010         * sem_util.adb: Update comments.
7011
7012 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7013
7014         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7015         pragma name for each SCO statement corresponding to a pragma.
7016
7017 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7018
7019         * opt.ads: Minor editing.
7020
7021 2011-08-29  Yannick Moy  <moy@adacore.com>
7022
7023         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7024         that only made sense for CodePeer mode.
7025
7026 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7027
7028         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7029         which is no longer used.
7030         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7031         handling of the 64-bit division check.
7032         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7033         division available.
7034         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7035         longer used.
7036
7037 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7038
7039         * get_scos.adb: Minor reformatting.
7040
7041 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7042
7043         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7044         statement list is wrapped in a block, the block is explicitly analyzed
7045         in order to properly redecorate the entities and create a servicing
7046         finalizer.
7047
7048 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7049
7050         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7051         (Set_Zero_Cost_Handling): Remove.
7052
7053 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7054
7055         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7056
7057 2011-08-29  Geert Bosch  <bosch@adacore.com>
7058
7059         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7060         instruction, as the latter may produce -0.0, which is not a valid VAX
7061         F float number.
7062         (Neg_G): Likewise for VAX F float.
7063
7064 2011-08-29  Robert Dewar  <dewar@adacore.com>
7065
7066         * exp_util.adb: Minor reformatting.
7067
7068 2011-08-29  Yannick Moy  <moy@adacore.com>
7069
7070         * sem_ch3.adb: Minor comment update.
7071
7072 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7073
7074         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7075         the operand type.
7076
7077 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7078
7079         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7080         current statement sequence on a generic instantiation or a subprogram
7081         declaration.
7082
7083 2011-08-29  Robert Dewar  <dewar@adacore.com>
7084
7085         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7086         Minor reformatting.
7087
7088 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7089
7090         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7091         Correct the check which involves the freeze node of a controlled or
7092         access-to-controlled type.
7093
7094 2011-08-29  Geert Bosch  <bosch@adacore.com>
7095
7096         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7097         statements.
7098         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7099         Asm statements.
7100
7101 2011-08-29  Yannick Moy  <moy@adacore.com>
7102
7103         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7104         for every index type and component type that is not a subtype_mark.
7105         (Process_Subtype): Set Etype of subtype.
7106
7107 2011-08-29  Robert Dewar  <dewar@adacore.com>
7108
7109         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7110         reorganization.  Minor reformatting.
7111
7112 2011-08-29  Steve Baird  <baird@adacore.com>
7113
7114         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7115         for CodePeer and ALFA modes.
7116
7117 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7118
7119         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7120         that comes from an enclosing scope if it is not the renaming of an
7121         actual, to handle properly a spurious ambiguity in an instance.
7122
7123 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
7124
7125         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7126         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
7127         use it instead of the Esize of the first parameter.
7128         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7129         above change.
7130         <Size>: Likewise.  Call it for composite types on the RM size.
7131
7132 2011-08-29  Yannick Moy  <moy@adacore.com>
7133
7134         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7135         * sem_util.adb (Unique_Name): Correct behaviour for names of
7136         compilation units.
7137
7138 2011-08-29  Yannick Moy  <moy@adacore.com>
7139
7140         * sem_prag.adb (Check_Precondition_Postcondition): In formal
7141         verification mode, analyze pragma expression for correctness, for
7142         pre/post on library-level subprogram, as it is not expanded later.
7143
7144 2011-08-29  Yannick Moy  <moy@adacore.com>
7145
7146         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7147         in formal verification.
7148
7149 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7150
7151         * sem_util.adb: Minor reformatting.
7152         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7153         there's no pragma.
7154         * par_sco.ads, par_sco.adb: Update comments.
7155
7156 2011-08-29  Yannick Moy  <moy@adacore.com>
7157
7158         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7159         associated getter/setter.
7160         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7161
7162 2011-08-29  Vincent Celier  <celier@adacore.com>
7163
7164         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7165         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7166         with declarations for Language_Kind and Dependency_Kind for Ada.
7167         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7168         (Process_Compiler): Take into account the new attributes Dependency_Kind
7169         and Language_Kind.
7170         (Check_Configuration): Check if language kind is unit based, not if the
7171         language name is Ada.
7172         (Process_Exceptions_Unit_Based): Ditto
7173         (Add_Language): Remove default additions of language and dependency kind
7174         * prj.ads: Minor comment change
7175         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7176
7177 2011-08-29  Johannes Kanig  <kanig@adacore.com>
7178
7179         * debug.adb: Update comments.
7180
7181 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
7182
7183         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7184         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7185         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7186         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7187         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7188
7189 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7190
7191         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7192         (GNATLIBCFLAGS_FOR_C): Replace
7193         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7194         (gnatlib-shared-default, gnatlib-shared-dual-win32)
7195         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7196         (gnatlib-sjlj, gnatlib-zcx): Likewise.
7197
7198 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
7199
7200         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7201
7202         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7203
7204         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7205
7206 2011-08-05  Nicolas Roche  <roche@adacore.com>
7207
7208         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7209         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7210         canadian cross.
7211         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7212
7213 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7214
7215         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7216         subprogram bodies declared out-of-order.
7217
7218 2011-08-05  Yannick Moy  <moy@adacore.com>
7219
7220         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7221         entities directly in package Standard, otherwise skip the standard
7222         prefix.
7223
7224 2011-08-05  Robert Dewar  <dewar@adacore.com>
7225
7226         * a-cbmutr.adb: Minor reformatting
7227         (Allocate_Node): refactor node allocation algorithm
7228
7229 2011-08-05  Robert Dewar  <dewar@adacore.com>
7230
7231         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7232         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7233         mode.
7234         (Analyze_Pragma, case Check_Policy): Ditto.
7235         * sem_prag.ads (Check_Disabled): New function
7236         * snames.ads-tmpl: Add Name_Disable.
7237
7238 2011-08-05  Robert Dewar  <dewar@adacore.com>
7239
7240         * gnat_rm.texi: Document implementation-defined policy DISABLE for
7241         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7242
7243 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7244
7245         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7246         that appears in a generic formal part and applies to a formal
7247         subprogram.
7248
7249 2011-08-05  Robert Dewar  <dewar@adacore.com>
7250
7251         * a-cbmutr.ads: Minor reformatting.
7252
7253 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7254
7255         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7256         to check count, check sign of value instead.
7257         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7258         (Copy_Subtree): allocate copy of source element
7259         (Equal_Subtree): compare elements, not access objects
7260
7261 2011-08-05  Vincent Celier  <celier@adacore.com>
7262
7263         * gnat_ugn.texi: Fix VMS alternative.
7264
7265 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7266
7267         * sem_ch11.adb: Add comment.
7268
7269 2011-08-05  Robert Dewar  <dewar@adacore.com>
7270
7271         * exp_util.adb: Minor comment fix.
7272
7273 2011-08-05  Robert Dewar  <dewar@adacore.com>
7274
7275         * scng.adb (Error_Unterminated_String): Improve flag position when
7276         comma present.
7277
7278 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7279
7280         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7281         tree containers).
7282         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7283         multiway tree containers.
7284
7285 2011-08-05  Robert Dewar  <dewar@adacore.com>
7286
7287         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7288         * stylesw.adb: Implement -gnatyC to control comment spacing
7289         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7290         -gnatyc/C).
7291         * usage.adb: Add line for -gnatyC.
7292
7293 2011-08-05  Robert Dewar  <dewar@adacore.com>
7294
7295         * gnat_ugn.texi: Document -gnatyC.
7296         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7297         synonym for COMMENTS2).
7298
7299 2011-08-05  Robert Dewar  <dewar@adacore.com>
7300
7301         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7302         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7303         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7304         a-comutr.ads, lib-xref.adb: Minor reformatting.
7305
7306 2011-08-05  Robert Dewar  <dewar@adacore.com>
7307
7308         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7309         warning if there is an exception handler present.
7310
7311 2011-08-05  Pascal Obry  <obry@adacore.com>
7312
7313         * a-iteint.ads: Fix copyright year.
7314
7315 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7316
7317         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7318         statement SCO for a USE clause or a representation clause.
7319
7320 2011-08-05  Yannick Moy  <moy@adacore.com>
7321
7322         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7323         between body and spec for stub.
7324         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7325         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7326         pragma precondition or postcondition, for which the enclosing
7327         subprogram or package in the AST is not the desired one, return empty.
7328
7329 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7330
7331         * g-expect.adb: Minor reformatting.
7332
7333 2011-08-05  Bob Duff  <duff@adacore.com>
7334
7335         * a-fihema.adb: Comment out OS_Lib.
7336
7337 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7338
7339         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7340         (unbounded multiway tree containers) and a-iteint.ads.
7341         * a-comutr.ads, a-comutr.adb:
7342         This is the new Ada 2012 unit for unbounded multiway tree containers
7343         * a-cimutr.ads, a-cimutr.adb
7344         This is the new Ada 2012 unit for indefinite multiway tree containers
7345         * a-iteint.ads: New file.
7346
7347 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7348
7349         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7350
7351 2011-08-05  Bob Duff  <duff@adacore.com>
7352
7353         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7354         subpools.
7355         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7356
7357 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7358
7359         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7360         general indexing aspects of Ada2012. Called when analyzing indexed
7361         components when other interpretations fail.
7362         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
7363         in an expression context where overloading is meaningful. This excludes
7364         the occurrence in an aspect specification (efficiency only).
7365         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
7366         related to iterators can be set by an attribute specification, but
7367         cannot be queried.
7368         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
7369         Constant_Indexing and Variable_Indexing.
7370         (Check_Indexing_Functions): New procedure to perform legality checks.
7371         Additional semantic checks at end of declarations.
7372
7373 2011-08-05  Sergey Rybin  <rybin@adacore.com>
7374
7375         * tree_io.ads: Update ASIS_Version_Number because of the change of the
7376         order of calling Tree_Write/Tree_Read routines made for aspects.
7377
7378 2011-08-05  Bob Duff  <duff@adacore.com>
7379
7380         * a-fihema.adb (Finalize): Fix race condition.
7381
7382 2011-08-05  Yannick Moy  <moy@adacore.com>
7383
7384         * sem_ch12.adb (Analyze_Package_Instantiation,
7385         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
7386         mode.
7387
7388 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7389
7390         * sem_type.adb (Specific_Type): in an instance, the type-specific
7391         operand of an equality check that involves null may have a private
7392         type. Use full view to determine legality of construct.
7393
7394 2011-08-05  Vincent Celier  <celier@adacore.com>
7395
7396         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7397         delete or close the file when the call to gnatmake was successful.
7398
7399 2011-08-05  Yannick Moy  <moy@adacore.com>
7400
7401         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
7402         Global_Discard_Names.
7403
7404 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7405
7406         * sinfo.ads: comments on use of entity field for aspect specifications.
7407
7408 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7409
7410         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
7411         node is not itself an entity but a selected component, it is a
7412         rewritten parameterless call to an en enclosing synchronized operation,
7413         and this expansion will be performed again in the instance, so there is
7414         no global information to preserve.
7415
7416 2011-08-05  Javier Miranda  <miranda@adacore.com>
7417
7418         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
7419         for renamings of predefined primitives.
7420         (In_Predef_Prims_DT): New subprogram.
7421
7422 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7423
7424         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
7425         possible interpretation of name is a reference type, add an
7426         interpretation that is the designated type of the reference
7427         discriminant of that type.
7428         * sem_res.adb (resolve): If the interpretation imposed by context is an
7429         implicit dereference, rewrite the node as the deference of the
7430         reference discriminant.
7431         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
7432         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
7433         parent type or base type.
7434         * sem_ch4.adb (Process_Indexed_Component,
7435         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
7436         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
7437         Check for implicit dereference.
7438         (List_Operand_Interps): Indicate when an implicit dereference is
7439         ambiguous.
7440         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
7441
7442 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7443
7444         * scos.ads: Update documentation of SCO table. Pragma statements can now
7445         be marked as disabled (using 'p' instead of 'P' as the statement kind).
7446         * par_sco.ads, par_sco.adb: Implement the above change.
7447         (Process_Decisions_Defer): Generate a P decision for the first parameter
7448         of a dyadic pragma Debug.
7449         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
7450         necessary.
7451         * put_scos.adb: Code simplification based on above change.
7452
7453 2011-08-05  Robert Dewar  <dewar@adacore.com>
7454
7455         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
7456         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
7457         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
7458         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
7459
7460 2011-08-05  Bob Duff  <duff@adacore.com>
7461
7462         * a-stunau.ads, g-spipat.adb: Update comments.
7463
7464 2011-08-05  Bob Duff  <duff@adacore.com>
7465
7466         * a-fihema.ads: Minor comment fix.
7467         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
7468         correct.
7469         (Attach, Detach): Remove some unnecessary code.
7470         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
7471
7472 2011-08-05  Bob Duff  <duff@adacore.com>
7473
7474         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
7475         allocation for Objects component. This simplifies the code somewhat. It
7476         is also a little more efficient in the not-so-unusual case where there
7477         are no controlled objects allocated.
7478         Make Finalization_Started flag atomic.
7479         (Finalize): Avoid unnecessary detachment of items from the list.
7480         (pcol): Minor cleanup.
7481
7482 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7483
7484         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
7485         package whose name is the same as that of the generic unit, or its
7486         ultimate prefix.
7487
7488 2011-08-05  Bob Duff  <duff@adacore.com>
7489
7490         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
7491         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
7492         Minor comment fixes.
7493
7494 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
7495
7496         * make.adb (Linking_Phase): No longer need to set source search path
7497         before calling gnatlink in CodePeer mode.
7498         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
7499         gcc in CodePeer mode, since the binder generated file no longer has a
7500         'with Main'.
7501         * switch.ads, switch.adb (Is_Language_Switch): Removed.
7502         * switch-c.adb: Update comment.
7503
7504 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7505
7506         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
7507
7508 2011-08-05  Nicolas Roche  <roche@adacore.com>
7509
7510         * gnat_ugn.texi: Fix minor syntax error issue.
7511
7512 2011-08-05  Vincent Celier  <celier@adacore.com>
7513
7514         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
7515         delete or close the file when the call to gnatmake returns a non
7516         successful return code.
7517
7518 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7519
7520         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
7521         check, indicate that the copy of the original node does not come from
7522         source, to prevent an infinite recursion of the expansion.
7523
7524 2011-08-05  Johannes Kanig  <kanig@adacore.com>
7525
7526         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
7527         VC generation for subprogram bodies.
7528
7529 2011-08-05  Yannick Moy  <moy@adacore.com>
7530
7531         * einfo.ads: Typo.
7532         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
7533         the base type with the smallest allowed base type.
7534
7535 2011-08-05  Sergey Rybin  <rybin@adacore.com>
7536
7537         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
7538         aspects.
7539
7540 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7541
7542         * sem_ch12.ads: minor comment updates.
7543
7544 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7545
7546         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
7547         instantiation and a formal package the compiler generates a package
7548         renaming declaration so that the generic name within the declaration
7549         is interpreted as a renaming of the instance. At the end of a formal
7550         package declaration, this renaming must become invisible.
7551
7552 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
7553
7554         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
7555         comparison and rely on concrete entities instead.
7556
7557 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7558
7559         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
7560         and discriminants, to indicate that the type has an access discriminant
7561         that supports implicit dereference.
7562         * snames.ads-tmpl: Add names of aspects and attributes related to
7563         Ada2012 iterators: constant_indexing, default_iterator,
7564         iterator_element, implicit_dereference, variable_indexing.
7565         * aspects.ads, aspects.adb: entries for iterator-related aspects.
7566         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
7567         iterator-related aspects.
7568         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
7569
7570 2011-08-05  Sergey Rybin  <rybin@adacore.com>
7571
7572         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
7573         metrics in gnatmetric to cover new kinds of coupling mentrics.
7574
7575 2011-08-05  Steve Baird  <baird@adacore.com>
7576
7577         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
7578         of calling the user-defined main subprogram.
7579         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
7580         is set) Call_Main_Subprogram ahead of, as opposed to
7581         inside of, Main.
7582         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
7583         generation of a "with" of the user-defined main subprogram.
7584         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
7585         (which is now called from Gen_Main instead).
7586
7587 2011-08-05  Emmanuel Briot  <briot@adacore.com>
7588
7589         * projects.texi: Added reference to the Makefile package.
7590
7591 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7592
7593         * exp_ch7.adb: Minor comment rewording.
7594
7595 2011-08-05  Ed Falis  <falis@adacore.com>
7596
7597         * env.c: Fix comment.
7598
7599 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
7600
7601         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
7602         character comparison and rely on concrete entities instead.
7603
7604 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7605
7606         * sem_ch3.adb: (Check_Private_Overriding): better error message,
7607         suggested by AI95-0068.
7608
7609 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
7610
7611         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
7612         the two potential initialization calls. This accounts for any
7613         access-before-elaboration checks which may precede the initialization
7614         calls.
7615         (Next_Suitable_Statement): New routine. Returns the next real statement
7616         after the input node while skipping generated checks.
7617         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
7618         with comment on usage.
7619         Do not generate Elaborate_All when the trigger is a finalization call
7620         coming from a type init proc.
7621         (Check_Elab_Call): Propagate the initialization procedure context to
7622         subsequent calls to Check_A_Call.
7623         (Check_Internal_Call_Continue): Propagate the initialization procedure
7624         context to subsequent calls to Check_Elab_Call.
7625         (Is_Finalization_Procedure): New routine. Returns True if the input
7626         entity denotes a [Deep_]Finalize routine.
7627         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
7628         along with comment on usage.
7629
7630 2011-08-05  Vadim Godunko  <godunko@adacore.com>
7631
7632         * s-atocou.ads: Add list of supported platforms.
7633
7634 2011-08-05  Yannick Moy  <moy@adacore.com>
7635
7636         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
7637
7638         * opt.ads (Disable_ALI_File): new Boolean flag
7639         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
7640
7641 2011-08-05  Ed Falis  <falis@adacore.com>
7642
7643         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
7644         environ is properly defined.
7645
7646 2011-08-05  Vincent Celier  <celier@adacore.com>
7647
7648         * make.adb (Compilation_Phase): Exit immediately when all objects have
7649         been found up to date, to avoid multiple exit messages.
7650         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
7651         same project for languages with no compiler.
7652         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
7653         -eI.
7654 2011-08-05  Robert Dewar  <dewar@adacore.com>
7655
7656         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
7657         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
7658         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
7659         s-atocou-builtin.adb: Minor reformatting.
7660
7661 2011-08-05  Yannick Moy  <moy@adacore.com>
7662
7663         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
7664         if the node to wrap is a pragma check, this node and enclosed
7665         expression are not expanded, so do not apply any transformations here.
7666         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
7667         introducing transient scopes.
7668
7669 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
7670
7671         * adaint.c (__gnat_set_writable, __gnat_set_readable,
7672         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
7673         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
7674         routine is available, so we use the default implementation of these
7675         functions.
7676         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
7677         support for copying attributes on VxWorks 6.
7678
7679 2011-08-05  Yannick Moy  <moy@adacore.com>
7680
7681         * debug.adb: Remove use of -gnatd.D.
7682         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
7683         * opt.ads: Simplify variables for ALFA mode, to keep one only
7684         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
7685         to ALFA mode.
7686
7687 2011-08-05  Vincent Celier  <celier@adacore.com>
7688
7689         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
7690         Builder'Default_Switches.
7691
7692 2011-08-05  Vincent Celier  <celier@adacore.com>
7693
7694         * makeusg.adb: Add lines for --create-map-file switches.
7695
7696 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7697
7698         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
7699         profile is incomplete and the full view is available, replace it with
7700         the full view.
7701         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
7702         incomplete, freezing the subprogram is delayed until the full view is
7703         frozen.
7704         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
7705         fixed-point multiplication operator and the predefined operator is
7706         resolved in favor of the user-defined one.
7707
7708 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7709
7710         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
7711         CONST_CAST.
7712
7713 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7714
7715         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
7716         whether a type lacks user-defined Read or Write operations, or has a
7717         component that lacks them.
7718         * sem_attr.adb (Check_Stream_Attribute): if restriction
7719         No_Default_Stream_Attributes is active, verify that all subcomponent
7720         types of the target have user-defined stream operations, and report
7721         error otherwise.
7722         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
7723         * exp_strm.adb: Build_Elementary_Input_Call,
7724         Build_Elementary_Write_Call): remove checks for restriction
7725         No_Default_Stream_Attributes, now checked in semantics.
7726
7727 2011-08-04  Vincent Celier  <celier@adacore.com>
7728
7729         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
7730         switches on the command line, look for all valid --RTS switches in the
7731         Builder switches and for each language use the first runtime name found
7732         to invoke gprconfig.
7733         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
7734         command line and there is no auto-configuration.
7735         (Runtime_Name_Set_For): New function.
7736
7737 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7738
7739         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
7740         elaborate initialization expression for variable Abort when processing
7741         a package body or a declaration.
7742         (Create_Finalizer): Propagate the package context when creating the
7743         exception-related variables.
7744         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
7745         For_Package along with usage comment.
7746
7747 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7748
7749         * gcc-interface/Makefile.in: Clean up targets.
7750         Enable new package for atomic counters and copy-on-write implementation
7751         of unbounded strings on x86 platforms.
7752         * gcc-interface/Make-lang.in: Update dependencies.
7753
7754 2011-08-04  Robert Dewar  <dewar@adacore.com>
7755
7756         * exp_ch7.adb: Minor reformatting.
7757
7758 2011-08-04  Robert Dewar  <dewar@adacore.com>
7759
7760         * exp_strm.adb: Minor reformatting.
7761
7762 2011-08-04  Vadim Godunko  <godunko@adacore.com>
7763
7764         * s-atocou.adb: Replace by dummy version and use on targets where atomic
7765         operations are not supported.
7766         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
7767         * s-atocou-x86.adb: New file.
7768         * Makefile.rtl: Add s-atocou.o file
7769
7770 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7771
7772         * make.adb (Compile): Move setting of CodePeer_Mode to ...
7773         (Compilation_Phase): ... here.
7774         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
7775
7776 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7777
7778         * Make-generated.in: Fix minor typo in comment.
7779
7780 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7781
7782         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
7783         the project path.
7784
7785 2011-08-04  Robert Dewar  <dewar@adacore.com>
7786
7787         * a-coinho.adb: Minor reformatting.
7788
7789 2011-08-04  Robert Dewar  <dewar@adacore.com>
7790
7791         * a-coinho.ads: Minor reformatting.
7792
7793 2011-08-04  Vadim Godunko  <godunko@adacore.com>
7794
7795         * s-atocou.ads, s-atocou.adb: New files.
7796         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
7797         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
7798         direct use of GCC's atomic builtins and replace them by use of new
7799         atomic counter package.
7800
7801 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7802
7803         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
7804
7805 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7806
7807         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
7808         with a call to Get_External_Tag.
7809         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
7810         subprogram usage. Remove the guard against package declarations and
7811         bodies since Build_Cleanup_Statements is no longer invoked in that
7812         context.
7813         (Build_Components): Initialize Tagged_Type_Stmts when the context
7814         contains at least one library-level tagged type.
7815         (Build_Finalizer): New local variables Has_Tagged_Types and
7816         Tagged_Type_Stmts along with associated comments on usage. Update the
7817         logic to include tagged type processing.
7818         (Create_Finalizer): Insert all library-level tagged type unregistration
7819         code before the jump block circuitry.
7820         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
7821         (Expand_N_Package_Declaration): Remove the call to
7822         Build_Cleanup_Statements.
7823         (Process_Tagged_Type_Declaration): New routine. Generate a call to
7824         unregister the external tag of a tagged type.
7825         (Processing_Actions): Reimplemented to handle tagged types.
7826         (Process_Declarations): Detect the declaration of a library-level
7827         tagged type and carry out the appropriate actions.
7828         (Unregister_Tagged_Types): Removed. The machinery has been directly
7829         merged with Build_Finalizer.
7830
7831 2011-08-04  Robert Dewar  <dewar@adacore.com>
7832
7833         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
7834         gnatls.adb, exp_ch3.adb: Minor reformatting.
7835
7836 2011-08-04  Marc Sango  <sango@adacore.com>
7837
7838         * sem_attr.adb (Analyze_Attribute): Replace the message
7839         "invisible attribute of}" of the spark restriction violation in
7840         attribute reference by the simple message "invisible attribute of type".
7841         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
7842         two insertion characters: '&' and '}'.
7843
7844 2011-08-04  Vadim Godunko  <godunko@adacore.com>
7845
7846         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
7847         * a-coinho.ads, a-coinho.adb: New file.
7848         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
7849
7850 2011-08-04  Nicolas Roche  <roche@adacore.com>
7851
7852         * alfa_test.adb: Not all ali files are containing alfa information even
7853         if compiled with -gnatd.F. So suppress warning about missing ALFA
7854         information.
7855
7856 2011-08-04  Yannick Moy  <moy@adacore.com>
7857
7858         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
7859         scope.
7860         * put_alfa.adb: Check that scope name is not empty.
7861
7862 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7863
7864         * exp_ch3.adb (Stream_Operation_Ok): new predicate
7865         Needs_Elementary_Stream_Operation, to determine whether user-defined
7866         Read and Write attributes are available for the elementary components
7867         of the given type. If only the predefined attributes are available,
7868         then when restriction No_Default_Stream_Attributes is active the
7869         predefined stream attributes for the composite type cannot be created.
7870
7871 2011-08-04  Robert Dewar  <dewar@adacore.com>
7872
7873         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
7874         Put routines in alpha order
7875
7876 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
7877
7878         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
7879         * gcc-interface/Make-lang.in: Update dependencies.
7880
7881 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7882
7883         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
7884         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
7885         gnat1why).
7886
7887 2011-08-04  Robert Dewar  <dewar@adacore.com>
7888
7889         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
7890         lib-xref-alfa.adb: Minor reformatting.
7891
7892 2011-08-04  Marc Sango  <sango@adacore.com>
7893
7894         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
7895         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
7896         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
7897         mode.
7898
7899 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7900
7901         * bindgen.adb (Gen_Adainit_C): Remove.
7902         (Gen_Adafinal_C): Ditto.
7903         (Gen_Elab_Externals_C): Ditto.
7904         (Gen_Elab_Calls_C): Ditto.
7905         (Gen_Elab_Order_C): Ditto.
7906         (Gen_Elab_Defs_C): Ditto.
7907         (Gen_Finalize_Library_C): Ditto.
7908         (Gen_Finalize_Library_Defs_C): Ditto.
7909         (Gen_Main_C): Ditto.
7910         (Gen_Output_File_C): Ditto.
7911         (Gen_Restrictions_C): Ditto.
7912         (Gen_Versions_C): Ditto.
7913         (Write_Info_Ada_C): Ditto.
7914         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
7915         (Gen_Output_File): Do not force Ada_Bind_File anymore.
7916         Always call Gen_Output_File_Ada.
7917         * gnatlink.adb (Begin_Info): Now a constant.
7918         (End_Info): Ditto.
7919         (Ada_Bind_File): Remove
7920         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
7921         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
7922         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
7923         * opt.ads (Ada_Bind_File): Remove.
7924
7925 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7926
7927         * projects.texi: Document target-specific directory in default project
7928         path for gnatmake.
7929
7930 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7931
7932         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
7933         path in all cases .
7934
7935 2011-08-04  Yannick Moy  <moy@adacore.com>
7936
7937         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
7938         opt.ads, lib-xref.ads: Code clean up.
7939
7940 2011-08-04  Yannick Moy  <moy@adacore.com>
7941
7942         * gnat_rm.texi: Update description of Test_Case
7943         * gnat_ugn.texi: Typo.
7944
7945 2011-08-04  Ed Falis  <falis@adacore.com>
7946
7947         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
7948
7949 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7950
7951         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
7952         it is of type Root_Controlled. This action eliminates fields Prev and
7953         Next from type equality.
7954
7955 2011-08-04  Yannick Moy  <moy@adacore.com>
7956
7957         * lib-xref-alfa.adb: Correct typo.
7958
7959 2011-08-04  Matthew Heaney  <heaney@adacore.com>
7960
7961         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
7962         component.
7963
7964 2011-08-04  Yannick Moy  <moy@adacore.com>
7965
7966         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
7967         (Analyze_Pragma): allow static string expression for name of Test_Case,
7968         instead of simply string literals.
7969         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
7970         expressions.
7971
7972 2011-08-04  Vincent Celier  <celier@adacore.com>
7973
7974         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
7975         case suffixes to find truncated main sources.
7976
7977 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7978
7979         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
7980         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
7981         (Compute_Current_Task): Ditto.
7982
7983 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7984
7985         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
7986
7987 2011-08-04  Yannick Moy  <moy@adacore.com>
7988
7989         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
7990         library-level constant.
7991         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
7992         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
7993         used as selector of parameter association, in ALFA mode.
7994
7995 2011-08-04  Robert Dewar  <dewar@adacore.com>
7996
7997         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
7998         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
7999         reformatting.
8000
8001 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8002
8003         * make.adb (Linking_Phase): Set source search path before calling
8004         gnatlink in CodePeer mode.
8005
8006 2011-08-04  Javier Miranda  <miranda@adacore.com>
8007
8008         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8009         Remove code which takes care of building TSDs.
8010         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8011         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8012         the accessibility check in VM targets.
8013         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8014         (Building_Static_DT): Now returns false for VM targets.
8015         (Build_VM_TSDs): Removed.
8016         (Expand_Interface_Conversion): Generate missing runtime check for
8017         conversions to interface types whose target type is unknown at compile
8018         time.
8019         (Make_VM_TSD): Add missing code to disable the generation of calls to
8020         Check_TSD if the tagged type is not defined at library level, or not
8021         has a representation clause specifying its external tag, or -gnatdQ is
8022         active.
8023         * exp_disp.ads (Build_VM_TSDs): Removed.
8024         (Make_VM_TSDs): Spec relocated from exp_disp.adb
8025         * sem_disp.adb (Check_Dispatching_Operation): No code required to
8026         register primitives in the dispatch tables in VM targets.
8027         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8028         initialization of class-wide interface objects in VM targets.
8029         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8030         of Make_DT).
8031
8032 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
8033
8034         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8035         when dotnet-ld cannot be found.
8036
8037 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8038
8039         * bindgen.adb: Simplify significantly generation of binder body file in
8040         CodePeer mode.
8041         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8042         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8043         not expanded).
8044
8045 2011-08-04  Yannick Moy  <moy@adacore.com>
8046
8047         * sem_prag.adb, sem.ads: Code cleanup.
8048
8049 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8050
8051         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8052         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8053         results if possible.
8054         * s-stusta.adb (Print): Adjust after changes in s-stausa.
8055         * gnat_ugn.texi: Update dynamic stack usage section.
8056
8057 2011-08-04  Steve Baird  <baird@adacore.com>
8058
8059         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8060         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8061         contains only a call to the user-defined main subprogram.
8062         (Gen_Main_Ada) - If CodePeer_Mode is set, then
8063         call the "wrapper" subprogram instead of directly
8064         calling the user-defined main subprogram.
8065
8066 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8067
8068         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8069         alternatives of a case statement for controlled objects. Rename local
8070         variable A to Dead_Alt.
8071         (Expand_N_If_Statement): Check the then and else statements of an if
8072         statement for controlled objects. Check the then statements of all
8073         elsif parts of an if statement for controlled objects.
8074         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8075         objects.
8076         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8077         detects a loop associated with the expansion of an array object.
8078         Augment the processing of the loop statements to account for a possible
8079         wrap done by Process_Statements_For_Controlled_Objects.
8080         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8081         statements and abortable part of an asynchronous select for controlled
8082         objects.
8083         (Expand_N_Conditional_Entry_Call): Check the else statements of a
8084         conditional entry call for controlled objects.
8085         (Expand_N_Selective_Accept): Check the alternatives of a selective
8086         accept for controlled objects.
8087         (Expand_N_Timed_Entry_Call): Check the entry call and delay
8088         alternatives of a timed entry call for controlled objects.
8089         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8090         exception handler for controlled objects.
8091         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8092         Add formal parameter Nested_Constructs along with its associated
8093         comment.
8094         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8095         Requires_Cleanup_Actions.
8096         (Process_Statements_For_Controlled_Objects): New routine.
8097         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8098         routine. Inspect a node which contains a non-handled sequence of
8099         statements for controlled objects. If such an object is found, the
8100         statements are wrapped in a block.
8101
8102 2011-08-04  Bob Duff  <duff@adacore.com>
8103
8104         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8105         need to compare with Class_Wide_Type (T2), in order to get at the
8106         original class-wide type node.
8107         * sem_type.ads (Covers): Improve the comment.
8108         * einfo.ads (Class_Wide_Type): Improve the comment.
8109         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8110         the type of the Deref.
8111
8112 2011-08-04  Yannick Moy  <moy@adacore.com>
8113
8114         * gnat_rm.texi: Document that Test_Case pragma can only appear on
8115         separate declarations.
8116         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8117         check identifier of pragma argument.
8118         (Chain_TC): check that no other test case associated to the same entity
8119         share the same name.
8120         (Check_Test_Case): disallow test case inside subprogram body
8121         (Analyze_Pragma): correct call to check identifier and not argument
8122         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8123         function gets name from test case pragma.
8124
8125 2011-08-04  Yannick Moy  <moy@adacore.com>
8126
8127         * gnat_rm.texi: Document new pragma and aspect.
8128         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8129         (No_Duplicates_Allowed): new constant array defining whether duplicates
8130         aspects of each kind can appear on the same declaration.
8131         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8132         field, which points to a node holding the previous Spec_PPC_List.
8133         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8134         through the indirection with Contract.
8135         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8136         * par-prag.adb (Prag): do nothing on Test_Case pragma
8137         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8138         be called directly.
8139         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8140         component Ensures of Test_Case.
8141         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8142         (Analyze_Generic_Subprogram_Declaration,
8143         Analyze_Subprogram_Instantiation,
8144         Analyze_Abstract_Subprogram_Declaration,
8145         Analyze_Subprogram_Body_Helper,
8146         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8147         insert contract in subprogram node at point of definition
8148         * sem_ch13.adb
8149         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8150         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8151         corresponding pragma
8152         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8153         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8154         similar to the analysis of pre/post
8155         (Derive_Subprogram): insert contract in subprogram node at point of
8156         derivation.
8157         * sem_prag.adb, sem_prag.ads
8158         (Check_Arg_Is_String_Literal, Check_Identifier):
8159         new checking procedures to be called in treatment of pragmas
8160         (Check_Test_Case): new procedure to check that a Test_Case aspect or
8161         pragma is well-formed. This does not check currently that 'Result is
8162         used only in the Ensures component of a Test_Case.
8163         (Analyze_Pragma): add case for Test_Case
8164         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8165         components of a Test_Case.
8166         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8167         expressions in the 3rd (and 4th if present) arguments of a Test_Case
8168         pragma, treated as spec expressions.
8169         (Sig_Flags): add value -1 for Test_Case.
8170         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8171         Get_Requires_From_Test_Case_Pragma): getters for both expression
8172         components of a Test_Case.
8173         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8174         indirection between an entry or [generic] subprogram entity and its
8175         pre/post + test-cases.
8176         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8177         get/set for fields of an N_Contract node.
8178         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8179         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8180         names and pragma for Test_Case.
8181         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8182
8183 2011-08-04  Vincent Celier  <celier@adacore.com>
8184
8185         * gnat_ugn.texi: Improve documentation of gnatmake switch
8186         --source-info-file=.
8187
8188 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8189
8190         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8191         type). Initialize Atyp to the appropriate type which is later checked
8192         for completion. Rewrite the assertion associated with private type
8193         completion.
8194
8195 2011-08-04  Ed Falis  <falis@adacore.com>
8196
8197         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8198         initialize the number of CPUs.
8199
8200 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8201
8202         * sem_type.adb (Disambiguate): New subsidiary routine
8203         In_Same_Declaration_List, to implement AI05-0020: a user-defined
8204         equality on an anonymous access type whose designated type is private
8205         does not lead to an ambiguity with the universal access equality
8206         operator in the body or child units of the defining package. The same
8207         is true for a multiplication operator on a private type completed with
8208         a fixed-point-type.
8209
8210 2011-08-04  Javier Miranda  <miranda@adacore.com>
8211
8212         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8213         (Normalize_Scalars_Config): Removed.
8214         * opt.adb
8215         (Register_Opt_Config_Switches): Remove registering config values of
8216         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8217         (Restore_Opt_Config_Switches): Remove code which restores the values of
8218         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8219         Init_Or_Norm_Scalars.
8220         (Save_Opt_Config_Switches): Remove code which saves values of
8221         Init_Or_Norm_Scalars and Normalize_Scalars.
8222         (Set_Opt_Config_Switches): Remove code which restores config values of
8223         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8224         Init_Or_Norm_Scalars.
8225
8226 2011-08-04  Yannick Moy  <moy@adacore.com>
8227
8228         * frontend.adb (Frontend): remove previous patch to avoid full
8229         qualification in ALFA mode.
8230         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8231         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8232         unique name for an entity, which could be used to identify the entity
8233         across compilation units.
8234
8235 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8236
8237         * prj-env.adb
8238         (Initialize_Default_Project_Path): Add target specific directory
8239         ($prefix/$target/lib/gnat) in front of project path in all cases
8240         (making gnatmake's behaviour consistent with gprbuild).
8241         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8242         Pass target name from Sdefault to project subsystem.
8243         * gnatls.adb: Show new target specific default project directory.
8244
8245 2011-08-04  Johannes Kanig  <kanig@adacore.com>
8246
8247         * cstand.adb: Add Information to Identifier in Standard
8248         (Identifer_For): Set Entity to the corresponding entity
8249
8250 2011-08-04  Sergey Rybin  <rybin@adacore.com>
8251
8252         * gnat_ugn.texi: Update doc on gnatcheck.
8253
8254 2011-08-04  Yannick Moy  <moy@adacore.com>
8255
8256         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8257         xrefs in a scope.
8258
8259 2011-08-04  Yannick Moy  <moy@adacore.com>
8260
8261         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8262         performing expansion.
8263         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8264         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8265         it is not called in ALFA mode.
8266
8267 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8268
8269         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8270         after all, so removed.
8271
8272 2011-08-04  Sergey Rybin  <rybin@adacore.com>
8273
8274         * vms_data.ads: Add missing VMS qualifiers.
8275
8276 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8277
8278         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8279         the list of files on the command line after processing it through
8280         Complete_Mains.
8281
8282 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8283
8284         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8285         processing for .NET/JVM. These targets can now benefit from
8286         Raise_From_Controlled_Operation and they share the same processing with
8287         standard targets.
8288         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8289         These targets need transient scopes in order to properly finalize short
8290         lived controlled objects.
8291         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8292          NET/JVM. These targets can now benefit from
8293         Raise_From_Controlled_Operation and they share the same processing with
8294         standard targets.
8295
8296 2011-08-04  Geert Bosch  <bosch@adacore.com>
8297
8298         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8299
8300 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8301
8302         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8303         Expand_Record_Aggregate, to determine whether aggregate must be
8304         expanded into assignments. This is the case if the ancestor part is
8305         private, regarless of the setting of the flag Has_Private_Ancestor.
8306
8307 2011-08-04  Ed Falis  <falis@adacore.com>
8308
8309         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8310
8311 2011-08-04  Bob Duff  <duff@adacore.com>
8312
8313         * sinfo.ads: Fix comment.
8314
8315 2011-08-04  Steve Baird  <baird@adacore.com>
8316
8317         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8318         choose a package name in much the same way as is
8319         done for JGNAT when VM_Target /= No_VM, except that
8320         a slightly more distinctive prefix string is used.
8321
8322 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8323
8324         * makeutl.adb (Complete_Mains): no longer accept unit names on the
8325         gnatmake command line.
8326         This behavior was never documented (and was supported only because of
8327         an early bug in the code). This case might lead to ambiguous cases
8328         (between unit names and truncated base names without suffixes).
8329
8330 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8331
8332         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8333         Remove the external tag of a tagged type from the internal hash table.
8334         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8335         expanded usage of the routine. Strenghten the check for Is_Master. Add
8336         processing for tagged types.
8337         (Build_Finalizer): Create all the necessary lists used in finalizer
8338         creation when the processed context is a package that may contain
8339         tagged types.
8340         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8341         Requires_Cleanup_Actions.
8342         (Expand_N_Package_Body): Package bodies may need clean up code
8343         depending on whether they contain tagged types.
8344         (Expand_N_Package_Declaration): Package declarations may need clean up
8345         code depending on whether they contain tagged types.
8346         (Unregister_Tagged_Types): New routine. Search through a list of
8347         declarations or statements, looking for non-abstract Ada tagged types.
8348         For each such type, generate code to unregister the external tag.
8349         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8350         Requires_Cleanup_Actions.
8351         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8352         through a list of declarations or statements looking for non-abstract
8353         Ada tagged types or controlled objects.
8354         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8355         Requires_Cleanup_Actions.
8356         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8357         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8358         RE_Unit_Table.
8359
8360 2011-08-04  Vincent Celier  <celier@adacore.com>
8361
8362         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
8363         has Ada sources, not project Project, because if the root project
8364         Project has no sources of its own, all projects will be deemed without
8365         sources.
8366
8367 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
8368
8369         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
8370         of the No_Param_Proc acc-to-subp type used for initialization of
8371         __gnat_finalize_library_objects so that it's declared at library level
8372         rather than nested inside of the adainit routine.
8373
8374 2011-08-04  Javier Miranda  <miranda@adacore.com>
8375
8376         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
8377         if the tagged type has a representation clause which specifies its
8378         external tag.
8379
8380 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8381
8382         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
8383         Remove previous procedure with that name.
8384         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
8385         when appropriate.
8386         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
8387         subtype mark, the ancestor cannot have unknown discriminants.
8388         (Resolve_Record_Aggregate): if the type has invisible components
8389         because of a private ancestor, the aggregate is illegal.
8390
8391 2011-08-04  Vincent Celier  <celier@adacore.com>
8392
8393         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
8394         account switches -gnat2005, -gnat12 and -gnat2012.
8395
8396 2011-08-04  Bob Duff  <duff@adacore.com>
8397
8398         * s-tasdeb.ads: Minor comment fix.
8399
8400 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8401
8402         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
8403         CodePeer mode.
8404         * switch.ads, switch.adb (Is_Language_Switch): New function.
8405
8406 2011-08-04  Vincent Celier  <celier@adacore.com>
8407
8408         * switch-c.adb: Minor comment addition.
8409
8410 2011-08-04  Vincent Celier  <celier@adacore.com>
8411
8412         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
8413         ending with '=' is followed by a space (missing file name).
8414
8415 2011-08-04  Pascal Obry  <obry@adacore.com>
8416
8417         * g-regist.ads: Fix size of HKEY on x86_64-windows.
8418
8419 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8420
8421         * sem_ch12.adb (Analyze_Associations): New routine
8422         Check_Overloaded_Formal_Subprogram to reject a formal package when
8423         there is a named association or a box initialisation for an overloaded
8424         formal subprogram of the corresponding generic.
8425
8426 2011-08-04  Yannick Moy  <moy@adacore.com>
8427
8428         * alfa.ads (ALFA_Xref_Record): add component for type of entity
8429         * get_alfa.adb, put_alfa.adb: Read and write new component of
8430         cross-reference.
8431         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
8432
8433 2011-08-04  Pascal Obry  <obry@adacore.com>
8434
8435         * urealp.adb: Minor reformatting.
8436
8437 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8438
8439         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
8440         Handle the case when Cleanup_Protected_Object returns Empty.
8441
8442 2011-08-04  Yannick Moy  <moy@adacore.com>
8443
8444         * frontend.adb (Frontend): only qualify names in non-ALFA mode
8445
8446 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8447
8448         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
8449         call, ignore functions.
8450
8451 2011-08-04  Geert Bosch  <bosch@adacore.com>
8452
8453         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
8454         point.
8455
8456 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8457
8458         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
8459         as an index for Builder'Switches. This conforms to the documentation.
8460         * make.adb (Insert_Project_Sources): avoid duplicate code
8461
8462 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8463
8464         * makeutl.adb (Complete_Mains): if the user has passed a relative file
8465         name on the command line (for instance "../dummy"), never assume it can
8466         be a unit name.
8467
8468 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8469
8470         * bindgen.adb: Remove code the reference or create the
8471         Break_Start/__gnat_break_start procedure.
8472         * s-stalib.adb (Break_Start): Removed.
8473
8474 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8475
8476         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
8477         shared with gprbuild.
8478
8479 2011-08-04  Yannick Moy  <moy@adacore.com>
8480
8481         * par-ch4.adb (P_Primary): preferentially issue an error message about
8482         a missing parenthesis arount a conditional or case expression in Ada
8483         2012 mode, if we detect that the alignment is not correct for a
8484         statement.
8485
8486 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8487
8488         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
8489         tag-to-class-wide conversion as needing finalization actions.
8490         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
8491         a tag-to-class-wide conversion as needing finalization actions.
8492         (Is_Finalizable_Transient): The result of a tag-to-class-wide
8493         conversion does not need finalization actions.
8494         (Is_Tag_To_CW_Conversion): New routine.
8495         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
8496         whether an object is the result of a tag-to-class-wide conversion.
8497
8498 2011-08-04  Yannick Moy  <moy@adacore.com>
8499
8500         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
8501         the left-hand-side and right-hand-side of a conjunct are inserted when
8502         translating a pre- or postcondition
8503         * sem_ch6.adb: Correct typo in comment
8504
8505 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8506
8507         * gnat_rm.texi: Ravenscar does not prohibit dependence on
8508         Unchecked_Conversion and Unchecked_Deallocation.
8509
8510 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8511
8512         * make.adb: Minor reformatting.
8513
8514 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8515
8516         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
8517         sources in the project and its imported projects, but not in the whole
8518         tree.
8519
8520 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8521
8522         * make.adb: Remove debug trace.
8523
8524 2011-08-04  Vincent Celier  <celier@adacore.com>
8525
8526         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
8527         path in canonical form, to be able to compare path names on platforms
8528         such as Windows or Darwin.
8529
8530 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8531
8532         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
8533         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
8534         * scos.ads: Update documentation accordingly.
8535         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
8536         pragmas.
8537
8538 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8539
8540         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
8541         attribute only if prefix type is scalar.
8542
8543 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8544
8545         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
8546         in gnatmake for specifying mains on the command line that do not belong
8547         to the main project. These mains must currently all belong to the same
8548         project, though.
8549         (Ultimate_Extension_Of): removed, since duplicated
8550         Ultimate_Extending_Project.
8551
8552 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8553
8554         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
8555         instead.
8556         (CodePeer_Mode_String): New.
8557         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
8558         CodePeer mode.
8559         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
8560         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
8561         mode, since no useful elaboration subprogram is needed by CodePeer.
8562         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
8563         In this mode, compile binder file with -gnatC and do stop after this
8564         step.
8565
8566 2011-08-04  Vincent Celier  <celier@adacore.com>
8567
8568         * exp_ch7.adb: Minor comment fix.
8569
8570 2011-08-04  Robert Dewar  <dewar@adacore.com>
8571
8572         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
8573         exp_ch4.adb, makeutl.adb: Minor reformatting.
8574
8575 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8576
8577         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
8578         Create several new subprograms to move code out of Make. This makes the
8579         code more readable, removes code duplication, and is a preparation work
8580         for adding support for aggregate projects.
8581
8582 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8583
8584         * s-po32gl.ads, s-po32gl.adb: New files.
8585         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
8586         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
8587         (Build_Finalization_Collection): Use it.
8588         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
8589         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
8590         literals.
8591         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
8592         * gcc-interface/Make-lang.in: Update dependencies.
8593
8594 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8595
8596         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
8597         the command line.
8598
8599 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8600
8601         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
8602         command line is not a file name, also check whether it could be a unit
8603         name.
8604
8605 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8606
8607         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
8608         the header of the finalization routine.
8609         If the unit has no finalizer but is a body whose spec has one, then
8610         generate the decrement of the elaboration entity only.
8611         If the unit has a finalizer and is a spec, then do not generate the
8612         decrement of the elaboration entity.
8613         (Gen_Finalize_Library_C): Likewise.
8614
8615 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8616
8617         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
8618         (Bounds_Size_Expression): Removed.
8619         (Double_Alignment_Of): New subsidiary routine.
8620         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
8621         for a hole in the dope vector of unconstrained arrays due to different
8622         index and element alignments.
8623
8624 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8625
8626         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
8627         raise program_error because body has not been seen yet.
8628
8629 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8630
8631         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
8632         an unresolved name.
8633
8634 2011-08-04  Vincent Celier  <celier@adacore.com>
8635
8636         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
8637
8638 2011-08-04  Yannick Moy  <moy@adacore.com>
8639
8640         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
8641         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
8642
8643 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8644
8645         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
8646         instantiation in RCI.
8647
8648 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8649
8650         * make.adb: Share more code with gprbuild
8651
8652 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8653
8654         * projects.texi: Added documentation for the IDE'Gnat project file
8655         attribute.
8656
8657 2011-08-04  Nicolas Roche  <roche@adacore.com>
8658
8659         * gnat_rm.texi: Minor editing.
8660
8661 2011-08-04  Javier Miranda  <miranda@adacore.com>
8662
8663         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
8664         and the library case for VM targets.
8665         (Gen_Adainit_Ada): Likewise.
8666
8667 2011-08-04  Robert Dewar  <dewar@adacore.com>
8668
8669         * g-altive.ads: Minor comment updates.
8670         * prj-nmsc.adb: Minor reformatting.
8671
8672 2011-08-04  Javier Miranda  <miranda@adacore.com>
8673
8674         * opt.ads
8675         (Normalize_Scalars_Config): Value of the configuration switch set by
8676         pragma Normalize_Scalars when it appears in the gnat.adc file.
8677         (Normalize_Scalars): New field for record Config_Switches_Type. Used
8678         to save and restore settings of this pragma.
8679         * opt.adb
8680         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
8681         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
8682
8683 2011-08-04  Vincent Celier  <celier@adacore.com>
8684
8685         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
8686
8687 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8688
8689         * makeutl.adb: Minor reformatting.
8690
8691 2011-08-04  Olivier Hainque  <hainque@adacore.com>
8692
8693         * g-altive.ads: Update comments to reflect that only the soft
8694         binding is available today.
8695
8696 2011-08-04  Robert Dewar  <dewar@adacore.com>
8697
8698         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
8699         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
8700         * gcc-interface/Make-lang.in: Update dependencies.
8701
8702 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8703
8704         * prj-env.adb: Remove local debug traces.
8705
8706 2011-08-04  Yannick Moy  <moy@adacore.com>
8707
8708         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
8709         was used instead of Hi_OK, which could cause a read of an uninitialized
8710         value later on. Detected while working on the new warning.
8711         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
8712         to local variable.
8713         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
8714         in more cases, in order to detect more unreferenced values.
8715         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
8716         object for expression, if any.
8717
8718 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8719
8720         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
8721         the operand types instead of the Esize.
8722
8723 2011-08-04  Steve Baird  <baird@adacore.com>
8724
8725         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
8726         enable CodePeer_Mode.
8727         * bindusg.adb (Display): Add help message describing -P binder switch.
8728         * gnat_ugn.texi: Document -P binder switch.
8729         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
8730         user-defined main program directly.
8731         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
8732         user-defined main program in the context clause of the package body.
8733
8734 2011-08-04  Yannick Moy  <moy@adacore.com>
8735
8736         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
8737         duplicate of Defining_Entity
8738         (Get_Unique_Entity_For_Decl): rename function into
8739         Unique_Defining_Entity
8740         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
8741         (Formal_Proof_On): remove synthesized flag
8742         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8743         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
8744         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
8745         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
8746         Annotate (Formal_Proof)
8747
8748 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8749
8750         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
8751         source files with non-standard naming schemes, in imported projects
8752
8753 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8754
8755         * makeutl.adb (Complete_Mains): when a multi-unit source file is
8756         specified on the gprbuild command line, we need to compile all units
8757         within that file, not just the first one we find
8758         Fix error message for mains that are not found.
8759
8760 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8761
8762         * sem_ch6.adb: Update comment.
8763         * sem_ch12.adb: Minor reformatting.
8764
8765 2011-08-04  Bob Duff  <duff@adacore.com>
8766
8767         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
8768         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
8769         race condition whose symptom is to fail to lock Parent. That, in turn,
8770         causes Parent.Awake_Count to be accessed without locking Parent, which
8771         causes another race condition whose symptom is that Parent.Awake_Count
8772         can be off by 1 (either too high or too low). The solution is to lock
8773         Parent unconditionally, and then lock Acceptor, before reading
8774         Acceptor.Terminate_Alternative.
8775
8776 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8777
8778         * debug.adb: Update comment.
8779
8780 2011-08-04  Robert Dewar  <dewar@adacore.com>
8781
8782         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
8783         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
8784         exp_ch6.adb: Minor reformatting.
8785
8786 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
8787
8788         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
8789         checks for -gnateE.
8790
8791 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8792
8793         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
8794
8795 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8796
8797         * sinfo.ads: Minor reformatting.
8798
8799 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8800
8801         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
8802         even if there is no location.
8803
8804 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8805
8806         * sem_res.adb, sem_ch4.adb: move check for restriction
8807         No_Task_Hierarchy to resolve_allocator.
8808
8809 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8810
8811         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
8812         This flag of N_Pragma nodes is not used, remove it as well as all of
8813         the associated circuitry.
8814
8815 2011-08-04  Javier Miranda  <miranda@adacore.com>
8816
8817         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
8818         runtime check on duplicated externa tags
8819         * debug.adb Document switch -gnatdQ.
8820
8821 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
8822
8823         * a-fihema.ads: Minor typo fix.
8824
8825 2011-08-04  Yannick Moy  <moy@adacore.com>
8826
8827         * sem_ch10.adb: Minor comment update.
8828
8829 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8830
8831         * einfo.adb: Update the node field usage to reflect the renaming of
8832         Return_Flag to Return_ Flag_Or_Transient_Decl.
8833         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
8834         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
8835         (Write_Field15_Name): Change Return_Flag to
8836         Return_Flag_Or_Transient_Decl.
8837         * einfo.ads: Rename node field Return_Flag to
8838         Return_Flag_Or_Transient_Decl. Update the associated comment and all
8839         occurrences in entities.
8840         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
8841         associated Inline pragma.
8842         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
8843         associated Inline pragma.
8844         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
8845         routine.
8846         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
8847         Return_Flag and Set_Return_Flag.
8848         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
8849         objects generated for controlled transients declared inside an
8850         Exception_With_Actions. Update the calls to Return_Flag.
8851         (Process_Object_Declaration): Add code to add a null guard for hook
8852         objects generated for controlled transients declared inside an
8853         Exception_With_Actions. Update related comment.
8854         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
8855         objects generated for controlled transients declared inside an
8856         Exception_With_Actions. Update the calls to Return_Flag.
8857         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
8858
8859 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8860
8861         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
8862         positional aggregate.
8863
8864 2011-08-04  Vincent Celier  <celier@adacore.com>
8865
8866         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
8867         SLOC only for pragmas.
8868
8869 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8870
8871         * projects.texi: Minor typo fix.
8872
8873 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8874
8875         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
8876         on case-sensitive file systems.
8877
8878 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8879
8880         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
8881         nested in a disabled pragma.
8882         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
8883         enclosing pragma, if any, for X decisions.
8884
8885 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8886
8887         * sem_prag.adb: Minor reformatting.
8888
8889 2011-08-04  Vincent Celier  <celier@adacore.com>
8890
8891         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
8892         allowed in no run time mode.
8893
8894 2011-08-04  Vincent Celier  <celier@adacore.com>
8895
8896         * make.adb (Check): When -gnatc is used, check for the source file
8897         inside the ALI file with a canonical case file name.
8898
8899 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8900
8901         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
8902         overriding the separator.
8903
8904 2011-08-04  Robert Dewar  <dewar@adacore.com>
8905
8906         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
8907         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
8908
8909 2011-08-04  Robert Dewar  <dewar@adacore.com>
8910
8911         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
8912
8913 2011-08-04  Yannick Moy  <moy@adacore.com>
8914
8915         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
8916         'Result only appears in postcondition of function.
8917
8918 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8919
8920         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
8921         external tag, include the value of the external tag in the exception
8922         message.
8923
8924 2011-08-04  Yannick Moy  <moy@adacore.com>
8925
8926         * sem_attr.adb (Result): modify error message for misplaced 'Result
8927
8928 2011-08-04  Sergey Rybin  <rybin@adacore.com>
8929
8930         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
8931         clear that the second argument must be an identifier.
8932
8933 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8934
8935         * exp_ch9.adb (Build_Barrier_Function): When compiling with
8936         -fpreserve-control-flow, insert an IF statement on the barrier
8937         condition to ensure that a conditional branch instruction is generated.
8938
8939 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8940
8941         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
8942         (Processing_Flags.Ignore_Missing_With): new flag.
8943
8944 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8945
8946         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
8947         Source_List_File on case-insensitive systems where the file is actually
8948         on a case-sensitive file system (NFS,...).
8949
8950 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8951
8952         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
8953         function return contains a controlled [extension] aggregate and the
8954         return statement is not part of a handled sequence of statements, wrap
8955         the return in a block. This ensures that all controlled temporaries
8956         generated during aggregate resolution will be picked up by the
8957         finalization machinery.
8958
8959 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8960
8961         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
8962         components, freeze type before resolution, to ensure that default
8963         initializations are present for all components.
8964         * sem_res.adb (Resolve_Actuals): the designated object of an
8965         accces-to-constant type is a legal actual in a call to an
8966         initialization procedure.
8967
8968 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8969
8970         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
8971         N_Unchecked_Type_Conversion to the possible containers of a renamed
8972         transient variable.
8973
8974 2011-08-04  Yannick Moy  <moy@adacore.com>
8975
8976         * par-ch13.adb (Aspect_Specifications_Present): recognize
8977         "with Identifier'Class =>" as an aspect, so that a meaningful warning
8978         is issued in Strict mode.
8979         * par.adb: Fix typos in comments.
8980
8981 2011-08-04  Yannick Moy  <moy@adacore.com>
8982
8983         * sem_attr.adb (Result): modify error message to take into account Post
8984         aspect when compiling Ada 2012 (or newer) code.
8985
8986 2011-08-04  Nicolas Roche  <roche@adacore.com>
8987
8988         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
8989         remove need for GCC exceptions.
8990
8991 2011-08-04  Vincent Celier  <celier@adacore.com>
8992
8993         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
8994         project, not the source file name.
8995         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
8996         excluded, continue looking. This excluded source will only be returned
8997         if there is no other source with the same base name that is not locally
8998         removed.
8999
9000 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9001
9002         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9003         private and one of the operands is a real literal, use a qualified
9004         expression rather than a conversion which is not meaningful to the
9005         back-end.
9006
9007 2011-08-04  Yannick Moy  <moy@adacore.com>
9008
9009         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9010         corresponding aspect X'Class are allowed, proceed with analysis of the
9011         aspect instead of skipping it.
9012
9013 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9014
9015         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9016         This will allow to have an Ada implementation for the subprogram.
9017
9018 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9019
9020         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9021         completion and aspects are present, apply them to the entity for the
9022         type which is currently the partial view, but which is the one that
9023         will be frozen.
9024         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9025         applies to a partial view, indicate that the full view has predicates
9026         and delayed aspects.
9027         (Replace_Type_Reference): Handle properly predicates that apply to the
9028         full view of a private completion.
9029
9030 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9031
9032         * layout.adb (Layout_Type): For composite types, do not set Esize.
9033         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9034         set Esize.
9035         (Size_Known): Look at the RM size of components instead of the Esize.
9036         (Freeze_Record_Type): Look at the RM size instead of the Esize to
9037         issue warning and activate Implicit_Packing.
9038         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
9039         if the Esize is not known.
9040         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9041         for elementary types only.
9042         (Analyze_Record_Representation_Clause): Look at the RM size instead
9043         of the Esize to issue errors.
9044         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9045         is not known.
9046         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
9047         obsolete block.
9048         Look at the RM size instead of the Esize for types if the latter is
9049         not known.
9050         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9051
9052 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9053
9054         * sem_type.adb: proper handling of equality not involving anonymous
9055         access types.
9056
9057 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9058
9059         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9060         Vis_Decls. When creating a library-level finalizer for a package spec,
9061         both the declaration and body of the finalizer are inserted either in
9062         the visible or private declarations of the package spec.
9063
9064 2011-08-04  Javier Miranda  <miranda@adacore.com>
9065
9066         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9067         use of the full-view of a type when invoking Is_Ancestor.
9068         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9069         the full-view of private parents is requested, then use also the
9070         full-view of the parent of the first derivation.
9071
9072 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9073
9074         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9075         instead of the locally imported procedure.
9076         * s-taprop-mingw.adb (Enter_Task): Ditto.
9077         * s-valrea.adb (Scan_Real): Ditto.
9078         * s-imgrea.adb (Set_Image_Real): Ditto.
9079         * s-flocon.ads: Make the package pure.
9080
9081 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9082
9083         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9084         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9085         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9086         New subprogram, moved here from...
9087         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9088         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9089         rewriting of the last argument into a procedure call statement here...
9090         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9091         instead.
9092
9093 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9094
9095         * par_sco.adb: Minor reformatting.
9096
9097 2011-08-04  Robert Dewar  <dewar@adacore.com>
9098
9099         * erroutc.adb: Minor reformatting.
9100
9101 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9102
9103         * par_sco.adb: Comment update.
9104
9105 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9106
9107         * s-flocon.ads: New file.
9108         * g-flocon.ads: Now a renaming of s-flocon.
9109         * Makefile.rtl: Add s-flocon.o
9110
9111 2011-08-04  Javier Miranda  <miranda@adacore.com>
9112
9113         * exp_strm.adb (Build_Array_Input_Function): if the array type is
9114         constrained, do not attempt to build a subtype of it.
9115
9116 2011-08-04  Yannick Moy  <moy@adacore.com>
9117
9118         * errout.ads Change comments: remove 'R'M as an example where quotes
9119         are needed; add ALFA as another case where quotes are not needed
9120         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9121         case where quotes are not needed.
9122         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9123         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9124         Remove all occurrences of 'A'L'F'A
9125
9126 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9127
9128         * sem_ch13.adb: check legality of invariant pragma.
9129
9130 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9131
9132         * bindgen.adb: Add comments.
9133
9134 2011-08-04  Yannick Moy  <moy@adacore.com>
9135
9136         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9137         synthesized flag.
9138         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9139         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9140
9141 2011-08-04  Robert Dewar  <dewar@adacore.com>
9142
9143         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9144         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9145         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9146
9147 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9148
9149         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9150
9151 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9152
9153         PR ada/47880
9154         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9155         allocated object.
9156
9157 2011-08-04  Robert Dewar  <dewar@adacore.com>
9158
9159         * einfo.ads, exp_ch4.adb: Minor reformatting.
9160
9161 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9162
9163         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9164
9165 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9166
9167         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9168         type in all cases to compute list of primitive operations, because full
9169         view may be an itype that is not attached to the list of declarations.
9170
9171 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9172
9173         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9174         library has already been finalized.
9175         (Gen_Adafinal_C): Likewise.
9176         (Gen_Adainit_Ada): Generate an early return if the library has
9177         already been elaborated.
9178         (Gen_Adainit_C): Likewise.
9179         (Gen_Output_File_Ada): Generate an elaboration flag.
9180         (Gen_Output_File_C): Likewise.
9181
9182 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9183
9184         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9185         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9186         built in the first place.
9187         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9188         for CodePeer because Finalize_Address was not built to begin with.
9189         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9190
9191 2011-08-04  Pascal Obry  <obry@adacore.com>
9192
9193         * adaint.c (__gnat_tmp_name): Use current process id to create temp
9194         filenames, this ensures unicity of filenames across processes.
9195
9196 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9197
9198         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9199         Raise_Controlled to Raise_From_Controlled_Operation. Update the
9200         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9201         Add False as the actual to From_Abort in the generated call to
9202         Raise_From_Controlled_Operation.
9203
9204 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9205
9206         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9207         so that the ali file name can be retrieved from outside of this package.
9208         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9209         doing nothing in the general case, but used to update the object file
9210         timestamp if directly generated by the backend.
9211         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9212         to a later time than the ali file one.
9213
9214 2011-08-04  Yannick Moy  <moy@adacore.com>
9215
9216         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9217         entities whose body contains an Annotate pragma which forces formal
9218         proof on this body.
9219         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9220         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9221         Mark_Non_ALFA_Subprogram to pass in a message and node.
9222         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9223         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9224         surrounding subprogram.
9225         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9226         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9227         as not in ALFA is annotated with Formal_Proof being On, then an error
9228         is issued based on the additional parameters for message and node.
9229         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9230         * gcc-interface/Make-lang.in: Update dependencies.
9231
9232 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9233
9234         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9235         Finalize_Address when CodePeer is enabled.
9236
9237 2011-08-04  Pascal Obry  <obry@adacore.com>
9238
9239         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9240         the latter returns a pointer to a static buffer which is deallocated
9241         at the end of the routine.
9242
9243 2011-08-04  Yannick Moy  <moy@adacore.com>
9244
9245         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9246         after index creation; mark unconstrained base array type generated as
9247         being in/not in ALFA as well
9248         (Make_Index): mark subtype created as in/not in ALFA
9249         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9250         over a loop as in/not in ALFA, depending on its type and form of loop
9251         iteration.
9252
9253 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9254
9255         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9256         directly to False on .NET and JVM.
9257
9258 2011-08-04  Yannick Moy  <moy@adacore.com>
9259
9260         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9261         constraint that subtype must come from source code to be in ALFA, so
9262         that anonymous subtypes can be in ALFA too.
9263
9264 2011-08-04  Yannick Moy  <moy@adacore.com>
9265
9266         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9267         reference for ALFA mode.
9268         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9269         procedure public so as to use it from formal verification back-end.
9270
9271 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9272
9273         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9274         invalid checks of the Parameter, making Remove_Switch not working
9275         correctly.
9276
9277 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9278
9279         * targparm.ads: Update header: no run-time exception is needed on this
9280         file.
9281
9282 2011-08-04  Vincent Celier  <celier@adacore.com>
9283
9284         * a-fihema.adb: Use System.IO instead of GNAT.IO
9285
9286 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9287
9288         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9289         are forbidden in Compiler_Unit mode.
9290
9291 2011-08-04  Robert Dewar  <dewar@adacore.com>
9292
9293         * sem_util.adb: Minor reformatting.
9294
9295 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9296
9297         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9298         library-level finalizers.
9299         (Gen_Finalize_Library_C): Update the import string for library-level
9300         finalizers.
9301         (Gen_Finalize_Library_Defs_C): Update the definition name of a
9302         library-level finalizer.
9303         * exp_ch7.adb: Remove with and use clauses for Stringt.
9304         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9305         Spec_Decl. Add local variable Body_Id. The names of library-level
9306         finalizers are now manually fully qualified and are no longer external.
9307         A single name is now capable of servicing .NET, JVM and non-VM targets.
9308         Pragma Export is no longer required to provide visibility for the name.
9309         (Create_Finalizer_String): Removed.
9310         (New_Finalizer_Name): New routine which mimics New_..._Name.
9311
9312 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9313
9314         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9315         elaboration counter to Standard_Short_Integer.
9316         * sem_util.adb (Build_Elaboration_Entity): Likewise.
9317         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9318         (Gen_Elab_Externals_C): Likewise.
9319
9320 2011-08-04  Ed Falis  <falis@adacore.com>
9321
9322         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9323         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9324         system-vxworks-mips.ads, system-vxworks-x86.ads
9325         (Always_Compatible_Rep): set to False for all VxWorks targets.
9326
9327 2011-08-04  Robert Dewar  <dewar@adacore.com>
9328
9329         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9330         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9331         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9332         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9333         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9334         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9335         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9336         Minor reformatting and code reorganization.
9337
9338 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9339
9340         * projects.texi: Added doc for aggregate projects.
9341
9342 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9343
9344         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9345         Add support for overriding the Project_Path in aggregate projects.
9346
9347 2011-08-04  Robert Dewar  <dewar@adacore.com>
9348
9349         * a-cofove.ads: Minor reformatting.
9350
9351 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9352
9353         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9354         on the generated code.
9355         (Build_Finalize_Statements): Update the comment on the generated code.
9356         (Build_Initialize_Statements): Update the comment on the generated code.
9357         (Build_Object_Declarations): Add local variable Result. The object
9358         declarations are now built in sequence.
9359         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9360         RE_Unit_Table.
9361
9362 2011-08-04  Robert Dewar  <dewar@adacore.com>
9363
9364         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
9365
9366 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9367
9368         * einfo.ads (Elaboration_Entity): Document new definition and use.
9369         (Elaboration_Entity_Required): Adjust to above change.
9370         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
9371         * exp_ch12.adb: And with and use for Snames.
9372         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
9373         * exp_util.adb (Set_Elaboration_Flag): Likewise.
9374         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
9375         <Check_Unit_Name>: Deal with N_Expanded_Name.
9376         <Attribute_Elaborated>: Extend to all unit names.
9377         * sem_elab.adb: And with and use for Uintp.
9378         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
9379         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
9380         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
9381         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
9382         from Gen_Adainit_Ada.
9383         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
9384         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
9385         case, do not call System.Standard_Library.Adafinal; instead call
9386         finalize_library if needed.
9387         (Gen_Adafinal_C): Likewise.
9388         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
9389         non-main program case.
9390         (Gen_Adainit_C): Generate a couple of external declarations here.
9391         In the main program case, set SSL.Finalize_Library_Objects.
9392         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
9393         (Gen_Elab_Calls_C): Likewise.
9394         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
9395         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
9396         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
9397         objects here.
9398         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
9399         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
9400         Gen_Adafinal_Ada.
9401         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
9402         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
9403         of external declarations.  Call Gen_Finalize_Library_C.
9404
9405 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9406
9407         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
9408         Compute_Compilation_Phases): new subprogram.
9409         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
9410         The number of mains as well as the various compilation phases that
9411         need to be run are now project tree specific, since various
9412         aggregated trees might have different requirements. In particular,
9413         they do not all require bind or link phases.
9414
9415 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9416
9417         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
9418         (Project_Tree_Appdata): New type.
9419         It is now possible to associate application-specific data to a project
9420         tree. In particular, this is used in the gprbuild builder to avoid a
9421         number of global tables and htables, especially now that there can be
9422         several project trees loaded at once because of aggregate projects.
9423         (Debug_Name): new procedure.
9424         * projects.texi: Clarify syntax of "**" for Source_Dirs
9425
9426 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9427
9428         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
9429         the "roots" for a main.
9430         (Fill_From_Project): add support for aggregate projects. Main units
9431         in aggregated projects are now automatically added in the list of
9432         files to build (although this fails later on in gprbuild, because
9433         these files are not using the root proejct tree, so this needs
9434         further cleanup)
9435         * gcc-interface/Make-lang.in: Update dependencies.
9436
9437 2011-08-03  Yannick Moy  <moy@adacore.com>
9438
9439         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
9440         conditional expression in ALFA.
9441         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
9442         expressions as not in ALFA.
9443
9444 2011-08-03  Robert Dewar  <dewar@adacore.com>
9445
9446         * a-cofove.adb: Minor reformatting.
9447
9448 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9449
9450         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
9451         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
9452         gprbuild sources.
9453         These packages are more logically placed in the Queue package, since
9454         they manipulate the queue. It is also likely that they can be adapted
9455         for gnatmake, thus sharing more code.
9456         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
9457         that we could move the above.
9458
9459 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9460
9461         * errutil.adb (Finalize): clean up the list of error messages on exit.
9462         Calling this subprogram multiple times will no longer show duplicate
9463         error messages on stderr.
9464
9465 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9466
9467         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
9468         Getopt_Switches when we have already define a command line
9469         configuration.
9470
9471 2011-08-03  Yannick Moy  <moy@adacore.com>
9472
9473         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
9474         in ALFA. Instead, they are considered as assertions to prove.
9475         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
9476         nodes as not in ALFA. Instead, include conditional expressions in ALFA
9477         if they have no ELSE part, or if they occur in pre- and postconditions,
9478         where the Condition cannot have side-effects in ALFA
9479         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
9480         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
9481         Instead, include type conversion between scalar types in ALFA.
9482         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
9483         if-and-only-if its type is in ALFA.
9484
9485 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9486
9487         * scos.adb, get_scos.adb, put_scos.adb
9488         New code letter for decisions: G (entry guard)
9489         * par_sco.adb
9490         (Traverse_Subprogram_Body): Rename to...
9491         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
9492         (Traverse_Protected_Body): New subprogram
9493         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
9494         protected bodies and entry bodies.
9495
9496 2011-08-03  Yannick Moy  <moy@adacore.com>
9497
9498         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
9499         entities with get/set subprograms, which is set on procedure entities
9500         generated by the compiler for a postcondition.
9501         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
9502         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
9503         entity for a declaration
9504         (Get_Unique_Entity_For_Decl): new function returning an entity which
9505         represents a declaration, so that matching spec and body have the same
9506         entity.
9507
9508 2011-08-03  Robert Dewar  <dewar@adacore.com>
9509
9510         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
9511         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
9512
9513 2011-08-03  Yannick Moy  <moy@adacore.com>
9514
9515         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
9516         library-level because retriction No_Implicit_Dynamic_Code in the
9517         front-end prevents its definition as a local subprogram
9518         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
9519         for reuse in other contexts
9520         (Traverse_Declarations_Or_Statements,
9521         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
9522         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
9523         procedures take a callback parameter to be called on all declarations
9524         * lib-xref.ads
9525         (Traverse_All_Compilation_Units): new generic function to traverse a
9526         compilation unit and call a callback parameter on all declarations
9527
9528 2011-08-03  Javier Miranda  <miranda@adacore.com>
9529
9530         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
9531         in Java since they are always enclosed in a namespace that
9532         differentiates them, and overloaded entities are supported by the VM.
9533
9534 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9535
9536         * checks.adb (Determine_Range): If a computed bound of an operation is
9537         outside the range of the base type of the expression, and overflow
9538         checks are enabled, the result is unknown and cannot be used for any
9539         subsequent constant folding.
9540         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
9541         unknown, so is the result of the comparison.
9542
9543 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9544
9545         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
9546         From_Abort. When finalization was triggered by an abort, propagate
9547         Standard'Abort_Signal rather than Program_Error.
9548         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
9549         From_Abort.
9550         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
9551         From_Abort. When finalization was triggered by an abort, propagate
9552         Standard'Abort_Signal rather than Program_Error.
9553         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
9554         From_Abort.
9555         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
9556         Abort_Id. Update the calls to Build_Object_Declarations and
9557         Build_Raise_Statement to include Abort_Id.
9558         (Build_Adjust_Statements): New local variable Abort_Id. Update the
9559         calls to Build_Object_Declarations and Build_Raise_Statement to include
9560         Abort_Id.
9561         (Build_Finalize_Statements): New local variable Abort_Id. Update the
9562         calls to Build_Object_Declarations and Build_Raise_Statement to include
9563         Abort_Id.
9564         (Build_Components): Create an entity for Abort_Id when exceptions are
9565         allowed on the target.
9566         (Build_Finalizer): New local variable Abort_Id.
9567         (Build_Initialize_Statements): New local variable Abort_Id. Update the
9568         calls to Build_Object_Declarations and Build_Raise_Statement to include
9569         Abort_Id.
9570         (Build_Object_Declarations): Add new formal Abort_Id. Create the
9571         declaration of flag Abort_Id to preserve the original abort status
9572         before finalization code is executed.
9573         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
9574         runtime routine Raise_From_Controlled_Operation.
9575         (Create_Finalizer): Update the call to Build_Raise_Statement to include
9576         Abort_Id. Update the call to Build_Object_Declarations to include
9577         Abort_Id. Update the layout of the finalizer body.
9578         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
9579         (Process_Transient_Objects): New local variable Abort_Id. Remove the
9580         clunky code to create all flags and objects related to
9581         exception propagation and replace it with a call to
9582         Build_Object_Declarations. Update the call to Build_Raise_Statement to
9583         include Abort_Id.
9584         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
9585         Add new formal Abort_Id and associated comment on its use.
9586         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
9587         on its use.
9588         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
9589         Remove the clunky code to create all flags and objects related to
9590         exception propagation and replace it with a call to
9591         Build_Object_Declarations. Update the call to Build_Raise_Statement.
9592
9593 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9594
9595         * s-tassta.adb: Fix minor typos.
9596
9597 2011-08-03  Robert Dewar  <dewar@adacore.com>
9598
9599         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
9600         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
9601
9602 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9603
9604         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
9605         to packages. This ensures that the finalizer body will not end up
9606         inside the freeze node.
9607         (Process_Declarations): Add code to detect whether a freeze node has a
9608         nested finalization collection.
9609
9610 2011-08-03  Pascal Obry  <obry@adacore.com>
9611
9612         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
9613         (Current_Session): Return a not null access to Session_Type.
9614         (Default_Session): Likewise.
9615
9616 2011-08-03  Robert Dewar  <dewar@adacore.com>
9617
9618         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
9619         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
9620
9621 2011-08-03  Pascal Obry  <obry@adacore.com>
9622
9623         * g-awk.ads: Minor comment fix.
9624
9625 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9626
9627         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9628         the tree structure related to discriminant constraints.
9629         Original_Discriminant cannot be used any more for computing the
9630         defining name for the reference to a discriminant.
9631
9632 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9633
9634         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
9635         function is not visibly tagged, this is not a dispatching call and
9636         therfore is not Tag_Indeterminate, even if the function is marked as
9637         dispatching on result.
9638
9639 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9640
9641         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
9642         (Expand_N_Free_Statement): Add a guard to protect against run-times
9643         which do not support controlled types.
9644         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
9645         against run-times which do not support controlled types.
9646         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
9647         against run-times which do not support controlled types.
9648         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
9649         against run-times which do not support controlled types.
9650         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
9651         protect against run-times which do not support controlled types.
9652
9653 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9654
9655         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
9656         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
9657
9658 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9659
9660         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
9661         modified in the source, to prevent spurious warnings when compiling
9662         with -gnatg.
9663
9664 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9665
9666         * a-except-2005.adb: Minor reformatting.
9667
9668 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9669
9670         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
9671         is a renaming declaration in the private part of a package, do not emit
9672         a warning that the with_clause could be moved because the renaming may
9673         be used in the body or in a child unit.
9674
9675 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9676
9677         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9678         Propagate the Comes_From_Source attribute from the original return
9679         object to the renaming.
9680
9681 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9682
9683         * exp_ch7.adb (Build_Raise_Statement): Do not call
9684         Raise_From_Controlled_Operation when this routine is not present in
9685         the run-time library.
9686         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
9687         libraries (Ravenscar), tasks are non-terminating, and protected objects
9688         and tasks can only appear at library level, so we do not want
9689         finalization of protected objects nor tasks.
9690         * exp_intr.adb: Minor clarification in comment.
9691         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
9692         Gen_Output_File_C): Remove references to finalization of library-level
9693         objects when using restricted run-time libraries.
9694
9695 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9696
9697         * sem_ch3.adb (Build_Discriminant_Constraints): Set
9698         Original_Discriminant only if the parent type is a generic formal.
9699
9700 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9701
9702         * exp_ch13.adb: Add with and use clause for Targparm;
9703         (Expand_N_Free_Statement): Prevent the generation of a custom
9704         Deallocate on .NET/JVM targets since this requires pools and address
9705         arithmetic.
9706         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
9707         .NET/JVM targets, attach the newly allocated object to the access
9708         type's finalization collection. Do not generate a call to
9709         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
9710         exist in the runtime.
9711         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
9712         create a custom Allocate for object that do not require initialization.
9713         Attach a newly allocated object to the access type's finalization
9714         collection on .NET/JVM.
9715         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
9716         assignment of controlled types on .NET/JVM. The two hidden pointers
9717         Prev and Next and stored and later restored after the assignment takes
9718         place.
9719         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
9720         kludge for .NET/JVM to recognize a particular piece of code coming from
9721         Heap_Management and change the call to Finalize into Deep_Finalize.
9722         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
9723         finalization collections on .NET/JVM only for types derived from
9724         Controlled. Separate the association of storage pools with a collection
9725         and only allow it on non-.NET/JVM targets.
9726         (Make_Attach_Call): New routine.
9727         (Make_Detach_Call): New routine.
9728         (Process_Object_Declarations): Suppress the generation of
9729         build-in-place return object clean up code on .NET/JVM since it uses
9730         pools.
9731         * exp_ch7.ads (Make_Attach_Call): New routine.
9732         (Make_Detach_Call): New routine.
9733         * exp_intr.adb Add with and use clause for Targparm.
9734         (Expand_Unc_Deallocation): Detach a controlled object from a collection
9735         on .NET/JVM targets.
9736         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
9737         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
9738         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
9739         names used in finalization.
9740
9741 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9742
9743         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
9744         (Attach, Detach): Lock the current task when chaining an object onto a
9745         collection.
9746
9747 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
9748
9749         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
9750         Rewritten to create the message strings when the exception is not
9751         raised by an abort during finalization.
9752         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
9753         Raise_From_Controlled_Operation and update its associated comment.
9754         * a-fihema.ads, a-fihema.adb: New GNAT unit.
9755         Ada.Finalization.Heap_Management provides key functionality
9756         associated with controlled objects on the heap, their creation,
9757         finalization and reclamation. Type Finalization_Collection is
9758         effectively a wrapper which sits ontop of a storage pool and performs
9759         all necessary bookkeeping for all the objects it contains. Each
9760         access-to-controlled or access-to-class-wide type receives a collection
9761         as part of its expansion. The compiler generates buffer code and
9762         invokes Allocate / Deallocate to create and destroy allocated
9763         controlled objects.
9764         * a-finali.adb ("="): Removed.
9765         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
9766         fields Prev and Next.
9767         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
9768         A library unit with at least one controlled object on the library level
9769         has a special finalizer which is invoked by the binder. To signal this,
9770         ali files carry field PF.
9771         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
9772         associated comment on field usage.
9773         * a-tags.adb (Get_RC_Offset): Removed.
9774         (Needs_Finalization): New routine.
9775         * a-tags.ads: Update the structure of the GNAT dispatch tables.
9776         Dispatch tables now carry field Needs_Finalization which provides
9777         runtime indication whether a type is controlled or has controlled
9778         components or both. Remove field RC_Offset.
9779         (Get_RC_Offset): Removed along with its associated pragma Export.
9780         Since tagged types with controlled components no longer carry hidden
9781         field _controller, the special mechanism to retrieve its location is no
9782         longer needed.
9783         (Needs_Finalization): New routine.
9784         * atree.ads, atree.adb (Elist24): New routine.
9785         (Set_Elist24): New routine.
9786         * atree.h: Add a define clause for Elist24.
9787         * bindgen.adb New library-level variable Lib_Final_Built.
9788         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
9789         presence of a VM target, the routine generates calls to the proper
9790         library finalization routine.
9791         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
9792         targets. Set the correct library finalization routine depending on
9793         whether the library has controlled objects or this is a VM compilation.
9794         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
9795         to library-level finalizers of compiled units in reverse order of
9796         elaboration. It also produces exception management code and reraises a
9797         potential exception after all units have been finalized.
9798         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
9799         library-level finalizers of compiled units in reverse order of
9800         elaboration.
9801         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
9802         definitions of all library-level finalizers available to the compilation
9803         (Gen_Main_Ada): Directly call Adafinal which now contails all target
9804         dependent code.
9805         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
9806         System.Standard_Library.Adafinal directly. If the library needs
9807         finalization actions, create the sequence of finalization calls.
9808         (Gen_Output_File_Ada): Alphabetize local variables and constants.
9809         Generate a with clause for System.Soft_Links when compiling for a VM.
9810         Remove the code which imports System.Standard_Library.Adafinal as
9811         Do_Finalize. Generate the library finalization routine.
9812         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
9813         If the library needs finalization actions, create all the definitions
9814         of library- level finalizers.
9815         (Has_Finalizer): New routine. Determines whether at least one compiled
9816         unit has a library-level finalizer.
9817         Add type Qualification_Mode.
9818         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
9819         * einfo.adb: New usage of field 15 as Return_Flag.
9820         Remove Finalization_Chain_Entity from the usages of field 19.
9821         Remove Associated_Final_Chain from the usages of field 23.
9822         New usage of field 23 as Associated_Collection.
9823         New usage of field 24 as Finalizer.
9824         New usage of flag 252 as Is_Processed_Transient.
9825         (Associated_Final_Chain): Removed.
9826         (Associated_Collection): New routine.
9827         (Finalization_Chain_Entity): Removed.
9828         (Finalizer): New routine.
9829         (Is_Finalizer): New routine.
9830         (Is_Processed_Transient): New routine.
9831         (Return_Flag): New routine.
9832         (Set_Associated_Final_Chain): Removed.
9833         (Set_Associated_Collection): New routine.
9834         (Set_Finalization_Chain_Entity): Removed.
9835         (Set_Finalizer): New routine.
9836         (Set_Is_Processed_Transient): New routine.
9837         (Set_Return_Flag): New routine.
9838         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
9839         displayed flags.
9840         (Write_Field8_Name): Alphabetize the output.
9841         (Write_Field11_Name): Alphabetize the output.
9842         (Write_Field12_Name): Alphabetize the output.
9843         (Write_Field13_Name): Alphabetize the output.
9844         (Write_Field14_Name): Alphabetize the output.
9845         (Write_Field15_Name): Alphabetize the output.
9846         (Write_Field16_Name): Alphabetize the output.
9847         (Write_Field17_Name): Alphabetize the output.
9848         (Write_Field18_Name): Alphabetize the output.
9849         (Write_Field19_Name): Alphabetize the output. Remove the output of
9850         Finalization_Chain_Entity.
9851         (Write_Field20_Name): Alphabetize the output.
9852         (Write_Field21_Name): Alphabetize the output.
9853         (Write_Field22_Name): Alphabetize the output.
9854         (Write_Field23_Name): Alphabetize the output. Remove the output of
9855         Associated_Final_Chain. Add output for Associated_Collection.
9856         (Write_Field24_Name): Alphabetize the output.
9857         (Write_Field25_Name): Add output for Finalizer.
9858         (Write_Field26_Name): Alphabetize the output.
9859         (Write_Field27_Name): Alphabetize the output.
9860         (Write_Field28_Name): Alphabetize the output.
9861         * einfo.ads: Add new field description for Associated_Collection and
9862         its uses in nodes.
9863         Remove Associated_Final_Chain and its uses in nodes.
9864         Remove Finalization_Chain_Entity and its uses in nodes.
9865         Add new field description for Finalizer and its uses in nodes.
9866         Add new synthesized attribute Is_Finalizer.
9867         Add new flag description for Is_Processed_Transient and its uses in
9868         nodes.
9869         Add new field description for Return_Flag and its uses in nodes.
9870         (Associated_Final_Chain): Removed along with its pragma Inline.
9871         (Associated_Collection): New routine and pragma Inline.
9872         (Finalization_Chain_Entity): Removed along with its pragma Inline.
9873         (Finalizer): New routine and pragma Inline.
9874         (Is_Finalizer): New routine and pragma Inline.
9875         (Is_Processed_Transient): New routine and pragma Inline.
9876         (Return_Flag): New routine and pragma Inline.
9877         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
9878         (Set_Associated_Collection): New routine and pragma Inline.
9879         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
9880         (Set_Finalizer): New routine and pragma Inline.
9881         (Set_Is_Processed_Transient): New routine and pragma Inline.
9882         (Set_Return_Flag): New routine and pragma Inline.
9883         * exp_aggr.adb: Alphabetize subprograms.
9884         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
9885         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
9886         associated comments. Remove local variables External_Final_List and
9887         Attach.
9888         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
9889         Ancestor. Remove the retrieval of finalization lists. Update the call to
9890         Make_Adjust_Call.
9891         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
9892         lists. Update the call to Late_Expansion.
9893         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
9894         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
9895         (Gen_Assign): Remove the retrieval of the finalization list used to
9896         build the assignment. Update the calls to Make_Init_Call and
9897         Make_Adjust_Call.
9898         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
9899         Remove the mechanism to determine attachment levels and finalization
9900         list retrieval. Remove the processing for coextensions.
9901         (Init_Controller): Removed. Controllers no longer exist.
9902         (Late_Expansion): Remove formals Flist and Obj along with their
9903         associated comments. Update the calls to Build_Record_Aggr_Code and
9904         Build_Array_Aggr_Code.
9905         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
9906         (Expand_N_Freeze_Entity): Add special processing for finalizers which
9907         appear in entry bodies, protected subprograms and task bodies.
9908         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
9909         * exp_ch3.adb (Add_Final_Chain): Removed.
9910         (Build_Array_Init_Proc): Alphabetize local variables.
9911         (Build_Assignment): Alphabetize local variables. Update the call to
9912         Maked_Adjust_Call.
9913         (Build_Class_Wide_Master): Rename local variables to better reflect
9914         their role.
9915         (Build_Discriminant_Assignments): Code reformatting.
9916         (Build_Init_Call_Thru): Code reformatting.
9917         (Build_Init_Procedure): Code reformatting. Generate a special version
9918         of Deep_Finalize which is capable of finalizing all initialized
9919         components and ignore the rest.
9920         (Build_Init_Statements): Rename local variables to better reflect their
9921         role.
9922         Reimplement the mechanism to include the creation and update of an index
9923         variable called a "counter". It is used as a bookmark for tracing
9924         initialized and non-initialized components.
9925         (Build_Initialization_Call): Remove local variable Controller_Typ.
9926         Alphabetize all local variables. Remove the initialization of the
9927         record controller and update the call to Make_Init_Call.
9928         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
9929         New local variable Counter.
9930         (Constrain_Array): Alphabetize.
9931         (Expand_Freeze_Array_Type): Create a collection instead of a
9932         finalization list.
9933         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
9934         Finalize_Address which is used in conjunction with allocated controlled
9935         objects.
9936         (Expand_N_Object_Declaration): Remove the creation of a finalization
9937         list for anonymous access types. Update the calls to Make_Init_Call and
9938         Make_Adjust_Call.
9939         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
9940         retrieval of finalization lists. Remove the expansion of the record
9941         controller. Create TSS primitive Finalize_Address used in conjunction
9942         with controlled objects on the heap. Create finalization collections
9943         for access-to-controlled record components.
9944         (Expand_Record_Controller): Removed.
9945         (Freeze_Type): Remove the freezing of record controllers. Freezing of
9946         class-wide types now requires additional processing. Create
9947         finalization collections for access-to-controlled types.
9948         (Increment_Counter): New routine.
9949         (Make_Counter): New routine.
9950         (Make_Eq_If): Remove the mention of Name_uController.
9951         (Make_Predefined_Primitive_Specs): There is no longer need to skip
9952         types coming from System.Finalization_Root.
9953         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
9954         (Predefined_Primitive_Bodies): There is no longer need to skip types
9955         coming from System.Finalization_Root.
9956         (Stream_Operation_OK): Do not generate stream routines for
9957         type Ada.Finalization.Heap_Management.Finalization_Collection.
9958         * exp_ch3.ads: Alphabetize subprograms.
9959         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
9960         Add with and use clause for Lib.
9961         (Complete_Coextension_Finalization): Removed.
9962         (Complete_Controlled_Allocation): New routine. Create a finalization
9963         collection for anonymous access-to-controlled types. Create a custom
9964         Allocate which interfaces with the back end and the machinery in
9965         Heap_Management.
9966         (Expand_Allocator_Expression): Add necessary calls to
9967         Complete_Controlled_Allocation. Remove the retrieval of finalization
9968         lists. Update the calls to Make_Adjust_Call. Generate a call to
9969         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9970         the associated collection.
9971         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
9972         Code clean up. Remove the retrieval of finalization lists and
9973         attachment levels.
9974         Update the call to Make_Init_Call. Generate a call to
9975         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9976         the associated collection.
9977         (Get_Allocator_Final_List): Removed. Finalization lists are not
9978         available.
9979         (Suitable_Element): Remove the mention of Name_uController.
9980         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
9981         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
9982         the left hand side, carry out the assignment and adjust the left hand
9983         side.
9984         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
9985         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
9986         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
9987         BIP_Collection and BIPcollection.
9988         (Build_Heap_Allocator): New routine used to allocate the return object
9989         of a build-in-place function onto a collection.
9990         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
9991         (Expand_Call): Do not replace direct calls to Deep routines with their
9992         aliases.
9993         (Expand_N_Extended_Return_Statement): Give all variables shorter names
9994         and update their occurrences. Add a special return flag to monitor the
9995         [ab]normal execution of the function. The flag is set right before the
9996         return statement.
9997         Rewrite the mechanism used to allocate a build-in-place return object
9998         on the heap or on a storage pool.
9999         (Is_Direct_Deep_Call): New routine.
10000         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10001         build-in-place function call instead of a final list. Build a call to
10002         Set_Finalize_Address_Ptr to decorate the associated collection.
10003         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10004         order to name the build-in-place function call's result for later
10005         finalization. Add a collection to a build-in-place function call
10006         instead of a final list.
10007         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10008         build-in-place function call instead of a final list. Remove the code
10009         which moves one final list and transforms it into the actual in a
10010         nested build-in-place call.
10011         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10012         build-in-place function call instead of a final list.
10013         (Move_Final_List): Removed.
10014         (Needs_BIP_Collection): New routine.
10015         (Needs_BIP_Final_List): Removed.
10016         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10017         enumeration type BIP_Formal_Kind.
10018         Update the related comment.
10019         (Needs_BIP_Collection): New routine.
10020         (Needs_BIP_Final_List): Removed.
10021         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10022         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10023         majority of subprograms in this unit. Add Name_Finalize_Address to
10024         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10025         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10026         statements for an array type.
10027         (Build_Adjust_Statements): Create the adjust statements for a record
10028         type.
10029         (Build_Cleanup_Statements): New routine. A procedure which given any
10030         construct containing asynchronous calls, references to _master, or is a
10031         task body, a task allocation or a protected body produces the necessary
10032         runtime calls to clean up these constructs.
10033         (Build_Exception_Handler): New routine.
10034         (Build_Final_List): Removed.
10035         (Build_Finalization_Collection): New routine. A core procedure which
10036         creates a collection to service heap allocated controlled objects
10037         associated with an access-to-controlled type.
10038         (Build_Finalize_Statements): Create the finalization statements for a
10039         record types.
10040         (Build_Finalizer): New routine. A core procedure which given any
10041         construct with declarations and/or statements detects all objects which
10042         need any type of clean up (controlled objects, protected objects) and
10043         generates all necessary code to clean up the said objects in the proper
10044         order.
10045         (Build_Finalizer_Call): New routine.
10046         (Build_Initialize_Statements): Create the initialization statements for
10047         an array type. The generated routine contains code to finalize partially
10048         initialized arrays.
10049         (Build_Object_Declarations): New routine.
10050         (Build_Raise_Statement): New routine.
10051         (Clean_Simple_Protected_Objects): Removed.
10052         (Controller_Component): Removed.
10053         (Enclosing_Function): New routine.
10054         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10055         either declarations or statements or both.
10056         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10057         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10058         package.
10059         (Find_Final_List): Removed.
10060         (Global_Flist_Ref): Removed.
10061         (In_Finalization_Root): Removed.
10062         (Insert_Actions_In_Scope_Around): Determine the range of the transient
10063         scope in terms of tree nodes. Process all transient variables within
10064         that range.
10065         (Make_Adjust_Call): Rewritten. There is no longer an attach call
10066         generated after the adjust.
10067         (Make_Attach_Call): Removed.
10068         (Make_Call): New routine.
10069         (Make_Clean): Removed.
10070         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10071         build routines.
10072         (Make_Deep_Proc): Rewritten to generate the new profile signature used
10073         in Deep routines.
10074         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10075         build routines.
10076         (Make_Final_Call): Modified to simply create a call to either
10077         Deep_Finalize or Finalize.
10078         (Make_Finalize_Address_Body): New routine.
10079         (Make_Finalize_Address_Stmts): New routine. A function which produces
10080         TSS primitive Finalize_Address used in conjunction with heap allocated
10081         controlled objects.
10082         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10083         (Make_Init_Call): Rewritten. There is no longer an attach call
10084         generated after initialization.
10085         (Make_Local_Deep_Finalize): New routine.
10086         (Make_Set_Finalize_Address_Ptr_Call): New routine.
10087         (Make_Transient_Block): Remove the finalization list retrieval and
10088         manipulation.
10089         (Needs_Finalization): Moved to Exp_Util.
10090         (Parent_Field_Type): New routine.
10091         (Preprocess_Components): New routine.
10092         (Process_Transient_Objects): New routine.
10093         (Wrap_HSS_In_Block): New routine.
10094         (Wrap_Transient_Declaration): Remove finalization list management and
10095         controller insertion.
10096         (Wrap_Transient_Expression): Code reformatting.
10097         (Wrap_Transient_Statement): Code reformatting.
10098         * exp_ch7.ads (Build_Final_List): Removed.
10099         (Build_Finalization_Collection): New routine.
10100         (Build_Raise_Statement): New routine.
10101         (Controller_Component): Removed.
10102         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10103         (Find_Final_List): Removed.
10104         (In_Finalization_Root): Removed.
10105         (Is_Simple_Protected_Type): Update related comment.
10106         (Make_Adjust_Call): New parameter profile and associated comments.
10107         (Make_Attach_Call): Removed.
10108         (Make_Final_Call): New parameter profile and associated comments.
10109         (Make_Finalize_Address_Body): New routine.
10110         (Make_Init_Call): New parameter profile and associated comments.
10111         (Make_Local_Deep_Finalize): New routine.
10112         (Make_Set_Finalize_Address_Ptr_Call): New routine.
10113         (Needs_Finalization): Moved to Exp_Util.
10114         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10115         (Expand_N_Protected_Body): Remove the handling of finalization lists.
10116         (Find_Protection_Type): Moved to Exp_Util.
10117         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10118         (Make_DT): Update sequence of dispatch table initialization. Remove the
10119         initialization of field RC_Offset. Add initialization of field Needs_
10120         Finalization.
10121         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10122         Reimplement how an object is first finalized, then deallocated.
10123         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10124         Code reformatting.
10125         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10126         Register TSS_Finalize_Address with type TSS_Names.
10127         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10128         procedure provides the interface between an allocation / deallocation
10129         and the support machinery in Ada.Finalization.Heap_Management.
10130         (Find_Init_Call): Code reformatting.
10131         (Find_Init_Call_In_List): Code reformatting.
10132         (Find_Protection_Type): Moved from Exp_Ch9.
10133         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10134         (Has_Controlled_Coextensions): Removed.
10135         (Has_Controlled_Objects): New routine.
10136         (In_Library_Level_Package_Body): New routine.
10137         (Insert_Action_After): New routine.
10138         (Is_Finalizable_Transient): New routine. This predicate determines
10139         whether an object declaration is one of the many variants of controlled
10140         transients.
10141         (Is_Null_Access_BIP_Func_Call): New routine.
10142         (Is_Non_BIP_Func_Call): New routine.
10143         (Is_Related_To_Func_Return): New routine.
10144         (Needs_Finalization): Moved from Exp_Ch7.
10145         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10146         (Find_Protection_Type): Moved from Exp_Ch9.
10147         (Has_Controlled_Coextensions): Removed.
10148         (Has_Controlled_Objects): New routine.
10149         (In_Library_Level_Package_Body): New routine.
10150         (Insert_Action_After): New routine.
10151         (Is_Finalizable_Transient): New routine.
10152         (Is_Null_Access_BIP_Func_Call): New routine.
10153         (Is_Non_BIP_Func_Call): New routine.
10154         (Is_Related_To_Func_Return): New routine.
10155         (Needs_Finalization): Moved from Exp_ch7.
10156         * expander.adb (Expand): Add a case for N_Free_Statement.
10157         * freeze.adb (Freeze_All): Replace the generation of a finalization
10158         list with a collection for access-to-controlled types.
10159         (Freeze_Entity): Code reformatting.
10160         (Freeze_Record_Type): Remove the freezing of a record controller
10161         component.
10162         (Freeze_Subprogram): Code reformatting.
10163         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10164         finalization list.
10165         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10166         has a library-level finalizer.
10167         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10168         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10169         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10170         files. Add a-fihema to the list of object files.
10171         * par-ch4.adb:
10172         Alphabetize the associations in type Is_Parameterless_Attribute.
10173         * rtsfind.ads: Ada.Finalization_List.Controller and
10174         System.Finalization_Implementation are no longer a GNAT unit.
10175         Update the range of type Ada_Finalization_Child. Remove the following
10176         recoverable entities:
10177
10178            RE_Attach_To_Final_List
10179            RE_Deep_Tag_Attach
10180            RE_Finalize_List
10181            RE_Finalize_One
10182            RE_Finalizable_Ptr_Ptr
10183            RE_Global_Final_List
10184            RE_Limited_Record_Controller
10185            RE_List_Controller
10186            RE_Move_Final_List
10187            RE_Record_Controller
10188            RE_Simple_List_Controller
10189
10190         Add the following recoverable entities:
10191
10192            RE_Add_Offset_To_Address
10193            RE_Allocate
10194            RE_Base_Pool
10195            RE_Deallocate
10196            RE_Exception_Identity
10197            RE_Finalization_Collection
10198            RE_Finalization_Collection_Ptr
10199            RE_Needs_Finalization
10200            RE_Save_Library_Occurrence
10201            RE_Set_Finalize_Address_Ptr
10202            RE_Set_Storage_Pool_Ptr
10203            RE_Storage_Count
10204         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10205         Name_uController.
10206         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10207         (First_Stored_Discriminant): Remove the mention of Name_uController.
10208         * sem_aux.ads: Comment reformatting.
10209         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10210         to redecorate an already existing class-wide type.
10211         (Decorate_Tagged_Type): New parameter profile and associated comment.
10212         Create a "shadow class-wide type" for a shadow entity.
10213         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10214         of the final chain along with the associated comment.
10215         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10216         Full_Desig and set it to the full view of the designated type.
10217         Initialize the finalization collection to empty.
10218         (Build_Derived_Record_Type): Alphabetize local variables. Code
10219         reformatting.
10220         (Collect_Fixed_Components): Remove the mention of Name_uController.
10221         (Create_Constrained_Components): Remove the mention of Name_uController.
10222         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10223         class-wide type of a shadow entity.
10224         (Process_Full_View): Update the machinery which marks type
10225         Limited_Controlled's entity as limited.
10226         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10227         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10228         list, instead make a collection build-in-place formal.
10229         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10230         a designated type in order to establish a match between the renaming
10231         and the renamed entity.
10232         (Find_Selected_Component): Add guard to prevent spurious exceptions
10233         from being raised on .NET/JVM.
10234         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10235         to the list of primitive that need special processing. Update arrays
10236         C_Names and D_Names.
10237         (Replace_Types): Handle class-wide types.
10238         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10239         different parameter profile, look at the first formal.
10240         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10241         use clauses for Exp_Util.
10242         * sem_res.adb: Remove with and use clauses for Elists.
10243         (Propagate_Coextensions): Removed.
10244         (Resolve_Allocator): Do not propagate the list of coextensions from one
10245         allocator to another.
10246         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10247         Deaccessed_T to Desig_Typ.
10248         (Enter_Name): Remove the mention of Name_uController.
10249         (Gather_Components): Remove the mention of Name_uController.
10250         (Incomplete_Or_Private_View): New routine.
10251         (Is_Coextension_Root): Removed.
10252         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10253         * sem_util.ads (Incomplete_Or_Private_View): New routine.
10254         (Is_Coextension_Root): Removed.
10255         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10256         Controlled types are now derived from a null tagged record. Remove
10257         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10258         * sinfo.adb (Coextensions): Removed.
10259         (Set_Coextensions): Removed.
10260         * sinfo.ads: Remove Coextensions from the explanation of node fields
10261         and its uses in nodes.
10262         Update the field usage of N_Allocator.
10263         (Coextensions): Removed along with its pragma Inline.
10264         (Set_Coextensions): Removed along with its pragma Inline.
10265         * snames.ads-tmpl: Remove names
10266
10267           Name_uClean
10268           Name_uController
10269           Name_uFinal_List
10270           Name_uLocal_Final_List
10271           Name_Finalization_Root
10272           Name_Next
10273           Name_Prev
10274
10275         Add names
10276
10277           Name_uFinalizer
10278           Name_Finalize_Address
10279         * s-pooglo.adb (Allocate): Add overriding indicator.
10280         (Deallocate): Add overriding indicator.
10281         (Storage_Size): Add overriding indicator.
10282         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10283         than Finalize_Global_List.
10284         (Null_Finalize_Global_List): Removed.
10285         (Save_Library_Occurrence): New routine.
10286         * s-soflin.ads: Remove variable Finalize_Global_List along with its
10287         initialization. Add variable Finalize_Library_Objects along with its
10288         pragma Export. Add variables Library_Exception and
10289         Library_Exception_Set along with their pragma Export.
10290         (Null_Finalize_Global_List): Removed.
10291         (Save_Library_Occurrence): New routine.
10292         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10293         rather than Finalize_Global_List.
10294         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10295         of the constructed node.
10296
10297 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10298
10299         * link.c: Include "auto-host.h" before system headers.
10300
10301 2011-08-03  Vincent Celier  <celier@adacore.com>
10302
10303         * make.adb (Gnatmake): Add to table Library_Projs only library projects
10304         that are not extended. Do not check if a library project that is
10305         extended should be regenerated. Do not add to table Library_Paths the
10306         libraries that are in extended projects. Link only with libraries that
10307         are in libray projects that are not extended.
10308         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10309         for a library project that is extended.
10310
10311 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10312
10313         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10314         conforming subprogram renamings that appear to be completions if they
10315         are not fully conformant.
10316         Such renamings are homographs but not completions.
10317         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10318         names in a subprogram renaming that appears in an instance.
10319
10320 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10321
10322         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10323         not immutably limited, build actual subtype from expression to provide
10324         proper bounds to caller.
10325
10326 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10327
10328         * sem_ch8.adb: Minor comment correction.
10329
10330 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10331
10332         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10333         returning a limited array, use an extended return statement.
10334
10335 2011-08-03  Vincent Celier  <celier@adacore.com>
10336
10337         * make.adb (Initialize): If --subdirs= is used, but no project file is
10338         specified, attempt to create the specify subdir if it does not already
10339         exist and use it as the object directory as if -D had been specified.
10340
10341 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10342
10343         * s-tpopsp-vms.adb: New file.
10344         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10345         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10346
10347 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10348
10349         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10350         package.
10351
10352 2011-08-03  Yannick Moy  <moy@adacore.com>
10353
10354         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10355         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10356         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10357         detect that an array has static bounds.
10358
10359 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10360
10361         * exp_dist.adb: Minor reformatting.
10362
10363 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10364
10365         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
10366         (ATCB_Key): Removed, not always used.
10367
10368 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10369
10370         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
10371         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
10372         most remaining global variables.
10373
10374 2011-08-03  Robert Dewar  <dewar@adacore.com>
10375
10376         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
10377         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
10378         reformatting.
10379
10380 2011-08-03  Javier Miranda  <miranda@adacore.com>
10381
10382         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
10383         that must be passed by copy in VM targets.
10384
10385 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10386
10387         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
10388         duplicates a similar htable now in the project tree.
10389
10390 2011-08-03  Claire Dross  <dross@adacore.com>
10391
10392         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
10393         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
10394         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
10395         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
10396         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
10397         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
10398         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
10399         update.
10400
10401 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10402
10403         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
10404         (ATCB_Key): Removed, not always used.
10405         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
10406         s-taprop-posix.adb.
10407         * s-tpopsp-tls.adb: New file.
10408         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
10409         x86/x64/ia64/powerpc/sparc Linux.
10410
10411 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10412
10413         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
10414         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
10415
10416 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10417
10418         * rtsfind.ads, exp_dist.adb, exp_dist.ads
10419         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
10420         Fix type selection for mapping integer types to PolyORB types.
10421
10422 2011-08-03  Bob Duff  <duff@adacore.com>
10423
10424         * sem_ch7.adb: Minor comment clarification.
10425
10426 2011-08-03  Bob Duff  <duff@adacore.com>
10427
10428         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
10429         an error analyzing a choice, skip further processing. Further
10430         processing could cause a crash or cascade errors.
10431
10432 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10433
10434         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
10435         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
10436         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
10437         prj-env.ads (Shared_Project_Tree_Data): new type
10438         An aggregate project and its aggregated trees need to share the common
10439         data structures used for lists of strings, packages,... This makes the
10440         code simpler since otherwise we have to pass the root tree (also used
10441         for the configuration file data) in addition to the current project
10442         tree. This also avoids ambiguities as to which tree should be used.
10443         And finally this saves a bit of memory.
10444         (For_Every_Project_Imported): new parameter Tree.
10445         Since aggregated projects are using a different tree, we need to let
10446         the caller know which tree to use to manipulate the returned project.
10447
10448 2011-08-03  Robert Dewar  <dewar@adacore.com>
10449
10450         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
10451         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
10452         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
10453         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
10454
10455 2011-08-03  Javier Miranda  <miranda@adacore.com>
10456
10457         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
10458         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
10459
10460 2011-08-03  Bob Duff  <duff@adacore.com>
10461
10462         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
10463         the Base_Type.
10464
10465 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
10466
10467         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
10468         g-sehash.ads: Fix typo. Update header.
10469
10470 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10471
10472         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
10473         expansion.
10474
10475 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10476
10477         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
10478         prefixes of private types along with records, since the selector may be
10479         a discriminant.
10480         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
10481         private types along with records, since the selector may be a
10482         discriminant.
10483
10484 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10485
10486         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
10487
10488 2011-08-03  Javier Miranda  <miranda@adacore.com>
10489
10490         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
10491         Tagged_Type_Expansion.
10492
10493 2011-08-03  Yannick Moy  <moy@adacore.com>
10494
10495         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
10496         violation when the argument of concatenation is the name of a
10497         constant.
10498
10499 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10500
10501         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
10502         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
10503         (Process_Declarative_Items): new parameter Child_Env.
10504
10505 2011-08-03  Yannick Moy  <moy@adacore.com>
10506
10507         * alfa.ads: Update format of ALFA section in ALI file in order to
10508         add a mapping from bodies to specs when both are present.
10509         (ALFA_Scope_Record): Add components for spec file/scope.
10510         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
10511         present.
10512         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
10513         collected, fill in the spec information when relevant.
10514         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
10515         present.
10516
10517 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10518
10519         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
10520         code unit to decide whether to add internally generated subprograms.
10521
10522 2011-08-03  Javier Miranda  <miranda@adacore.com>
10523
10524         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
10525         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
10526         be handled by copy in VM targets.
10527
10528 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10529
10530         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
10531         code with Makeutl.Get_Switches.
10532         * prj-tree.adb: Update comment.
10533
10534 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10535
10536         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
10537         subprogram with a limited formal that does not support external
10538         streaming.
10539
10540 2011-08-03  Yannick Moy  <moy@adacore.com>
10541
10542         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
10543         continuation line
10544         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
10545         not from current unit in two phases, because it is not possible to
10546         change the table while iterating over its content.
10547         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
10548
10549 2011-08-03  Sergey Rybin  <rybin@adacore.com>
10550
10551         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
10552         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
10553
10554 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10555
10556         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
10557         and the component type is composite, this is ambiguous for predefined
10558         concatenation, but if the node is not overloaded and the entity is a use
10559         -defined function its profile can be used to resolve that aggregate.
10560
10561 2011-08-03  Robert Dewar  <dewar@adacore.com>
10562
10563         * exp_ch4.adb: Minor code cleanup.
10564
10565 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10566
10567         * exp_dist.adb: Do not generate distribution stubs if serious errors
10568         have been diagnosed.
10569
10570 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10571
10572         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
10573         the first formal of a primitive operation, go to the base type to
10574         handle properly an access to a derived type with constrained
10575         discriminants.
10576         * sem_type.adb (Disambiguate): an immediately visible operator hides a
10577         user-defined function that is only use-visible.
10578
10579 2011-08-03  Robert Dewar  <dewar@adacore.com>
10580
10581         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
10582         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
10583         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
10584         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
10585         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
10586         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
10587         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
10588         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
10589
10590 2011-08-03  Robert Dewar  <dewar@adacore.com>
10591
10592         * repinfo.adb (List_Mechanism): Add handling of
10593         Convention_Ada_Pass_By_XXX.
10594         * sem_mech.adb (Set_Mechanism): Ditto.
10595         * sem_prag.adb (Process_Convention): Add entries for
10596         Convention_Ada_Pass_By_XXX.
10597         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
10598
10599 2011-08-03  Pascal Obry  <obry@adacore.com>
10600
10601         * makeutl.adb: Minor reformatting.
10602
10603 2011-08-03  Vincent Celier  <celier@adacore.com>
10604
10605         * fname-uf.adb
10606         (Get_File_Name) If the file cannot be found when there are no config
10607         pragmas file and May_Fail is True, return No_File instead of the file
10608         name, to be consistent.
10609
10610 2011-08-03  Pascal Obry  <obry@adacore.com>
10611
10612         * adaint.c (__gnat_is_executable_file_attr): Avoid access
10613         to null pointer.
10614
10615 2011-08-03  Javier Miranda  <miranda@adacore.com>
10616
10617         * sem_ch13.adb
10618         (Same_Representation): In VM targets the representation of arrays with
10619         aliased components differs from arrays with non-aliased components.
10620
10621 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10622
10623         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
10624         not systematically lower case attribute indexes that contain no "."
10625         Fix definition of several Naming attributes, which take
10626         a unit name as index and therefore should be case insensitive.
10627         Minor refactoring (reduce length of variable names).
10628
10629 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10630
10631         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
10632
10633 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10634
10635         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
10636         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
10637         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
10638         prj-tree.ads (Prj.Tree.Environment): new type.
10639
10640 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10641
10642         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
10643         prj-tree.adb, prj-tree.ads (Environment): new type.
10644
10645 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10646
10647         * prj-tree.ads: Remove unused variable.
10648
10649 2011-08-03  Yannick Moy  <moy@adacore.com>
10650
10651         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
10652         issuing messages related to SPARK restriction violation.
10653
10654 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10655
10656         * sem_ch6.adb: guard against error nodes in return statements.
10657
10658 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10659
10660         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
10661         a warning can only appear on a configuration file, so emit warning
10662         without further checks.
10663
10664 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10665
10666         * s-interr.ads: add overriding keyword.
10667
10668 2011-08-03  Geert Bosch  <bosch@adacore.com>
10669
10670         * exp_attr.adb: Fix minor typo.
10671
10672 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10673
10674         * par-ch4.adb: improve error recovery.
10675
10676 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10677
10678         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
10679         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
10680         to Errout_Handling.
10681
10682 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10683
10684         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
10685         "external" as an attribute name in aggregate projects.
10686
10687 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
10688
10689         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
10690         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
10691         from 0, so we need to adjust.
10692
10693 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10694
10695         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
10696         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
10697
10698 2011-08-03  Yannick Moy  <moy@adacore.com>
10699
10700         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
10701         restriction on overloaded entity if the entity is not an operator.
10702
10703 2011-08-03  Yannick Moy  <moy@adacore.com>
10704
10705         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
10706         restrict.ads: Rename remaining Check_Formal_Restriction* into
10707         Check_SPARK_Restriction*.
10708
10709 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10710
10711         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
10712         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
10713         qualifier.
10714         (Project_Empty): removed
10715         (Empty_Project): new parameter Qualifier
10716         This is used to have fields specific to aggregate projects, cleaner
10717         New field to store the list of aggregated projects.
10718         (Check_Aggregate_Project): removed
10719         (Process_Aggregated_Projects, Free): new subprograms.
10720
10721 2011-08-03  Olivier Hainque  <hainque@adacore.com>
10722
10723         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
10724
10725 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10726
10727         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
10728         explicit dereference of an unconstrained type, create a constrained
10729         subtype for it, as is done for function calls that return an
10730         unconstrained type.
10731
10732 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10733
10734         * g-pehage.adb (Finalize): Avoid possible double-free.
10735
10736 2011-08-03  Steve Baird  <baird@adacore.com>
10737
10738         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
10739         Elab_Spec/Body attrs in CodePeer_Mode.
10740
10741 2011-08-03  Javier Miranda  <miranda@adacore.com>
10742
10743         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
10744         low bound is not known at compile time but they have no others choice.
10745         Done because in this case the bounds can be obtained directly from the
10746         aggregate.
10747
10748 2011-08-03  Ed Falis  <falis@adacore.com>
10749
10750         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
10751         on VxWorks SMP. Remove unusable constant ANY_CPU.
10752
10753 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10754
10755         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
10756         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
10757         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
10758         Prj.Env.Initialize_Empty): new subprograms
10759         (Get_Env, Find_Project): remove parameter Target_Name.
10760
10761 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10762
10763         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
10764         as a condition for the delayed call to Derived_Subprograms done for the
10765         case of the rewriting of a derived type that constrains the
10766         discriminants of its parent type.
10767         Avoids redundant subprogram derivations for private subtype derivations.
10768
10769 2011-08-03  Javier Miranda  <miranda@adacore.com>
10770
10771         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
10772         Build_Record_Aggr_Code.
10773         (Build_Record_Aggr_Code): Add missing support to initialize hidden
10774         discriminants in extension aggregates.
10775
10776 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10777
10778         * prj-pp.adb (Print): also output project qualifiers, since in
10779         particular "aggregate" is mandatory in an aggregate project.
10780
10781 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10782
10783         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
10784         (Debug_Output): new function.
10785
10786 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10787
10788         * gnat_ugn.texi: Document -Wstack-usage.
10789         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
10790
10791 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10792
10793         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
10794         have keyword LIMITED.
10795
10796 2011-08-03  Yannick Moy  <moy@adacore.com>
10797
10798         * alfa.adb, alfa.ads, alfa_test.adb: New files.
10799         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
10800         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
10801         section (does not happen in compiler, only if code directly calls
10802         Scan_ALI).
10803         * get_alfa.adb, get_alfa.ads: New files.
10804         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
10805         needed.
10806         * lib-xref-alfa.adb: New file.
10807         * lib-xref.adb, lib-xref.ads
10808         (Xref_Entry): redefine information needed in cross-references for ALFA.
10809         Push ALFA treatments in separated local package.
10810         (Enclosing_Subpragram_Or_Package): treat specially subprogram
10811         identifiers. Return entity of package body instead of spec. Return
10812         Empty for a scope with no location.
10813         (Generate_Reference): adapt to new components for ALFA information.
10814         Remove the need for D references on definitions.
10815         (Is_Local_Reference): moved to ALFA local package
10816         (Output_References): extract subfunction as Extract_Source_Name
10817         (Output_Local_References): remove procedure, replaced by filtering of
10818         cross-references in package ALFA and printing in Put_ALFA.
10819         (Write_Entity_Name): remove procedure
10820         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
10821         print exact name of entity as it appears in source file
10822         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
10823         * put_alfa.adb, put_alfa.ads: New files.
10824         * xref_lib.adb (Search_Xref): protect read of cross-references against
10825         reading other sections of the ALI file, in gnatxref
10826         (Search): protect read of cross-references against reading other
10827         sections of the ALI file, in gnatfind.
10828         * gcc-interface/Make-lang.in: Update dependencies.
10829
10830 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10831
10832         * sem_ch3.adb: Minor reformatting.
10833
10834 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
10835
10836         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
10837         raising an exception.
10838
10839 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10840
10841         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
10842         type, always use 1 as the lower bound or string, even if lower bound of
10843         context is not static, to handle properly null strings in a non-static
10844         context.
10845
10846 2011-08-03  Bob Duff  <duff@adacore.com>
10847
10848         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
10849         always legal on the right-hand side of an assignment statement; there
10850         is always an applicable index constraint in this case. Therefore, the
10851         check for Pkind = N_Assignment_Statement is now unconditional -- it
10852         doesn't depend on whether Is_Constrained (Typ).
10853
10854 2011-08-03  Robert Dewar  <dewar@adacore.com>
10855
10856         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
10857
10858 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10859
10860         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
10861         for an itype created within a generic unit.
10862
10863 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10864
10865         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
10866         suppresses all inlining.
10867
10868 2011-08-03  Robert Dewar  <dewar@adacore.com>
10869
10870         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
10871         exp_aggr.adb: Minor reformatting.
10872
10873 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10874
10875         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
10876         tagged assignment when discriminant checks are suppressed. This is
10877         useless and extremely costly in terms of static stack usage.
10878
10879 2011-08-03  Bob Duff  <duff@adacore.com>
10880
10881         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
10882         of generics, because this leads to the wrong entity in the wrong scope,
10883         causing (e.g.) pragma Export_Procedure to get an error if the entity is
10884         an instance.
10885         (Process_Interface_Name): Follow Alias for instances of generics, to
10886         correct for the above change.
10887
10888 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10889
10890         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
10891         is an integer literal it is always safe to replace the reference. In
10892         addition, if the reference appears in the generated code for an object
10893         declaration it is necessary to copy because otherwise the reference
10894         might be to the uninitilized value of the discriminant of the object
10895         itself.
10896
10897 2011-08-03  Pascal Obry  <obry@adacore.com>
10898
10899         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
10900         ACL used, in this case we want to check for ending .exe, not .exe
10901         anywhere in the path.
10902
10903 2011-08-03  Sergey Rybin  <rybin@adacore.com>
10904
10905         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10906         the tree structure (semantic decoration of references to record
10907         discriminants).
10908
10909 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10910
10911         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
10912         choices of a named array aggregate, bail out when any choices are
10913         marked as Errors_Posted.
10914
10915 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10916
10917         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
10918         in which entity is frozen, to handle properly loop variables in
10919         iterators.
10920
10921 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10922
10923         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
10924         subtype is not static, compute the upper bound using attributes, to
10925         handle properly index types that are not integer types.
10926
10927 2011-08-03  Bob Duff  <duff@adacore.com>
10928
10929         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
10930         Update copyright notice.
10931
10932 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10933
10934         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
10935         Original_Discriminant if within an instance.
10936         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
10937
10938 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10939
10940         * einfo.ads: Minor reformatting.
10941
10942 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10943
10944         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
10945         composite type with an unfrozen subcomponent, in the profile of a
10946         primitive operation.
10947
10948 2011-08-03  Robert Dewar  <dewar@adacore.com>
10949
10950         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
10951
10952 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10953
10954         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
10955         unconstrained type with discriminants is initialized with an aggregate,
10956         use the constrained subtype of the aggregate as the type of the object,
10957         because it is immutable, and this allows the back-end to generate no
10958         code for the object declaration.
10959
10960 2011-08-03  Robert Dewar  <dewar@adacore.com>
10961
10962         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
10963         comparison operand is variable, and turns out to be zero or negative.
10964
10965 2011-08-03  Javier Miranda  <miranda@adacore.com>
10966
10967         * exp_intr.adb
10968         (Expand_Dispatching_Constructor_Call): Disable expansion of
10969         code required for native targets. Done to avoid generating
10970         references to unavailable runtime entities in VM targets.
10971         * exp_ch3.adb
10972         (Expand_N_Object_Declaration): Add missing support to handle
10973         the explicit initialization of class-wide interface objects.
10974         Fix documentation.
10975
10976 2011-08-03  Matthew Heaney  <heaney@adacore.com>
10977
10978         * a-cobove.adb (Merge): Move source onto target, instead of using
10979         Assign.
10980
10981 2011-08-03  Matthew Heaney  <heaney@adacore.com>
10982
10983         * a-cbdlli.adb (Splice): Move source items from first to last.
10984
10985 2011-08-03  Yannick Moy  <moy@adacore.com>
10986
10987         * sem_util.ads: Add comment.
10988
10989 2011-08-03  Javier Miranda  <miranda@adacore.com>
10990
10991         * exp_aggr.adb
10992         (Expand_Record_Aggregate): In VM targets disable the expansion into
10993         assignments of aggregates whose type is not known at compile time.
10994
10995 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10996
10997         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
10998         protected entries and task entries, to build the proper renaming
10999         declaration for entry formals, used in debugging.
11000         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11001         parameters in the same way.
11002
11003 2011-08-02  Robert Dewar  <dewar@adacore.com>
11004
11005         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11006         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11007         code reorganization.
11008
11009 2011-08-02  Robert Dewar  <dewar@adacore.com>
11010
11011         * debug.adb: Debug flag d.P to suppress length comparison optimization
11012         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11013         comparison of Length by comparing First/Last instead.
11014
11015 2011-08-02  Matthew Heaney  <heaney@adacore.com>
11016
11017         * a-cobove.ads: Code clean up.
11018
11019 2011-08-02  Vincent Celier  <celier@adacore.com>
11020
11021         * adaint.c (file_names_case_sensitive_cache): New static int.
11022         (__gnat_get_file_names_case_sensitive): Cache the return value in
11023         file_names_case_sensitive_cache at the first invocation, to avoid
11024         multiple calls to getenv.
11025
11026 2011-08-02  Bob Duff  <duff@adacore.com>
11027
11028         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11029
11030 2011-08-02  Yannick Moy  <moy@adacore.com>
11031
11032         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11033         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11034         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11035         indicate that we are in a precondition or postcondition. This is used in
11036         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11037         decide whether to flag the spec or body of the current subprogram as
11038         not in ALFA.
11039
11040 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
11041
11042         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11043         list.
11044         * a-extiin.ads: New file.
11045
11046 2011-08-02  Bob Duff  <duff@adacore.com>
11047
11048         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11049         now raises Name_Error instead of Use_Error in certain cases. The other
11050         parts of this AI were already implemented properly.
11051
11052 2011-08-02  Vincent Celier  <celier@adacore.com>
11053
11054         * link.c: Only import "auto-host.h" when building the gnattools.
11055
11056 2011-08-02  Yannick Moy  <moy@adacore.com>
11057
11058         * sem_util.adb: Inter-unit inlining does not work for a subprogram
11059         which calls a local subprogram, so extract subprogram
11060         from Mark_Non_ALFA_Subprogram_Body.
11061
11062 2011-08-02  Javier Miranda  <miranda@adacore.com>
11063
11064         * exp_ch9.adb
11065         (Extract_Dispatching_Call): If the type of the dispatching object is an
11066         access type then return an explicit dereference in the Object out-mode
11067         parameter.
11068
11069 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11070
11071         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11072         compatibility checks for all indexes of an array subtype, not just the
11073         first. Reset Has_Dynamic_Range_Check on the subtype before each
11074         potential check to ensure that Insert_Range_Checks will not elide any
11075         of the dynamic checks.
11076
11077 2011-08-02  Yannick Moy  <moy@adacore.com>
11078
11079         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11080         SPARK restriction at parsing time.
11081         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11082         directive only if the SPARK restriction is set for this unit.
11083
11084 2011-08-02  Yannick Moy  <moy@adacore.com>
11085
11086         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11087         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11088         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11089         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11090         Mark_Non_ALFA_Subprogram_Body.
11091         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11092         inlined.
11093
11094 2011-08-02  Yannick Moy  <moy@adacore.com>
11095
11096         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11097         might be costly.
11098
11099 2011-08-02  Robert Dewar  <dewar@adacore.com>
11100
11101         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11102         exp_ch3.adb: Minor reformatting.
11103
11104 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11105
11106         * adaint.c (__gnat_locate_exec_on_path): only returns executable
11107         files, not any regular file.
11108         (__gnat_locate_file_with_predicate): new subprogram.
11109
11110 2011-08-02  Yannick Moy  <moy@adacore.com>
11111
11112         * sinfo.adb, sinfo.ads: Restrict the use of flags
11113         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11114         nodes, plus N_Subtype_Declaration for the 2nd one.
11115
11116 2011-08-02  Sergey Rybin  <rybin@adacore.com>
11117
11118         * gnat_rm.texi: Ramification of pragma Eliminate documentation
11119          - fix bugs in the description of Source_Trace;
11120          - get rid of UNIT_NAME;
11121
11122 2011-08-02  Javier Miranda  <miranda@adacore.com>
11123
11124         * exp_ch9.adb
11125         (Build_Dispatching_Requeue): Adding support for VM targets
11126         since we cannot directly reference the Tag entity.
11127         * exp_sel.adb (Build_K): Adding support for VM targets.
11128         (Build_S_Assignment): Adding support for VM targets.
11129         * exp_disp.adb
11130         (Default_Prim_Op_Position): In VM targets do not restrict availability
11131         of predefined interface primitives to compiling in Ada 2005 mode.
11132         (Is_Predefined_Interface_Primitive): In VM targets this service is not
11133         restricted to compiling in Ada 2005 mode.
11134         (Make_VM_TSD): Generate code that declares and initializes the OSD
11135         record. Needed to support dispatching calls through synchronized
11136         interfaces.
11137         * exp_ch3.adb
11138         (Make_Predefined_Primitive_Specs): Enable generation of predefined
11139         primitives associated with synchronized interfaces.
11140         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11141         primitives associated with synchronized interfaces.
11142
11143 2011-08-02  Yannick Moy  <moy@adacore.com>
11144
11145         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11146         statements hidden in SPARK if preceded by the HIDE directive
11147         (Parse_Exception_Handlers): mark each exception handler in a sequence of
11148         exception handlers as hidden in SPARK if preceded by the HIDE directive
11149         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11150         if starting with the HIDE directive
11151         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11152         starting with the HIDE directive; mark the declarations in a private
11153         part as hidden in SPARK if the private part starts with the HIDE
11154         directive
11155         * restrict.adb, restrict.ads
11156         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11157         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11158         argument node belongs to a part which is hidden in SPARK
11159         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11160         parts in SPARK; protect the possibly costly call to
11161         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11162         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11163         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11164         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11165         Tok_SPARK_Hide.
11166         (Scan): recognize special comment starting with '#' and followed by
11167         SPARK keyword "hide" as a HIDE directive.
11168
11169 2011-08-02  Yannick Moy  <moy@adacore.com>
11170
11171         * types.ads, erroutc.ads: Minor reformatting.
11172
11173 2011-08-02  Vincent Celier  <celier@adacore.com>
11174
11175         * link.c: Add response file support for cross platforms.
11176
11177 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11178
11179         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11180         in an association, set parent field of copy before partial analysis.
11181         * sem_res.adb (Resolve_Slice): create reference to itype only when
11182         expansion is enabled.
11183
11184 2011-08-02  Yannick Moy  <moy@adacore.com>
11185
11186         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11187         for new flag denoting which subprogram bodies are in ALFA
11188         * restrict.adb, sem_ch7.adb: Update comment
11189         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11190         sem_ch9.adb, sem_res.adb: Add calls to
11191         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11192         * sem_ch6.adb (Analyze_Function_Return): add calls to
11193         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11194         middle of the body, and extended return.
11195         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11196         False when missing return.
11197         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11198         to True for subprograms whose spec is in ALFA. Remove later on the flag
11199         on the entity used for a subprogram body when there exists a separate
11200         declaration.
11201         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11202         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11203         False, otherwise do nothing.
11204
11205 2011-08-02  Robert Dewar  <dewar@adacore.com>
11206
11207         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11208
11209 2011-08-02  Yannick Moy  <moy@adacore.com>
11210
11211         * sem_ch4.ads: minor formatting.
11212
11213 2011-08-02  Yannick Moy  <moy@adacore.com>
11214
11215         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11216         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11217         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11218         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11219         opt.ads: cleanup of SPARK mode
11220
11221 2011-08-02  Yannick Moy  <moy@adacore.com>
11222
11223         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11224         types.
11225         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11226         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11227         * sem_ch3.adb
11228         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11229         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11230         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11231         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11232         types.
11233         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11234         non-static range.
11235         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11236         functions whose return type is not in ALFA.
11237         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11238         specifications.
11239         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11240         parameter's type is not in ALFA.
11241         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11242         types are in ALFA.
11243
11244 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11245
11246         * sem_ch6 (Analyze_Expression_Function): treat the function as
11247         Inline_Always, and introduce a subprogram declaration for it when it is
11248         not a completion.
11249         * inline.adb (Add_Inlined_Body): recognize bodies that come from
11250         expression functions, so that the back-end can determine whether they
11251         can in fact be inlined.
11252         * sem_util.adb (Is_Expression_Function): predicate to determine whether
11253         a function body comes from an expression function.
11254
11255 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11256
11257         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11258         null exclusions to test Can_Never_Be_Null on the anonymous access types
11259         of the formals rather than testing the formals themselves. Exclude this
11260         check in cases where the Old_Formal is marked as a controlling formal,
11261         to avoid issuing spurious errors for bodies completing dispatching
11262         operations (due to the flag not getting set on controlling access
11263         formals in body specs).
11264         (Find_Corresponding_Spec): When checking full and subtype conformance of
11265         subprogram bodies in instances, pass Designated and E in that order, for
11266         consistency with the expected order of the formals (New_Id followed by
11267         Old_Id).
11268
11269 2011-08-02  Robert Dewar  <dewar@adacore.com>
11270
11271         * sem_ch8.adb: Minor reformatting.
11272
11273 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11274
11275         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11276         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11277         primitive operations of class-wide actuals.
11278
11279 2011-08-02  Javier Miranda  <miranda@adacore.com>
11280
11281         * exp_atag.ads, exp_atag.adb
11282         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11283         since its value is implicitly passed in argument Typ.
11284         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11285         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11286         Build_Common_Dispatching_Select_Statements.
11287
11288 2011-08-02  Robert Dewar  <dewar@adacore.com>
11289
11290         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11291         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11292         Minor reformatting.
11293
11294 2011-08-02  Robert Dewar  <dewar@adacore.com>
11295
11296         * sem_res.adb: Minor reformatting.
11297         * sem_prag.adb: Minor reformatting.
11298
11299 2011-08-02  Javier Miranda  <miranda@adacore.com>
11300
11301         * exp_atag.adb, exp_atags.ads
11302         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11303         by the tagged type Entity. Required to use this routine in the VM
11304         targets since we do not have available the Tag entity in the VM
11305         platforms.
11306         * exp_ch6.adb
11307         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11308         Ada.Tags has not been previously loaded.
11309         * exp_ch7.adb
11310         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11311         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11312         * sem_aux.adb
11313         (Enclosing_Dynamic_Scope): Add missing support to handle the full
11314         view of enclosing scopes. Required to handle enclosing scopes that
11315         are synchronized types whose full view is a task type.
11316         * exp_disp.adb
11317         (Build_VM_TSDs): Minor code improvement to avoid generating and
11318         analyzing lists with empty nodes.
11319         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11320         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11321         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11322         (Make_Disp_Timed_Select_Body): Add support for VM targets.
11323         (Make_Select_Specific_Data_Table): Add support for VM targets.
11324         (Make_VM_TSD): Generate code to initialize the SSD structure of
11325         the TSD.
11326
11327 2011-08-02  Yannick Moy  <moy@adacore.com>
11328
11329         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11330         cross-references section in ALI.
11331         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11332         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11333         Sub).
11334         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11335         subprogram or package entity of a node
11336         (Is_Local_Reference_Type): new function returns True for references
11337         selected in local cross-references.
11338         (Lt): function extracted from Lt in Output_References
11339         (Write_Entity_Name): function extracted from Output_References
11340         (Generate_Definition): generate reference with type 'D' for definition
11341         of objects (object declaration and parameter specification), with
11342         appropriate locations and units, for use in local cross-references.
11343         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11344         references of type 'I' for initialization in object definition.
11345         (Output_References): move part of function Lt and procedure
11346         Write_Entity_Name outside of the body. Ignore references of types 'D'
11347         and 'I' introduced for local cross-references.
11348         (Output_Local_References): new procedure to output the local
11349         cross-references sections.
11350         (Lref_Entity_Status): new array defining whether an entity is a local
11351         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11352         with 'I' type when initialization expression is present.
11353         * get_scos.adb, get_scos.ads: Correct comments and typos
11354
11355 2011-08-02  Javier Miranda  <miranda@adacore.com>
11356
11357         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11358         the JVM target.
11359         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11360         the JVM target.
11361         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11362         TSD support.
11363
11364 2011-08-02  Vincent Celier  <celier@adacore.com>
11365
11366         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11367         (No_Space_Img): New function
11368         (Find_Excluded_Sources): When reading from a file, record the file name
11369         and the line number for each excluded source.
11370         (Mark_Excluded_Sources): When reporting an error, if the excluded
11371         sources were read from a file, include file name and line number in
11372         the error message.
11373
11374 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11375
11376         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11377
11378 2011-08-02  Robert Dewar  <dewar@adacore.com>
11379
11380         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11381
11382 2011-08-02  Javier Miranda  <miranda@adacore.com>
11383
11384         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11385         generation of TSDs to the DOTNET compiler.
11386         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11387         generation of TSDs to the DOTNET compiler.
11388
11389 2011-08-02  Javier Miranda  <miranda@adacore.com>
11390
11391         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11392         record of all the tagged types declared inside library level package
11393         declarations, library level package bodies or library level subprograms.
11394         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11395         associated with a given tagged type.
11396         (Build_VM_TSDs): New subprogram.
11397         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11398         compilation units that are subprograms.
11399         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11400         compilation units that are package bodies.
11401         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11402         units that are a package declaration or a package instantiation.
11403         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11404         reorganization to improve the error generated by the frontend when the
11405         function Ada.Tags.Secondary_Tag is not available.
11406         * rtsfind.ads (RE_Register_TSD): New runtime entity.
11407         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11408
11409 2011-08-02  Javier Miranda  <miranda@adacore.com>
11410
11411         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11412
11413 2011-08-02  Robert Dewar  <dewar@adacore.com>
11414
11415         * s-imenne.ads: Minor reformatting.
11416
11417 2011-08-02  Robert Dewar  <dewar@adacore.com>
11418
11419         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11420         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11421         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11422
11423 2011-08-02  Robert Dewar  <dewar@adacore.com>
11424
11425         * einfo.ads (Materialize_Entity): Document this is only for renamings
11426         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11427         required debug information in the case where we transform the object
11428         declaration into a renaming declaration.
11429         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11430         object
11431         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11432         Materialize_Entity.
11433
11434 2011-08-02  Robert Dewar  <dewar@adacore.com>
11435
11436         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11437         Suppress_Init_Procs.
11438         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11439         Suppress_Initialization/Initialization_Suppressed.
11440         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11441         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11442         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11443         * sem_prag.adb: New processing for pragma Suppress_Initialization.
11444
11445 2011-08-02  Robert Dewar  <dewar@adacore.com>
11446
11447         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11448         Minor reformatting.
11449
11450 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11451
11452         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11453         only have inheritable classwide pre/postconditions.
11454
11455 2011-08-02  Javier Miranda  <miranda@adacore.com>
11456
11457         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11458         * rtsfind.ads (RE_Check_TSD): New runtime entity.
11459         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11460         checks if the external tag of a type is the same as the external tag
11461         of some other declaration.
11462
11463 2011-08-02  Thomas Quinot  <quinot@adacore.com>
11464
11465         * s-taskin.ads: Minor reformatting.
11466
11467 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11468
11469         * g-comlin.adb (Display_Help): swap the order in which it prints the
11470         short help and the general usage.
11471
11472 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11473
11474         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11475         the aspect declarations and attach them to the generic copy for
11476         subsequent analysis.
11477         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11478         declarations of the generic tree to the new subprogram declarations.
11479         * sem_attr.adb (Check_Precondition_Postcondition): recognize
11480         conditions that apply to a subprogram instance.
11481
11482 2011-08-02  Robert Dewar  <dewar@adacore.com>
11483
11484         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11485
11486 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11487
11488         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11489         private type with a tagged full view is not derived in the immediate
11490         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11491
11492 2011-08-02  Robert Dewar  <dewar@adacore.com>
11493
11494         * exp_ch4.adb: Minor reformatting.
11495
11496 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11497
11498         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
11499         Ada2012 iterator, the loop will be rewritten during expansion into a
11500         while loop with a cursor and an element declaration. Do not analyze the
11501         body in this case, because if the container is for indefinite types the
11502         actual subtype of the elements will only be determined when the cursor
11503         declaration is analyzed.
11504
11505 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11506
11507         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11508         size/alignment related attributes in CodePeer_Mode.
11509
11510 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11511
11512         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11513         Prepend_Element, since this can result in the operation getting the
11514         wrong slot in the full type's dispatch table if the full type has
11515         inherited operations. The incomplete type's operation will get added
11516         to the proper position in the full type's primitives
11517         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11518         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11519         dispatching operations, since there are cases where nonprimitive
11520         subprograms can get added to the list of incomplete dependents (such
11521         as subprograms in nested packages).
11522         * sem_ch6.adb (Process_Formals): First, remove test for being in a
11523         private part when determining whether to add a primitive with a
11524         parameter of a tagged incomplete type to the Private_Dependents list.
11525         Such primitives can also occur in the visible part, and should not have
11526         been excluded from being private dependents.
11527         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11528         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11529         list of a Taft-amendment incomplete type is a primitive before issuing
11530         an error that the full type must appear in the same unit. There are
11531         cases where nonprimitives can be in the list (such as subprograms in
11532         nested packages).
11533         * sem_disp.adb (Derives_From): Use correct condition for checking that
11534         a formal's type is derived from the type of the corresponding formal in
11535         the parent subprogram (the condition was completely wrong). Add
11536         checking that was missing for controlling result types being derived
11537         from the result type of the parent operation.
11538
11539 2011-08-02  Yannick Moy  <moy@adacore.com>
11540
11541         * errout.adb (First_Node): minor renaming
11542         * restrict.adb (Check_Formal_Restriction): put restriction warning on
11543         first node.
11544
11545 2011-08-02  Yannick Moy  <moy@adacore.com>
11546
11547         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11548         before accessing operands.
11549         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11550         decide whether an initialization expression respects SPARK rules, as
11551         the plain node is the expanded one. This allows for more valid warnings
11552         to be issued.
11553         * gnat_rm.texi: Minor update.
11554
11555 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11556
11557         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11558         previous change.
11559
11560 2011-08-02  Robert Dewar  <dewar@adacore.com>
11561
11562         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11563
11564 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11565
11566         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11567         loop statements and the element renaming declaration with a block when
11568         the element type is controlled.
11569
11570 2011-08-02  Yannick Moy  <moy@adacore.com>
11571
11572         * sinfo.ads: Minor formatting.
11573
11574 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11575
11576         * sem_aggr.adb (Add_Association): if the association has a box and no
11577         expression, use the Sloc of the aggregate itself for the new
11578         association.
11579         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11580         the Original_Node.
11581
11582 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11583
11584         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11585         When a container is provided via a function call, generate a renaming
11586         of the function result. This avoids the creation of a transient scope
11587         and the premature finalization of the container.
11588         * exp_ch7.adb (Is_Container_Cursor): Removed.
11589         (Wrap_Transient_Declaration): Remove the supression of the finalization
11590         of the list controller when the declaration denotes a container cursor,
11591         it is not needed.
11592
11593 2011-08-02  Yannick Moy  <moy@adacore.com>
11594
11595         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11596         node is from source, instead of the original node being from source.
11597         * sem_aggr.adb
11598         (Resolve_Array_Aggregate): refine the check for a static expression, to
11599         recognize also static ranges
11600         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11601         Array_Type_Declaration): postpone the test for the type being a subtype
11602         mark after the type has been resolved, so that component-selection and
11603         expanded-name are discriminated.
11604         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11605         to distinguish the case of an iteration scheme, so that an error is
11606         issed on a non-static range in SPARK except in an iteration scheme.
11607         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11608         In_Iter_Schm = True.
11609         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11610         user-defined operators so that they are allowed in renaming
11611         * sem_ch8.adb
11612         (Find_Selected_Component): refine the check for prefixing of operators
11613         so that they are allowed in renaming. Move the checks for restrictions
11614         on selector name after analysis discriminated between
11615         component-selection and expanded-name.
11616         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11617         concatenation argument of string type if it is static.
11618         * sem_util.adb, sem_util.ads
11619         (Check_Later_Vs_Basic_Declarations): add a new function
11620         Is_Later_Declarative_Item to decice which declarations are allowed as
11621         later items, in the two different modes Ada 83 and SPARK. In the SPARK
11622         mode, add that renamings are considered as later items.
11623         (Enclosing_Package): new function to return the enclosing package
11624         (Enter_Name): correct the rule for homonyms in SPARK
11625         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11626         from source (result of expansion) to avoid issuing wrong warnings.
11627
11628 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11629
11630         * errout.adb: On anything but an expression First_Node returns its
11631         argument.
11632
11633 2011-08-02  Pascal Obry  <obry@adacore.com>
11634
11635         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11636
11637 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11638
11639         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11640         Set the associated loop as the related expression of internally
11641         generated cursors.
11642         * exp_ch7.adb (Is_Container_Cursor): New routine.
11643         (Wrap_Transient_Declaration): Supress the finalization of the list
11644         controller when the declaration denotes a container cursor.
11645
11646 2011-08-02  Yannick Moy  <moy@adacore.com>
11647
11648         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11649         command line now.
11650         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11651         expression is a simple expression. This check cannot be performed in
11652         the semantics, so just drop it.
11653         (P_Index_Or_Discriminant_Constraint): move check that the index or
11654         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11655         semantics. Other cases were previously checked in the semantics.
11656         * par-ch4.adb (P_Name): move checks that a selector name is not
11657         character literal or an operator symbol to Find_Selected_Component in
11658         the semantics
11659         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11660         declarations are not placed after later declarations in a separate
11661         procedure in Sem_Util (possibly not the best choice?), to be used both
11662         during parsing, for Ada 83 mode, and during semantic analysis, for
11663         SPARK mode.
11664         * par-endh.adb (Check_End): move check that end label is not missing
11665         to Process_End_Label in the semantics
11666         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11667         the special case for SPARK restriction
11668         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11669         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11670         parameter Force to issue the error message even on internal node (used
11671         for generated end label). Call Check_Restriction to check when an error
11672         must be issued. In SPARK mode, issue an error message even if the
11673         restriction is not set.
11674         (Check_Restriction): new procedure with an additional out parameter to
11675         inform the caller that a message has been issued
11676         * sem_aggr.adb: Minor modification of message
11677         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11678         instead of issuing an error message directly
11679         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11680         declarations are not placed after later declarations, by calling
11681         Check_Later_Vs_Basic_Declarations
11682         (Analyze_Subtype_Declaration): move here the check that an index or
11683         discriminant constraint must be a subtype mark. Change the check that
11684         a subtype of String must start at one so that it works on subtype marks.
11685         * sem_ch4.adb (Analyze_Call): move here the check that a named
11686         association cannot follow a positional one in a call
11687         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11688         instead of issuing an error message directly
11689         * sem_ch8.adb (Find_Selected_Component): move here the check that a
11690         selector name is not a character literal or an operator symbol. Move
11691         here the check that the prefix of an expanded name cannot be a
11692         subprogram or a loop statement.
11693         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11694         procedure called from parsing and semantics to check that basic
11695         declarations are not placed after later declarations
11696         (Process_End_Label): move here the check that end label is not missing
11697
11698 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11699
11700         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11701         representation clause in codepeer mode, since it confuses CodePeer and
11702         does not bring useful info.
11703
11704 2011-08-02  Ed Falis  <falis@adacore.com>
11705
11706         * init.c: initialize fp hw on MILS.
11707
11708 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11709
11710         * errout.adb (First_Node): for bodies, return the node itself (small
11711         optimization). For other nodes, do not check source_unit if the node
11712         comes from Standard.
11713
11714 2011-08-02  Robert Dewar  <dewar@adacore.com>
11715
11716         * exp_ch3.adb: Minor comment additions.
11717         * sem_ch13.adb: Minor reformatting.
11718
11719 2011-08-02  Pascal Obry  <obry@adacore.com>
11720
11721         * make.adb, makeutl.adb: Removes some superfluous directory separator.
11722
11723 2011-08-02  Robert Dewar  <dewar@adacore.com>
11724
11725         * sem_attr.adb: Minor reformatting.
11726
11727 2011-08-02  Robert Dewar  <dewar@adacore.com>
11728
11729         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11730         (Has_Default_Component_Value): Removed
11731         * einfo.ads Comment updates
11732         (Has_Default_Aspect): Replaces Has_Default_Value
11733         (Has_Default_Component_Value): Removed
11734         * exp_ch13.adb
11735         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11736         * exp_ch3.adb
11737         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11738         (Get_Simple_Init_Val): Handle Default_Value aspect
11739         (Needs_Simple_Initialization): Handle Default_Value aspect
11740         * exp_ch3.ads: Needs_Simple_Initialization
11741         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11742         * par-prag.adb (Pragma_Default[_Component]Value) Removed
11743         * sem_ch13.adb
11744         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11745         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11746         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11747
11748 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11749
11750         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11751         package containing iteration primitives.
11752         exp_ch5.adb (Expand_Iterator_Loop): ditto.
11753
11754 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11755
11756         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11757         "of", pre-analyze expression in case it is a function call with
11758         finalization actions that must be placed ahead of the loop.
11759         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11760         on an Ada2012 iterator, insert them ahead of the rewritten loop.
11761
11762 2011-08-02  Geert Bosch  <bosch@adacore.com>
11763
11764         * cstand.adb (Create_Float_Types): Only consider C's long double for
11765         Long_Long_Float, in addition to double.
11766
11767 2011-08-02  Robert Dewar  <dewar@adacore.com>
11768
11769         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11770         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11771         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11772         Minor reformatting.
11773
11774 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11775
11776         * sem_attr.adb: handle properly 'Result when it is a prefix of an
11777         indexed component.
11778
11779 2011-08-02  Javier Miranda  <miranda@adacore.com>
11780
11781         * einfo.ads, einfo.adb
11782         (Original_Access_Type): Move this attribute to Node26 since there was
11783         an undocumented use of Node21 in E_Access_Subprogram_Type entities
11784         which causes conflicts and breaks the generation of the .NET compiler.
11785         (Interface_Name): Add missing documentation on JGNAT only uses of
11786         this attribute.
11787
11788 2011-08-02  Geert Bosch  <bosch@adacore.com>
11789
11790         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11791         (Find_Back_End_Float_Type): Likewise
11792         (Create_Back_End_Float_Types): Likewise
11793         (Create_Float_Types): Likewise
11794         (Register_Float_Type): Likewise
11795         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11796         Nlist and split out type selection in new local Find_Base_Type function.
11797         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11798         Nlist
11799         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11800
11801 2011-08-02  Robert Dewar  <dewar@adacore.com>
11802
11803         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11804         alpha order).
11805         * opt.ads: Minor comment change.
11806         * sem_ch12.adb: Minor code reorganization.
11807
11808 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11809
11810         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11811         subtype's list of rep items to the list on the full subtype in the case
11812         where the lists are the same.
11813
11814 2011-08-02  Geert Bosch  <bosch@adacore.com>
11815
11816         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11817         using the one from System.Strings, which also deallocates all strings.
11818
11819 2011-08-02  Geert Bosch  <bosch@adacore.com>
11820
11821         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11822         function.
11823         * gcc-interface/Make-lang.in: Update dependencies.
11824
11825 2011-08-02  Olivier Hainque  <hainque@adacore.com>
11826
11827         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11828         end_locus.
11829
11830 2011-08-02  Javier Miranda  <miranda@adacore.com>
11831
11832         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11833         associated with anonymous access to subprograms.
11834
11835 2011-08-02  Geert Bosch  <bosch@adacore.com>
11836
11837         * opt.ads
11838         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11839         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11840         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11841         (Add_Symbol_Definition): Move to switch-c.adb
11842         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11843         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11844         (Add_Symbol_Definition): Move to switch-c.adb.
11845         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11846         * sem_warn.adb
11847         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11848         Move to warnsw.adb.
11849         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11850         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11851         Move to warnsw.adb.
11852         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11853         (Add_Symbol_Definition): Moved from Prepcomp.
11854         * switch-c.ads: Update copyright notice. Use String_List instead of
11855         Argument_List, removing dependency on System.OS_Lib.
11856
11857 2011-08-02  Yannick Moy  <moy@adacore.com>
11858
11859         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11860         mode on initialization expression which does not respect SPARK
11861         restrictions.
11862         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11863         if the tree referenced by its argument represents an initialization
11864         expression in SPARK, suitable for initializing an object in an object
11865         declaration.
11866
11867 2011-08-02  Javier Miranda  <miranda@adacore.com>
11868
11869         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11870         internally generated access to subprogram with its associated protected
11871         subprogram type.
11872         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11873
11874 2011-08-02  Geert Bosch  <bosch@adacore.com>
11875
11876         * cstand.adb (Register_Float_Type): Print information about type to
11877         register, if the Debug_Flag_Dot_B is set.
11878         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11879         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11880         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11881         with a requested precision of more than Max_Digits digits and no more
11882         than Max_Base_Digits digits, if a range specification is present and the
11883         Predefined_Float_Types list has a suitable type to derive from.
11884         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11885         case of type completion with pragma Import
11886         * sem_prag.adb
11887         (Process_Import_Predefined_Type): Processing to complete a type
11888         with pragma Import. Currently supports floating point types only.
11889         (Set_Convention_From_Pragma): Do nothing without underlying type.
11890         (Process_Convention): Guard against absence of underlying type,
11891         which may happen when importing incomplete types.
11892         (Process_Import_Or_Interface): Handle case of importing predefined
11893         types. Tweak error message.
11894
11895 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11896
11897         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11898         functions to previous change.  Reorganize code slightly.
11899
11900 2011-08-02  Geert Bosch  <bosch@adacore.com>
11901
11902         * back_end.ads (Register_Type_Proc): New call back procedure type for
11903         allowing the back end to provide information about available types.
11904         (Register_Back_End_Types): New procedure to register back end types.
11905         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11906         available types.
11907         * cstand.adb (Back_End_Float_Types): New list for floating point types
11908         supported by the back end.
11909         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11910         (Copy_Float_Type): New procedure to make new copies of predefined types.
11911         (Register_Float_Type): New call back procedure to populate the BEFT list
11912         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11913         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11914         (Create_Float_Types): New procedure to create entities for floating
11915         point types predefined in Standard, and put these and any remaining
11916         BEFTs on the Predefined_Float_Types list.
11917         * stand.ads (Predefined_Float_Types): New list for predefined floating
11918         point types that do not have declarations in package Standard.
11919
11920 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11921
11922         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
11923         entity node for the unit containing the parameter.
11924         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11925         (Add_Inlined_Subprogram): Likewise.
11926         * gcc-interface/Make-lang.in: Update dependencies.
11927
11928 2011-08-02  Thomas Quinot  <quinot@adacore.com>
11929
11930         * s-stusta.adb (Print): Make sure Pos is always initialized to a
11931         suitable value.
11932
11933 2011-08-02  Geert Bosch  <bosch@adacore.com>
11934
11935         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11936
11937 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11938
11939         * sem_type.adb (Covers): Move trivial case to the top and reuse the
11940         computed value of Base_Type.
11941
11942 2011-08-02  Yannick Moy  <moy@adacore.com>
11943
11944         * restrict.adb (Check_Restriction): issue an error for any use of
11945         class-wide, even if the No_Dispatch restriction is not set.
11946         * sem_aggr.adb: Correct typos in comments and messages in formal mode
11947         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11948         when completing a private extension, the type named in the private part
11949         is not the same as that named in the visible part.
11950         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11951         of an inherited primitive operations of a tagged type or type extension
11952         that returns the tagged type.
11953         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11954         function which returns True for an implicit operation inherited by the
11955         derived type declaration for the argument type.
11956         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11957         order.
11958
11959 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11960
11961         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11962         Process_Bounds, to perform analysis with expansion of a range or an
11963         expression that is the iteration scheme for a loop.
11964         (Analyze_Iterator_Specification): If domain of iteration is given by a
11965         function call with a controlled result, as is the case if call returns
11966         a predefined container, ensure that finalization actions are properly
11967         generated.
11968         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11969
11970 2011-08-02  Javier Miranda  <miranda@adacore.com>
11971
11972         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11973         * gcc-interface/Make-lang.in: Update dependencies.
11974
11975 2011-08-02  Javier Miranda  <miranda@adacore.com>
11976
11977         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11978         determine if the analysis is performed using N or Original_Node (N).
11979         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11980         functionality of routine Is_Variable avoids code duplication.
11981         * checks.adb (Determine_Range): Handle temporaries generated by
11982         Remove_Side_Effects.
11983
11984 2011-08-02  Javier Miranda  <miranda@adacore.com>
11985
11986         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11987         expansion of the condition. Required since the previous analysis was
11988         done with expansion disabled (see Resolve_Quantified_Expression) and
11989         hence checks were not inserted and record comparisons have not been
11990         expanded.
11991
11992 2011-08-02  Ed Falis  <falis@adacore.com>
11993
11994         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11995         Update header.
11996
11997 2011-08-02  Bob Duff  <duff@adacore.com>
11998
11999         * opt.ads: Minor comment fix.
12000
12001 2011-08-02  Bob Duff  <duff@adacore.com>
12002
12003         * sem_ch12.adb (Analyze_Package_Instantiation,
12004         Analyze_Subprogram_Instantiation): Turn off style checking while
12005         analyzing an instance. Whatever style checks that apply to the generic
12006         unit should apply, so it makes no sense to apply them in an instance.
12007         This was causing trouble when compiling an instance of a runtime
12008         unit that violates the -gnatyO switch.
12009         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12010         one of the two case statements, causing spurious errors.
12011
12012 2011-08-02  Robert Dewar  <dewar@adacore.com>
12013
12014         * uname.adb: Minor reformatting.
12015         * gnatcmd.adb: Minor reformatting.
12016         * exp_attr.adb: Minor reformatting.
12017
12018 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12019
12020         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12021         No_Dispatching_Calls, do not look for the Assign primitive, because
12022         predefined primitives are not created in this case.
12023
12024 2011-08-02  Bob Duff  <duff@adacore.com>
12025
12026         * stylesw.ads: Minor comment fixes.
12027
12028 2011-08-02  Robert Dewar  <dewar@adacore.com>
12029
12030         * freeze.adb (Add_To_Result): New procedure.
12031
12032 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
12033
12034         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12035         time, if the specific run-time routines for handling streams of strings
12036         are not available, use the default mechanism.
12037
12038 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12039
12040         * s-regpat.ads: Fix typo.
12041
12042 2011-08-02  Vincent Celier  <celier@adacore.com>
12043
12044         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12045         not null, call it to create the in memory config project file without
12046         parsing an existing default config project file.
12047
12048 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12049
12050         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12051
12052 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12053
12054         * sem_elim.adb: an abstract subprogram does not need an eliminate
12055         pragma for its descendant to be eliminable.
12056
12057 2011-08-02  Ed Falis  <falis@adacore.com>
12058
12059         * init.c: revert to handling before previous checkin for VxWorks
12060         * s-intman-vxworks.adb: delete unnecessary declarations related to
12061         using Ada interrupt facilities for handling signals.
12062         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12063         * s-intman-vxworks.ads: Import __gnat_install_handler as
12064         Initialize_Interrupts.
12065         * s-taprop-vxworks.adb: Delete Signal_Mask.
12066         (Abort_Handler): change construction of mask to unblock exception
12067         signals.
12068
12069 2011-08-02  Jerome Guitton  <guitton@adacore.com>
12070
12071         * a-except-2005.adb (Raise_From_Signal_Handler): Call
12072         Debug_Raise_Exception before propagation starts.
12073
12074 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12075
12076         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12077         to Restriction_Check_Required.
12078         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12079         * sem_res.adb (Resolve_Call): Likewise.
12080         * sem_attr.adb (Check_Stream_Attribute): Likewise.
12081
12082 2011-08-02  Bob Duff  <duff@adacore.com>
12083
12084         * stylesw.ads: Update comment.
12085         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12086         * errout.ads: Remove obsolete comment.
12087
12088 2011-08-02  Javier Miranda  <miranda@adacore.com>
12089
12090         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12091         (Set_Is_Safe_To_Reevaluate): new procedure.
12092         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12093         assignment is allowed on safe-to-reevaluate variables.
12094         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12095         temporary created to remove side effects in expressions that use
12096         the secondary stack as safe-to-reevaluate.
12097         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12098         variables that are not true constants.
12099
12100 2011-08-02  Robert Dewar  <dewar@adacore.com>
12101
12102         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12103         sem_res.adb, sem_ch6.adb: Minor reformatting.
12104
12105 2011-08-02  Jerome Guitton  <guitton@adacore.com>
12106
12107         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12108
12109 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12110
12111         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12112         not set Overridden_Operation if subprogram is an initialization
12113         procedure.
12114
12115 2011-08-02  Yannick Moy  <moy@adacore.com>
12116
12117         * par-ch6.adb: Correct obsolete name in comments
12118         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12119         which takes two message arguments (existing function takes one), with
12120         second message used for continuation.
12121         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12122         block statements that originate from a source block statement, not
12123         generated block statements
12124         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12125         symmetry with procedure case
12126         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12127         function to issue an error in formal mode if a package specification
12128         contains more than one tagged type or type extension.
12129         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12130         parameters matching formals of tagged types are objects (or ancestor
12131         type conversions of objects), not general expressions. Issue an error
12132         on view conversions that are not involving ancestor conversion of an
12133         extended type.
12134         (Resolve_Type_Conversion): in formal mode, issue an error on the
12135         operand of an ancestor type conversion which is not an object
12136         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12137         procedure so that it works also for actuals of function calls
12138         (Is_Actual_Tagged_Parameter): new function which determines if its
12139         argument is an actual parameter of a formal of tagged type in a
12140         subprogram call
12141         (Is_SPARK_Object_Reference): new function which determines if the tree
12142         referenced by its argument represents an object in SPARK
12143
12144 2011-08-02  Robert Dewar  <dewar@adacore.com>
12145
12146         * sem_ch3.adb: Minor reformatting
12147         Minor comment addition
12148         Minor error msg text change
12149
12150 2011-08-02  Javier Miranda  <miranda@adacore.com>
12151
12152         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12153         function. Used to be more precise when we generate a variable plus one
12154         assignment to remove side effects in the evaluation of the Bound
12155         expressions.
12156         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12157         of the bound expression to force its re-analysis and thus expand the
12158         associated transient scope (if required). Code cleanup replacing the
12159         previous code that declared the constant entity by an invocation to
12160         routine Force_Evaluation which centralizes this work in the frontend.
12161
12162 2011-08-02  Robert Dewar  <dewar@adacore.com>
12163
12164         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12165         (Base_Type): Now uses improved Is_Base_Type function
12166         * einfo.ads (Base_Type): Inline this function
12167
12168 2011-08-02  Robert Dewar  <dewar@adacore.com>
12169
12170         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12171         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12172
12173 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12174
12175         * gcc-interface/Make-lang.in: Update dependencies.
12176         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12177         targets.
12178
12179 2011-08-02  Yannick Moy  <moy@adacore.com>
12180
12181         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12182         non-simple expression used in delta constraint
12183         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12184         index constraint which is not a subtype mark
12185         * par.adb: With and use Restrict
12186         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12187         mode on component type which is not a subtype mark and default
12188         expression on component
12189         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12190         of string which does not have a lower index bound equal to 1
12191         (Array_Type_Declaration): issue an error in formal mode on index or
12192         component type which is not a subtype mark, and on aliased keyword on
12193         component
12194         (Derived_Type_Declaration): issue an error in formal mode on interface,
12195         limited or abstract type
12196         (Record_Type_Declaration): issue an error in formal mode on interface
12197         (Record_Type_Definition): issue an error in formal mode on tagged types
12198         and type extensions not declared in the specification of a library unit
12199         package; on null non-tagged record; on variant part
12200
12201 2011-08-02  Vincent Celier  <celier@adacore.com>
12202
12203         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12204         not declared for qualified library project when Library_Name is not
12205         declared, but Library_Dir is.
12206
12207 2011-08-02  Robert Dewar  <dewar@adacore.com>
12208
12209         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12210         pragmas (affects aspects [Component_]Default_Value
12211         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12212         component type for the resolution
12213
12214 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12215
12216         * einfo.adb (Base_Type): Tune implementation for speed.
12217
12218 2011-08-02  Robert Dewar  <dewar@adacore.com>
12219
12220         * freeze.adb: Minor reformatting.
12221
12222 2011-08-02  Thomas Quinot  <quinot@adacore.com>
12223
12224         * scos.ads: Update comments.
12225
12226 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12227
12228         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12229         base type, because the parent may be a subtype of a private type whose
12230         convention is established in a private part.
12231
12232 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12233
12234         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12235         statement in a block when the expansion of the return expression has
12236         created a finalization chain.
12237         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12238         with the parent node.
12239         Add N_Extended_Return_Statement to handle the case where a transient
12240         object declaration appears in the Return_Object_Declarations list of
12241         an extended return statement.
12242
12243 2011-08-02  Matthew Gingell  <gingell@adacore.com>
12244
12245         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12246         unused parameter 'name'.
12247
12248 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12249
12250         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12251         inherited operation, check whether its alias, which is the source
12252         operastion that it renames, has been marked eliminated.
12253
12254 2011-08-02  Javier Miranda  <miranda@adacore.com>
12255
12256         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12257         in-mode parameter whose type is an access type since it can be used to
12258         modify its designated object. Enforce code that handles as safe an
12259         access type that is not access-to-constant but it is the result of a
12260         previous removal of side-effects.
12261         (Remove_Side_Effects): Minor code reorganization of cases which require
12262         no action. Done to incorporate documentation on new cases uncovered
12263         working in this ticket: no action needed if this routine was invoked
12264         too early and the nodes are not yet decorated.
12265         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12266         to routine Remove_Side_Effects by calls to Force_Evaluation since they
12267         were issued with actuals that are implicitly provided by
12268         Force_Evaluation.
12269
12270 2011-08-02  Robert Dewar  <dewar@adacore.com>
12271
12272         * sem_ch3.adb, sem_res.adb: Minor reformatting.
12273
12274 2011-08-02  Yannick Moy  <moy@adacore.com>
12275
12276         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12277         to issue an error in formal mode on attribute not supported in this mode
12278         (Analyze_Attribute): issue errors on standard attributes not supported
12279         in formal mode.
12280         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12281         comment, and issue error in formal mode on modulus which is not a power
12282         of 2.
12283         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12284         range.
12285         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12286         subtype mark.
12287         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12288         operator on modular type (except 'not').
12289
12290 2011-08-02  Robert Dewar  <dewar@adacore.com>
12291
12292         * gnat_rm.texi: Minor reformatting.
12293
12294 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12295
12296         * s-osinte-linux.ads: Minor comment update and reformatting.
12297         * i-cexten.ads: Make this unit pure, as for its parent.
12298         Will allow its usage in more contexts if needed.
12299
12300 2011-08-02  Robert Dewar  <dewar@adacore.com>
12301
12302         * s-utf_32.ads: Minor comment fix.
12303
12304 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12305
12306         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12307         operation of a tagged synchronized type, handle the case where the
12308         controlling argument is overloaded.
12309
12310 2011-08-02  Yannick Moy  <moy@adacore.com>
12311
12312         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12313         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12314         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12315         SPARK mode and formal verification mode on processing SPARK restriction
12316         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12317         requiring consistency checking.
12318
12319 2011-08-02  Robert Dewar  <dewar@adacore.com>
12320
12321         * sem_res.adb: Minor reformatting.
12322
12323 2011-08-02  Robert Dewar  <dewar@adacore.com>
12324
12325         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12326         a-cforse.ads: Remove unneeded with of Ada.Containers
12327         Remove commented out pragma Inline's
12328         Move specifications of new subprograms to the actual specs
12329
12330 2011-08-02  Yannick Moy  <moy@adacore.com>
12331
12332         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12333         a-cforse.ads: Update comments.
12334
12335 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12336
12337         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12338
12339 2011-08-02  Robert Dewar  <dewar@adacore.com>
12340
12341         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12342         a-cforse.ads, a-cofove.ads: Minor reformatting.
12343
12344 2011-08-02  Claire Dross  <dross@adacore.com>
12345
12346         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12347         a-cofove.ads: Add comments.
12348
12349 2011-08-02  Yannick Moy  <moy@adacore.com>
12350
12351         * gnat_rm.texi: Document formal containers.
12352
12353 2011-08-02  Emmanuel Briot  <briot@adacore.com>
12354
12355         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12356         are empty sections.
12357
12358 2011-08-02  Robert Dewar  <dewar@adacore.com>
12359
12360         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12361         reformatting.
12362
12363 2011-08-02  Robert Dewar  <dewar@adacore.com>
12364
12365         * aspects.adb: New aspects Default_Value and Default_Component_Value
12366         New format of Aspect_Names table checks for omitted entries
12367         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12368         handling of boolean aspects for derived types.
12369         New aspects Default_Value and Default_Component_Value
12370         New format of Aspect_Names table checks for omitted entries
12371         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12372         (Has_Default_Value): New flag
12373         (Has_Default_Component_Value): New flag
12374         (Has_Default_Value): New flag
12375         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12376         table.
12377         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12378         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12379         Default_Value and Default_Component_Value
12380         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12381         New aspects Default_Value and Default_Component_Value
12382         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12383         * sprint.adb: Print N_Aspect_Specification node when called from gdb
12384
12385 2011-08-02  Vincent Celier  <celier@adacore.com>
12386
12387         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12388         inherit library kind.
12389
12390 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12391
12392         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12393         Minor reformatting.
12394
12395 2011-08-02  Robert Dewar  <dewar@adacore.com>
12396
12397         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12398
12399 2011-08-02  Yannick Moy  <moy@adacore.com>
12400
12401         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12402
12403 2011-08-02  Robert Dewar  <dewar@adacore.com>
12404
12405         * impunit.adb: Add comment.
12406
12407 2011-08-02  Yannick Moy  <moy@adacore.com>
12408
12409         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12410         qualification of aggregates in formal mode
12411         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12412         another aggregate
12413         (Resolve_Aggregate): complete the test that an aggregate is adequately
12414         qualified in formal mode
12415
12416 2011-08-02  Pascal Obry  <obry@adacore.com>
12417
12418         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12419         * mlib-prj.adb: Supress warning when compiling binder generated file.
12420         (Build_Library): Supress all warnings when compiling the binder
12421         generated file.
12422
12423 2011-08-02  Yannick Moy  <moy@adacore.com>
12424
12425         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12426         from here...
12427         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12428         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12429         Add with/use clauses to make Check_Formal_Restriction visible
12430
12431 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12432
12433         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12434         in-parameters when type of the generic formal is private in the generic
12435         spec and non-private in the body.
12436
12437 2011-08-02  Claire Dross  <dross@adacore.com>
12438
12439         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12440         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12441         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12442         * impunit.adb, Makefile.rtl: Take new files into account.
12443
12444 2011-08-02  Robert Dewar  <dewar@adacore.com>
12445
12446         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12447         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12448
12449 2011-08-02  Yannick Moy  <moy@adacore.com>
12450
12451         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12452         formal mode
12453         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12454         matching static array bounds, taking into account the special case of
12455         string literals
12456         * sem_ch3.adb: Typo in comment.
12457
12458 2011-08-02  Yannick Moy  <moy@adacore.com>
12459
12460         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12461         which issues an error in formal mode if its argument node is originally
12462         from source
12463         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12464         has a discriminant specification so that it does not include the case
12465         of derived types
12466         (Derived_Type_Declaration): move here the test that a derived type has a
12467         discriminant specification
12468         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12469         first element of a component association before accessing its choices
12470         (presence of component association is not enough)
12471         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12472         declaration is a library item before accessing the next element in a
12473         list, as library items are not member of lists
12474         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12475         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12476         Check_Formal_Restriction whenever possible.
12477
12478 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12479
12480         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12481         reference when needed.
12482
12483 2011-08-02  Bob Duff  <duff@adacore.com>
12484
12485         * gnat_ugn.texi: Fix typo.
12486
12487 2011-08-02  Vincent Celier  <celier@adacore.com>
12488
12489         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12490         archive file name. Do not use the full path name of archives for Open
12491         VMS.
12492
12493 2011-08-02  Robert Dewar  <dewar@adacore.com>
12494
12495         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12496         Analyze_Aspect_Specifications
12497         * sem_ch13.adb
12498         (Analyze_Aspect_Specifications): New handling for boolean aspects
12499         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12500         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12501         sequence for Analyze_Aspect_Specifications
12502         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12503         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12504
12505 2011-08-02  Robert Dewar  <dewar@adacore.com>
12506
12507         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12508         aspects, since these no longer exist.
12509
12510 2011-08-02  Robert Dewar  <dewar@adacore.com>
12511
12512         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12513         semicolon, do not try to see if there are aspects following it.
12514         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12515         aspect spec.
12516
12517 2011-08-02  Robert Dewar  <dewar@adacore.com>
12518
12519         * sem_ch8.adb, aspects.ads: Minor reformatting.
12520
12521 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12522
12523         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12524         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12525         extracted from...
12526         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
12527
12528 2011-08-02  Yannick Moy  <moy@adacore.com>
12529
12530         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12531         mode on subprogram declaration outside of package specification, unless
12532         it is followed by a pragma Import
12533         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12534         Access_Type_Declaration): issue error in formal mode on access type
12535         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12536         incomplete type
12537         (Analyze_Object_Declaration): issue error in formal mode on object
12538         declaration which does not respect SPARK restrictions
12539         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12540         declaration which does not respect SPARK restrictions
12541         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12542         error in formal mode on digits or delta constraint
12543         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12544         decimal fixed point type
12545         (Derived_Type_Declaration): issue error in formal mode on derived type
12546         other than type extensions of tagged record types
12547         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12548         with check on access definition
12549         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12550         mode on protected definition.
12551         (Analyze_Task_Definition): issue error in formal mode on task definition
12552
12553 2011-08-02  Robert Dewar  <dewar@adacore.com>
12554
12555         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12556
12557 2011-08-02  Javier Miranda  <miranda@adacore.com>
12558
12559         * sem_ch6.adb (Can_Override_Operator): New function.
12560         (Verify_Overriding_Indicator): Add missing code to check overriding
12561         indicator in operators. Fixes regression.
12562         (Check_Overriding_Indicator): Minor reformating after replacing the
12563         code that evaluates if the subprogram can override an operator by
12564         invocations to the above new function.
12565         * einfo.adb
12566         (Write_Field26_Name): Add missing code to ensure that, following
12567         the documentation in einfo.ads, this field is not shown as attribute
12568         "Static_Initialization" on non-dispatching functions.
12569
12570 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
12571
12572         * sem_res.adb (Resolve_Call): A call to
12573         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12574         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12575         i.e., when the second parameter is of type Time_Span.
12576
12577 2011-08-02  Vincent Celier  <celier@adacore.com>
12578
12579         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12580         with an archive instead of -L<library dir> -l<library name>.
12581
12582 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12583
12584         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12585         mark the base types In_Use in addition to making the operations
12586         use_visible.
12587
12588 2011-08-02  Ed Falis  <falis@adacore.com>
12589
12590         * init.c: add and setup __gnat_signal_mask for the exception signals
12591         * s-inmaop-vxworks.adb: new file.
12592         * s-intman-vxworks.adb: remove unnecessary initializations and
12593         simplify remaining
12594         * s-intman-vxworks.ads: remove unnecessary variable
12595         * s-taprop-vxworks.adb: simplify signal initialization
12596
12597 2011-08-02  Robert Dewar  <dewar@adacore.com>
12598
12599         * sem_ch8.adb: Minor code reorganization, comment updates.
12600
12601 2011-08-02  Robert Dewar  <dewar@adacore.com>
12602
12603         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12604         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12605         here from Sem_Res.
12606         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12607         (Matching_Static_Array_Bounds): Moved here from Sem_Res
12608
12609 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12610
12611         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12612         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12613         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12614         use_type_clauses, to handle more efficiently use_type and use_all_type
12615         constructs.
12616         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12617         Ada2012 Use_All_Type clause.
12618         (Use_Class_Wide_Operations): new procedure.
12619
12620 2011-08-02  Robert Dewar  <dewar@adacore.com>
12621
12622         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12623         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12624         expression to expression function.
12625
12626 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12627
12628         * sem_ch4.adb: transform simple Ada2012 membership into equality only
12629         if types are compatible.
12630
12631 2011-08-02  Yannick Moy  <moy@adacore.com>
12632
12633         * sem_res.adb (Matching_Static_Array_Bounds): new function which
12634         returns True if its argument array types have same dimension and same
12635         static bounds at each index.
12636         (Resolve_Actuals): issue an error in formal mode on actuals passed as
12637         OUT or IN OUT paramaters which are not view conversions in SPARK.
12638         (Resolve_Arithmetic_Op): issue an error in formal mode on
12639         multiplication or division with operands of fixed point types which are
12640         not qualified or explicitly converted.
12641         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12642         Boolean or array type (except String) operands.
12643         (Resolve_Equality_Op): issue an error in formal mode on equality
12644         operators for array types other than String with non-matching static
12645         bounds.
12646         (Resolve_Logical_Op): issue an error in formal mode on logical operators
12647         for array types with non-matching static bounds. Factorize the code in
12648         Matching_Static_Array_Bounds.
12649         (Resolve_Qualified_Expression): issue an error in formal mode on
12650         qualified expressions for array types with non-matching static bounds.
12651         (Resolve_Type_Conversion): issue an error in formal mode on type
12652         conversion for array types with non-matching static bounds
12653
12654 2011-08-02  Robert Dewar  <dewar@adacore.com>
12655
12656         * par-ch10.adb: Minor code reorganization (use Nkind_In).
12657
12658 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12659
12660         * par-ch9.adb: save location of entry for proper error message.
12661
12662 2011-08-02  Javier Miranda  <miranda@adacore.com>
12663
12664         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12665         (Use_Full_View) which permits this routine to climb through the
12666         ancestors using the full-view of private parents.
12667         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12668         Use_Full_View to true in calls to Is_Ancestor.
12669         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12670         true in call to Is_Ancestor.
12671         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12672         Use_Full_View to true in call to Is_Ancestor.
12673         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12674         call to Is_Ancestor.
12675         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12676         Use_Full_View to true in calls to Is_Ancestor.
12677         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12678         Make_Select_Specific_Data_Table, Register_Primitive,
12679         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12680         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12681         to true in call to Is_Ancestor.
12682         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12683         Use_Full_View to true in calls to Is_Ancestor.
12684         * exp_cg.adb
12685         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12686         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12687
12688 2011-08-02  Robert Dewar  <dewar@adacore.com>
12689
12690         * gnat_rm.texi: Minor reformatting.
12691         * sem_prag.adb: Minor reformatting.
12692
12693 2011-08-02  Tristan Gingold  <gingold@adacore.com>
12694
12695         * vms_data.ads: Add VMS qualifier for -gnateP.
12696
12697 2011-08-02  Robert Dewar  <dewar@adacore.com>
12698
12699         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12700         * par-ch7.adb (P_Package): Proper placement of aspects for package
12701         decl/instantiation.
12702         * par-endh.adb (Check_End): Ad Is_Sloc parameter
12703         (End_Statements): Add Is_Sloc parameterr
12704         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12705         (Check_End): Ad Is_Sloc parameter
12706         (End_Statements): Add Is_Sloc parameterr
12707
12708 2011-08-02  Vincent Celier  <celier@adacore.com>
12709
12710         * ug_words: Add VMS qualifier equivalent to -gnateP:
12711         /SYMBOL_PREPROCESSING.
12712
12713 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
12714
12715         * gnat-style.texi: For hexadecimal numeric literals the typical
12716         grouping of digits is 4 to represent 2 bytes.
12717         A procedure spec which is split into several lines is indented two
12718         characters.
12719
12720 2011-08-02  Yannick Moy  <moy@adacore.com>
12721
12722         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12723         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12724         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12725         properly qualified
12726         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12727         choice in array aggregate
12728         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12729         mark as ancestor
12730         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12731         positional and named aggregate for record, or others in record
12732         aggregate, or multiple choice in record aggregate
12733         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12734         array operands to logical operations AND, OR and XOR do not have the
12735         same static lower and higher bounds
12736         * sem_ch5.adb, sinfo.ads: Correct typos in comments
12737
12738 2011-08-01  Robert Dewar  <dewar@adacore.com>
12739
12740         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12741         Replaces Last_Source_Node_In_Sequence.
12742         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12743         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12744         parens and blank in string (this was inconsistently implemented).
12745         * errout.ads
12746         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12747         blank in string (this was inconsistently implemented).
12748         * gnat1drv.adb
12749         (Set_Global_Switches): Set formal mode switches appropriately
12750         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12751         * par-prag.adb
12752         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12753         call Set_Error_Msg_Lang to set "spark" as language name.
12754         * par.adb: Remove unnecessary call to set formal language for errout
12755         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12756         appropriately and call Set_Error_Msg_Lang to set "spark" as language
12757         name.
12758         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12759         calls to it, moved after resolution so that types are known
12760         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12761         result of concatenation is not of type String
12762         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12763         concatenation is not properly restricted
12764         * gnat_rm.texi: Add doc on pragma Spark_95.
12765         * gcc-interface/Makefile.in: Remove obsolete target pairs for
12766         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12767         * gcc-interface/Make-lang.in: Update dependencies.
12768
12769 2011-08-01  Javier Miranda  <miranda@adacore.com>
12770
12771         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12772         condition that detects if the overridden operation must replace an
12773         existing entity.
12774
12775 2011-08-01  Javier Miranda  <miranda@adacore.com>
12776
12777         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12778         code declarations inserted by Insert_Actions in each alternative of the
12779         N_Case_Expression node.
12780
12781 2011-08-01  Robert Dewar  <dewar@adacore.com>
12782
12783         * sem_ch6.adb: Minor code reorganization.
12784         * sem_util.adb: Minor reformatting.
12785
12786 2011-08-01  Pascal Obry  <obry@adacore.com>
12787
12788         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12789         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12790
12791 2011-08-01  Yannick Moy  <moy@adacore.com>
12792
12793         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12794         literal or operator symbol which is prefixed
12795         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12796         mode on access attributes.
12797         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12798         that concatenation operands are properly restricted in formal mode
12799         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12800         Analyze_Concatenation_Operand. Issue an error in formal mode if the
12801         result of the concatenation has a type different from String.
12802         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12803         Analyze_Quantified_Expression, Analyze_Slice,
12804         Analyze_Null): issue an error in formal mode on unsupported constructs
12805         * sem_ch5.adb
12806         (Analyze_Block_Statement): only issue error on source block statement
12807         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12808         function which returns the last node in a list of nodes for which
12809         Comes_From_Source returns True, if any
12810         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12811         Last_Source_Node_In_Sequence
12812         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12813         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12814         mode on unsupported constructs
12815         * sem_ch9.adb Do not return after issuing error in formal mode, as the
12816         rest of the actions may be needed later on since the error is marked as
12817         not serious.
12818         * sinfo.ads: Typos in comments.
12819
12820 2011-08-01  Pascal Obry  <obry@adacore.com>
12821
12822         * projects.texi: Minor editing.
12823
12824 2011-08-01  Yannick Moy  <moy@adacore.com>
12825
12826         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12827         insertion character ~~
12828         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12829         (Set_Error_Msg_Lang): new procedure which fixes the language for use
12830         with insertion character ~~
12831         (Set_Msg_Text): treat insertion character ~~
12832         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12833         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12834         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12835         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12836         errors related to the formal language restriction not serious
12837         (insertion character |).
12838         * par.adb (Par): set formal language for error messages if needed
12839         * sem_ch6.adb (Check_Missing_Return): take into account possible
12840         generated statements at the end of the function
12841         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12842         enumeration value to define a new pragma SPARK_95
12843         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12844         SPARK_Version): new type and variables to store the SPARK version
12845         (none by default).
12846         (SPARK_Mode): return True when SPARK_Version is set
12847         * par-prag.adb: Correct indentation
12848         (Prag): take Pragma_SPARK_95 into account
12849         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12850         into account.
12851
12852 2011-08-01  Robert Dewar  <dewar@adacore.com>
12853
12854         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12855         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12856         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12857
12858 2011-08-01  Pascal Obry  <obry@adacore.com>
12859
12860         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12861         Target_Name to Get_Path call.
12862         (Parse_Single_Project): Likewise.
12863         (Post_Parse_Context_Clause): Likewise.
12864         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12865         Call Initialise_Project_Path with the proper Target_Name.
12866         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12867         search path.
12868         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12869         with the proper Target_Name.
12870         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12871         Part.Parse routine.
12872         (Parse_Project_And_Apply_Config): Likewise.
12873         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12874         This is fine as this part of the code is supporting only native
12875         compilation.
12876         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12877         is fine as this part of the code is supporting only native compilation.
12878
12879 2011-08-01  Yannick Moy  <moy@adacore.com>
12880
12881         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12882         of homonym, unless the homonym is one of the cases allowed in SPARK
12883         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12884         package declaration occurring after a body.
12885
12886 2011-08-01  Robert Dewar  <dewar@adacore.com>
12887
12888         * checks.adb, exp_ch4.adb: Minor reformatting.
12889
12890 2011-08-01  Javier Miranda  <miranda@adacore.com>
12891
12892         * einfo.ads (Access_Disp_Table): Fix documentation.
12893         (Dispatch_Table_Wrappers): Fix documentation.
12894
12895 2011-08-01  Pascal Obry  <obry@adacore.com>
12896
12897         * prj-env.adb, prj-env.ads: Minor reformatting.
12898
12899 2011-08-01  Yannick Moy  <moy@adacore.com>
12900
12901         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12902         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12903         procedures out of these packages.
12904         * errout.ads, errout.adb
12905         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12906         procedures in of this package
12907         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12908         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12909         on misplaced later vs initial declarations, like in Ada 83
12910         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12911         formal mode on attribute of private type whose full type declaration
12912         is not visible
12913         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12914         package declaration inside a package specification
12915         (Analyze_Full_Type_Declaration): issue error in formal mode on
12916         controlled type or discriminant type
12917         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12918         user-defined operator means that it should come from the source
12919         (New_Overloaded_Entity): issue error in formal mode on overloaded
12920         entity.
12921         * sem_ch6.ads, sem_ch13.ads: typos in comments.
12922
12923 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12924
12925         * atree.adb: Minor reformatting.
12926         * checks.adb: Minor reformatting.
12927
12928 2011-08-01  Vincent Celier  <celier@adacore.com>
12929
12930         * s-parame-vms-ia64.ads: Fix typo in comment
12931         Minor reformatting
12932         * s-parame-vms-restrict.ads: Removed, unused.
12933
12934 2011-08-01  Javier Miranda  <miranda@adacore.com>
12935
12936         * exp_ch3.adb
12937         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12938         * sem_ch3.adb
12939         (Constrain_Index): Remove side effects in the evaluation of the bounds.
12940         * sem_ch3.ads, sem_ch3.adb
12941         (Is_Constant_Bound): New extended version of the subprogram that was
12942         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12943         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12944         * sem_aux.ads (Constant_Value): Fix typo in comment.
12945         * checks.adb (Generate_Index_Checks): New implementation which, for
12946         array objects with constant bounds, generates the runtime check
12947         referencing the bounds of the array type. For other cases this routine
12948         provides its previous behavior obtaining such values from the array
12949         object.
12950         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12951         parent type.
12952         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12953         we cannot have semantic interpretations of the new node.
12954
12955 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12956
12957         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12958         expressions.
12959
12960 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12961
12962         * sem_ch8.adb: Minor code editing.
12963         * s-vxwext.adb: Remove trailing space.
12964         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12965         consistency with other files.
12966
12967 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12968
12969         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12970
12971 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12972
12973         * par-ch10.adb: reject parameterized expressions as compilation unit.
12974         * sem_ch4.adb: handle properly conditional expression with overloaded
12975         then_clause and no else_clause.
12976
12977 2011-08-01  Tristan Gingold  <gingold@adacore.com>
12978
12979         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12980         like done by System.Aux_DEC.
12981         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12982
12983 2011-08-01  Yannick Moy  <moy@adacore.com>
12984
12985         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12986         missing label at end of declaration (subprogram or package)
12987         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12988         of positional and named parameter association
12989         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12990         Error_Msg_SP which adds a prefix to the error message giving the name
12991         of the formal language analyzed
12992         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12993         access result type in subprogram, unconstrained array as result type,.
12994         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12995         procedure
12996         * sem_ch8.adb: Code clean up.
12997
12998 2011-08-01  Javier Miranda  <miranda@adacore.com>
12999
13000         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13001         * einfo.ads (Access_Disp_Table): Fix documentation.
13002         (Dispatch_Table_Wrappers): Fix documentation.
13003         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13004         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13005         to enforce the documentation of this attribute.
13006         (Set_Is_Interface): Cleanup the assertion.
13007         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13008         the Underlying_Type entity before reading attribute Access_Disp_Table.
13009         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13010         Locate the Underlying_Type before reading attribute Access_Disp_Table.
13011         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13012         the Underlying_Type entity before reading attribute Access_Disp_Table.
13013         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13014         Locate the Underlying_Type entity before reading attribute
13015         Access_Disp_Table.
13016
13017 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13018
13019         * s-poosiz.ads: Additional overriding indicators.
13020
13021 2011-08-01  Yannick Moy  <moy@adacore.com>
13022
13023         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13024         formal mode.
13025         (Analyze_Iteration_Scheme): issue error in formal mode when loop
13026         parameter specification does not include a subtype mark.
13027         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13028         formal mode on abstract subprogram.
13029         (Analyze_Subprogram_Specification): issue error in formal mode on
13030         user-defined operator.
13031         (Process_Formals): issue error in formal mode on access parameter and
13032         default expression.
13033         * sem_ch9.adb (Analyze_Abort_Statement,
13034         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13035         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13036         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13037         Analyze_Requeue, Analyze_Selective_Accept,
13038         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13039         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13040         issue error in formal mode on user-defined raise statement.
13041
13042 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13043
13044         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13045         declaration being hidden when overriding an implicit inherited
13046         subprogram.
13047         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13048         (-gnats), do not complain about a source file that contains only a
13049         pragma No_Body.
13050
13051 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13052
13053         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13054         variable if already set.
13055
13056 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13057
13058         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13059         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13060         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13061         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13062         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13063         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13064         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13065         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13066         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13067         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13068         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13069         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13070         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13071         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13072         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13073         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13074         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13075         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13076         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13077         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13078         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13079         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13080         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13081         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13082         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13083         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13084         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13085         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13086         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13087         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13088         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13089         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13090         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13091         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13092         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13093         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13094         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13095         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13096         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13097         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13098         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13099         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13100         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13101         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13102         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13103         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13104         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13105         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13106         s-osinte-mingw.ads: Update to GPLv3 run-time license.
13107         Use GNAT instead of GNARL.
13108
13109 2011-08-01  Bob Duff  <duff@adacore.com>
13110
13111         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13112         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13113         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13114         reformatting.
13115
13116 2011-08-01  Yannick Moy  <moy@adacore.com>
13117
13118         * debug.adb (d.D) reverve flag for the SPARK mode
13119         (d.E) reverve flag for SPARK generation mode
13120         (d.F) reverve flag for Why generation mode
13121         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13122         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
13123         functions which return True when the corresponding modes are set
13124         (Formal_Language): return "spark" or "alfa" when in formal verification
13125         mode.
13126         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13127         Error_Msg to prefix the error message with a tag giving the formal
13128         language
13129         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13130         message with a tag giving the formal language
13131         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13132         block statement
13133         (Analyze_Case_Statement): issue error in formal mode on case statement
13134         with a single "others" case alternative
13135         (Analyze_Exit_Statement): issue errors in formal mode on exit
13136         statements which do not respect SPARK restrictions
13137         (Analyze_Goto_Statement): issue error in formal mode on goto statement
13138         (Check_Unreachable_Code): always issue an error (not a warning) in
13139         formal mode on unreachable code (concerns both code after an infinite
13140         loop and after an unconditional jump, both not allowed in SPARK)
13141         * sem_ch6.adb (Analyze_Return_Statement): add call to
13142         Set_Return_Present for a procedure containing a return statement
13143         (already done for functions in Analyze_Function_Return)
13144         (Analyze_Function_Return): issue error in formal mode on extended
13145         return or if return is not last statement in function
13146         (Check_Missing_Return): issue error in formal mode if function does
13147         not end with return or if procedure contains a return
13148         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13149         function to detect if there is an inner scope of its parameter S which
13150         is a loop.
13151
13152 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13153
13154         * sem_ch6.ads: Minor reformatting.
13155
13156 2011-08-01  Javier Miranda  <miranda@adacore.com>
13157
13158         * sem_util.adb (Abstract_Interface_List): Complete condition when
13159         processing private type declarations to avoid reading unavailable
13160         attribute.
13161         (Is_Synchronized_Tagged_Type): Complete condition when processing
13162         private extension declaration nodes to avoid reading unavailable
13163         attribute.
13164
13165 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13166
13167         * sem_ch3.adb: Minor reformatting.
13168
13169 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13170
13171         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13172         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13173         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13174         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13175         for VMS, instead parametrize the common implementation with
13176         System.Parameters declarations.
13177
13178 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
13179
13180         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13181
13182 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13183
13184         * seh_init.c: Fix SEH handler installation on win64.
13185
13186 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13187
13188         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13189         double analysis of an anonymous access to subprogram, because it can
13190         lead to improper sharing of profiles and a back-end crash.
13191
13192 2011-08-01  Robert Dewar  <dewar@adacore.com>
13193
13194         * make.adb, sem_ch4.adb: Minor reformatting.
13195         * gcc-interface/Make-lang.in: Update dependencies.
13196         * sem_util.adb, exp_ch5.adb: Minor reformatting.
13197
13198 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13199
13200         * gnat_rm.texi: Fix definition of Long_Integer.
13201
13202 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13203
13204         * exp_aggr.adb: check limit size of static aggregate unconditionally,
13205         to prevent storage exhaustion.
13206         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13207         finalized is a function body, insert the cleanup code before the final
13208         return statement, to prevent spurious warnings.
13209         * s-pooglo.ads: add overriding indicator.
13210
13211 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13212
13213         * sem_ch4.adb (Operator_Check): improve error message when both a
13214         with_clause and a use_clause are needed to make operator usage legal.
13215         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13216         determine whether a compilation unit is visible within an other,
13217         either through a with_clause in the current unit, or a with_clause in
13218         its library unit or one one of its parents.
13219
13220 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13221
13222         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13223         over an arbitrary expression of an array or container type.
13224         * lib-xref.adb: clarify comment.
13225
13226 2011-08-01  Bob Duff  <duff@adacore.com>
13227
13228         * einfo.ads: Minor reformatting.
13229         * debug.adb: Minor comment improvement.
13230
13231 2011-08-01  Javier Miranda  <miranda@adacore.com>
13232
13233         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13234         consider hidden subprograms as valid candidates.
13235
13236 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13237
13238         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13239
13240 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
13241
13242         * gnat_ugn.texi: Fix typo.
13243
13244 2011-08-01  Robert Dewar  <dewar@adacore.com>
13245
13246         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13247         lib-xref.adb: Minor reformatting
13248
13249 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
13250
13251         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13252         when to generate a call to Move_Final_List.
13253         (Has_Controlled_Parts): Remove this function.
13254
13255 2011-08-01  Geert Bosch  <bosch@adacore.com>
13256
13257         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13258         "," in choice list.
13259
13260 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13261
13262         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13263         explicit raise of a predefined exception as Comes_From_Source if the
13264         original N_Raise_Statement comes from source.
13265
13266 2011-08-01  Robert Dewar  <dewar@adacore.com>
13267
13268         * sinfo.ads: Add comment.
13269         * sem_ch6.adb: Minor reformatting.
13270
13271 2011-08-01  Robert Dewar  <dewar@adacore.com>
13272
13273         * freeze.adb (Freeze_Entity): Refine check for bad component size
13274         clause to avoid rejecting confirming clause when atomic/aliased present.
13275
13276 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13277
13278         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13279         better determine whether an entity reference is a write.
13280         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13281         subcomponent.
13282         * lib-xref.adb (Output_References): Do no suppress a read reference at
13283         the same location as an immediately preceeding modify-reference, to
13284         handle properly in-out actuals.
13285
13286 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13287
13288         * env.c (__gnat_setenv) [VMS]: Refine previous change.
13289
13290 2011-08-01  Quentin Ochem  <ochem@adacore.com>
13291
13292         * i-cstrin.adb (New_String): Changed implementation, now uses only the
13293         heap to compute the result.
13294
13295 2011-08-01  Robert Dewar  <dewar@adacore.com>
13296
13297         * atree.ads: Minor reformatting.
13298
13299 2011-08-01  Emmanuel Briot  <briot@adacore.com>
13300
13301         * g-expect.adb (Get_Command_Output): Fix memory leak.
13302
13303 2011-08-01  Geert Bosch  <bosch@adacore.com>
13304
13305         * cstand.adb (P_Float_Type): New procedure to print the definition of
13306         predefined fpt types.
13307         (P_Mixed_Name): New procedure to print a name using mixed case
13308         (Print_Standard): Use P_Float_Type for printing floating point types
13309         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13310         precision IEEE float.
13311
13312 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13313
13314         * sem_ch3.adb: Minor reformatting.
13315
13316 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13317
13318         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13319         the completion of a generic function, insert the new body rather than
13320         rewriting the original.
13321
13322 2011-08-01  Yannick Moy  <moy@adacore.com>
13323
13324         * sinfo.ads, errout.ads: Typos in comments.
13325
13326 2011-08-01  Robert Dewar  <dewar@adacore.com>
13327
13328         * par-endh.adb: Minor reformatting.
13329
13330 2011-08-01  Robert Dewar  <dewar@adacore.com>
13331
13332         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13333         (Pre_Post_Aspects): New subtype.
13334         * par-ch12.adb (P_Generic): New syntax for aspects in packages
13335         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13336         * par-ch7.adb (P_Package): Remove Decl parameter
13337         (P_Package): Handle new syntax for aspects (before IS)
13338         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13339         new aspect syntax
13340         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13341         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13342         (P_Package): Remove Decl parameter
13343         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13344         aspects
13345         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13346         specs
13347         * sem_util.ads, sem_util.adb (Static_Boolean): New function
13348         * sinfo.ads: Document new syntax for aspects in packages etc.
13349         * sprint.adb: Handle new syntax of aspects before IS in package
13350
13351 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13352
13353         * atree.ads: Minor reformatting.
13354         * sem_prag.adb: Minor reformatting.
13355
13356 2011-08-01  Robert Dewar  <dewar@adacore.com>
13357
13358         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13359         case expr alternative.
13360
13361 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13362
13363         * sem_ch12.adb: Fix typo.
13364
13365 2011-08-01  Geert Bosch  <bosch@adacore.com>
13366
13367         * sem_prag.adb (Check_No_Link_Name): New procedure.
13368         (Process_Import_Or_Interface): Use Check_No_Link_Name.
13369         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13370         instead of Standard_Long_Long_Float_Size global. Preparation for
13371         eventual removal of per type constants.
13372         * exp_util.ads (Get_Stream_Size): New function returning the stream
13373         size value of subtype E.
13374         * exp_util.adb (Get_Stream_Size): Implement new function.
13375         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13376         function.
13377         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13378         * einfo.adb:
13379         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13380
13381 2011-08-01  Geert Bosch  <bosch@adacore.com>
13382
13383         * cstand.adb: Fix comments.
13384         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13385         count of arguments.
13386
13387 2011-08-01  Robert Dewar  <dewar@adacore.com>
13388
13389         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13390
13391 2011-08-01  Geert Bosch  <bosch@adacore.com>
13392
13393         * atree.ads: Fix comment.
13394
13395 2011-08-01  Robert Dewar  <dewar@adacore.com>
13396
13397         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13398         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13399         * par.adb: Add with for Namet.Sp.
13400         * par-tchk.adb: Minor reformatting.
13401
13402 2011-08-01  Vincent Celier  <celier@adacore.com>
13403
13404         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13405         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13406         of the init procedure of a SAL.
13407         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13408         New procedure.
13409
13410 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13411
13412         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13413         reformatting.
13414
13415 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13416
13417         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13418
13419 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13420
13421         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13422         conformant with its spec (return True only for types that have
13423         an overriding Initialize primitive operation that prevents them from
13424         having preelaborable initialization).
13425         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13426         initialization for controlled types in Ada 2005 or later mode.
13427
13428 2011-08-01  Robert Dewar  <dewar@adacore.com>
13429
13430         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13431         Postcondition.
13432         (Same_Aspect): New function.
13433         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13434         Type_Invariant, Precondition, Postcondition.
13435         * snames.ads-tmpl: Add Name_Type_Invariant.
13436
13437 2011-08-01  Robert Dewar  <dewar@adacore.com>
13438
13439         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13440         here.
13441         (Freeze_All_Ent): Fix error in handling inherited aspects.
13442         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13443         already analyzed, but don't skip entire processing of a declaration,
13444         that's wrong in some cases of declarations being rewritten.
13445         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13446         Don't delay for integer, string literals
13447         Treat predicates in usual manner for delay, remove special case code,
13448         not needed.
13449         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13450         (Build_Predicate_Function): Update saved expression in aspect
13451         (Build_Invariant_Procedure): Update saved expression in aspect
13452         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13453         of replacement of discriminant references if the reference is simple.
13454
13455 2011-08-01  Robert Dewar  <dewar@adacore.com>
13456
13457         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13458         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13459         Static_Predicate and Dynamic_Predicate.
13460         (Build_Predicate_Function): Add processing for Static_Predicate
13461         and Dynamic_Predicate.
13462         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13463         (From_Static_Predicate): New flag
13464         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13465
13466 2011-08-01  Robert Dewar  <dewar@adacore.com>
13467
13468         * usage.adb: Documentation cleanup for Ada version modes in usage.
13469         * expander.adb: Minor reformatting.
13470
13471 2011-08-01  Robert Dewar  <dewar@adacore.com>
13472
13473         * atree.ads: Minor comment fix.
13474         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13475         a-witeio.ads, sem_prag.adb: Minor reformatting.
13476
13477 2011-08-01  Doug Rupp  <rupp@adacore.com>
13478
13479         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13480         pointers. Use descrip.h header file for convenience. Add some
13481         comments.
13482
13483 2011-08-01  Robert Dewar  <dewar@adacore.com>
13484
13485         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13486         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13487         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13488         New procedure.
13489         (Check_Aspect_At_End_Of_Declarations): New procedure
13490         (Analye_Aspect_Specification): Minor changes for above procedures
13491         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13492         specification node as well.
13493
13494 2011-08-01  Pascal Obry  <obry@adacore.com>
13495
13496         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13497         Windows files. Use GetFilesAttributes() in this case to check for file
13498         existence instead of returning with an error code.
13499
13500 2011-08-01  Vincent Celier  <celier@adacore.com>
13501
13502         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13503         High is above Source length.
13504
13505 2011-08-01  Robert Dewar  <dewar@adacore.com>
13506
13507         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13508
13509 2011-08-01  Robert Dewar  <dewar@adacore.com>
13510
13511         * aspects.ads (Boolean_Aspects): New subtype.
13512         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13513         for derived types in cases where the parent type and derived type have
13514         aspects.
13515         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13516         with aspects when parent type also has aspects.
13517         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13518         boolean expression at this point).
13519         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13520         accordance with final decision on the Ada 2012 feature.
13521         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13522
13523 2011-08-01  Matthew Heaney  <heaney@adacore.com>
13524
13525         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13526
13527 2011-08-01  Pascal Obry  <obry@adacore.com>
13528
13529         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13530         Fix Replace_Slice when High is above current string size.
13531         (Replace_Slice): Fix DL computation when High is above current
13532         string length.
13533
13534 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
13535
13536         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13537
13538 2011-08-01  Matthew Heaney  <heaney@adacore.com>
13539
13540         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13541         of node.
13542
13543 2011-08-01  Pascal Obry  <obry@adacore.com>
13544
13545         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13546         reformatting.
13547
13548 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13549
13550         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13551         access to protected subprograms in generic bodies.
13552         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13553         protected type, indicate that the convention of the subprogram is
13554         Convention_Protected, because it may be used in subsequent declarations
13555         within the protected declaration.
13556
13557 2011-08-01  Vincent Celier  <celier@adacore.com>
13558
13559         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13560         and "final" procedures when the name of the library is "ada", to avoid
13561         duplicate symbols "adainit" and "adafinal" in executables.
13562
13563 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13564
13565         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13566         quantified expression that appears within a postcondition and uses the
13567         Ada2012 'Result attribute.
13568
13569 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13570
13571         * init.c (__gnat_error_handler): Cast reason to int.
13572         (__gnat_install_handler): Explain sa_sigaction use.
13573
13574 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
13575
13576         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13577         subprogram has copy-in copy-out parameters, try to promote the mode of
13578         the return type if it is passed in registers.
13579
13580 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
13581
13582         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13583         left operand as addressable.
13584
13585 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
13586
13587         * gcc-interface/gigi.h (build_function_stub): Remove.
13588         (build_return_expr): Likewise.
13589         (convert_vms_descriptor): Declare.
13590         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13591         (build_function_stub): Move to...
13592         * gcc-interface/utils2.c (build_return_expr): Move to...
13593         * gcc-interface/trans.c (build_function_stub): ...here.
13594         (build_return_expr): ...here.
13595         (Subprogram_Body_to_gnu): Add local variable for language_function.
13596         Disconnect the parameter attributes cache, if any, once done with it.
13597         Call end_subprog_body only after setting the end_locus.
13598         Build the stub associated with the function, if any, at the very end.
13599         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13600         variables and streamline control flow.
13601
13602 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
13603
13604         PR ada/49819
13605         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13606         g-trasym-dwarf.adb.
13607
13608 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13609
13610         PR bootstrap/49794
13611         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13612         Assign to act.sa_sigaction.
13613         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13614         current->return_address to char * before arithmetic.
13615
13616 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13617
13618         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13619         Correct argument types.
13620         Extract code from reason.
13621         (__gnat_install_handler): Assign to act.sa_sigaction.
13622
13623 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
13624
13625         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13626         (GNAT1_OBJS): ...here.
13627
13628 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
13629
13630         PR ada/48711
13631         * g-socthi-mingw.adb (Fill): Fix formatting.
13632
13633         * gcc-interface/gigi.h: Move around comment.
13634
13635 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
13636
13637         PR ada/46350
13638         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13639
13640 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
13641
13642         PR ada/48711
13643         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13644
13645 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
13646
13647         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13648         range comparison if Pmode is SImode.
13649
13650 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
13651             Eric Botcazou  <ebotcazou@adacore.com>
13652
13653         * adadecode.c: Wrap up in extern "C" block.
13654         * adadecode.h: Likewise.
13655         * adaint.c: Likewise.  Remove 'const' keyword.
13656         * adaint.h: Likewise.
13657         * argv.c: Likewise.
13658         * atree.h: Likewise.
13659         * cio.c: Likewise.
13660         * cstreams.c: Likewise.
13661         * env.c: Likewise.
13662         * exit.c: Likewise.
13663         * fe.h: Likewise.
13664         * final.c: Likewise.
13665         * init.c: Likewise.
13666         * initialize.c: Likewise.
13667         * link.c: Likewise.
13668         * namet.h: Likewise.
13669         * nlists.h: Likewise.
13670         * raise.c: Likewise.
13671         * raise.h: Likewise.
13672         * repinfo.h: Likewise.
13673         * seh_init.c: Likewise.
13674         * targext.c: Likewise.
13675         * tracebak.c: Likewise.
13676         * uintp.h: Likewise.
13677         * urealp.h: Likewise.
13678         * xeinfo.adb: Wrap up generated C code in extern "C" block.
13679         * xsinfo.adb: Likewise.
13680         * xsnamest.adb: Likewise.
13681         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13682         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13683         * gcc-interface/misc.c: Likewise.
13684         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13685         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
13686         ada/targext.o here...
13687         (GNAT_ADA_OBJS): ...and not here.
13688         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13689         (GNATBIND_OBJS): Reorder.
13690
13691 2011-07-07  Richard Henderson  <rth@redhat.com>
13692
13693         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13694         dwarf2out_frame_init.
13695
13696 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
13697
13698         * gcc-interface/misc.c (gnat_init): Tweak previous change.
13699
13700 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13701
13702         PR target/39150
13703         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13704
13705 2011-07-06  Richard Guenther  <rguenther@suse.de>
13706
13707         * gcc-interface/misc.c (gnat_init): Merge calls to
13708         build_common_tree_nodes and build_common_tree_nodes_2.
13709         Re-initialize boolean_false_node.
13710
13711 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
13712             Olivier Hainque  <hainque@adacore.com>
13713             Nicolas Setton  <setton@adacore.com>
13714
13715         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13716         the type according to the ARTIFICIAL_P parameter.
13717         (create_type_decl): Likewise.
13718         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13719
13720 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
13721
13722         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13723         (gnatbind): Likewise.
13724
13725 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13726
13727         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13728
13729 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
13730
13731         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13732         local variable throughout.  Remove useless call to Base_Type.
13733         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13734         Take it also into account for the volatileness of the field.  Set the
13735         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
13736
13737 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
13738
13739         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13740         on a dereference built for a by-ref object if it has an address clause.
13741
13742 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
13743
13744         * einfo.ads (Address_Taken): Document use for the second argument of
13745         Asm_Input and Asm_Output attributes.
13746         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13747         argument is an entity name, then set Address_Taken on it.
13748         <Attribute_Asm_Output>: Likewise.
13749         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13750         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13751         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13752         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13753
13754 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
13755
13756         PR middle-end/46500
13757         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13758
13759 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
13760
13761         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13762         (ada/utils.o): Update dependencies.
13763         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13764         ../../../libcpp/libcpp.a.
13765         * gcc-interface/utils.c: Include common/common-target.h.
13766         (process_attributes): Use targetm_common.have_named_sections.
13767
13768 2011-06-07  Richard Guenther  <rguenther@suse.de>
13769
13770         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13771         set_sizetype.
13772
13773 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13774
13775         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13776         TREE_THIS_NOTRAP flag.
13777
13778 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13779
13780         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13781         Fix thinko.
13782
13783 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13784
13785         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13786         constants whose full view has discriminants specially.
13787
13788 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13789
13790         * gcc-interface/utils.c: Include diagnostic.h.
13791         (gnat_write_global_declarations): Output debug information for all
13792         global type declarations before finalizing the compilation unit.
13793         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13794
13795 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
13796
13797         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13798
13799 2011-05-25  Kai Tietz  <ktietz@redhat.com>
13800
13801         * adaint.c (__gnat_to_canonical_file_list_next): Use array
13802         initialization instead of const/none-const pointer assignment.
13803
13804 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
13805
13806         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13807         $(EXTRA_GNAT1_OBJS).
13808         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13809         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13810         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13811         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13812         libcommon-target.a instead of prefix.o.
13813
13814 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
13815
13816         PR ada/49097
13817         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13818
13819 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
13820
13821         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13822         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13823         instead of version.o.
13824
13825 2011-05-18  Kai Tietz  <ktietz@redhat.com>
13826
13827         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13828         boolean_false_node instead of integer_zero_node.
13829         (convert_with_check): Likewise.
13830         * gcc-interface/decl.c (choices_to_gnu): Likewise.
13831
13832 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
13833
13834         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13835         type of the parameter is an unconstrained array, convert the actual to
13836         the type of the formal in the In Out and Out cases as well.
13837
13838 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
13839
13840         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13841         call build_function_type_array or build_varargs_function_type_array
13842         instead.
13843         (create_subprog_type): Don't call build_function_type; call
13844         build_function_type_vec instead.
13845
13846 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
13847
13848         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13849         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13850         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13851
13852 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
13853
13854         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13855
13856         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13857         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13858
13859 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
13860
13861         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13862
13863 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
13864
13865         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13866         instead of accessing TYPE_ARG_TYPES directly.
13867         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13868
13869 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13870
13871         PR ada/48844
13872         * gcc-interface/gigi.h (get_variant_part): Declare.
13873         * gcc-interface/decl.c (get_variant_part): Make global.
13874         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13875         types have the same constant size, are record types and T1 has a
13876         variant part while T2 doesn't.
13877
13878 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13879
13880         * gcc-interface/utils.c (begin_subprog_body): Do not call
13881         get_pending_sizes.
13882         (end_subprog_body): Likewise.
13883
13884 2011-05-04  Richard Guenther  <rguenther@suse.de>
13885
13886         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13887         int_const_binop.
13888         (pos_to_constructor): Likewise.
13889
13890 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
13891             Eric Botcazou  <ebotcazou@adacore.com>
13892
13893         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13894         of build_function_type.  Adjust calls to...
13895         (build_raise_check): ...this.  Do not take a void_tree parameter.
13896         Call build_function_type_list instead of build_function_type.
13897         Fix head comment and swap couple of conditional blocks.
13898
13899 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
13900
13901         * gnatvsn.ads (Library_Version): Bump to 4.7.
13902         (Current_Year): Bump to 2011.
13903
13904 2011-04-29  Michael Matz  <matz@suse.de>
13905
13906         * gcc-interface/misc.c (gnat_handle_option): Set
13907         warn_maybe_uninitialized.
13908
13909 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
13910
13911         * gnat_ugn.texi (Complexity Metrics Control): Update link to
13912         the Watson/McCabe paper.
13913
13914 2011-04-23  Jim Meyering  <meyering@redhat.com>
13915
13916         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13917
13918 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
13919
13920         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13921         onto the new type.
13922
13923 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
13924
13925         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13926         parameter.
13927         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
13928         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13929         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13930         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13931         <all>: Do not set flags on the reused DECL node coming from an alias.
13932         Set DECL_IGNORED_P on the DECL node built for subprograms if they
13933         don't need debug info here...
13934         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13935         (gigi): Adjust calls to create_subprog_decl.
13936         (build_raise_check): Likewise.
13937         (establish_gnat_vms_condition_handler): Likewise.
13938         (Compilation_Unit_to_gnu): Likewise.
13939         (gnat_to_gnu): Likewise.
13940
13941 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
13942
13943         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13944         (NO_REORDER_ADAFLAGS): New variable.
13945         (EXTRA_GNATTOOLS): Always define.
13946         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13947         Clean up and adjust list of files compiled with special options.
13948         * gcc-interface/Make-lang.in: Likewise.
13949         (ada/decl.o): Cosmetical change.
13950         (ada/misc.o): Remove dependency on $(PLUGIN_H).
13951
13952 2011-04-20  Jim Meyering  <meyering@redhat.com>
13953
13954         * initialize.c (__gnat_initialize): Remove useless if-before-free.
13955
13956 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
13957
13958         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13959         $(CFLAGS) on the link line.
13960
13961 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
13962
13963         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13964         padded type built for the return type if it is unconstrained.
13965
13966 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
13967
13968         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13969
13970 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
13971
13972         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13973         before calling TREE_CHAIN.
13974         * gcc-interface/misc.c (gnat_init_ts): New function.
13975         (LANG_HOOKS_INIT_TS): Define.
13976
13977 2011-04-12  Martin Jambor  <mjambor@suse.cz>
13978
13979         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13980         instead of cgraph_node.
13981
13982 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
13983
13984         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13985         alignment on fields of the RETURN type built for the Copy-In Copy-Out
13986         mechanism.
13987
13988 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
13989
13990         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13991         of aggregate types that contain a placeholder.
13992
13993 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
13994
13995         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13996         TYPE_ARG_TYPES.
13997         (handle_type_generic_attribute): Likewise.
13998
13999 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
14000
14001         PR ada/47163
14002         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14003
14004 2011-04-04  Kai Tietz  <ktietz@redhat.com>
14005
14006         PR ada/47163
14007         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14008         to flag value.
14009
14010 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14011
14012         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14013         type case, do not strip a padding type around the array type.
14014
14015 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14016
14017         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14018         types.
14019
14020 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14021
14022         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14023         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14024         code for -feliminate-unused-debug-types.
14025         (gnat_post_options): Likewise.
14026
14027 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14028
14029         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14030         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14031         distinct copy.
14032
14033 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14034
14035         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14036         DECL_ARTIFICIAL flag on enumeration types.
14037
14038 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14039
14040         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14041         fat pointer types artificial unconditionally.
14042         <E_Array_Subtype>: Attach the base array type as a parallel type if it
14043         isn't artificial.
14044
14045 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14046
14047         * gcc-interface/gigi.h (get_dummy_type): Declare.
14048         (build_dummy_unc_pointer_types): Likewise.
14049         (finish_fat_pointer_type): Likewise.
14050         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14051         fat pointer type has been built, complete it in place.
14052         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14053         and thin pointers.  Remove useless variable.
14054         (finish_fat_pointer_type): Make global and move to...
14055         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14056         (get_dummy_type): New function.
14057         (build_dummy_unc_pointer_types): Likewise.
14058         (gnat_pushdecl): Propage the name to the anonymous variants only.
14059         (update_pointer_to): Only adjust the pointer types in the unconstrained
14060         array case.
14061
14062 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14063
14064         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14065         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14066         if this is a Taft amendment type and the full declaration is available.
14067         * gcc-interface/trans.c (process_type): Likewise.
14068         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14069         (process_freeze_entity): Likewise.
14070         * gcc-interface/utils.c (dummy_global): New static variable.
14071         (gnat_write_global_declarations): If there are types declared as used
14072         at the global level, insert them in the global hash table.
14073
14074 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14075
14076         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14077         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14078         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14079         copy.
14080         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
14081         flag of the type accordingly.
14082         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14083
14084 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14085
14086         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14087         finalizing types when updating the pointers to the designated type.
14088         <all>: Finalize the deferred types even if we didn't defer processing
14089         of incomplete types in this invocation.
14090
14091 2011-04-01  Olivier Hainque  <hainque@adacore.com>
14092             Nicolas Setton  <setton@adacore.com>
14093             Eric Botcazou  <ebotcazou@adacore.com>
14094
14095         * gcc-interface/misc.c (gnat_descriptive_type): New function.
14096         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14097
14098 2011-03-28  Kai Tietz  <ktietz@redhat.com>
14099
14100         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14101         Windows targets.
14102         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14103         * system-mingw.ads (System): Change ZCX_By_Default default to True.
14104
14105         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14106
14107 2011-03-28  Tristan Gingold  <gingold@adacore.com>
14108
14109         PR ada/44431
14110         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14111         Use ada output of gnatbind.
14112         (ada/b_gnatb.adb): Ditto.
14113         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14114         (ada.mostlyclean, ada.stage1)
14115         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14116         (ada.stagefeedback): Adjust.
14117         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14118         Use ada output of gnatbind.
14119         (b_gnatm.adb): Ditto.
14120         (b_gnatl.o, b_gnatm.o): New rules.
14121
14122 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14123
14124         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14125         for the padded type built to support a specified size or alignment.
14126
14127 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14128
14129         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14130         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14131         unconditionally to the end of the unit when the designated type is
14132         limited_with'ed.
14133         <all>: Rename local variable.  Attempt to un-defer types only and do it
14134         for limited_with'ed types as well.
14135         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
14136         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14137         consistently and remove redundant call to finalize_from_with_types.
14138
14139 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14140
14141         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14142         subprograms without a previous spec declared in the same unit.
14143         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14144         subprograms at the end of the unit instead of at the beginning.
14145         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14146         isn't public for the special handling of non-inline functions nested
14147         inside inline external functions.
14148
14149 2011-03-25  Jeff Law  <law@redhat.com>
14150
14151         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14152
14153 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
14154
14155         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14156         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14157         to compute Set_Size_Depends_On_Discriminant.
14158         (Layout_Type): Call it on array types in back-end layout mode.
14159         * sem_util.adb (Requires_Transient_Scope): Return true for array
14160         types only if the size depends on the value of discriminants.
14161         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14162         type if the RHS is a call to a function that returns an unconstrained
14163         type with default discriminant.
14164
14165 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
14166
14167         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14168         non-conversion to the nominal result type at the end.
14169
14170 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14171
14172         * gcc-interface/trans.c (create_temporary): New function taken from...
14173         (create_init_temporary): ...here.  Call it.
14174         (call_to_gnu): Create the temporary for the return value early, if any.
14175         Create it for a function with copy-in/copy-out parameters if there is
14176         no target; in other cases of copy-in/copy-out, use another temporary.
14177         Push the new binding level lazily.  Add and rename local variables.
14178
14179 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14180
14181         * gcc-interface/decl.c (validate_size): Improve comments and tweak
14182         error message.
14183         (set_rm_size): Likewise.
14184
14185 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14186
14187         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14188         for the padded type built in order to support a specified alignment.
14189         Fix incorrect formatting.
14190
14191 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14192
14193         PR bootstrap/48216
14194         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14195
14196 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14197
14198         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14199         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14200         to the end of the list.  Adjust recursive call.  Rename local variable.
14201         If REORDER is true, reorder components of the record type.
14202         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14203         components_to_record and adjust the parameter list.
14204
14205 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14206
14207         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14208         disabled, use the variable for bounds of loop iteration scheme.
14209
14210 2011-03-21  Kai Tietz  <ktietz@redhat.com>
14211
14212         PR target/12171
14213         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14214
14215 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
14216
14217         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14218         out whether the expression is read-only.  Short-circuit placeholder
14219         case and rename a couple of local variables.
14220
14221 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
14222
14223         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14224         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14225         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14226         (convert): Deal with conversions from a smaller form type specially.
14227
14228 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
14229
14230         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14231         its argument, except for the special -I- switch.
14232
14233 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
14234
14235         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14236         "Ada Issues".
14237
14238 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
14239
14240         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14241
14242 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
14243
14244         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14245         GNAT_FORMAL.
14246         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14247         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
14248         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
14249         Do not generate the check directly, instead instantiate the template
14250         check present in the descriptor.
14251         (make_descriptor_field): Move around.
14252         (build_vms_descriptor32): Build a template check in the POINTER field.
14253         (build_vms_descriptor): Remove useless suffixes.
14254         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14255
14256 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
14257
14258         PR bootstrap/47467
14259         * targext.c: Include target files if IN_RTS is defined.
14260
14261 2011-01-26  Richard Guenther  <rguenther@suse.de>
14262
14263         PR bootstrap/47467
14264         * targext.c: Include config.h.
14265         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14266         dependency.
14267
14268 2011-01-04  Pascal Obry  <obry@adacore.com>
14269             Eric Botcazou  <ebotcazou@adacore.com>
14270
14271         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14272
14273 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14274
14275         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14276         end-of-case on the end label and its associated gotos, if any.
14277
14278 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14279
14280         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14281         expressions of the parameter cache within the statement group of
14282         the CICO mechanism.
14283
14284 2011-01-04  Olivier Hainque  <hainque@adacore.com>
14285             Eric Botcazou  <ebotcazou@adacore.com>
14286
14287         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14288         (set_end_locus_from_node): New function.
14289         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14290         make and the function end_locus.
14291         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14292         for the elaboration subprogram.
14293         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14294         set the end_locus of the expression as well.
14295
14296 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14297
14298         PR ada/47131
14299         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14300         variables that are referenced in exception handlers volatile.
14301
14302
14303 \f
14304 Copyright (C) 2011 Free Software Foundation, Inc.
14305
14306 Copying and distribution of this file, with or without modification,
14307 are permitted in any medium without royalty provided the copyright
14308 notice and this notice are preserved.
14309
14310         * gnat_rm.texi: Ramification of pragma Eliminate documentation
14311          - fix bugs in the description of Source_Trace;
14312          - get rid of UNIT_NAME;
14313
14314 2011-08-02  Javier Miranda  <miranda@adacore.com>
14315
14316         * exp_ch9.adb
14317         (Build_Dispatching_Requeue): Adding support for VM targets
14318         since we cannot directly reference the Tag entity.
14319         * exp_sel.adb (Build_K): Adding support for VM targets.
14320         (Build_S_Assignment): Adding support for VM targets.
14321         * exp_disp.adb
14322         (Default_Prim_Op_Position): In VM targets do not restrict availability
14323         of predefined interface primitives to compiling in Ada 2005 mode.
14324         (Is_Predefined_Interface_Primitive): In VM targets this service is not
14325         restricted to compiling in Ada 2005 mode.
14326         (Make_VM_TSD): Generate code that declares and initializes the OSD
14327         record. Needed to support dispatching calls through synchronized
14328         interfaces.
14329         * exp_ch3.adb
14330         (Make_Predefined_Primitive_Specs): Enable generation of predefined
14331         primitives associated with synchronized interfaces.
14332         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14333         primitives associated with synchronized interfaces.
14334
14335 2011-08-02  Yannick Moy  <moy@adacore.com>
14336
14337         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14338         statements hidden in SPARK if preceded by the HIDE directive
14339         (Parse_Exception_Handlers): mark each exception handler in a sequence of
14340         exception handlers as hidden in SPARK if preceded by the HIDE directive
14341         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14342         if starting with the HIDE directive
14343         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14344         starting with the HIDE directive; mark the declarations in a private
14345         part as hidden in SPARK if the private part starts with the HIDE
14346         directive
14347         * restrict.adb, restrict.ads
14348         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14349         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14350         argument node belongs to a part which is hidden in SPARK
14351         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14352         parts in SPARK; protect the possibly costly call to
14353         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14354         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14355         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14356         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14357         Tok_SPARK_Hide.
14358         (Scan): recognize special comment starting with '#' and followed by
14359         SPARK keyword "hide" as a HIDE directive.
14360
14361 2011-08-02  Yannick Moy  <moy@adacore.com>
14362
14363         * types.ads, erroutc.ads: Minor reformatting.
14364
14365 2011-08-02  Vincent Celier  <celier@adacore.com>
14366
14367         * link.c: Add response file support for cross platforms.
14368
14369 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14370
14371         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
14372         in an association, set parent field of copy before partial analysis.
14373         * sem_res.adb (Resolve_Slice): create reference to itype only when
14374         expansion is enabled.
14375
14376 2011-08-02  Yannick Moy  <moy@adacore.com>
14377
14378         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
14379         for new flag denoting which subprogram bodies are in ALFA
14380         * restrict.adb, sem_ch7.adb: Update comment
14381         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
14382         sem_ch9.adb, sem_res.adb: Add calls to
14383         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
14384         * sem_ch6.adb (Analyze_Function_Return): add calls to
14385         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
14386         middle of the body, and extended return.
14387         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
14388         False when missing return.
14389         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
14390         to True for subprograms whose spec is in ALFA. Remove later on the flag
14391         on the entity used for a subprogram body when there exists a separate
14392         declaration.
14393         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
14394         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
14395         False, otherwise do nothing.
14396
14397 2011-08-02  Robert Dewar  <dewar@adacore.com>
14398
14399         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14400
14401 2011-08-02  Yannick Moy  <moy@adacore.com>
14402
14403         * sem_ch4.ads: minor formatting.
14404
14405 2011-08-02  Yannick Moy  <moy@adacore.com>
14406
14407         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
14408         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
14409         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
14410         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
14411         opt.ads: cleanup of SPARK mode
14412
14413 2011-08-02  Yannick Moy  <moy@adacore.com>
14414
14415         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
14416         types.
14417         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
14418         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
14419         * sem_ch3.adb
14420         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
14421         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
14422         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
14423         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
14424         types.
14425         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
14426         non-static range.
14427         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
14428         functions whose return type is not in ALFA.
14429         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
14430         specifications.
14431         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
14432         parameter's type is not in ALFA.
14433         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
14434         types are in ALFA.
14435
14436 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14437
14438         * sem_ch6 (Analyze_Expression_Function): treat the function as
14439         Inline_Always, and introduce a subprogram declaration for it when it is
14440         not a completion.
14441         * inline.adb (Add_Inlined_Body): recognize bodies that come from
14442         expression functions, so that the back-end can determine whether they
14443         can in fact be inlined.
14444         * sem_util.adb (Is_Expression_Function): predicate to determine whether
14445         a function body comes from an expression function.
14446
14447 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
14448
14449         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
14450         null exclusions to test Can_Never_Be_Null on the anonymous access types
14451         of the formals rather than testing the formals themselves. Exclude this
14452         check in cases where the Old_Formal is marked as a controlling formal,
14453         to avoid issuing spurious errors for bodies completing dispatching
14454         operations (due to the flag not getting set on controlling access
14455         formals in body specs).
14456         (Find_Corresponding_Spec): When checking full and subtype conformance of
14457         subprogram bodies in instances, pass Designated and E in that order, for
14458         consistency with the expected order of the formals (New_Id followed by
14459         Old_Id).
14460
14461 2011-08-02  Robert Dewar  <dewar@adacore.com>
14462
14463         * sem_ch8.adb: Minor reformatting.
14464
14465 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14466
14467         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
14468         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
14469         primitive operations of class-wide actuals.
14470
14471 2011-08-02  Javier Miranda  <miranda@adacore.com>
14472
14473         * exp_atag.ads, exp_atag.adb
14474         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
14475         since its value is implicitly passed in argument Typ.
14476         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
14477         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
14478         Build_Common_Dispatching_Select_Statements.
14479
14480 2011-08-02  Robert Dewar  <dewar@adacore.com>
14481
14482         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
14483         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
14484         Minor reformatting.
14485
14486 2011-08-02  Robert Dewar  <dewar@adacore.com>
14487
14488         * sem_res.adb: Minor reformatting.
14489         * sem_prag.adb: Minor reformatting.
14490
14491 2011-08-02  Javier Miranda  <miranda@adacore.com>
14492
14493         * exp_atag.adb, exp_atags.ads
14494         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
14495         by the tagged type Entity. Required to use this routine in the VM
14496         targets since we do not have available the Tag entity in the VM
14497         platforms.
14498         * exp_ch6.adb
14499         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
14500         Ada.Tags has not been previously loaded.
14501         * exp_ch7.adb
14502         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
14503         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
14504         * sem_aux.adb
14505         (Enclosing_Dynamic_Scope): Add missing support to handle the full
14506         view of enclosing scopes. Required to handle enclosing scopes that
14507         are synchronized types whose full view is a task type.
14508         * exp_disp.adb
14509         (Build_VM_TSDs): Minor code improvement to avoid generating and
14510         analyzing lists with empty nodes.
14511         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
14512         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
14513         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
14514         (Make_Disp_Timed_Select_Body): Add support for VM targets.
14515         (Make_Select_Specific_Data_Table): Add support for VM targets.
14516         (Make_VM_TSD): Generate code to initialize the SSD structure of
14517         the TSD.
14518
14519 2011-08-02  Yannick Moy  <moy@adacore.com>
14520
14521         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
14522         cross-references section in ALI.
14523         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
14524         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
14525         Sub).
14526         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
14527         subprogram or package entity of a node
14528         (Is_Local_Reference_Type): new function returns True for references
14529         selected in local cross-references.
14530         (Lt): function extracted from Lt in Output_References
14531         (Write_Entity_Name): function extracted from Output_References
14532         (Generate_Definition): generate reference with type 'D' for definition
14533         of objects (object declaration and parameter specification), with
14534         appropriate locations and units, for use in local cross-references.
14535         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
14536         references of type 'I' for initialization in object definition.
14537         (Output_References): move part of function Lt and procedure
14538         Write_Entity_Name outside of the body. Ignore references of types 'D'
14539         and 'I' introduced for local cross-references.
14540         (Output_Local_References): new procedure to output the local
14541         cross-references sections.
14542         (Lref_Entity_Status): new array defining whether an entity is a local
14543         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
14544         with 'I' type when initialization expression is present.
14545         * get_scos.adb, get_scos.ads: Correct comments and typos
14546
14547 2011-08-02  Javier Miranda  <miranda@adacore.com>
14548
14549         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
14550         the JVM target.
14551         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
14552         the JVM target.
14553         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
14554         TSD support.
14555
14556 2011-08-02  Vincent Celier  <celier@adacore.com>
14557
14558         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
14559         (No_Space_Img): New function
14560         (Find_Excluded_Sources): When reading from a file, record the file name
14561         and the line number for each excluded source.
14562         (Mark_Excluded_Sources): When reporting an error, if the excluded
14563         sources were read from a file, include file name and line number in
14564         the error message.
14565
14566 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14567
14568         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
14569
14570 2011-08-02  Robert Dewar  <dewar@adacore.com>
14571
14572         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
14573
14574 2011-08-02  Javier Miranda  <miranda@adacore.com>
14575
14576         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
14577         generation of TSDs to the DOTNET compiler.
14578         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
14579         generation of TSDs to the DOTNET compiler.
14580
14581 2011-08-02  Javier Miranda  <miranda@adacore.com>
14582
14583         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
14584         record of all the tagged types declared inside library level package
14585         declarations, library level package bodies or library level subprograms.
14586         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
14587         associated with a given tagged type.
14588         (Build_VM_TSDs): New subprogram.
14589         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
14590         compilation units that are subprograms.
14591         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
14592         compilation units that are package bodies.
14593         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
14594         units that are a package declaration or a package instantiation.
14595         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
14596         reorganization to improve the error generated by the frontend when the
14597         function Ada.Tags.Secondary_Tag is not available.
14598         * rtsfind.ads (RE_Register_TSD): New runtime entity.
14599         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
14600
14601 2011-08-02  Javier Miranda  <miranda@adacore.com>
14602
14603         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
14604
14605 2011-08-02  Robert Dewar  <dewar@adacore.com>
14606
14607         * s-imenne.ads: Minor reformatting.
14608
14609 2011-08-02  Robert Dewar  <dewar@adacore.com>
14610
14611         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
14612         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
14613         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
14614
14615 2011-08-02  Robert Dewar  <dewar@adacore.com>
14616
14617         * einfo.ads (Materialize_Entity): Document this is only for renamings
14618         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
14619         required debug information in the case where we transform the object
14620         declaration into a renaming declaration.
14621         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
14622         object
14623         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
14624         Materialize_Entity.
14625
14626 2011-08-02  Robert Dewar  <dewar@adacore.com>
14627
14628         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
14629         Suppress_Init_Procs.
14630         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
14631         Suppress_Initialization/Initialization_Suppressed.
14632         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
14633         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
14634         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
14635         * sem_prag.adb: New processing for pragma Suppress_Initialization.
14636
14637 2011-08-02  Robert Dewar  <dewar@adacore.com>
14638
14639         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
14640         Minor reformatting.
14641
14642 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14643
14644         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
14645         only have inheritable classwide pre/postconditions.
14646
14647 2011-08-02  Javier Miranda  <miranda@adacore.com>
14648
14649         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
14650         * rtsfind.ads (RE_Check_TSD): New runtime entity.
14651         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
14652         checks if the external tag of a type is the same as the external tag
14653         of some other declaration.
14654
14655 2011-08-02  Thomas Quinot  <quinot@adacore.com>
14656
14657         * s-taskin.ads: Minor reformatting.
14658
14659 2011-08-02  Emmanuel Briot  <briot@adacore.com>
14660
14661         * g-comlin.adb (Display_Help): swap the order in which it prints the
14662         short help and the general usage.
14663
14664 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14665
14666         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
14667         the aspect declarations and attach them to the generic copy for
14668         subsequent analysis.
14669         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
14670         declarations of the generic tree to the new subprogram declarations.
14671         * sem_attr.adb (Check_Precondition_Postcondition): recognize
14672         conditions that apply to a subprogram instance.
14673
14674 2011-08-02  Robert Dewar  <dewar@adacore.com>
14675
14676         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
14677
14678 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14679
14680         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
14681         private type with a tagged full view is not derived in the immediate
14682         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
14683
14684 2011-08-02  Robert Dewar  <dewar@adacore.com>
14685
14686         * exp_ch4.adb: Minor reformatting.
14687
14688 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14689
14690         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
14691         Ada2012 iterator, the loop will be rewritten during expansion into a
14692         while loop with a cursor and an element declaration. Do not analyze the
14693         body in this case, because if the container is for indefinite types the
14694         actual subtype of the elements will only be determined when the cursor
14695         declaration is analyzed.
14696
14697 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14698
14699         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
14700         size/alignment related attributes in CodePeer_Mode.
14701
14702 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
14703
14704         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
14705         Prepend_Element, since this can result in the operation getting the
14706         wrong slot in the full type's dispatch table if the full type has
14707         inherited operations. The incomplete type's operation will get added
14708         to the proper position in the full type's primitives
14709         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
14710         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
14711         dispatching operations, since there are cases where nonprimitive
14712         subprograms can get added to the list of incomplete dependents (such
14713         as subprograms in nested packages).
14714         * sem_ch6.adb (Process_Formals): First, remove test for being in a
14715         private part when determining whether to add a primitive with a
14716         parameter of a tagged incomplete type to the Private_Dependents list.
14717         Such primitives can also occur in the visible part, and should not have
14718         been excluded from being private dependents.
14719         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
14720         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
14721         list of a Taft-amendment incomplete type is a primitive before issuing
14722         an error that the full type must appear in the same unit. There are
14723         cases where nonprimitives can be in the list (such as subprograms in
14724         nested packages).
14725         * sem_disp.adb (Derives_From): Use correct condition for checking that
14726         a formal's type is derived from the type of the corresponding formal in
14727         the parent subprogram (the condition was completely wrong). Add
14728         checking that was missing for controlling result types being derived
14729         from the result type of the parent operation.
14730
14731 2011-08-02  Yannick Moy  <moy@adacore.com>
14732
14733         * errout.adb (First_Node): minor renaming
14734         * restrict.adb (Check_Formal_Restriction): put restriction warning on
14735         first node.
14736
14737 2011-08-02  Yannick Moy  <moy@adacore.com>
14738
14739         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
14740         before accessing operands.
14741         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
14742         decide whether an initialization expression respects SPARK rules, as
14743         the plain node is the expanded one. This allows for more valid warnings
14744         to be issued.
14745         * gnat_rm.texi: Minor update.
14746
14747 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14748
14749         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
14750         previous change.
14751
14752 2011-08-02  Robert Dewar  <dewar@adacore.com>
14753
14754         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
14755
14756 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14757
14758         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
14759         loop statements and the element renaming declaration with a block when
14760         the element type is controlled.
14761
14762 2011-08-02  Yannick Moy  <moy@adacore.com>
14763
14764         * sinfo.ads: Minor formatting.
14765
14766 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14767
14768         * sem_aggr.adb (Add_Association): if the association has a box and no
14769         expression, use the Sloc of the aggregate itself for the new
14770         association.
14771         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
14772         the Original_Node.
14773
14774 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14775
14776         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
14777         When a container is provided via a function call, generate a renaming
14778         of the function result. This avoids the creation of a transient scope
14779         and the premature finalization of the container.
14780         * exp_ch7.adb (Is_Container_Cursor): Removed.
14781         (Wrap_Transient_Declaration): Remove the supression of the finalization
14782         of the list controller when the declaration denotes a container cursor,
14783         it is not needed.
14784
14785 2011-08-02  Yannick Moy  <moy@adacore.com>
14786
14787         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
14788         node is from source, instead of the original node being from source.
14789         * sem_aggr.adb
14790         (Resolve_Array_Aggregate): refine the check for a static expression, to
14791         recognize also static ranges
14792         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
14793         Array_Type_Declaration): postpone the test for the type being a subtype
14794         mark after the type has been resolved, so that component-selection and
14795         expanded-name are discriminated.
14796         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
14797         to distinguish the case of an iteration scheme, so that an error is
14798         issed on a non-static range in SPARK except in an iteration scheme.
14799         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
14800         In_Iter_Schm = True.
14801         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
14802         user-defined operators so that they are allowed in renaming
14803         * sem_ch8.adb
14804         (Find_Selected_Component): refine the check for prefixing of operators
14805         so that they are allowed in renaming. Move the checks for restrictions
14806         on selector name after analysis discriminated between
14807         component-selection and expanded-name.
14808         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
14809         concatenation argument of string type if it is static.
14810         * sem_util.adb, sem_util.ads
14811         (Check_Later_Vs_Basic_Declarations): add a new function
14812         Is_Later_Declarative_Item to decice which declarations are allowed as
14813         later items, in the two different modes Ada 83 and SPARK. In the SPARK
14814         mode, add that renamings are considered as later items.
14815         (Enclosing_Package): new function to return the enclosing package
14816         (Enter_Name): correct the rule for homonyms in SPARK
14817         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
14818         from source (result of expansion) to avoid issuing wrong warnings.
14819
14820 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14821
14822         * errout.adb: On anything but an expression First_Node returns its
14823         argument.
14824
14825 2011-08-02  Pascal Obry  <obry@adacore.com>
14826
14827         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
14828
14829 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14830
14831         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
14832         Set the associated loop as the related expression of internally
14833         generated cursors.
14834         * exp_ch7.adb (Is_Container_Cursor): New routine.
14835         (Wrap_Transient_Declaration): Supress the finalization of the list
14836         controller when the declaration denotes a container cursor.
14837
14838 2011-08-02  Yannick Moy  <moy@adacore.com>
14839
14840         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
14841         command line now.
14842         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
14843         expression is a simple expression. This check cannot be performed in
14844         the semantics, so just drop it.
14845         (P_Index_Or_Discriminant_Constraint): move check that the index or
14846         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
14847         semantics. Other cases were previously checked in the semantics.
14848         * par-ch4.adb (P_Name): move checks that a selector name is not
14849         character literal or an operator symbol to Find_Selected_Component in
14850         the semantics
14851         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
14852         declarations are not placed after later declarations in a separate
14853         procedure in Sem_Util (possibly not the best choice?), to be used both
14854         during parsing, for Ada 83 mode, and during semantic analysis, for
14855         SPARK mode.
14856         * par-endh.adb (Check_End): move check that end label is not missing
14857         to Process_End_Label in the semantics
14858         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
14859         the special case for SPARK restriction
14860         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
14861         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
14862         parameter Force to issue the error message even on internal node (used
14863         for generated end label). Call Check_Restriction to check when an error
14864         must be issued. In SPARK mode, issue an error message even if the
14865         restriction is not set.
14866         (Check_Restriction): new procedure with an additional out parameter to
14867         inform the caller that a message has been issued
14868         * sem_aggr.adb: Minor modification of message
14869         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
14870         instead of issuing an error message directly
14871         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
14872         declarations are not placed after later declarations, by calling
14873         Check_Later_Vs_Basic_Declarations
14874         (Analyze_Subtype_Declaration): move here the check that an index or
14875         discriminant constraint must be a subtype mark. Change the check that
14876         a subtype of String must start at one so that it works on subtype marks.
14877         * sem_ch4.adb (Analyze_Call): move here the check that a named
14878         association cannot follow a positional one in a call
14879         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
14880         instead of issuing an error message directly
14881         * sem_ch8.adb (Find_Selected_Component): move here the check that a
14882         selector name is not a character literal or an operator symbol. Move
14883         here the check that the prefix of an expanded name cannot be a
14884         subprogram or a loop statement.
14885         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
14886         procedure called from parsing and semantics to check that basic
14887         declarations are not placed after later declarations
14888         (Process_End_Label): move here the check that end label is not missing
14889
14890 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14891
14892         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
14893         representation clause in codepeer mode, since it confuses CodePeer and
14894         does not bring useful info.
14895
14896 2011-08-02  Ed Falis  <falis@adacore.com>
14897
14898         * init.c: initialize fp hw on MILS.
14899
14900 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14901
14902         * errout.adb (First_Node): for bodies, return the node itself (small
14903         optimization). For other nodes, do not check source_unit if the node
14904         comes from Standard.
14905
14906 2011-08-02  Robert Dewar  <dewar@adacore.com>
14907
14908         * exp_ch3.adb: Minor comment additions.
14909         * sem_ch13.adb: Minor reformatting.
14910
14911 2011-08-02  Pascal Obry  <obry@adacore.com>
14912
14913         * make.adb, makeutl.adb: Removes some superfluous directory separator.
14914
14915 2011-08-02  Robert Dewar  <dewar@adacore.com>
14916
14917         * sem_attr.adb: Minor reformatting.
14918
14919 2011-08-02  Robert Dewar  <dewar@adacore.com>
14920
14921         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
14922         (Has_Default_Component_Value): Removed
14923         * einfo.ads Comment updates
14924         (Has_Default_Aspect): Replaces Has_Default_Value
14925         (Has_Default_Component_Value): Removed
14926         * exp_ch13.adb
14927         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
14928         * exp_ch3.adb
14929         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
14930         (Get_Simple_Init_Val): Handle Default_Value aspect
14931         (Needs_Simple_Initialization): Handle Default_Value aspect
14932         * exp_ch3.ads: Needs_Simple_Initialization
14933         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
14934         * par-prag.adb (Pragma_Default[_Component]Value) Removed
14935         * sem_ch13.adb
14936         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
14937         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
14938         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
14939
14940 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14941
14942         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
14943         package containing iteration primitives.
14944         exp_ch5.adb (Expand_Iterator_Loop): ditto.
14945
14946 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14947
14948         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
14949         "of", pre-analyze expression in case it is a function call with
14950         finalization actions that must be placed ahead of the loop.
14951         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
14952         on an Ada2012 iterator, insert them ahead of the rewritten loop.
14953
14954 2011-08-02  Geert Bosch  <bosch@adacore.com>
14955
14956         * cstand.adb (Create_Float_Types): Only consider C's long double for
14957         Long_Long_Float, in addition to double.
14958
14959 2011-08-02  Robert Dewar  <dewar@adacore.com>
14960
14961         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
14962         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
14963         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
14964         Minor reformatting.
14965
14966 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14967
14968         * sem_attr.adb: handle properly 'Result when it is a prefix of an
14969         indexed component.
14970
14971 2011-08-02  Javier Miranda  <miranda@adacore.com>
14972
14973         * einfo.ads, einfo.adb
14974         (Original_Access_Type): Move this attribute to Node26 since there was
14975         an undocumented use of Node21 in E_Access_Subprogram_Type entities
14976         which causes conflicts and breaks the generation of the .NET compiler.
14977         (Interface_Name): Add missing documentation on JGNAT only uses of
14978         this attribute.
14979
14980 2011-08-02  Geert Bosch  <bosch@adacore.com>
14981
14982         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
14983         (Find_Back_End_Float_Type): Likewise
14984         (Create_Back_End_Float_Types): Likewise
14985         (Create_Float_Types): Likewise
14986         (Register_Float_Type): Likewise
14987         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
14988         Nlist and split out type selection in new local Find_Base_Type function.
14989         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
14990         Nlist
14991         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
14992
14993 2011-08-02  Robert Dewar  <dewar@adacore.com>
14994
14995         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
14996         alpha order).
14997         * opt.ads: Minor comment change.
14998         * sem_ch12.adb: Minor code reorganization.
14999
15000 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
15001
15002         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15003         subtype's list of rep items to the list on the full subtype in the case
15004         where the lists are the same.
15005
15006 2011-08-02  Geert Bosch  <bosch@adacore.com>
15007
15008         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15009         using the one from System.Strings, which also deallocates all strings.
15010
15011 2011-08-02  Geert Bosch  <bosch@adacore.com>
15012
15013         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15014         function.
15015         * gcc-interface/Make-lang.in: Update dependencies.
15016
15017 2011-08-02  Olivier Hainque  <hainque@adacore.com>
15018
15019         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15020         end_locus.
15021
15022 2011-08-02  Javier Miranda  <miranda@adacore.com>
15023
15024         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15025         associated with anonymous access to subprograms.
15026
15027 2011-08-02  Geert Bosch  <bosch@adacore.com>
15028
15029         * opt.ads
15030         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15031         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15032         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15033         (Add_Symbol_Definition): Move to switch-c.adb
15034         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15035         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15036         (Add_Symbol_Definition): Move to switch-c.adb.
15037         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15038         * sem_warn.adb
15039         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15040         Move to warnsw.adb.
15041         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15042         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15043         Move to warnsw.adb.
15044         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15045         (Add_Symbol_Definition): Moved from Prepcomp.
15046         * switch-c.ads: Update copyright notice. Use String_List instead of
15047         Argument_List, removing dependency on System.OS_Lib.
15048
15049 2011-08-02  Yannick Moy  <moy@adacore.com>
15050
15051         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15052         mode on initialization expression which does not respect SPARK
15053         restrictions.
15054         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15055         if the tree referenced by its argument represents an initialization
15056         expression in SPARK, suitable for initializing an object in an object
15057         declaration.
15058
15059 2011-08-02  Javier Miranda  <miranda@adacore.com>
15060
15061         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15062         internally generated access to subprogram with its associated protected
15063         subprogram type.
15064         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15065
15066 2011-08-02  Geert Bosch  <bosch@adacore.com>
15067
15068         * cstand.adb (Register_Float_Type): Print information about type to
15069         register, if the Debug_Flag_Dot_B is set.
15070         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15071         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15072         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15073         with a requested precision of more than Max_Digits digits and no more
15074         than Max_Base_Digits digits, if a range specification is present and the
15075         Predefined_Float_Types list has a suitable type to derive from.
15076         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15077         case of type completion with pragma Import
15078         * sem_prag.adb
15079         (Process_Import_Predefined_Type): Processing to complete a type
15080         with pragma Import. Currently supports floating point types only.
15081         (Set_Convention_From_Pragma): Do nothing without underlying type.
15082         (Process_Convention): Guard against absence of underlying type,
15083         which may happen when importing incomplete types.
15084         (Process_Import_Or_Interface): Handle case of importing predefined
15085         types. Tweak error message.
15086
15087 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15088
15089         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15090         functions to previous change.  Reorganize code slightly.
15091
15092 2011-08-02  Geert Bosch  <bosch@adacore.com>
15093
15094         * back_end.ads (Register_Type_Proc): New call back procedure type for
15095         allowing the back end to provide information about available types.
15096         (Register_Back_End_Types): New procedure to register back end types.
15097         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15098         available types.
15099         * cstand.adb (Back_End_Float_Types): New list for floating point types
15100         supported by the back end.
15101         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15102         (Copy_Float_Type): New procedure to make new copies of predefined types.
15103         (Register_Float_Type): New call back procedure to populate the BEFT list
15104         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15105         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15106         (Create_Float_Types): New procedure to create entities for floating
15107         point types predefined in Standard, and put these and any remaining
15108         BEFTs on the Predefined_Float_Types list.
15109         * stand.ads (Predefined_Float_Types): New list for predefined floating
15110         point types that do not have declarations in package Standard.
15111
15112 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15113
15114         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
15115         entity node for the unit containing the parameter.
15116         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15117         (Add_Inlined_Subprogram): Likewise.
15118         * gcc-interface/Make-lang.in: Update dependencies.
15119
15120 2011-08-02  Thomas Quinot  <quinot@adacore.com>
15121
15122         * s-stusta.adb (Print): Make sure Pos is always initialized to a
15123         suitable value.
15124
15125 2011-08-02  Geert Bosch  <bosch@adacore.com>
15126
15127         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15128
15129 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15130
15131         * sem_type.adb (Covers): Move trivial case to the top and reuse the
15132         computed value of Base_Type.
15133
15134 2011-08-02  Yannick Moy  <moy@adacore.com>
15135
15136         * restrict.adb (Check_Restriction): issue an error for any use of
15137         class-wide, even if the No_Dispatch restriction is not set.
15138         * sem_aggr.adb: Correct typos in comments and messages in formal mode
15139         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15140         when completing a private extension, the type named in the private part
15141         is not the same as that named in the visible part.
15142         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15143         of an inherited primitive operations of a tagged type or type extension
15144         that returns the tagged type.
15145         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15146         function which returns True for an implicit operation inherited by the
15147         derived type declaration for the argument type.
15148         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15149         order.
15150
15151 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15152
15153         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15154         Process_Bounds, to perform analysis with expansion of a range or an
15155         expression that is the iteration scheme for a loop.
15156         (Analyze_Iterator_Specification): If domain of iteration is given by a
15157         function call with a controlled result, as is the case if call returns
15158         a predefined container, ensure that finalization actions are properly
15159         generated.
15160         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15161
15162 2011-08-02  Javier Miranda  <miranda@adacore.com>
15163
15164         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15165         * gcc-interface/Make-lang.in: Update dependencies.
15166
15167 2011-08-02  Javier Miranda  <miranda@adacore.com>
15168
15169         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15170         determine if the analysis is performed using N or Original_Node (N).
15171         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15172         functionality of routine Is_Variable avoids code duplication.
15173         * checks.adb (Determine_Range): Handle temporaries generated by
15174         Remove_Side_Effects.
15175
15176 2011-08-02  Javier Miranda  <miranda@adacore.com>
15177
15178         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15179         expansion of the condition. Required since the previous analysis was
15180         done with expansion disabled (see Resolve_Quantified_Expression) and
15181         hence checks were not inserted and record comparisons have not been
15182         expanded.
15183
15184 2011-08-02  Ed Falis  <falis@adacore.com>
15185
15186         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15187         Update header.
15188
15189 2011-08-02  Bob Duff  <duff@adacore.com>
15190
15191         * opt.ads: Minor comment fix.
15192
15193 2011-08-02  Bob Duff  <duff@adacore.com>
15194
15195         * sem_ch12.adb (Analyze_Package_Instantiation,
15196         Analyze_Subprogram_Instantiation): Turn off style checking while
15197         analyzing an instance. Whatever style checks that apply to the generic
15198         unit should apply, so it makes no sense to apply them in an instance.
15199         This was causing trouble when compiling an instance of a runtime
15200         unit that violates the -gnatyO switch.
15201         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15202         one of the two case statements, causing spurious errors.
15203
15204 2011-08-02  Robert Dewar  <dewar@adacore.com>
15205
15206         * uname.adb: Minor reformatting.
15207         * gnatcmd.adb: Minor reformatting.
15208         * exp_attr.adb: Minor reformatting.
15209
15210 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15211
15212         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15213         No_Dispatching_Calls, do not look for the Assign primitive, because
15214         predefined primitives are not created in this case.
15215
15216 2011-08-02  Bob Duff  <duff@adacore.com>
15217
15218         * stylesw.ads: Minor comment fixes.
15219
15220 2011-08-02  Robert Dewar  <dewar@adacore.com>
15221
15222         * freeze.adb (Add_To_Result): New procedure.
15223
15224 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
15225
15226         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15227         time, if the specific run-time routines for handling streams of strings
15228         are not available, use the default mechanism.
15229
15230 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15231
15232         * s-regpat.ads: Fix typo.
15233
15234 2011-08-02  Vincent Celier  <celier@adacore.com>
15235
15236         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15237         not null, call it to create the in memory config project file without
15238         parsing an existing default config project file.
15239
15240 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15241
15242         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15243
15244 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15245
15246         * sem_elim.adb: an abstract subprogram does not need an eliminate
15247         pragma for its descendant to be eliminable.
15248
15249 2011-08-02  Ed Falis  <falis@adacore.com>
15250
15251         * init.c: revert to handling before previous checkin for VxWorks
15252         * s-intman-vxworks.adb: delete unnecessary declarations related to
15253         using Ada interrupt facilities for handling signals.
15254         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15255         * s-intman-vxworks.ads: Import __gnat_install_handler as
15256         Initialize_Interrupts.
15257         * s-taprop-vxworks.adb: Delete Signal_Mask.
15258         (Abort_Handler): change construction of mask to unblock exception
15259         signals.
15260
15261 2011-08-02  Jerome Guitton  <guitton@adacore.com>
15262
15263         * a-except-2005.adb (Raise_From_Signal_Handler): Call
15264         Debug_Raise_Exception before propagation starts.
15265
15266 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15267
15268         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15269         to Restriction_Check_Required.
15270         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15271         * sem_res.adb (Resolve_Call): Likewise.
15272         * sem_attr.adb (Check_Stream_Attribute): Likewise.
15273
15274 2011-08-02  Bob Duff  <duff@adacore.com>
15275
15276         * stylesw.ads: Update comment.
15277         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15278         * errout.ads: Remove obsolete comment.
15279
15280 2011-08-02  Javier Miranda  <miranda@adacore.com>
15281
15282         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15283         (Set_Is_Safe_To_Reevaluate): new procedure.
15284         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15285         assignment is allowed on safe-to-reevaluate variables.
15286         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15287         temporary created to remove side effects in expressions that use
15288         the secondary stack as safe-to-reevaluate.
15289         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15290         variables that are not true constants.
15291
15292 2011-08-02  Robert Dewar  <dewar@adacore.com>
15293
15294         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15295         sem_res.adb, sem_ch6.adb: Minor reformatting.
15296
15297 2011-08-02  Jerome Guitton  <guitton@adacore.com>
15298
15299         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15300
15301 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15302
15303         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15304         not set Overridden_Operation if subprogram is an initialization
15305         procedure.
15306
15307 2011-08-02  Yannick Moy  <moy@adacore.com>
15308
15309         * par-ch6.adb: Correct obsolete name in comments
15310         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15311         which takes two message arguments (existing function takes one), with
15312         second message used for continuation.
15313         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15314         block statements that originate from a source block statement, not
15315         generated block statements
15316         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15317         symmetry with procedure case
15318         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15319         function to issue an error in formal mode if a package specification
15320         contains more than one tagged type or type extension.
15321         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15322         parameters matching formals of tagged types are objects (or ancestor
15323         type conversions of objects), not general expressions. Issue an error
15324         on view conversions that are not involving ancestor conversion of an
15325         extended type.
15326         (Resolve_Type_Conversion): in formal mode, issue an error on the
15327         operand of an ancestor type conversion which is not an object
15328         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15329         procedure so that it works also for actuals of function calls
15330         (Is_Actual_Tagged_Parameter): new function which determines if its
15331         argument is an actual parameter of a formal of tagged type in a
15332         subprogram call
15333         (Is_SPARK_Object_Reference): new function which determines if the tree
15334         referenced by its argument represents an object in SPARK
15335
15336 2011-08-02  Robert Dewar  <dewar@adacore.com>
15337
15338         * sem_ch3.adb: Minor reformatting
15339         Minor comment addition
15340         Minor error msg text change
15341
15342 2011-08-02  Javier Miranda  <miranda@adacore.com>
15343
15344         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15345         function. Used to be more precise when we generate a variable plus one
15346         assignment to remove side effects in the evaluation of the Bound
15347         expressions.
15348         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15349         of the bound expression to force its re-analysis and thus expand the
15350         associated transient scope (if required). Code cleanup replacing the
15351         previous code that declared the constant entity by an invocation to
15352         routine Force_Evaluation which centralizes this work in the frontend.
15353
15354 2011-08-02  Robert Dewar  <dewar@adacore.com>
15355
15356         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15357         (Base_Type): Now uses improved Is_Base_Type function
15358         * einfo.ads (Base_Type): Inline this function
15359
15360 2011-08-02  Robert Dewar  <dewar@adacore.com>
15361
15362         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
15363         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
15364
15365 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15366
15367         * gcc-interface/Make-lang.in: Update dependencies.
15368         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
15369         targets.
15370
15371 2011-08-02  Yannick Moy  <moy@adacore.com>
15372
15373         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
15374         non-simple expression used in delta constraint
15375         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
15376         index constraint which is not a subtype mark
15377         * par.adb: With and use Restrict
15378         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
15379         mode on component type which is not a subtype mark and default
15380         expression on component
15381         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
15382         of string which does not have a lower index bound equal to 1
15383         (Array_Type_Declaration): issue an error in formal mode on index or
15384         component type which is not a subtype mark, and on aliased keyword on
15385         component
15386         (Derived_Type_Declaration): issue an error in formal mode on interface,
15387         limited or abstract type
15388         (Record_Type_Declaration): issue an error in formal mode on interface
15389         (Record_Type_Definition): issue an error in formal mode on tagged types
15390         and type extensions not declared in the specification of a library unit
15391         package; on null non-tagged record; on variant part
15392
15393 2011-08-02  Vincent Celier  <celier@adacore.com>
15394
15395         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
15396         not declared for qualified library project when Library_Name is not
15397         declared, but Library_Dir is.
15398
15399 2011-08-02  Robert Dewar  <dewar@adacore.com>
15400
15401         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
15402         pragmas (affects aspects [Component_]Default_Value
15403         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
15404         component type for the resolution
15405
15406 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15407
15408         * einfo.adb (Base_Type): Tune implementation for speed.
15409
15410 2011-08-02  Robert Dewar  <dewar@adacore.com>
15411
15412         * freeze.adb: Minor reformatting.
15413
15414 2011-08-02  Thomas Quinot  <quinot@adacore.com>
15415
15416         * scos.ads: Update comments.
15417
15418 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15419
15420         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
15421         base type, because the parent may be a subtype of a private type whose
15422         convention is established in a private part.
15423
15424 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
15425
15426         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
15427         statement in a block when the expansion of the return expression has
15428         created a finalization chain.
15429         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
15430         with the parent node.
15431         Add N_Extended_Return_Statement to handle the case where a transient
15432         object declaration appears in the Return_Object_Declarations list of
15433         an extended return statement.
15434
15435 2011-08-02  Matthew Gingell  <gingell@adacore.com>
15436
15437         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
15438         unused parameter 'name'.
15439
15440 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15441
15442         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
15443         inherited operation, check whether its alias, which is the source
15444         operastion that it renames, has been marked eliminated.
15445
15446 2011-08-02  Javier Miranda  <miranda@adacore.com>
15447
15448         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
15449         in-mode parameter whose type is an access type since it can be used to
15450         modify its designated object. Enforce code that handles as safe an
15451         access type that is not access-to-constant but it is the result of a
15452         previous removal of side-effects.
15453         (Remove_Side_Effects): Minor code reorganization of cases which require
15454         no action. Done to incorporate documentation on new cases uncovered
15455         working in this ticket: no action needed if this routine was invoked
15456         too early and the nodes are not yet decorated.
15457         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
15458         to routine Remove_Side_Effects by calls to Force_Evaluation since they
15459         were issued with actuals that are implicitly provided by
15460         Force_Evaluation.
15461
15462 2011-08-02  Robert Dewar  <dewar@adacore.com>
15463
15464         * sem_ch3.adb, sem_res.adb: Minor reformatting.
15465
15466 2011-08-02  Yannick Moy  <moy@adacore.com>
15467
15468         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
15469         to issue an error in formal mode on attribute not supported in this mode
15470         (Analyze_Attribute): issue errors on standard attributes not supported
15471         in formal mode.
15472         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
15473         comment, and issue error in formal mode on modulus which is not a power
15474         of 2.
15475         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
15476         range.
15477         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
15478         subtype mark.
15479         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
15480         operator on modular type (except 'not').
15481
15482 2011-08-02  Robert Dewar  <dewar@adacore.com>
15483
15484         * gnat_rm.texi: Minor reformatting.
15485
15486 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15487
15488         * s-osinte-linux.ads: Minor comment update and reformatting.
15489         * i-cexten.ads: Make this unit pure, as for its parent.
15490         Will allow its usage in more contexts if needed.
15491
15492 2011-08-02  Robert Dewar  <dewar@adacore.com>
15493
15494         * s-utf_32.ads: Minor comment fix.
15495
15496 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15497
15498         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
15499         operation of a tagged synchronized type, handle the case where the
15500         controlling argument is overloaded.
15501
15502 2011-08-02  Yannick Moy  <moy@adacore.com>
15503
15504         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
15505         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
15506         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
15507         SPARK mode and formal verification mode on processing SPARK restriction
15508         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
15509         requiring consistency checking.
15510
15511 2011-08-02  Robert Dewar  <dewar@adacore.com>
15512
15513         * sem_res.adb: Minor reformatting.
15514
15515 2011-08-02  Robert Dewar  <dewar@adacore.com>
15516
15517         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15518         a-cforse.ads: Remove unneeded with of Ada.Containers
15519         Remove commented out pragma Inline's
15520         Move specifications of new subprograms to the actual specs
15521
15522 2011-08-02  Yannick Moy  <moy@adacore.com>
15523
15524         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15525         a-cforse.ads: Update comments.
15526
15527 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15528
15529         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
15530
15531 2011-08-02  Robert Dewar  <dewar@adacore.com>
15532
15533         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
15534         a-cforse.ads, a-cofove.ads: Minor reformatting.
15535
15536 2011-08-02  Claire Dross  <dross@adacore.com>
15537
15538         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
15539         a-cofove.ads: Add comments.
15540
15541 2011-08-02  Yannick Moy  <moy@adacore.com>
15542
15543         * gnat_rm.texi: Document formal containers.
15544
15545 2011-08-02  Emmanuel Briot  <briot@adacore.com>
15546
15547         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
15548         are empty sections.
15549
15550 2011-08-02  Robert Dewar  <dewar@adacore.com>
15551
15552         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
15553         reformatting.
15554
15555 2011-08-02  Robert Dewar  <dewar@adacore.com>
15556
15557         * aspects.adb: New aspects Default_Value and Default_Component_Value
15558         New format of Aspect_Names table checks for omitted entries
15559         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
15560         handling of boolean aspects for derived types.
15561         New aspects Default_Value and Default_Component_Value
15562         New format of Aspect_Names table checks for omitted entries
15563         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
15564         (Has_Default_Value): New flag
15565         (Has_Default_Component_Value): New flag
15566         (Has_Default_Value): New flag
15567         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
15568         table.
15569         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
15570         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
15571         Default_Value and Default_Component_Value
15572         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
15573         New aspects Default_Value and Default_Component_Value
15574         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
15575         * sprint.adb: Print N_Aspect_Specification node when called from gdb
15576
15577 2011-08-02  Vincent Celier  <celier@adacore.com>
15578
15579         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
15580         inherit library kind.
15581
15582 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15583
15584         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
15585         Minor reformatting.
15586
15587 2011-08-02  Robert Dewar  <dewar@adacore.com>
15588
15589         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
15590
15591 2011-08-02  Yannick Moy  <moy@adacore.com>
15592
15593         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
15594
15595 2011-08-02  Robert Dewar  <dewar@adacore.com>
15596
15597         * impunit.adb: Add comment.
15598
15599 2011-08-02  Yannick Moy  <moy@adacore.com>
15600
15601         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
15602         qualification of aggregates in formal mode
15603         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
15604         another aggregate
15605         (Resolve_Aggregate): complete the test that an aggregate is adequately
15606         qualified in formal mode
15607
15608 2011-08-02  Pascal Obry  <obry@adacore.com>
15609
15610         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
15611         * mlib-prj.adb: Supress warning when compiling binder generated file.
15612         (Build_Library): Supress all warnings when compiling the binder
15613         generated file.
15614
15615 2011-08-02  Yannick Moy  <moy@adacore.com>
15616
15617         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
15618         from here...
15619         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
15620         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
15621         Add with/use clauses to make Check_Formal_Restriction visible
15622
15623 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15624
15625         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
15626         in-parameters when type of the generic formal is private in the generic
15627         spec and non-private in the body.
15628
15629 2011-08-02  Claire Dross  <dross@adacore.com>
15630
15631         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
15632         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
15633         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
15634         * impunit.adb, Makefile.rtl: Take new files into account.
15635
15636 2011-08-02  Robert Dewar  <dewar@adacore.com>
15637
15638         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
15639         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15640
15641 2011-08-02  Yannick Moy  <moy@adacore.com>
15642
15643         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
15644         formal mode
15645         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
15646         matching static array bounds, taking into account the special case of
15647         string literals
15648         * sem_ch3.adb: Typo in comment.
15649
15650 2011-08-02  Yannick Moy  <moy@adacore.com>
15651
15652         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
15653         which issues an error in formal mode if its argument node is originally
15654         from source
15655         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
15656         has a discriminant specification so that it does not include the case
15657         of derived types
15658         (Derived_Type_Declaration): move here the test that a derived type has a
15659         discriminant specification
15660         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
15661         first element of a component association before accessing its choices
15662         (presence of component association is not enough)
15663         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
15664         declaration is a library item before accessing the next element in a
15665         list, as library items are not member of lists
15666         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
15667         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
15668         Check_Formal_Restriction whenever possible.
15669
15670 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15671
15672         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
15673         reference when needed.
15674
15675 2011-08-02  Bob Duff  <duff@adacore.com>
15676
15677         * gnat_ugn.texi: Fix typo.
15678
15679 2011-08-02  Vincent Celier  <celier@adacore.com>
15680
15681         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
15682         archive file name. Do not use the full path name of archives for Open
15683         VMS.
15684
15685 2011-08-02  Robert Dewar  <dewar@adacore.com>
15686
15687         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
15688         Analyze_Aspect_Specifications
15689         * sem_ch13.adb
15690         (Analyze_Aspect_Specifications): New handling for boolean aspects
15691         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
15692         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
15693         sequence for Analyze_Aspect_Specifications
15694         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
15695         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
15696
15697 2011-08-02  Robert Dewar  <dewar@adacore.com>
15698
15699         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
15700         aspects, since these no longer exist.
15701
15702 2011-08-02  Robert Dewar  <dewar@adacore.com>
15703
15704         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
15705         semicolon, do not try to see if there are aspects following it.
15706         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
15707         aspect spec.
15708
15709 2011-08-02  Robert Dewar  <dewar@adacore.com>
15710
15711         * sem_ch8.adb, aspects.ads: Minor reformatting.
15712
15713 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15714
15715         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
15716         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
15717         extracted from...
15718         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
15719
15720 2011-08-02  Yannick Moy  <moy@adacore.com>
15721
15722         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
15723         mode on subprogram declaration outside of package specification, unless
15724         it is followed by a pragma Import
15725         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
15726         Access_Type_Declaration): issue error in formal mode on access type
15727         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
15728         incomplete type
15729         (Analyze_Object_Declaration): issue error in formal mode on object
15730         declaration which does not respect SPARK restrictions
15731         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
15732         declaration which does not respect SPARK restrictions
15733         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
15734         error in formal mode on digits or delta constraint
15735         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
15736         decimal fixed point type
15737         (Derived_Type_Declaration): issue error in formal mode on derived type
15738         other than type extensions of tagged record types
15739         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
15740         with check on access definition
15741         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
15742         mode on protected definition.
15743         (Analyze_Task_Definition): issue error in formal mode on task definition
15744
15745 2011-08-02  Robert Dewar  <dewar@adacore.com>
15746
15747         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
15748
15749 2011-08-02  Javier Miranda  <miranda@adacore.com>
15750
15751         * sem_ch6.adb (Can_Override_Operator): New function.
15752         (Verify_Overriding_Indicator): Add missing code to check overriding
15753         indicator in operators. Fixes regression.
15754         (Check_Overriding_Indicator): Minor reformating after replacing the
15755         code that evaluates if the subprogram can override an operator by
15756         invocations to the above new function.
15757         * einfo.adb
15758         (Write_Field26_Name): Add missing code to ensure that, following
15759         the documentation in einfo.ads, this field is not shown as attribute
15760         "Static_Initialization" on non-dispatching functions.
15761
15762 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
15763
15764         * sem_res.adb (Resolve_Call): A call to
15765         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
15766         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
15767         i.e., when the second parameter is of type Time_Span.
15768
15769 2011-08-02  Vincent Celier  <celier@adacore.com>
15770
15771         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
15772         with an archive instead of -L<library dir> -l<library name>.
15773
15774 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15775
15776         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
15777         mark the base types In_Use in addition to making the operations
15778         use_visible.
15779
15780 2011-08-02  Ed Falis  <falis@adacore.com>
15781
15782         * init.c: add and setup __gnat_signal_mask for the exception signals
15783         * s-inmaop-vxworks.adb: new file.
15784         * s-intman-vxworks.adb: remove unnecessary initializations and
15785         simplify remaining
15786         * s-intman-vxworks.ads: remove unnecessary variable
15787         * s-taprop-vxworks.adb: simplify signal initialization
15788
15789 2011-08-02  Robert Dewar  <dewar@adacore.com>
15790
15791         * sem_ch8.adb: Minor code reorganization, comment updates.
15792
15793 2011-08-02  Robert Dewar  <dewar@adacore.com>
15794
15795         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
15796         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
15797         here from Sem_Res.
15798         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
15799         (Matching_Static_Array_Bounds): Moved here from Sem_Res
15800
15801 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15802
15803         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
15804         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
15805         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
15806         use_type_clauses, to handle more efficiently use_type and use_all_type
15807         constructs.
15808         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
15809         Ada2012 Use_All_Type clause.
15810         (Use_Class_Wide_Operations): new procedure.
15811
15812 2011-08-02  Robert Dewar  <dewar@adacore.com>
15813
15814         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
15815         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
15816         expression to expression function.
15817
15818 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15819
15820         * sem_ch4.adb: transform simple Ada2012 membership into equality only
15821         if types are compatible.
15822
15823 2011-08-02  Yannick Moy  <moy@adacore.com>
15824
15825         * sem_res.adb (Matching_Static_Array_Bounds): new function which
15826         returns True if its argument array types have same dimension and same
15827         static bounds at each index.
15828         (Resolve_Actuals): issue an error in formal mode on actuals passed as
15829         OUT or IN OUT paramaters which are not view conversions in SPARK.
15830         (Resolve_Arithmetic_Op): issue an error in formal mode on
15831         multiplication or division with operands of fixed point types which are
15832         not qualified or explicitly converted.
15833         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
15834         Boolean or array type (except String) operands.
15835         (Resolve_Equality_Op): issue an error in formal mode on equality
15836         operators for array types other than String with non-matching static
15837         bounds.
15838         (Resolve_Logical_Op): issue an error in formal mode on logical operators
15839         for array types with non-matching static bounds. Factorize the code in
15840         Matching_Static_Array_Bounds.
15841         (Resolve_Qualified_Expression): issue an error in formal mode on
15842         qualified expressions for array types with non-matching static bounds.
15843         (Resolve_Type_Conversion): issue an error in formal mode on type
15844         conversion for array types with non-matching static bounds
15845
15846 2011-08-02  Robert Dewar  <dewar@adacore.com>
15847
15848         * par-ch10.adb: Minor code reorganization (use Nkind_In).
15849
15850 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15851
15852         * par-ch9.adb: save location of entry for proper error message.
15853
15854 2011-08-02  Javier Miranda  <miranda@adacore.com>
15855
15856         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
15857         (Use_Full_View) which permits this routine to climb through the
15858         ancestors using the full-view of private parents.
15859         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
15860         Use_Full_View to true in calls to Is_Ancestor.
15861         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
15862         true in call to Is_Ancestor.
15863         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
15864         Use_Full_View to true in call to Is_Ancestor.
15865         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
15866         call to Is_Ancestor.
15867         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
15868         Use_Full_View to true in calls to Is_Ancestor.
15869         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
15870         Make_Select_Specific_Data_Table, Register_Primitive,
15871         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
15872         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
15873         to true in call to Is_Ancestor.
15874         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
15875         Use_Full_View to true in calls to Is_Ancestor.
15876         * exp_cg.adb
15877         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
15878         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
15879
15880 2011-08-02  Robert Dewar  <dewar@adacore.com>
15881
15882         * gnat_rm.texi: Minor reformatting.
15883         * sem_prag.adb: Minor reformatting.
15884
15885 2011-08-02  Tristan Gingold  <gingold@adacore.com>
15886
15887         * vms_data.ads: Add VMS qualifier for -gnateP.
15888
15889 2011-08-02  Robert Dewar  <dewar@adacore.com>
15890
15891         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
15892         * par-ch7.adb (P_Package): Proper placement of aspects for package
15893         decl/instantiation.
15894         * par-endh.adb (Check_End): Ad Is_Sloc parameter
15895         (End_Statements): Add Is_Sloc parameterr
15896         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
15897         (Check_End): Ad Is_Sloc parameter
15898         (End_Statements): Add Is_Sloc parameterr
15899
15900 2011-08-02  Vincent Celier  <celier@adacore.com>
15901
15902         * ug_words: Add VMS qualifier equivalent to -gnateP:
15903         /SYMBOL_PREPROCESSING.
15904
15905 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
15906
15907         * gnat-style.texi: For hexadecimal numeric literals the typical
15908         grouping of digits is 4 to represent 2 bytes.
15909         A procedure spec which is split into several lines is indented two
15910         characters.
15911
15912 2011-08-02  Yannick Moy  <moy@adacore.com>
15913
15914         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
15915         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
15916         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
15917         properly qualified
15918         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
15919         choice in array aggregate
15920         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
15921         mark as ancestor
15922         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
15923         positional and named aggregate for record, or others in record
15924         aggregate, or multiple choice in record aggregate
15925         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
15926         array operands to logical operations AND, OR and XOR do not have the
15927         same static lower and higher bounds
15928         * sem_ch5.adb, sinfo.ads: Correct typos in comments
15929
15930 2011-08-01  Robert Dewar  <dewar@adacore.com>
15931
15932         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
15933         Replaces Last_Source_Node_In_Sequence.
15934         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
15935         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
15936         parens and blank in string (this was inconsistently implemented).
15937         * errout.ads
15938         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
15939         blank in string (this was inconsistently implemented).
15940         * gnat1drv.adb
15941         (Set_Global_Switches): Set formal mode switches appropriately
15942         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
15943         * par-prag.adb
15944         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
15945         call Set_Error_Msg_Lang to set "spark" as language name.
15946         * par.adb: Remove unnecessary call to set formal language for errout
15947         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
15948         appropriately and call Set_Error_Msg_Lang to set "spark" as language
15949         name.
15950         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
15951         calls to it, moved after resolution so that types are known
15952         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
15953         result of concatenation is not of type String
15954         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
15955         concatenation is not properly restricted
15956         * gnat_rm.texi: Add doc on pragma Spark_95.
15957         * gcc-interface/Makefile.in: Remove obsolete target pairs for
15958         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
15959         * gcc-interface/Make-lang.in: Update dependencies.
15960
15961 2011-08-01  Javier Miranda  <miranda@adacore.com>
15962
15963         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
15964         condition that detects if the overridden operation must replace an
15965         existing entity.
15966
15967 2011-08-01  Javier Miranda  <miranda@adacore.com>
15968
15969         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
15970         code declarations inserted by Insert_Actions in each alternative of the
15971         N_Case_Expression node.
15972
15973 2011-08-01  Robert Dewar  <dewar@adacore.com>
15974
15975         * sem_ch6.adb: Minor code reorganization.
15976         * sem_util.adb: Minor reformatting.
15977
15978 2011-08-01  Pascal Obry  <obry@adacore.com>
15979
15980         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
15981         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
15982
15983 2011-08-01  Yannick Moy  <moy@adacore.com>
15984
15985         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
15986         literal or operator symbol which is prefixed
15987         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
15988         mode on access attributes.
15989         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
15990         that concatenation operands are properly restricted in formal mode
15991         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
15992         Analyze_Concatenation_Operand. Issue an error in formal mode if the
15993         result of the concatenation has a type different from String.
15994         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
15995         Analyze_Quantified_Expression, Analyze_Slice,
15996         Analyze_Null): issue an error in formal mode on unsupported constructs
15997         * sem_ch5.adb
15998         (Analyze_Block_Statement): only issue error on source block statement
15999         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16000         function which returns the last node in a list of nodes for which
16001         Comes_From_Source returns True, if any
16002         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16003         Last_Source_Node_In_Sequence
16004         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16005         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16006         mode on unsupported constructs
16007         * sem_ch9.adb Do not return after issuing error in formal mode, as the
16008         rest of the actions may be needed later on since the error is marked as
16009         not serious.
16010         * sinfo.ads: Typos in comments.
16011
16012 2011-08-01  Pascal Obry  <obry@adacore.com>
16013
16014         * projects.texi: Minor editing.
16015
16016 2011-08-01  Yannick Moy  <moy@adacore.com>
16017
16018         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16019         insertion character ~~
16020         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16021         (Set_Error_Msg_Lang): new procedure which fixes the language for use
16022         with insertion character ~~
16023         (Set_Msg_Text): treat insertion character ~~
16024         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16025         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16026         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16027         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16028         errors related to the formal language restriction not serious
16029         (insertion character |).
16030         * par.adb (Par): set formal language for error messages if needed
16031         * sem_ch6.adb (Check_Missing_Return): take into account possible
16032         generated statements at the end of the function
16033         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16034         enumeration value to define a new pragma SPARK_95
16035         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16036         SPARK_Version): new type and variables to store the SPARK version
16037         (none by default).
16038         (SPARK_Mode): return True when SPARK_Version is set
16039         * par-prag.adb: Correct indentation
16040         (Prag): take Pragma_SPARK_95 into account
16041         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16042         into account.
16043
16044 2011-08-01  Robert Dewar  <dewar@adacore.com>
16045
16046         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16047         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16048         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16049
16050 2011-08-01  Pascal Obry  <obry@adacore.com>
16051
16052         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16053         Target_Name to Get_Path call.
16054         (Parse_Single_Project): Likewise.
16055         (Post_Parse_Context_Clause): Likewise.
16056         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16057         Call Initialise_Project_Path with the proper Target_Name.
16058         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16059         search path.
16060         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16061         with the proper Target_Name.
16062         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16063         Part.Parse routine.
16064         (Parse_Project_And_Apply_Config): Likewise.
16065         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16066         This is fine as this part of the code is supporting only native
16067         compilation.
16068         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16069         is fine as this part of the code is supporting only native compilation.
16070
16071 2011-08-01  Yannick Moy  <moy@adacore.com>
16072
16073         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16074         of homonym, unless the homonym is one of the cases allowed in SPARK
16075         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16076         package declaration occurring after a body.
16077
16078 2011-08-01  Robert Dewar  <dewar@adacore.com>
16079
16080         * checks.adb, exp_ch4.adb: Minor reformatting.
16081
16082 2011-08-01  Javier Miranda  <miranda@adacore.com>
16083
16084         * einfo.ads (Access_Disp_Table): Fix documentation.
16085         (Dispatch_Table_Wrappers): Fix documentation.
16086
16087 2011-08-01  Pascal Obry  <obry@adacore.com>
16088
16089         * prj-env.adb, prj-env.ads: Minor reformatting.
16090
16091 2011-08-01  Yannick Moy  <moy@adacore.com>
16092
16093         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16094         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16095         procedures out of these packages.
16096         * errout.ads, errout.adb
16097         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16098         procedures in of this package
16099         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16100         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16101         on misplaced later vs initial declarations, like in Ada 83
16102         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16103         formal mode on attribute of private type whose full type declaration
16104         is not visible
16105         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16106         package declaration inside a package specification
16107         (Analyze_Full_Type_Declaration): issue error in formal mode on
16108         controlled type or discriminant type
16109         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16110         user-defined operator means that it should come from the source
16111         (New_Overloaded_Entity): issue error in formal mode on overloaded
16112         entity.
16113         * sem_ch6.ads, sem_ch13.ads: typos in comments.
16114
16115 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16116
16117         * atree.adb: Minor reformatting.
16118         * checks.adb: Minor reformatting.
16119
16120 2011-08-01  Vincent Celier  <celier@adacore.com>
16121
16122         * s-parame-vms-ia64.ads: Fix typo in comment
16123         Minor reformatting
16124         * s-parame-vms-restrict.ads: Removed, unused.
16125
16126 2011-08-01  Javier Miranda  <miranda@adacore.com>
16127
16128         * exp_ch3.adb
16129         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16130         * sem_ch3.adb
16131         (Constrain_Index): Remove side effects in the evaluation of the bounds.
16132         * sem_ch3.ads, sem_ch3.adb
16133         (Is_Constant_Bound): New extended version of the subprogram that was
16134         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16135         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16136         * sem_aux.ads (Constant_Value): Fix typo in comment.
16137         * checks.adb (Generate_Index_Checks): New implementation which, for
16138         array objects with constant bounds, generates the runtime check
16139         referencing the bounds of the array type. For other cases this routine
16140         provides its previous behavior obtaining such values from the array
16141         object.
16142         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16143         parent type.
16144         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16145         we cannot have semantic interpretations of the new node.
16146
16147 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16148
16149         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16150         expressions.
16151
16152 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16153
16154         * sem_ch8.adb: Minor code editing.
16155         * s-vxwext.adb: Remove trailing space.
16156         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16157         consistency with other files.
16158
16159 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16160
16161         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16162
16163 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16164
16165         * par-ch10.adb: reject parameterized expressions as compilation unit.
16166         * sem_ch4.adb: handle properly conditional expression with overloaded
16167         then_clause and no else_clause.
16168
16169 2011-08-01  Tristan Gingold  <gingold@adacore.com>
16170
16171         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16172         like done by System.Aux_DEC.
16173         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16174
16175 2011-08-01  Yannick Moy  <moy@adacore.com>
16176
16177         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16178         missing label at end of declaration (subprogram or package)
16179         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16180         of positional and named parameter association
16181         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16182         Error_Msg_SP which adds a prefix to the error message giving the name
16183         of the formal language analyzed
16184         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16185         access result type in subprogram, unconstrained array as result type,.
16186         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16187         procedure
16188         * sem_ch8.adb: Code clean up.
16189
16190 2011-08-01  Javier Miranda  <miranda@adacore.com>
16191
16192         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16193         * einfo.ads (Access_Disp_Table): Fix documentation.
16194         (Dispatch_Table_Wrappers): Fix documentation.
16195         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16196         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16197         to enforce the documentation of this attribute.
16198         (Set_Is_Interface): Cleanup the assertion.
16199         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16200         the Underlying_Type entity before reading attribute Access_Disp_Table.
16201         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16202         Locate the Underlying_Type before reading attribute Access_Disp_Table.
16203         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16204         the Underlying_Type entity before reading attribute Access_Disp_Table.
16205         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16206         Locate the Underlying_Type entity before reading attribute
16207         Access_Disp_Table.
16208
16209 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16210
16211         * s-poosiz.ads: Additional overriding indicators.
16212
16213 2011-08-01  Yannick Moy  <moy@adacore.com>
16214
16215         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16216         formal mode.
16217         (Analyze_Iteration_Scheme): issue error in formal mode when loop
16218         parameter specification does not include a subtype mark.
16219         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16220         formal mode on abstract subprogram.
16221         (Analyze_Subprogram_Specification): issue error in formal mode on
16222         user-defined operator.
16223         (Process_Formals): issue error in formal mode on access parameter and
16224         default expression.
16225         * sem_ch9.adb (Analyze_Abort_Statement,
16226         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16227         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16228         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16229         Analyze_Requeue, Analyze_Selective_Accept,
16230         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16231         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16232         issue error in formal mode on user-defined raise statement.
16233
16234 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16235
16236         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16237         declaration being hidden when overriding an implicit inherited
16238         subprogram.
16239         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16240         (-gnats), do not complain about a source file that contains only a
16241         pragma No_Body.
16242
16243 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16244
16245         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16246         variable if already set.
16247
16248 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16249
16250         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16251         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16252         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16253         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16254         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16255         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16256         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16257         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16258         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16259         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16260         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16261         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16262         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16263         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16264         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16265         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16266         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16267         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16268         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16269         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16270         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16271         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16272         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16273         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16274         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16275         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16276         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16277         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16278         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16279         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16280         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16281         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16282         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16283         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16284         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16285         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16286         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16287         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16288         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16289         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16290         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16291         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16292         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16293         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16294         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16295         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16296         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16297         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16298         s-osinte-mingw.ads: Update to GPLv3 run-time license.
16299         Use GNAT instead of GNARL.
16300
16301 2011-08-01  Bob Duff  <duff@adacore.com>
16302
16303         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16304         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16305         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16306         reformatting.
16307
16308 2011-08-01  Yannick Moy  <moy@adacore.com>
16309
16310         * debug.adb (d.D) reverve flag for the SPARK mode
16311         (d.E) reverve flag for SPARK generation mode
16312         (d.F) reverve flag for Why generation mode
16313         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16314         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
16315         functions which return True when the corresponding modes are set
16316         (Formal_Language): return "spark" or "alfa" when in formal verification
16317         mode.
16318         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16319         Error_Msg to prefix the error message with a tag giving the formal
16320         language
16321         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16322         message with a tag giving the formal language
16323         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16324         block statement
16325         (Analyze_Case_Statement): issue error in formal mode on case statement
16326         with a single "others" case alternative
16327         (Analyze_Exit_Statement): issue errors in formal mode on exit
16328         statements which do not respect SPARK restrictions
16329         (Analyze_Goto_Statement): issue error in formal mode on goto statement
16330         (Check_Unreachable_Code): always issue an error (not a warning) in
16331         formal mode on unreachable code (concerns both code after an infinite
16332         loop and after an unconditional jump, both not allowed in SPARK)
16333         * sem_ch6.adb (Analyze_Return_Statement): add call to
16334         Set_Return_Present for a procedure containing a return statement
16335         (already done for functions in Analyze_Function_Return)
16336         (Analyze_Function_Return): issue error in formal mode on extended
16337         return or if return is not last statement in function
16338         (Check_Missing_Return): issue error in formal mode if function does
16339         not end with return or if procedure contains a return
16340         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16341         function to detect if there is an inner scope of its parameter S which
16342         is a loop.
16343
16344 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16345
16346         * sem_ch6.ads: Minor reformatting.
16347
16348 2011-08-01  Javier Miranda  <miranda@adacore.com>
16349
16350         * sem_util.adb (Abstract_Interface_List): Complete condition when
16351         processing private type declarations to avoid reading unavailable
16352         attribute.
16353         (Is_Synchronized_Tagged_Type): Complete condition when processing
16354         private extension declaration nodes to avoid reading unavailable
16355         attribute.
16356
16357 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16358
16359         * sem_ch3.adb: Minor reformatting.
16360
16361 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16362
16363         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
16364         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
16365         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
16366         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
16367         for VMS, instead parametrize the common implementation with
16368         System.Parameters declarations.
16369
16370 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
16371
16372         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
16373
16374 2011-08-01  Tristan Gingold  <gingold@adacore.com>
16375
16376         * seh_init.c: Fix SEH handler installation on win64.
16377
16378 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16379
16380         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
16381         double analysis of an anonymous access to subprogram, because it can
16382         lead to improper sharing of profiles and a back-end crash.
16383
16384 2011-08-01  Robert Dewar  <dewar@adacore.com>
16385
16386         * make.adb, sem_ch4.adb: Minor reformatting.
16387         * gcc-interface/Make-lang.in: Update dependencies.
16388         * sem_util.adb, exp_ch5.adb: Minor reformatting.
16389
16390 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16391
16392         * gnat_rm.texi: Fix definition of Long_Integer.
16393
16394 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16395
16396         * exp_aggr.adb: check limit size of static aggregate unconditionally,
16397         to prevent storage exhaustion.
16398         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
16399         finalized is a function body, insert the cleanup code before the final
16400         return statement, to prevent spurious warnings.
16401         * s-pooglo.ads: add overriding indicator.
16402
16403 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16404
16405         * sem_ch4.adb (Operator_Check): improve error message when both a
16406         with_clause and a use_clause are needed to make operator usage legal.
16407         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
16408         determine whether a compilation unit is visible within an other,
16409         either through a with_clause in the current unit, or a with_clause in
16410         its library unit or one one of its parents.
16411
16412 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16413
16414         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
16415         over an arbitrary expression of an array or container type.
16416         * lib-xref.adb: clarify comment.
16417
16418 2011-08-01  Bob Duff  <duff@adacore.com>
16419
16420         * einfo.ads: Minor reformatting.
16421         * debug.adb: Minor comment improvement.
16422
16423 2011-08-01  Javier Miranda  <miranda@adacore.com>
16424
16425         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
16426         consider hidden subprograms as valid candidates.
16427
16428 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16429
16430         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
16431
16432 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
16433
16434         * gnat_ugn.texi: Fix typo.
16435
16436 2011-08-01  Robert Dewar  <dewar@adacore.com>
16437
16438         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
16439         lib-xref.adb: Minor reformatting
16440
16441 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
16442
16443         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
16444         when to generate a call to Move_Final_List.
16445         (Has_Controlled_Parts): Remove this function.
16446
16447 2011-08-01  Geert Bosch  <bosch@adacore.com>
16448
16449         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
16450         "," in choice list.
16451
16452 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16453
16454         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
16455         explicit raise of a predefined exception as Comes_From_Source if the
16456         original N_Raise_Statement comes from source.
16457
16458 2011-08-01  Robert Dewar  <dewar@adacore.com>
16459
16460         * sinfo.ads: Add comment.
16461         * sem_ch6.adb: Minor reformatting.
16462
16463 2011-08-01  Robert Dewar  <dewar@adacore.com>
16464
16465         * freeze.adb (Freeze_Entity): Refine check for bad component size
16466         clause to avoid rejecting confirming clause when atomic/aliased present.
16467
16468 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16469
16470         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
16471         better determine whether an entity reference is a write.
16472         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
16473         subcomponent.
16474         * lib-xref.adb (Output_References): Do no suppress a read reference at
16475         the same location as an immediately preceeding modify-reference, to
16476         handle properly in-out actuals.
16477
16478 2011-08-01  Tristan Gingold  <gingold@adacore.com>
16479
16480         * env.c (__gnat_setenv) [VMS]: Refine previous change.
16481
16482 2011-08-01  Quentin Ochem  <ochem@adacore.com>
16483
16484         * i-cstrin.adb (New_String): Changed implementation, now uses only the
16485         heap to compute the result.
16486
16487 2011-08-01  Robert Dewar  <dewar@adacore.com>
16488
16489         * atree.ads: Minor reformatting.
16490
16491 2011-08-01  Emmanuel Briot  <briot@adacore.com>
16492
16493         * g-expect.adb (Get_Command_Output): Fix memory leak.
16494
16495 2011-08-01  Geert Bosch  <bosch@adacore.com>
16496
16497         * cstand.adb (P_Float_Type): New procedure to print the definition of
16498         predefined fpt types.
16499         (P_Mixed_Name): New procedure to print a name using mixed case
16500         (Print_Standard): Use P_Float_Type for printing floating point types
16501         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
16502         precision IEEE float.
16503
16504 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16505
16506         * sem_ch3.adb: Minor reformatting.
16507
16508 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16509
16510         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
16511         the completion of a generic function, insert the new body rather than
16512         rewriting the original.
16513
16514 2011-08-01  Yannick Moy  <moy@adacore.com>
16515
16516         * sinfo.ads, errout.ads: Typos in comments.
16517
16518 2011-08-01  Robert Dewar  <dewar@adacore.com>
16519
16520         * par-endh.adb: Minor reformatting.
16521
16522 2011-08-01  Robert Dewar  <dewar@adacore.com>
16523
16524         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
16525         (Pre_Post_Aspects): New subtype.
16526         * par-ch12.adb (P_Generic): New syntax for aspects in packages
16527         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
16528         * par-ch7.adb (P_Package): Remove Decl parameter
16529         (P_Package): Handle new syntax for aspects (before IS)
16530         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
16531         new aspect syntax
16532         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
16533         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
16534         (P_Package): Remove Decl parameter
16535         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
16536         aspects
16537         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
16538         specs
16539         * sem_util.ads, sem_util.adb (Static_Boolean): New function
16540         * sinfo.ads: Document new syntax for aspects in packages etc.
16541         * sprint.adb: Handle new syntax of aspects before IS in package
16542
16543 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16544
16545         * atree.ads: Minor reformatting.
16546         * sem_prag.adb: Minor reformatting.
16547
16548 2011-08-01  Robert Dewar  <dewar@adacore.com>
16549
16550         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
16551         case expr alternative.
16552
16553 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16554
16555         * sem_ch12.adb: Fix typo.
16556
16557 2011-08-01  Geert Bosch  <bosch@adacore.com>
16558
16559         * sem_prag.adb (Check_No_Link_Name): New procedure.
16560         (Process_Import_Or_Interface): Use Check_No_Link_Name.
16561         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
16562         instead of Standard_Long_Long_Float_Size global. Preparation for
16563         eventual removal of per type constants.
16564         * exp_util.ads (Get_Stream_Size): New function returning the stream
16565         size value of subtype E.
16566         * exp_util.adb (Get_Stream_Size): Implement new function.
16567         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
16568         function.
16569         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
16570         * einfo.adb:
16571         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
16572
16573 2011-08-01  Geert Bosch  <bosch@adacore.com>
16574
16575         * cstand.adb: Fix comments.
16576         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
16577         count of arguments.
16578
16579 2011-08-01  Robert Dewar  <dewar@adacore.com>
16580
16581         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
16582
16583 2011-08-01  Geert Bosch  <bosch@adacore.com>
16584
16585         * atree.ads: Fix comment.
16586
16587 2011-08-01  Robert Dewar  <dewar@adacore.com>
16588
16589         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
16590         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
16591         * par.adb: Add with for Namet.Sp.
16592         * par-tchk.adb: Minor reformatting.
16593
16594 2011-08-01  Vincent Celier  <celier@adacore.com>
16595
16596         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
16597         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
16598         of the init procedure of a SAL.
16599         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
16600         New procedure.
16601
16602 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16603
16604         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
16605         reformatting.
16606
16607 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16608
16609         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
16610
16611 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16612
16613         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
16614         conformant with its spec (return True only for types that have
16615         an overriding Initialize primitive operation that prevents them from
16616         having preelaborable initialization).
16617         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
16618         initialization for controlled types in Ada 2005 or later mode.
16619
16620 2011-08-01  Robert Dewar  <dewar@adacore.com>
16621
16622         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
16623         Postcondition.
16624         (Same_Aspect): New function.
16625         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
16626         Type_Invariant, Precondition, Postcondition.
16627         * snames.ads-tmpl: Add Name_Type_Invariant.
16628
16629 2011-08-01  Robert Dewar  <dewar@adacore.com>
16630
16631         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
16632         here.
16633         (Freeze_All_Ent): Fix error in handling inherited aspects.
16634         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
16635         already analyzed, but don't skip entire processing of a declaration,
16636         that's wrong in some cases of declarations being rewritten.
16637         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
16638         Don't delay for integer, string literals
16639         Treat predicates in usual manner for delay, remove special case code,
16640         not needed.
16641         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
16642         (Build_Predicate_Function): Update saved expression in aspect
16643         (Build_Invariant_Procedure): Update saved expression in aspect
16644         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
16645         of replacement of discriminant references if the reference is simple.
16646
16647 2011-08-01  Robert Dewar  <dewar@adacore.com>
16648
16649         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
16650         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
16651         Static_Predicate and Dynamic_Predicate.
16652         (Build_Predicate_Function): Add processing for Static_Predicate
16653         and Dynamic_Predicate.
16654         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
16655         (From_Static_Predicate): New flag
16656         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
16657
16658 2011-08-01  Robert Dewar  <dewar@adacore.com>
16659
16660         * usage.adb: Documentation cleanup for Ada version modes in usage.
16661         * expander.adb: Minor reformatting.
16662
16663 2011-08-01  Robert Dewar  <dewar@adacore.com>
16664
16665         * atree.ads: Minor comment fix.
16666         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
16667         a-witeio.ads, sem_prag.adb: Minor reformatting.
16668
16669 2011-08-01  Doug Rupp  <rupp@adacore.com>
16670
16671         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
16672         pointers. Use descrip.h header file for convenience. Add some
16673         comments.
16674
16675 2011-08-01  Robert Dewar  <dewar@adacore.com>
16676
16677         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
16678         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
16679         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
16680         New procedure.
16681         (Check_Aspect_At_End_Of_Declarations): New procedure
16682         (Analye_Aspect_Specification): Minor changes for above procedures
16683         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
16684         specification node as well.
16685
16686 2011-08-01  Pascal Obry  <obry@adacore.com>
16687
16688         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
16689         Windows files. Use GetFilesAttributes() in this case to check for file
16690         existence instead of returning with an error code.
16691
16692 2011-08-01  Vincent Celier  <celier@adacore.com>
16693
16694         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
16695         High is above Source length.
16696
16697 2011-08-01  Robert Dewar  <dewar@adacore.com>
16698
16699         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
16700
16701 2011-08-01  Robert Dewar  <dewar@adacore.com>
16702
16703         * aspects.ads (Boolean_Aspects): New subtype.
16704         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
16705         for derived types in cases where the parent type and derived type have
16706         aspects.
16707         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
16708         with aspects when parent type also has aspects.
16709         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
16710         boolean expression at this point).
16711         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
16712         accordance with final decision on the Ada 2012 feature.
16713         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
16714
16715 2011-08-01  Matthew Heaney  <heaney@adacore.com>
16716
16717         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
16718
16719 2011-08-01  Pascal Obry  <obry@adacore.com>
16720
16721         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
16722         Fix Replace_Slice when High is above current string size.
16723         (Replace_Slice): Fix DL computation when High is above current
16724         string length.
16725
16726 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
16727
16728         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
16729
16730 2011-08-01  Matthew Heaney  <heaney@adacore.com>
16731
16732         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
16733         of node.
16734
16735 2011-08-01  Pascal Obry  <obry@adacore.com>
16736
16737         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
16738         reformatting.
16739
16740 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16741
16742         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
16743         access to protected subprograms in generic bodies.
16744         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
16745         protected type, indicate that the convention of the subprogram is
16746         Convention_Protected, because it may be used in subsequent declarations
16747         within the protected declaration.
16748
16749 2011-08-01  Vincent Celier  <celier@adacore.com>
16750
16751         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
16752         and "final" procedures when the name of the library is "ada", to avoid
16753         duplicate symbols "adainit" and "adafinal" in executables.
16754
16755 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16756
16757         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
16758         quantified expression that appears within a postcondition and uses the
16759         Ada2012 'Result attribute.
16760
16761 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16762
16763         * init.c (__gnat_error_handler): Cast reason to int.
16764         (__gnat_install_handler): Explain sa_sigaction use.
16765
16766 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
16767
16768         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
16769         subprogram has copy-in copy-out parameters, try to promote the mode of
16770         the return type if it is passed in registers.
16771
16772 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
16773
16774         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
16775         left operand as addressable.
16776
16777 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
16778
16779         * gcc-interface/gigi.h (build_function_stub): Remove.
16780         (build_return_expr): Likewise.
16781         (convert_vms_descriptor): Declare.
16782         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
16783         (build_function_stub): Move to...
16784         * gcc-interface/utils2.c (build_return_expr): Move to...
16785         * gcc-interface/trans.c (build_function_stub): ...here.
16786         (build_return_expr): ...here.
16787         (Subprogram_Body_to_gnu): Add local variable for language_function.
16788         Disconnect the parameter attributes cache, if any, once done with it.
16789         Call end_subprog_body only after setting the end_locus.
16790         Build the stub associated with the function, if any, at the very end.
16791         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
16792         variables and streamline control flow.
16793
16794 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
16795
16796         PR ada/49819
16797         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
16798         g-trasym-dwarf.adb.
16799
16800 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16801
16802         PR bootstrap/49794
16803         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
16804         Assign to act.sa_sigaction.
16805         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
16806         current->return_address to char * before arithmetic.
16807
16808 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16809
16810         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
16811         Correct argument types.
16812         Extract code from reason.
16813         (__gnat_install_handler): Assign to act.sa_sigaction.
16814
16815 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
16816
16817         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
16818         (GNAT1_OBJS): ...here.
16819
16820 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
16821
16822         PR ada/48711
16823         * g-socthi-mingw.adb (Fill): Fix formatting.
16824
16825         * gcc-interface/gigi.h: Move around comment.
16826
16827 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
16828
16829         PR ada/46350
16830         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
16831
16832 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
16833
16834         PR ada/48711
16835         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
16836
16837 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
16838
16839         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
16840         range comparison if Pmode is SImode.
16841
16842 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
16843             Eric Botcazou  <ebotcazou@adacore.com>
16844
16845         * adadecode.c: Wrap up in extern "C" block.
16846         * adadecode.h: Likewise.
16847         * adaint.c: Likewise.  Remove 'const' keyword.
16848         * adaint.h: Likewise.
16849         * argv.c: Likewise.
16850         * atree.h: Likewise.
16851         * cio.c: Likewise.
16852         * cstreams.c: Likewise.
16853         * env.c: Likewise.
16854         * exit.c: Likewise.
16855         * fe.h: Likewise.
16856         * final.c: Likewise.
16857         * init.c: Likewise.
16858         * initialize.c: Likewise.
16859         * link.c: Likewise.
16860         * namet.h: Likewise.
16861         * nlists.h: Likewise.
16862         * raise.c: Likewise.
16863         * raise.h: Likewise.
16864         * repinfo.h: Likewise.
16865         * seh_init.c: Likewise.
16866         * targext.c: Likewise.
16867         * tracebak.c: Likewise.
16868         * uintp.h: Likewise.
16869         * urealp.h: Likewise.
16870         * xeinfo.adb: Wrap up generated C code in extern "C" block.
16871         * xsinfo.adb: Likewise.
16872         * xsnamest.adb: Likewise.
16873         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
16874         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
16875         * gcc-interface/misc.c: Likewise.
16876         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
16877         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
16878         ada/targext.o here...
16879         (GNAT_ADA_OBJS): ...and not here.
16880         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
16881         (GNATBIND_OBJS): Reorder.
16882
16883 2011-07-07  Richard Henderson  <rth@redhat.com>
16884
16885         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
16886         dwarf2out_frame_init.
16887
16888 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
16889
16890         * gcc-interface/misc.c (gnat_init): Tweak previous change.
16891
16892 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16893
16894         PR target/39150
16895         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
16896
16897 2011-07-06  Richard Guenther  <rguenther@suse.de>
16898
16899         * gcc-interface/misc.c (gnat_init): Merge calls to
16900         build_common_tree_nodes and build_common_tree_nodes_2.
16901         Re-initialize boolean_false_node.
16902
16903 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
16904             Olivier Hainque  <hainque@adacore.com>
16905             Nicolas Setton  <setton@adacore.com>
16906
16907         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
16908         the type according to the ARTIFICIAL_P parameter.
16909         (create_type_decl): Likewise.
16910         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
16911
16912 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
16913
16914         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
16915         (gnatbind): Likewise.
16916
16917 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16918
16919         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
16920
16921 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
16922
16923         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
16924         local variable throughout.  Remove useless call to Base_Type.
16925         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
16926         Take it also into account for the volatileness of the field.  Set the
16927         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
16928
16929 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
16930
16931         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
16932         on a dereference built for a by-ref object if it has an address clause.
16933
16934 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
16935
16936         * einfo.ads (Address_Taken): Document use for the second argument of
16937         Asm_Input and Asm_Output attributes.
16938         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
16939         argument is an entity name, then set Address_Taken on it.
16940         <Attribute_Asm_Output>: Likewise.
16941         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
16942         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
16943         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
16944         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
16945
16946 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
16947
16948         PR middle-end/46500
16949         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
16950
16951 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
16952
16953         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
16954         (ada/utils.o): Update dependencies.
16955         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
16956         ../../../libcpp/libcpp.a.
16957         * gcc-interface/utils.c: Include common/common-target.h.
16958         (process_attributes): Use targetm_common.have_named_sections.
16959
16960 2011-06-07  Richard Guenther  <rguenther@suse.de>
16961
16962         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
16963         set_sizetype.
16964
16965 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16966
16967         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
16968         TREE_THIS_NOTRAP flag.
16969
16970 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16971
16972         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
16973         Fix thinko.
16974
16975 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16976
16977         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
16978         constants whose full view has discriminants specially.
16979
16980 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16981
16982         * gcc-interface/utils.c: Include diagnostic.h.
16983         (gnat_write_global_declarations): Output debug information for all
16984         global type declarations before finalizing the compilation unit.
16985         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
16986
16987 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
16988
16989         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
16990
16991 2011-05-25  Kai Tietz  <ktietz@redhat.com>
16992
16993         * adaint.c (__gnat_to_canonical_file_list_next): Use array
16994         initialization instead of const/none-const pointer assignment.
16995
16996 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
16997
16998         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
16999         $(EXTRA_GNAT1_OBJS).
17000         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17001         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17002         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17003         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17004         libcommon-target.a instead of prefix.o.
17005
17006 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
17007
17008         PR ada/49097
17009         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17010
17011 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
17012
17013         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17014         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17015         instead of version.o.
17016
17017 2011-05-18  Kai Tietz  <ktietz@redhat.com>
17018
17019         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17020         boolean_false_node instead of integer_zero_node.
17021         (convert_with_check): Likewise.
17022         * gcc-interface/decl.c (choices_to_gnu): Likewise.
17023
17024 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
17025
17026         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17027         type of the parameter is an unconstrained array, convert the actual to
17028         the type of the formal in the In Out and Out cases as well.
17029
17030 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
17031
17032         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17033         call build_function_type_array or build_varargs_function_type_array
17034         instead.
17035         (create_subprog_type): Don't call build_function_type; call
17036         build_function_type_vec instead.
17037
17038 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
17039
17040         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17041         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17042         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17043
17044 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
17045
17046         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17047
17048         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17049         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17050
17051 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
17052
17053         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17054
17055 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
17056
17057         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17058         instead of accessing TYPE_ARG_TYPES directly.
17059         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17060
17061 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17062
17063         PR ada/48844
17064         * gcc-interface/gigi.h (get_variant_part): Declare.
17065         * gcc-interface/decl.c (get_variant_part): Make global.
17066         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17067         types have the same constant size, are record types and T1 has a
17068         variant part while T2 doesn't.
17069
17070 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17071
17072         * gcc-interface/utils.c (begin_subprog_body): Do not call
17073         get_pending_sizes.
17074         (end_subprog_body): Likewise.
17075
17076 2011-05-04  Richard Guenther  <rguenther@suse.de>
17077
17078         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17079         int_const_binop.
17080         (pos_to_constructor): Likewise.
17081
17082 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
17083             Eric Botcazou  <ebotcazou@adacore.com>
17084
17085         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17086         of build_function_type.  Adjust calls to...
17087         (build_raise_check): ...this.  Do not take a void_tree parameter.
17088         Call build_function_type_list instead of build_function_type.
17089         Fix head comment and swap couple of conditional blocks.
17090
17091 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
17092
17093         * gnatvsn.ads (Library_Version): Bump to 4.7.
17094         (Current_Year): Bump to 2011.
17095
17096 2011-04-29  Michael Matz  <matz@suse.de>
17097
17098         * gcc-interface/misc.c (gnat_handle_option): Set
17099         warn_maybe_uninitialized.
17100
17101 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
17102
17103         * gnat_ugn.texi (Complexity Metrics Control): Update link to
17104         the Watson/McCabe paper.
17105
17106 2011-04-23  Jim Meyering  <meyering@redhat.com>
17107
17108         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17109
17110 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
17111
17112         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17113         onto the new type.
17114
17115 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
17116
17117         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17118         parameter.
17119         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
17120         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17121         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17122         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17123         <all>: Do not set flags on the reused DECL node coming from an alias.
17124         Set DECL_IGNORED_P on the DECL node built for subprograms if they
17125         don't need debug info here...
17126         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17127         (gigi): Adjust calls to create_subprog_decl.
17128         (build_raise_check): Likewise.
17129         (establish_gnat_vms_condition_handler): Likewise.
17130         (Compilation_Unit_to_gnu): Likewise.
17131         (gnat_to_gnu): Likewise.
17132
17133 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
17134
17135         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17136         (NO_REORDER_ADAFLAGS): New variable.
17137         (EXTRA_GNATTOOLS): Always define.
17138         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17139         Clean up and adjust list of files compiled with special options.
17140         * gcc-interface/Make-lang.in: Likewise.
17141         (ada/decl.o): Cosmetical change.
17142         (ada/misc.o): Remove dependency on $(PLUGIN_H).
17143
17144 2011-04-20  Jim Meyering  <meyering@redhat.com>
17145
17146         * initialize.c (__gnat_initialize): Remove useless if-before-free.
17147
17148 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
17149
17150         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17151         $(CFLAGS) on the link line.
17152
17153 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
17154
17155         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17156         padded type built for the return type if it is unconstrained.
17157
17158 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
17159
17160         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17161
17162 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
17163
17164         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17165         before calling TREE_CHAIN.
17166         * gcc-interface/misc.c (gnat_init_ts): New function.
17167         (LANG_HOOKS_INIT_TS): Define.
17168
17169 2011-04-12  Martin Jambor  <mjambor@suse.cz>
17170
17171         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17172         instead of cgraph_node.
17173
17174 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
17175
17176         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17177         alignment on fields of the RETURN type built for the Copy-In Copy-Out
17178         mechanism.
17179
17180 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
17181
17182         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17183         of aggregate types that contain a placeholder.
17184
17185 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
17186
17187         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17188         TYPE_ARG_TYPES.
17189         (handle_type_generic_attribute): Likewise.
17190
17191 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
17192
17193         PR ada/47163
17194         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17195
17196 2011-04-04  Kai Tietz  <ktietz@redhat.com>
17197
17198         PR ada/47163
17199         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17200         to flag value.
17201
17202 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17203
17204         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17205         type case, do not strip a padding type around the array type.
17206
17207 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17208
17209         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17210         types.
17211
17212 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17213
17214         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17215         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17216         code for -feliminate-unused-debug-types.
17217         (gnat_post_options): Likewise.
17218
17219 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17220
17221         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17222         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17223         distinct copy.
17224
17225 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17226
17227         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17228         DECL_ARTIFICIAL flag on enumeration types.
17229
17230 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17231
17232         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17233         fat pointer types artificial unconditionally.
17234         <E_Array_Subtype>: Attach the base array type as a parallel type if it
17235         isn't artificial.
17236
17237 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17238
17239         * gcc-interface/gigi.h (get_dummy_type): Declare.
17240         (build_dummy_unc_pointer_types): Likewise.
17241         (finish_fat_pointer_type): Likewise.
17242         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17243         fat pointer type has been built, complete it in place.
17244         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17245         and thin pointers.  Remove useless variable.
17246         (finish_fat_pointer_type): Make global and move to...
17247         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17248         (get_dummy_type): New function.
17249         (build_dummy_unc_pointer_types): Likewise.
17250         (gnat_pushdecl): Propage the name to the anonymous variants only.
17251         (update_pointer_to): Only adjust the pointer types in the unconstrained
17252         array case.
17253
17254 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17255
17256         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17257         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17258         if this is a Taft amendment type and the full declaration is available.
17259         * gcc-interface/trans.c (process_type): Likewise.
17260         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17261         (process_freeze_entity): Likewise.
17262         * gcc-interface/utils.c (dummy_global): New static variable.
17263         (gnat_write_global_declarations): If there are types declared as used
17264         at the global level, insert them in the global hash table.
17265
17266 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17267
17268         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17269         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17270         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17271         copy.
17272         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
17273         flag of the type accordingly.
17274         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17275
17276 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17277
17278         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17279         finalizing types when updating the pointers to the designated type.
17280         <all>: Finalize the deferred types even if we didn't defer processing
17281         of incomplete types in this invocation.
17282
17283 2011-04-01  Olivier Hainque  <hainque@adacore.com>
17284             Nicolas Setton  <setton@adacore.com>
17285             Eric Botcazou  <ebotcazou@adacore.com>
17286
17287         * gcc-interface/misc.c (gnat_descriptive_type): New function.
17288         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17289
17290 2011-03-28  Kai Tietz  <ktietz@redhat.com>
17291
17292         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17293         Windows targets.
17294         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17295         * system-mingw.ads (System): Change ZCX_By_Default default to True.
17296
17297         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17298
17299 2011-03-28  Tristan Gingold  <gingold@adacore.com>
17300
17301         PR ada/44431
17302         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17303         Use ada output of gnatbind.
17304         (ada/b_gnatb.adb): Ditto.
17305         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17306         (ada.mostlyclean, ada.stage1)
17307         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17308         (ada.stagefeedback): Adjust.
17309         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17310         Use ada output of gnatbind.
17311         (b_gnatm.adb): Ditto.
17312         (b_gnatl.o, b_gnatm.o): New rules.
17313
17314 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17315
17316         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17317         for the padded type built to support a specified size or alignment.
17318
17319 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17320
17321         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17322         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17323         unconditionally to the end of the unit when the designated type is
17324         limited_with'ed.
17325         <all>: Rename local variable.  Attempt to un-defer types only and do it
17326         for limited_with'ed types as well.
17327         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
17328         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17329         consistently and remove redundant call to finalize_from_with_types.
17330
17331 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17332
17333         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17334         subprograms without a previous spec declared in the same unit.
17335         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17336         subprograms at the end of the unit instead of at the beginning.
17337         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17338         isn't public for the special handling of non-inline functions nested
17339         inside inline external functions.
17340
17341 2011-03-25  Jeff Law  <law@redhat.com>
17342
17343         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17344
17345 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
17346
17347         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17348         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17349         to compute Set_Size_Depends_On_Discriminant.
17350         (Layout_Type): Call it on array types in back-end layout mode.
17351         * sem_util.adb (Requires_Transient_Scope): Return true for array
17352         types only if the size depends on the value of discriminants.
17353         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17354         type if the RHS is a call to a function that returns an unconstrained
17355         type with default discriminant.
17356
17357 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
17358
17359         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17360         non-conversion to the nominal result type at the end.
17361
17362 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
17363
17364         * gcc-interface/trans.c (create_temporary): New function taken from...
17365         (create_init_temporary): ...here.  Call it.
17366         (call_to_gnu): Create the temporary for the return value early, if any.
17367         Create it for a function with copy-in/copy-out parameters if there is
17368         no target; in other cases of copy-in/copy-out, use another temporary.
17369         Push the new binding level lazily.  Add and rename local variables.
17370
17371 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
17372
17373         * gcc-interface/decl.c (validate_size): Improve comments and tweak
17374         error message.
17375         (set_rm_size): Likewise.
17376
17377 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
17378
17379         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17380         for the padded type built in order to support a specified alignment.
17381         Fix incorrect formatting.
17382
17383 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
17384
17385         PR bootstrap/48216
17386         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
17387
17388 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
17389
17390         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
17391         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
17392         to the end of the list.  Adjust recursive call.  Rename local variable.
17393         If REORDER is true, reorder components of the record type.
17394         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
17395         components_to_record and adjust the parameter list.
17396
17397 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
17398
17399         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
17400         disabled, use the variable for bounds of loop iteration scheme.
17401
17402 2011-03-21  Kai Tietz  <ktietz@redhat.com>
17403
17404         PR target/12171
17405         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
17406
17407 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
17408
17409         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
17410         out whether the expression is read-only.  Short-circuit placeholder
17411         case and rename a couple of local variables.
17412
17413 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
17414
17415         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
17416         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
17417         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
17418         (convert): Deal with conversions from a smaller form type specially.
17419
17420 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
17421
17422         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
17423         its argument, except for the special -I- switch.
17424
17425 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
17426
17427         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
17428         "Ada Issues".
17429
17430 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
17431
17432         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
17433
17434 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
17435
17436         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
17437         GNAT_FORMAL.
17438         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
17439         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
17440         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
17441         Do not generate the check directly, instead instantiate the template
17442         check present in the descriptor.
17443         (make_descriptor_field): Move around.
17444         (build_vms_descriptor32): Build a template check in the POINTER field.
17445         (build_vms_descriptor): Remove useless suffixes.
17446         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
17447
17448 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
17449
17450         PR bootstrap/47467
17451         * targext.c: Include target files if IN_RTS is defined.
17452
17453 2011-01-26  Richard Guenther  <rguenther@suse.de>
17454
17455         PR bootstrap/47467
17456         * targext.c: Include config.h.
17457         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
17458         dependency.
17459
17460 2011-01-04  Pascal Obry  <obry@adacore.com>
17461             Eric Botcazou  <ebotcazou@adacore.com>
17462
17463         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
17464
17465 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
17466
17467         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
17468         end-of-case on the end label and its associated gotos, if any.
17469
17470 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
17471
17472         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
17473         expressions of the parameter cache within the statement group of
17474         the CICO mechanism.
17475
17476 2011-01-04  Olivier Hainque  <hainque@adacore.com>
17477             Eric Botcazou  <ebotcazou@adacore.com>
17478
17479         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
17480         (set_end_locus_from_node): New function.
17481         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
17482         make and the function end_locus.
17483         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
17484         for the elaboration subprogram.
17485         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
17486         set the end_locus of the expression as well.
17487
17488 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
17489
17490         PR ada/47131
17491         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
17492         variables that are referenced in exception handlers volatile.
17493
17494
17495 \f
17496 Copyright (C) 2011 Free Software Foundation, Inc.
17497
17498 Copying and distribution of this file, with or without modification,
17499 are permitted in any medium without royalty provided the copyright
17500 notice and this notice are preserved.