OSDN Git Service

2011-11-04 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-11-04  Robert Dewar  <dewar@adacore.com>
2
3         * sem_prag.adb: Minor reformatting.
4         * gnat_rm.texi: Update documentation for pragma Warnings (Off,
5         "***") usage.
6         * exp_ch2.adb (Expand_Entity_Reference): Only set
7         Atomic_Sync_Required on entities that are variables. Doesn't
8         make any sense on anything else.
9
10 2011-11-04  Robert Dewar  <dewar@adacore.com>
11
12         * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
13         atomic sync to type case.
14         * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
15         apply to types.
16
17 2011-11-04  Robert Dewar  <dewar@adacore.com>
18
19         * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
20         for call vs assign.
21         * gcc-interface/Make-lang.in: Update dependencies.
22
23 2011-11-04  Robert Dewar  <dewar@adacore.com>
24
25         * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
26         compile time.
27
28 2011-11-04  Matthew Heaney  <heaney@adacore.com>
29
30         * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
31         * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
32         a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
33         * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
34         a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
35         a-sulcin.ad[sb]: New files.
36
37 2011-11-04  Geert Bosch  <bosch@adacore.com>
38
39         * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
40         s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
41         i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
42         s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
43         * gcc-interface/Makefile.in: Remove libgnala and related objects.
44
45 2011-11-04  Matthew Heaney  <heaney@adacore.com>
46
47         * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
48         a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
49         a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
50         a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
51         added to package.
52
53 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
54
55         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
56         that the type of the parameters isn't dummy in type_annotate_only mode.
57
58 2011-11-04  Robert Dewar  <dewar@adacore.com>
59
60         * sem_ch12.adb: Minor reformatting
61
62 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
63
64         * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
65         initialize elaboration entities to zero when specs are processed.
66
67 2011-10-28  Iain Sandoe  <iains@gcc.gnu.org>
68             Eric Botcazou  <ebotcazou@adacore.com>
69
70         PR target/50678
71         * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
72         bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
73
74 2011-10-28  Eric Botcazou  <ebotcazou@adacore.com>
75
76         PR ada/50842
77         * gcc-interface/Makefile.in (SYMDEPS): Delete.
78         (LIBICONV): New variable.
79         (LIBICONV_DEP): Likewise.
80         (LIBS): Add $(LIBICONV).
81         (LIBDEPS): Add $(LIBICONV_DEP).
82         (EXTRA_GNATTOOLS_OBJS): Merge into...
83         (TOOLS_LIBS): ...this.  Add $(LIBICONV).
84
85 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
86
87         * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
88         variable.  Always create the elaboration variable, if any, as constant.
89
90 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
91
92         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
93         make a packable type for fields of union types as well.
94         <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
95         (gnat_to_gnu_component_type): Try to make a packable type for fields
96         of union types as well.
97         (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
98         (maybe_pad_type): Try to make a packable type for fields of union types
99         as well.
100         (gnat_to_gnu_field): Likewise.
101         (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
102         (set_rm_size): Likewise.
103         (rm_size): Likewise.
104         * gcc-interface/misc.c (gnat_type_max_size): Likewise.
105         * gcc-interface/trans.c (add_decl_expr): Likewise.
106         * gcc-interface/utils.c (finish_record_type): Likewise.
107         * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
108
109 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
110
111         * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
112         declared as atomic.  Move around conditionally executed code.
113
114 2011-10-24  Robert Dewar  <dewar@adacore.com>
115
116         * sem.adb (Initialize): Fix bug that blew up if called a second time.
117
118 2011-10-24  Robert Dewar  <dewar@adacore.com>
119
120         * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
121         tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
122
123 2011-10-24  Robert Dewar  <dewar@adacore.com>
124
125         * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
126         name in error msg.
127
128 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
129
130         * gnat_rm.texi: Add an entry for restriction No_Finalization.
131
132 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
133
134         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
135         current instance is within the one that contains the generic,
136         the freeze node for the current one must appear in the current
137         declarative part. Ditto if the current instance is within another
138         package instance. In both of these cases the freeze node of the
139         previous instance is not relevant.
140
141 2011-10-24  Gary Dismukes  <dismukes@adacore.com>
142
143         * switch-m.adb (Normalize_Compiler_Switches): Add recognition
144         of AAMP-specific switches -univ and -aamp_target.
145
146 2011-10-24  Robert Dewar  <dewar@adacore.com>
147
148         * a-tienau.adb (Put): Deal properly with limited line length.
149
150 2011-10-24  Robert Dewar  <dewar@adacore.com>
151
152         * sem_warn.adb, sem_ch12.adb: Minor reformatting.
153
154 2011-10-24  Tristan Gingold  <gingold@adacore.com>
155
156         * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
157         on AIX.
158
159 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
160
161         * sem_ch12.adb (Earlier): make available globally. If both
162         nodes have the same sloc, the freeze node that does not come
163         from source is the later one.
164         (True_Parent): Make available globally.
165         (Previous_Instance): Subsidiary of
166         Insert_Freeze_Node_For_Instance, to check whether the generic
167         parent of the current instance is declared within a previous
168         instance in the same unit or declarative  part, in which case the
169         freeze nodes of both instances must appear in order to prevent
170         elaboration problems in gigi.
171         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
172         freeze point, and the freeze node of a preceding instantiation
173         must be inserted before it.
174
175 2011-10-24  Robert Dewar  <dewar@adacore.com>
176
177         * checks.ads, checks.adb: Add handling of Synchronization_Check
178         * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
179         atomic sync).
180         * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
181         flag Minor code reorganization.
182         * opt.ads (Warn_On_Atomic_Synchronization): New switch.
183         * par-prag.adb: Add dummy entries for pragma
184         Disable/Enable_Atomic_Synchronization.
185         * sem_prag.adb (Process_Suppress_Unsuppress): Handle
186         case of Atomic_Synchronization specially (not suppressed
187         by All_Checks, cannot be set from Source).
188         (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
189         * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
190         * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
191         entry for pragma Disable/Enable_Atomic_Synchronization
192         * switch-c.adb: The -gnatp switch does not disable
193         Atomic_Synchronization Add -gnatep switch to disable
194         Atomic_Synchronization.
195         * types.ads: Add entry for Synchronization_Check
196         * usage.adb: Add line for -gnated switch
197         * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
198
199 2011-10-24  Geert Bosch  <bosch@adacore.com>
200
201         * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
202         at Integer'First.
203
204 2011-10-24  Robert Dewar  <dewar@adacore.com>
205
206         * sem_ch12.adb, s-gearop.adb: Minor reformatting.
207
208 2011-10-24  Robert Dewar  <dewar@adacore.com>
209
210         * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
211         * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
212
213 2011-10-24  Emmanuel Briot  <briot@adacore.com>
214
215         * prj-proc.adb (Process_Expression_Variable_Decl): No special
216         handling for Project_Path unless it is an attribute.
217
218 2011-10-24  Javier Miranda  <miranda@adacore.com>
219
220         * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
221         (Install_Hidden_Primitives): New subprogram.
222         (Restore_Hidden_Primitives): New subprogram.
223         (Analyze_Formal_Package_Declaration,
224         Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
225         Invoke Check_Hidden_Primitives after every call to
226         Analyze_Associations, and invoke Restore_Hidden_Primitives to
227         restore their visibility after processing the instantiation.
228         (Instantiate_Package_Body): Install visible primitives before
229         analyzing the instantiation and uninstall them to restore their
230         visibility when the instantiation has been analyzed.
231         * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
232         (Remove_Suffix): New subprogram
233         * sem_ch3.adb (Derive_Subprogram): When handling
234         a derived subprogram for the instantiation of a formal derived
235         tagged type, inherit the dispatching attributes from the actual
236         subprogram (not from the parent type).
237
238 2011-10-24  Vasiliy Fofanov  <fofanov@adacore.com>
239
240         * gnat_ugn.texi: Document explicit use of XDECGNAT library.
241
242 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
243
244         * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
245         update its uses.
246         (Build_Discriminant_Assignments): Add local variable D_Loc and update
247         its uses.
248         (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
249         Var_Loc and update their uses.
250         (Build_Record_Init_Proc): Code reformatting.
251         (Increment_Counter): Add formal parameter Loc.
252         (Make_Counter): Add formal parameter Loc.
253
254 2011-10-24  Eric Botcazou  <ebotcazou@adacore.com>
255
256         * sem_disp.adb (Covers_Some_Interface): Fix typo.
257
258 2011-10-24  Matthew Heaney  <heaney@adacore.com>
259
260         * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
261         of predicate.
262
263 2011-10-24  Yannick Moy  <moy@adacore.com>
264
265         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
266         Translate arguments in positional notation into pragma argument
267         association arguments for the generated pragma.
268
269 2011-10-24  Arnaud Charlet  <charlet@adacore.com>
270
271         * exp_ch5.adb: Fix minor typo.
272
273 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
274
275         * sem_ch3.adb (Is_Visible_Component): Refine predicate for
276         the case of a component reference in an instance body, when the
277         enclosing type is private.
278
279 2011-10-24  Sergey Rybin  <rybin@adacore.com frybin>
280
281         * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
282         driver for getting the project support into gnatelim section.
283
284 2011-10-24  Robert Dewar  <dewar@adacore.com>
285
286         * gnat_rm.texi: Minor correction to documentation on address clause.
287
288 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
289
290         * s-finmas.adb (Attach): Synchronize and call the unprotected version.
291         (Attach_Unprotected): New routine.
292         (Delete_Finalize_Address): Removed.
293         (Delete_Finalize_Address_Unprotected): New routine.
294         (Detach): Synchronize and call the unprotected version.
295         (Detach_Unprotected): Remove locking.
296         (Finalize): Add various comment on synchronization. Lock the critical
297         region and call the unprotected versions of routines.
298         (Finalize_Address): Removed.
299         (Finalize_Address_Unprotected): New routine.
300         (Set_Finalize_Address): Synchronize and call
301         the unprotected version.
302         (Set_Finalize_Address_Unprotected): New routine.
303         (Set_Heterogeneous_Finalize_Address): Removed.
304         (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
305         (Set_Is_Heterogeneous): Add comment on synchronization and
306         locking.
307         * s-finmas.ads: Flag Finalization_Started is no longer atomic
308         because synchronization uses task locking / unlocking.
309         (Attach): Add comment on usage.
310         (Attach_Unprotected): New routine.
311         (Delete_Finalize_Address): Renamed to
312         Delete_Finalize_Address_Unprotected.
313         (Detach): Add comment on usage.
314         (Detach_Unprotected): New routine.
315         (Finalize_Address): Renamed to Finalize_Address_Unprotected.
316         (Set_Finalize_Address): Add comment on usage.
317         (Set_Finalize_Address_Unprotected): New routine.
318         (Set_Heterogeneous_Finalize_Address): Renamed to
319         Set_Heterogeneous_Finalize_Address_Unprotected.
320         * s-stposu.adb (Allocate_Any_Controlled): Add local variable
321         Allocation_Locked. Add various comments on synchronization. Lock
322         the critical region and call the unprotected version of
323         routines.
324         (Deallocate_Any_Controlled): Add various comments on
325         synchronization. Lock the critical region and call the unprotected
326         version of routines.
327
328 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
329
330         * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
331         are universal and must carry the corresponding type.
332         * sem_eval.adb (Check_Non_Static_Context): If the type of the
333         expression is universal real, as may be the case for a fixed point
334         expression with constant operands in the context of a conversion,
335         there is nothing to check.
336         * s-finmas.adb: Minor reformatting
337
338 2011-10-23  Eric Botcazou  <ebotcazou@adacore.com>
339
340         * gcc-interface/decl.c (create_concat_name): Add explicit cast.
341
342 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
343
344         * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
345         TRACE): Reintroduce.
346         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
347         ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
348
349 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
350
351         * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
352         (unchecked_conversion_nop): Use it.
353         (gnat_to_gnu): Likewise.
354
355 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
356
357         * back_end.adb (Call_Back_End): Pass the maximum logical line number
358         instead of the maximum physical line number to gigi.
359         * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
360
361 2011-10-16  Tom Tromey  <tromey@redhat.com>
362             Dodji Seketeli  <dodji@redhat.com>
363
364         * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
365         public ordinary map interface.
366
367 2011-10-16  Tristan Gingold  <gingold@adacore.com>
368
369         * link.c (_AIX): Add support for GNU ld.
370
371 2011-10-16  Fedor Rybin  <frybin@adacore.com>
372
373         * gnat_ugn.texi: Fixing gnattest example names in the doc.
374         Adding explanation to additional tests usage.
375
376 2011-10-16  Robert Dewar  <dewar@adacore.com>
377
378         * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
379
380 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
381
382         * a-convec.adb: Fix minor inconsistencies.
383
384 2011-10-16  Matthew Heaney  <heaney@adacore.com>
385
386         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
387         Implementation): Specify pragma Implementation_Defined.
388
389 2011-10-15  Nicolas Roche  <roche@adacore.com>
390
391         * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
392         either rtp-smp or ravenscar-cert-rtp runtimes.
393
394 2011-10-15  Bob Duff  <duff@adacore.com>
395
396         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
397         Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
398         is available.
399         (Expand_N_Extended_Return_Statement): Do not create a renaming of the
400         build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
401         available.
402         (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
403         pool only if RE_Root_Storage_Pool_Ptr is available.
404         (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
405         pool actual unless RE_Root_Storage_Pool_Ptr is available.
406         * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
407         formal only if RE_Root_Storage_Pool_Ptr is available.
408
409 2011-10-15  Matthew Heaney  <heaney@adacore.com>
410
411         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
412         type): Specify Priority aspect for protected type.
413
414 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
415
416         * exp_disp.adb (Check_Premature_Freezing): If an untagged type
417         is a generic actual, it is a subtype of a type that was frozen
418         by the instantiation, and even if not marked frozen it does not
419         affect the construction of the dispatch table.
420
421 2011-10-14  Robert Dewar  <dewar@adacore.com>
422
423         * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
424         reformatting.
425         * s-rident.ads: Add missing Compiler_Unit pragma.
426
427 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
428
429         * sem_res.adb: Minor reformatting.
430
431 2011-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
432
433         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
434         Code and comment reformatting. Use BIP_Task_Master
435         when creating a _master.
436         (BIP_Formal_Suffix): Code reformatting. Correct the case for
437         BIP_Task_Master.
438         (Make_Build_In_Place_Call_In_Object_Declaration): Use
439         BIP_Task_Master when creating a reference to the enclosing
440         function's _master formal.
441         (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
442         to the _master.
443         * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
444         (Needs_BIP_Finalization_Master): Alphabetized.
445         * sem_ch6.adb (Create_Extra_Formals): Update the usage of
446         BIP_Task_Master.
447
448 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
449
450         * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
451         reject an aliased keyword on the object declaration of an extended
452         return statement. In older versions of the language indicate
453         that this is illegal in the standard.
454
455 2011-10-14  Pascal Obry  <obry@adacore.com>
456
457         * sem_util.adb, sem_ch4.adb: Minor reformatting.
458
459 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
460
461         * sem_ch13.adb: Recognize properly procedure calls that are
462         transformed into code statements.
463
464 2011-10-14  Vincent Celier  <celier@adacore.com>
465
466         * projects.texi: Minor fix in project example.
467
468 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
469
470         * sem_util.adb: Return objects are aliased if their type is
471         immutably limited as per AI05-0053.
472
473 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
474
475         * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
476         expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
477         Short_Circuit_And_Or expansion code (moved to sem_res).
478         * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
479         "and" and "or" operators as short-circuit "and then" and "or
480         else", when pragma Short_Circuit_And_Or is active.
481
482 2011-10-13  Robert Dewar  <dewar@adacore.com>
483
484         * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
485         sem_ch6.adb, exp_ch3.adb: Minor reformatting.
486
487 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
488
489         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
490
491 2011-10-13  Jerome Guitton  <guitton@adacore.com>
492
493         * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
494
495 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
496
497         * a-convec.ads (Cursor): Minor reformatting.
498         * a-convec.adb (Next): Fix minor inconsistencies.
499         (Previous): Likewise.
500
501 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
502
503         * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
504         New predicate to determine whether some operations on an array
505         type are available when the full view of its component may differ
506         from the view of the point of the array declaration.
507         * sem_ch4.adb (Find_Equality_Types): Use
508         Available_Full_View_Of_Component.
509         * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
510
511 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
512
513         * sem_ch9.adb: Analyze aspects while discriminants of protected
514         type are visible.
515
516 2011-10-13  Geert Bosch  <bosch@adacore.com>
517
518         * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
519         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
520         longer depend on an external library.
521         * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
522         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
523         Update dependencies.
524         * gcc-interface/Make-lang.in: Update dependencies. 
525
526 2011-10-13  Cyrille Comar  <comar@adacore.com>
527
528         * gnat_ugn.texi: Minor editing.
529
530 2011-10-13  Vincent Celier  <celier@adacore.com>
531
532         * projects.texi: Add documentation on packages and attributes
533         that are inherited from a project being extended into the
534         extended project.
535
536 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
537
538         * exp_ch3.adb (Build_Master): Rewritten.
539         (Expand_N_Full_Type_Declaration): Reformat the declarative
540         region. Update the call to Build_Master_Renaming.
541         (Expand_Previous_Access_Type): Rewritten.
542         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
543         Add local constant Result_Subt and update related usage.
544         (Expand_N_Extended_Return_Statement): Add local constant
545         Result_Subt and update related usage.
546         * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
547         new context detection mechanism.
548         (Build_Class_Wide_Master):
549         Use Insert_Action to add the renaming into the tree.
550         (Build_Master_Entity): Rewritten to use the new context detection
551         mechanism.
552         (Build_Master_Renaming): Add formal parameter Ins_Nod
553         and related usage. Use Insert_Action to add the renaming into the
554         tree.
555         (Find_Enclosing_Context): New subsidiary routine. Rather
556         than relying on enclosing scopes, this routine looks at the
557         tree structure to figure out the proper context for a _master
558         or a _chain. This approach eliminates the issues with transient
559         scopes which have not been converted into blocks.
560         * exp_ch9.ads (Build_Master_Entity): Change parameter profile
561         to better reflect the new usage. Update the related comment.
562         (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
563         the comment on usage.
564         * sem_ch3.adb (Access_Definition): Update the calls to
565         Build_Master_Entity and Build_Master_Renaming.
566         * sem_ch6.adb (Create_Extra_Formals): Add local variable
567         Full_Subt. Code reformatting.
568         * sem_util.adb (Is_Iterator): Alphabetized.
569         (Is_LHS): Alphabetized.
570         (Is_Limited_Class_Wide_Type): New routine.
571         * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
572
573 2011-10-13  Geert Bosch  <bosch@adacore.com>
574
575         * a-ngrear.adb (Solve): Make generic and move to
576         System.Generic_Array_Operations.
577         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
578         New generic solvers to  compute a vector resp. matrix Y such
579         that A * Y = X, approximately.
580         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
581         Implement using Forward_Eliminate and Back_Substitute
582         * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
583         on BLAS and LAPACK.
584         * a-ngcoar.ads ("abs"): Fix return type to be real.
585
586 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
587
588         PR ada/50589
589         * s-linux-alpha.ads: Do not "with" Interfaces.C.
590         * s-linux-sparc.ads: Likewise.
591
592 2011-10-13  Geert Bosch  <bosch@adacore.com>
593
594         * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
595         returning a Real.
596         * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
597         and use formal.
598         * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
599         new profile.
600
601 2011-10-13  Geert Bosch  <bosch@adacore.com>
602
603         * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
604         move to System.Generic_Array_Operations.
605
606 2011-10-13  Geert Bosch  <bosch@adacore.com>
607
608         * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
609         * s-gearop.ads (L2_Norm): Change profile to be suitable for
610         Complex_Vector
611         * s-gearop.adb (L2_Norm): Reimplement using direct definition,
612         not inner product
613
614 2011-10-13  Robert Dewar  <dewar@adacore.com>
615
616         * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
617         prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
618         sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
619         par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
620         par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
621         exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
622
623 2011-10-13  Geert Bosch  <bosch@adacore.com>
624
625         * s-gearop.adb: Minor comment additions.
626
627 2011-10-13  Fedor Rybin  <frybin@adacore.com>
628
629         * gnat_ugn.texi: Add gnattest section.
630
631 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
632
633         * freeze.adb: Do not create body of renaming if declaration has
634         errors.
635
636 2011-10-13  Olivier Hainque  <hainque@adacore.com>
637
638         * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
639         further, to the ppc+kernel case only.
640
641 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
642
643         * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
644         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
645         Do not create a pool formal on .NET/JVM.
646         (Expand_N_Extended_Return_Statement): Alphabetize local
647         variables. Do not create a renaming of the build-in-place pool
648         parameter on .NET/JVM.  (Make_Build_In_Place_Call_In_Allocator):
649         Add the user-defined pool only on non-VM targets.
650         (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
651         local variables.  Do not add a pool actual on .NET/JVM.
652         * sem_ch6.adb: Add with and use clause for Targparm.
653         (Create_Extra_Formals): Add build-in-place pool formal only on
654         non-VM targets.
655         * rtsfind.ads: Alphabetize entries.
656
657 2011-10-13  Sergey Rybin  <rybin@adacore.com>
658
659         * gnat_ugn.texi: Minor correction.
660
661 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
662
663         * sem_ch8.adb: Minor error message improvement.
664
665 2011-10-13  Robert Dewar  <dewar@adacore.com>
666
667         * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
668
669 2011-10-13  Gary Dismukes  <dismukes@adacore.com>
670
671         * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
672         of a for loop for an enumeration type with an enumeration rep
673         clause, which involves moving the original loop parameter into
674         a nested block, the loop parameter's entity must be removed from
675         the entity list of the loop scope.
676
677 2011-10-13  Bob Duff  <duff@adacore.com>
678
679         * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
680         that gets passed in the same cases where BIP_Alloc_Form is passed
681         (caller-unknown-size results). BIP_Storage_Pool is used when
682         BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
683         to the user-defined storage pool is passed at the call site,
684         and this pool is used in callee to allocate the result.
685         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
686         version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
687         the additional BIP_Storage_Pool actual.
688         (Expand_N_Extended_Return_Statement): Allocate the function
689         result using the user-defined storage pool, if BIP_Alloc_Form =
690         User_Storage_Pool.
691         * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
692         * exp_ch4.adb: Don't overwrite storage pool set by
693         Expand_N_Extended_Return_Statement.
694         * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
695         for use in build-in-place function calls within allocators
696         where the access type has a user-defined storage pool.
697
698 2011-10-13  Sergey Rybin  <rybin@adacore.com>
699
700         * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
701         literal casing.
702
703 2011-10-13  Nicolas Roche  <roche@adacore.com>
704
705         * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
706         with 'rtp'.
707
708 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
709
710         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
711         account that an unchecked union type can be limited.
712
713 2011-10-13  Olivier Hainque  <hainque@adacore.com>
714
715         * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
716         the use of the signal trampoline for PPC in the sjlj case as well.
717         Add legitimate casts, preventing compile time warnings on the
718         (sighandler *) profile.
719
720 2011-10-13  Yannick Moy  <moy@adacore.com>
721
722         * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
723         in Alfa mode.
724
725 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
726
727         * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
728         expressions are legal limited return values if each one of their
729         dependent expressions are legal.
730
731 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
732
733         * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
734         if the prefix of the call is a qualified expression, rewrite as
735         a code statement.
736         * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
737         code statement is legal if it is a rewriting of a procedure call.
738
739 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
740
741         * exp_aggr.adb (Flatten): If a component association has a box,
742         assume that aggregate is not static.
743         (Safe_Aggregate): If a component association in a non-limited
744         aggregate has a box, assume that it cannot be expanded in place.
745
746 2011-10-13  Vincent Celier  <celier@adacore.com>
747
748         * prj-conf.adb (Get_Or_Create_Configuration_File): Call
749         Process_Project_Tree_Phase_1 with Packages_To_Check.
750         (Process_Project_And_Apply_Config): Ditto
751         * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
752         Remove default for argument Packages_To_Check.
753         * prj-proc.adb (Recursive_Process): New argument
754         Packages_To_Check.
755         (Process): Ditto.
756         (Process_Project_Tree_Phase_1): Ditto.
757         (Recursive_Project.Process_Aggregated_Projects): Call
758         Prj.Part.Parse and Process_Project_Tree_Phase_1 with
759         Packages_To_Check.
760         * prj-proc.ads (Process): New argument Packages_To_Check
761         (Process_Project_Tree_Phase_1): Ditto
762
763 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
764
765         * gcc-interface/Makefile.in: Fix typo.
766
767 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
768
769         * sem_ch12.adb (Analyze_Formal_{Floating_Type,
770         Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
771         Use sloc of defining identifier of farmal type declaration,
772         as sloc of generated internal entity, to prevent misplaced
773         references in ali.
774
775 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
776
777         * sem_intr.adb (Check_Intrinsic_Operator): Check that type
778         is fully defined before checking that it is a numeric type.
779
780 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
781
782         * sem_aggr.adb (Resolve_Record_Aggregate): If a component
783         association for component X has a box, then X is covered in the
784         aggregate even if there is not default value for X in the type
785         declaration, and X has to be default-initialized.
786
787 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
788
789         * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
790         literals as referenced only if reference is in current source unit.
791
792 2011-10-13  Matthew Heaney  <heaney@adacore.com>
793
794         * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
795
796 2011-10-13  Olivier Hainque  <hainque@adacore.com>
797
798         * sigtramp.h: New file.  Prototype and spec of the signal
799         trampoline to be called by an established handler to provide
800         dwarf call frame info before the real signal processing code.
801         * sigtramp-ppcvxw.c: New file.  Implementation of the signal
802         trampoline for ppc-vxworks.
803         * init.c (vxworks section): Use it for ppc.
804
805 2011-10-13  Thomas Quinot  <quinot@adacore.com>
806
807         * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
808         (Check_Future_Identifier): New subprogram,
809         factors duplicated code from Par.Ch2.P_Identifier and
810         Par.Ch3.P_Defining_Identifier.
811
812 2011-10-13  Thomas Quinot  <quinot@adacore.com>
813
814         * s-taprop-posix.adb (Initialize): Always raise Storage_Error
815         if we fail to initialize CV attributes or CV.
816
817 2011-10-13  Thomas Quinot  <quinot@adacore.com>
818
819         * s-tasren.adb (Timed_Selective_Wait, case
820         Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
821         we know abortion is already deferred.
822
823 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
824
825         * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
826         (Build_Master_Renaming (function)): Removed.
827         (Build_Master_Renaming (procedure)): Moved to exp_ch9.
828         (Expand_Full_Type_Declaration): Alphabetize
829         variables. Reformatting of code and comments. Rewrite the
830         section on processing of anonymous access-to-task types in
831         record components.
832         * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
833         (Build_Master_Renaming): Moved to exp_ch9.
834         * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
835         (Build_Master_Entity): Add formal parameter
836         Use_Current. Reformatting of code and comments.
837         (Build_Master_Renaming): Moved from exp_ch3.
838         * exp_ch9.ads (Build_Class_Wide_Master): Moved from
839         exp_ch3. Update comment on usage.
840         (Build_Master_Entity):
841         Add formal parameter Use_Current. Update comment on usage.
842         (Build_Master_Renaming): Moved from exp_ch3.
843         * sem_ch3.adb (Access_Definition): Remove redundant code to
844         create a _master and a renaming.
845
846 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
847
848         * lib-xref.adb: Do no emit reference to overridden operation,
849         if it is internally generated.
850
851 2011-10-13  Vincent Celier  <celier@adacore.com>
852
853         * bindgen.adb: Remove any processing related to g-trasym
854         * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
855         * mlib-prj.adb: Remove any processing related to g-trasym.
856
857 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
858
859         * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
860         * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
861         (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
862         (ADA_FLAGS_TO_PASS): Likewise.
863         (COMMON_FLAGS_TO_PASS): New.
864         (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
865         native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
866         (gnatlib): Use COMMON_FLAGS_TO_PASS.
867         (ada.install-common): Likewise.
868         (install-gnatlib): Likewise.
869         (install-gnatlib-obj): Likewise.
870         (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
871         (gnat-cross): Delete.
872         (gnatboot): Likewise.
873         (gnatboot2): Likewise.
874         (gnatboot3): Likewise.
875         (gnatstage1): Likewise.
876         (gnatstage2): Likewise.
877         * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
878         (MOST_ADAFLAGS): Likewise.
879         (LOOSE_CFLAGS): Likewise.
880         (gnat-cross): Likewise.
881         (GNATLIBFLAGS): Add -W -Wall.
882         (GNATLIBCFLAGS_FOR_C): Likewise.
883         * gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
884         * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
885
886 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
887
888         * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
889         (push_range_check_info): Likewise.
890         (gnat_to_gnu) <N_Code_Statement>: Likewise.
891         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
892         (gnat_invariant_expr): Likewise.
893         * gcc-interface/utils.c (compute_related_constant): Likewise.
894         (max_size): Fix handling of SAVE_EXPR.
895         (remove_conversions): Fix formatting.
896
897 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
898
899         * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
900         (DECL_INDUCTION_VAR): New macro.
901         (SET_DECL_INDUCTION_VAR): Likewise.
902         * gcc-interface/gigi.h (convert_to_index_type): Declare.
903         (gnat_invariant_expr): Likewise.
904         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
905         parameter, set DECL_LOOP_PARM_P on it.
906         * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
907         is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
908         * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
909         (struct range_check_info_d): New type.
910         (struct loop_info_d): Likewise.
911         (gnu_loop_stack): New stack.
912         (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
913         built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
914         is set, do not test DECL_RENAMED_OBJECT.
915         (push_range_check_info): New function.
916         (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
917         the label.  Reference the label and the iteration variable from it.
918         Build the special induction variable in the unsigned version of the
919         size type, if it is larger than the base type.  And attach it to the
920         iteration variable if the latter isn't by-ref.  In the iteration scheme
921         case, initialize the invariant conditions in front of the loop if
922         deemed profitable.  Use gnu_loop_stack.
923         (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
924         <N_Raise_Constraint_Error>: Always process the reason.  In the range
925         check and related cases, and if loop unswitching is enabled, compute
926         invariant conditions and push this information onto the stack.
927         Do not translate again the condition if it has been already translated.
928         * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
929         DECL_LOOP_PARM_P isn't set.
930         (convert_to_index_type): New function.
931         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
932         to convert the index from the base index type to sizetype.
933         (gnat_invariant_expr): New function.
934
935 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
936
937         * gcc-interface/utils.c (def_builtin_1): Delete old interface with
938         two parallel arrays to hold standard builtin declarations, and
939         replace it with a function based interface that can support
940         creating builtins on the fly in the future.
941         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
942         (gnat_to_gnu): Ditto.
943
944 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
945
946         PR lto/50492
947         * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
948         * gcc-interface/utils.c (global_context): New variable.
949         (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
950         that are either public external or at top level.  Use "No" macro.
951         (end_subprog_body): Call decl_function_context.
952         (rest_of_subprog_body_compilation): Likewise.
953
954 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
955
956         * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
957         (rest_of_subprog_body_compilation): Likewise.
958         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
959         test for useless conversions by means of gnat_useless_type_conversion.
960         * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
961         (language_function): Add named_ret_val and other_ret_val.
962         (f_named_ret_val): New macro.
963         (f_other_ret_val): Likewise.
964         (gigi): Call rest_of_subprog_body_compilation.
965         (struct nrv_data): New structure.
966         (is_nrv_p): New predicate.
967         (prune_nrv_r): New helper function.
968         (prune_nrv_in_block): New function.
969         (finalize_nrv_r): New helper function.
970         (finalize_nrv): New function.
971         (return_value_ok_for_nrv_p): New predicate.
972         (build_return_expr): If optimization is enabled, record candidates for
973         the Named Return Value optimization.
974         (build_function_stub): Call rest_of_subprog_body_compilation.
975         (Subprogram_Body_to_gnu): If optimization is enabled and there are
976         candidates, finalize the Named Return Value optimization.
977         Call rest_of_subprog_body_compilation.
978         (call_to_gnu): At the end, if a return value is needed, simplify the
979         result before wrapping it up in a COMPOUND_EXPR.
980         * gcc-interface/utils.c (end_subprog_body): Split into...
981         (rest_of_subprog_body_compilation): ...this.  New function.
982         (gnat_useless_type_conversion): Likewise.
983
984 2011-10-06  Thomas Quinot  <quinot@adacore.com>
985
986         * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
987         exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
988         g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
989         par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
990         sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
991         sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
992         s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
993         * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
994
995 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
996
997         * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
998         references.
999
1000 2011-10-06  Matthew Heaney  <heaney@adacore.com>
1001
1002         * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
1003         (Dequeue_Only_High_Priority): Protected procedure now implemented.
1004
1005 2011-10-06  Vincent Celier  <celier@adacore.com>
1006
1007         * g-trasym.adb: Replace old implementation with the default
1008         implementation that returns list of addresses as "0x...".
1009         * g-trasym.ads: Update the list of platforms with the full
1010         capability.  Indicate that there is a default implementation
1011         for other platforms.
1012         * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
1013         * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
1014         is now a default implementation for all platforms without the full
1015         capability.
1016
1017 2011-10-06  Robert Dewar  <dewar@adacore.com>
1018
1019         * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
1020         a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
1021         a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
1022         reorganization (use conditional expressions).
1023
1024 2011-10-06  Robert Dewar  <dewar@adacore.com>
1025
1026         * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
1027         floating divide by zero.
1028
1029 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
1030
1031         * sem_ch6.adb: Limited interfaces that are not immutably limited
1032         are OK in return statements.
1033
1034 2011-09-30  Iain Sandoe  <iains@gcc.gnu.org>
1035
1036         * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
1037         change to powerpc section.
1038
1039 2011-09-29  Iain Sandoe  <iains@gcc.gnu.org>
1040
1041         * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
1042         across the port.
1043
1044 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1045
1046         * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
1047         a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
1048         a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
1049         indefinite sets.
1050         * a-coorma.ads: Minor reformmating.
1051         * einfo.ads: Improve the comment describing the
1052         Directly_Designated_Type function.
1053         * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
1054         ordered maps.
1055         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1056         dependencies.
1057
1058 2011-09-27  Robert Dewar  <dewar@adacore.com>
1059
1060         * a-comutr.ads: Minor reformatting.
1061
1062 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1063
1064         * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
1065         iterators to multiway trees.
1066
1067 2011-09-27  Yannick Moy  <moy@adacore.com>
1068
1069         * debug.adb (d.D): New option for strict Alfa mode.
1070         * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1071         permissions as strictly as possible.
1072         * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1073         Alfa mode, now, interpret ranges of base types like GNAT does; in
1074         strict mode, simply change the range of the implicit base Itype.
1075         * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1076
1077 2011-09-27  Robert Dewar  <dewar@adacore.com>
1078
1079         * exp_ch9.adb: Minor comment fixes.
1080
1081 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1082
1083         * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1084         trees.
1085
1086 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
1087
1088         * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1089         instead of Directly_Designated_Type in the indirect array case.
1090
1091 2011-09-27  Robert Dewar  <dewar@adacore.com>
1092
1093         * exp_util.adb, exp_aggr.adb: Minor reformatting.
1094
1095 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1096
1097         * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1098         on subtype declarations.
1099         * exp_aggr.adb: Minor comment update.
1100
1101 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
1102
1103         * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1104         test in the N_Explicit_Dereference case.  Fold double logical
1105         negation in the special loop case and conditionalize it on
1106         Variable_Ref being true.
1107
1108 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1109
1110         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1111         single protected object and the selector is a discriminant or an
1112         entry family, this is a non-overloaded candidate interpretation,
1113         and possible primitive operations of the type must not be
1114         examined.
1115
1116 2011-09-27  Arnaud Charlet  <charlet@adacore.com>
1117
1118         * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1119
1120 2011-09-27  Pascal Obry  <obry@adacore.com>
1121
1122         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1123         s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1124         Add dummy definitions for pthread_rwlock_t
1125         and pthread_rwlockattr_t on all POSIX platforms.
1126         * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1127         reference.
1128         (Finalize_Lock): Likewise.
1129         (Write_Lock): Likewise.
1130         (Unlock): Likewise.
1131
1132 2011-09-27  Tristan Gingold  <gingold@adacore.com>
1133
1134         * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1135         windows 64.
1136
1137 2011-09-27  Pascal Obry  <obry@adacore.com>
1138
1139         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1140         s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1141         s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1142         s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1143         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1144         s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1145         s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1146         s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1147         s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1148         s-taprop-posix.adb: Revert previous changes.
1149         (Lock): Now a record containing the two possible lock
1150         (mutex and read/write) defined in OS_Interface.
1151         * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1152         'R' locking policy.
1153         (Initialize_Protection): Likewise.
1154         (Lock): Likewise.
1155         (Lock_Read_Only): Likewise.
1156         (Unlock): Likewise.
1157
1158 2011-09-27  Pascal Obry  <obry@adacore.com>
1159
1160         * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1161         OS_Interface.pthread_rwlock_t.
1162
1163 2011-09-27  Robert Dewar  <dewar@adacore.com>
1164
1165         * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1166         a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1167         sem_ch5.adb, sem_util.adb: Minor reformatting.
1168
1169 2011-09-27  Pascal Obry  <obry@adacore.com>
1170
1171         * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1172         (Finalize_Lock)[RW_Lock]: Likewise.
1173         (Write_Lock)[RW_Lock]: Likewise.
1174         (Unlock)[RW_Lock]: Likewise.
1175         (Read_Lock): Define L as RW_Lock (instead of Lock).
1176         * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1177         routine for r/w lock.
1178         (Finalize_Lock)[RW_Lock]: Likewise.
1179         (Write_Lock)[RW_Lock]: Likewise.
1180         (Unlock)[RW_Lock]: Likewise.
1181         (Read_Lock): Define L as RW_Lock (instead of Lock).
1182
1183         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1184         s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1185         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1186         (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1187         routine for standard lock.
1188         (Finalize_Lock)[RW_Lock]: Likewise.
1189         (Write_Lock)[RW_Lock]: Likewise.
1190         (Unlock)[RW_Lock]: Likewise.
1191         (Read_Lock): Define L as RW_Lock (instead of Lock).
1192         * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1193         in the record definition.
1194         * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1195         lock for 'R' locking policy.
1196         (Initialize_Protection): Likewise.
1197         (Lock): Likewise.
1198         (Lock_Read_Only): Likewise.
1199         (Unlock): Likewise.
1200         * s-taspri-posix.ads (RW_Lock): New type defined as
1201         OS_Interface.pthread_rwlock_t.
1202
1203         * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1204         s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1205         s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1206         s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1207
1208 2011-09-27  Pascal Obry  <obry@adacore.com>
1209
1210         * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1211
1212 2011-09-27  Pascal Obry  <obry@adacore.com>
1213
1214         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1215         s-osinte-hpux.ads, s-osinte-irix.ads,
1216         s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1217         pthread_mutex_t.
1218         (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1219         * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1220         pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1221         pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1222         pthread_rwlock_destroy, pthread_rwlock_rdlock,
1223         pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1224
1225 2011-09-27  Pascal Obry  <obry@adacore.com>
1226
1227         * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1228         (RE_Id): Add RE_Lock_Read_Only.
1229         (RE_Unit_Table): Likewise.
1230         * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1231         to lift restriction on first character. Handle now the
1232         Name_Concurrent_Readers_Locking where policy character is set to
1233         'R'.
1234         * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1235         constant.
1236         * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1237         read only lock for function in protected object.
1238         * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1239         this routine is now used.
1240
1241 2011-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1242
1243         * s-atocou-x86.adb (Decrement): Use %;.
1244         (Increment): Likewise.
1245
1246 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1247
1248         * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1249         dereference of the pointer to the storage area.  Remove useless type
1250         conversions and factor out common code.
1251
1252 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1253
1254         * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1255         variable and use it throughout.
1256         <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1257         <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1258         first step.  Also convert to the unpadded type as a last step.
1259
1260 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1261
1262         * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1263         DECL_CHAIN in comment.
1264         * gcc-interface/trans.c (gigi): Likewise.
1265         (Attribute_to_gnu): Likewise.
1266         (build_function_stub): Likewise.
1267         (gnat_to_gnu): Likewise.
1268         * gcc-interface/utils.c (create_subprog_decl): Likewise.
1269         (convert_vms_descriptor64): Likewise.
1270         (convert_vms_descriptor32): Likewise.
1271
1272 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1273
1274         * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1275         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1276         issues.  Use COMPLETE_TYPE_P in assertion.  Also set TREE_READONLY if
1277         the type of the record is TYPE_READONLY.
1278
1279 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1280             Robert Dewar  <dewar@adacore.com>
1281
1282         * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1283         OUT formal parameter which is of an null-exclusion access subtype.
1284
1285 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1286
1287         * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1288         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1289         (gnat_to_gnu_param): Likewise.
1290         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1291         maybe_unconstrained_array instead of doing the work manually.
1292         (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1293         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1294         is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1295         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1296         (gnat_stabilize_reference): Likewise.
1297
1298 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1299
1300         * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1301         (SET_TYPE_NULL_BOUNDS): Likewise.
1302         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1303         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1304         * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1305         pointer types.
1306         * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1307         check that the initializer is a valid constant expression for use in
1308         initializing a static variable.  Add missing guard.
1309         (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1310         (convert_to_fat_pointer): In the null fat pointer case, build a valid
1311         pointer for the bounds.
1312         * gcc-interface/utils2.c (compare_fat_pointers): New function.
1313         (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1314
1315 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1316
1317         * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1318         * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1319         the by-ref case.  Do not set TREE_READONLY on a renamed object.  Set
1320         TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1321         (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1322         to the indirect case.
1323         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1324         the TREE_THIS_NOTRAP flag.
1325
1326 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1327
1328         * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1329         iteration scheme, always generate the do-while form if optimization
1330         is enabled.  Use more straightforward test at the end.
1331
1332 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1333
1334         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1335         XNEW instead of xmalloc.  Do not build useless pointer type.
1336         <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1337         * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1338         * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1339
1340 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1341
1342         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1343         the alignment if this doesn't prevent BLKmode access to the object.
1344
1345 2011-09-24  Iain Sandoe  <iains@gcc.gnu.org>
1346
1347         * gcc-interface/Makefile.in (darwin): Do not issue the
1348         '-flat_namespace' linker flag during Ada build.
1349         * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1350         default shared library options.
1351
1352 2011-09-19  Alexandre Oliva  <aoliva@redhat.com>
1353
1354         * gcc-interface/decl.c (annotate_value): Look up expression for
1355         insertion in the cache at the end.
1356
1357 2011-09-19  Arnaud Charlet  <charlet@adacore.com>
1358
1359         * gcc-interface/Make-lang.in: Update dependencies.
1360
1361 2011-09-19  Steve Baird  <baird@adacore.com>
1362
1363         * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1364         configuration pragma names so that Is_Configuration_Pragma_Name
1365         will return True for Name_Annotate.  Make corresponding change in
1366         Pragma_Id enumeration type.  This is needed to allow an Annotate
1367         pragma to occur in a configuration pragma file (typically,
1368         a gnat.adc file).
1369         * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1370         * gnat_rm.texi: Note that pragma Annotate may be used as a
1371         configuration pragma.
1372
1373 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
1374
1375         * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1376         a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1377
1378 2011-09-19  Yannick Moy  <moy@adacore.com>
1379
1380         * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1381         for expansion of set membership.
1382         (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1383         * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1384         visible for use in Alfa expansion.
1385         * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1386         variable in Alfa mode.
1387
1388 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1389
1390         * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1391
1392 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1393
1394         * exp_ch9.adb: Minor reformatting.
1395
1396 2011-09-19  Hristian Kirtchev  <kirtchev@adacore.com>
1397
1398         * freeze.adb (Build_Renamed_Body): Generic subprograms
1399         instantiations cannot be poperly inlined by the compiler, do
1400         not set the Body_To_Inline attribute in such cases.
1401         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1402         inlining-related flags from the generic subprogram declaration.
1403
1404 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1405
1406         * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1407         (Build_Stub_Type): Remove, instead copy components from
1408         System.Partition_Interface.RACW_Stub_Type.
1409         (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1410         (Copy_Component_List): New subprogram.
1411
1412 2011-09-19  Yannick Moy  <moy@adacore.com>
1413
1414         * lib-xref.adb (Generate_Reference): Ignore references to
1415         constants in Standard.
1416
1417 2011-09-19  Robert Dewar  <dewar@adacore.com>
1418
1419         * err_vars.ads, errout.ads: Minor reformatting.
1420
1421 2011-09-19  Robert Dewar  <dewar@adacore.com>
1422
1423         * aspects.ads (Impl_Defined_Aspects): New array
1424         * lib-writ.adb (No_Dependences): New name for No_Dependence
1425         * restrict.adb (No_Dependences): New name for No_Dependence
1426         (Check_Restriction_No_Specification_Of_Aspect): New
1427         procedure.
1428         (Set_Restriction_No_Specification_Of_Aspect): New procedure
1429         (Restricted_Profile_Result): New variable
1430         (No_Specification_Of_Aspects): New variable
1431         (No_Specification_Of_Aspect_Warning): New variable
1432         * restrict.ads (No_Dependences): New name for No_Dependence
1433         (Check_Restriction_No_Specification_Of_Aspect): New procedure
1434         (Set_Restriction_No_Specification_Of_Aspect): New procedure
1435         * s-rident.ads: Add restriction
1436         No_Implementation_Aspect_Specifications, this is also added to
1437         the No_Implementation_Extensions profile.
1438         * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1439         No_Implementation_Defined_Aspects
1440         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1441         * sem_prag.adb (Analyze_Aspect_Specifications): Check
1442         No_Implementation_Aspects
1443         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1444         * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1445
1446 2011-09-19  Yannick Moy  <moy@adacore.com>
1447
1448         * lib-xref.adb (Generate_Reference): Take into account multiple
1449         renamings for Alfa refs.
1450
1451 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1452
1453         * g-socthi-mingw.adb: Minor reformatting.
1454
1455 2011-09-19  Yannick Moy  <moy@adacore.com>
1456
1457         * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1458         expansion to False in mode Alfa
1459
1460 2011-09-19  Pascal Obry  <obry@adacore.com>
1461
1462         * mingw32.h: Remove obsolete code needed for old versions
1463         of MingW.
1464
1465 2011-09-19  Robert Dewar  <dewar@adacore.com>
1466
1467         * errout.ads: Minor reformatting.
1468
1469 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
1470
1471         * sem_ch6.adb (Analyze_Expression_Function): When the expression
1472         function is transformed into a declaration and a body, insert
1473         body at the end of the declarative part, to prevent premature
1474         freeze actions, and preserve original specification in the
1475         subprogram declaration.
1476
1477 2011-09-19  Vincent Celier  <celier@adacore.com>
1478
1479         * projects.texi: Minor editing.
1480
1481 2011-09-19  Robert Dewar  <dewar@adacore.com>
1482
1483         * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1484         exp_aggr.adb: Minor reformatting.
1485
1486 2011-09-19  Yannick Moy  <moy@adacore.com>
1487
1488         * lib-xref.adb (Generate_Reference): Change entity referenced
1489         to underlying object if any, or else reference to the HEAP.
1490
1491 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
1492
1493         * gcc-interface/Make-lang.in: Update dependencies.
1494
1495 2011-09-15  Robert Dewar  <dewar@adacore.com>
1496
1497         * tree_io.ads: Minor reformatting.
1498         * a-intnam.ads: Fix bad header.
1499
1500 2011-09-15  Thomas Quinot  <quinot@adacore.com>
1501
1502         * a-exexpr-gcc.adb: Minor reformatting.
1503
1504 2011-09-15  Yannick Moy  <moy@adacore.com>
1505
1506         * sem_ch6.adb: Propagate information that an expression function comes
1507         from source (otherwise references to this entity are not stored).
1508
1509 2011-09-15  Robert Dewar  <dewar@adacore.com>
1510
1511         * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1512         a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1513         a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1514
1515 2011-09-15  Ed Schonberg  <schonberg@adacore.com>
1516
1517         * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1518         if the expression function is not a completion, create a
1519         new specification for the generated declaration, and keep the
1520         original specification in the generated body. Shorter code also
1521         ensures that proper warnings are generated for unused formals
1522         in all cases.
1523
1524 2011-09-15  Sergey Rybin  <rybin@adacore.com>
1525
1526         * tree_io.ads: Update ASIS_Version_Number because of the changes
1527         in the tree structures for expression functions.
1528
1529 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
1530
1531         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1532         s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1533         s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1534         (CLOCK_REALTIME): Fix wrong value on some OSes.
1535         * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1536
1537 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1538
1539         * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1540         to unconstrained array case, deal with each branch of a COND_EXPR.
1541         * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1542         a COND_EXPR in the initializer, if present.
1543
1544 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1545
1546         * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1547         of an addressable type.
1548         * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1549         Deal with those cases for which creating a temporary is mandatory.
1550
1551 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1552
1553         * gcc-interface/trans.c (call_to_gnu): Use local variable.  Make sure
1554         this is a real formal parameter before testing whether it is by ref.
1555
1556 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1557
1558         * gcc-interface/gigi.h (build_call_0_expr): Delete.
1559         (build_call_1_expr): Likewise.
1560         (build_call_2_expr): Likewise.
1561         (build_call_n_expr): New prototype.
1562         * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1563         * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1564         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1565         (Exception_Handler_to_gnu_zcx): Likewise.
1566         (gnat_to_gnu): Likewise.
1567         (build_binary_op_trapv): Likewise.
1568         * gcc-interface/utils2.c (build_call_0_expr): Delete.
1569         (build_call_1_expr): Likewise.
1570         (build_call_2_expr): Likewise.
1571         (build_call_n_expr): New function.
1572         (build_call_raise): Use build_call_n_expr.
1573         (build_call_raise_range): Likewise.
1574         (build_call_raise_column): Likewise.
1575         (build_call_alloc_dealloc_proc): Likewise.
1576         (maybe_wrap_malloc): Likewise.
1577         (maybe_wrap_free): Likewise.
1578
1579 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1580
1581         * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1582         MODIFY_EXPR.
1583         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1584         the result type is null if ENABLE_CHECKING.  Set operation_type at the
1585         end unconditionally if not set in the previous cases.
1586         Use build2 and void_type_node for MODIFY_EXPR.
1587         (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1588
1589 2011-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1590
1591         * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1592         precision when converting to or from an integral type whose precision
1593         is not equal to its size.
1594
1595 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
1596
1597         * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1598
1599 2011-09-07  Iain Sandoe  <iains@gcc.gnu.org>
1600
1601         * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1602         implementation.
1603         * system-darwin-ppc64.ads: New file.
1604
1605 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1606
1607         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1608         reference to "-lm".
1609
1610 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1611
1612         * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1613         size switches to the link phase for shared libs.
1614
1615 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1616
1617         * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1618         LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1619
1620 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1621
1622         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1623         (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1624         gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1625         New targets.
1626         (TOOLS_FLAGS_TO_PASS): New.
1627         (../stamp-tools): Reintroduce, to avoid merge conflicts.
1628
1629 2011-09-06  Robert Dewar  <dewar@adacore.com>
1630
1631         * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1632         name for Is_RM_Defined_Unit. Also several fixes to this unit.
1633
1634 2011-09-06  Robert Dewar  <dewar@adacore.com>
1635
1636         * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1637         * s-rident.ads: New restriction No_Implementation_Units
1638         (this restriction is also part of the profile
1639         No_Implementation_Extensions)
1640         * sem_ch10.adb (Analyze_With_Clause): Add check for
1641         No_Implementation_Units restriction.
1642
1643 2011-09-06  Jerome Guitton  <guitton@adacore.com>
1644
1645         * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1646         on vThreads.
1647
1648 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1649
1650         * s-solita.adb: Minor reformatting.
1651
1652 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1653
1654         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1655         is a rewriting of an expression function does not freeze previous
1656         entities.
1657
1658 2011-09-06  Robert Dewar  <dewar@adacore.com>
1659
1660         * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1661
1662 2011-09-06  Tristan Gingold  <gingold@adacore.com>
1663
1664         * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1665         powerpc-wrs-vxworksae.
1666
1667 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1668
1669         * s-os_lib.ads (Spawn): Minor documentation clarification,
1670         Success is True for a zero exit status.
1671
1672 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1673
1674         * sem_ch5.adb: Add message for common iterator error.
1675
1676 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1677
1678         * exp_ch3.adb (Build_Initialization_Call): If the target is a
1679         selected component discriminated by a current instance, replace
1680         the constraint with a reference to the target object, regardless
1681         of whether the context is an init_proc.
1682
1683 2011-09-06  Robert Dewar  <dewar@adacore.com>
1684
1685         * exp_attr.adb: Descriptor_Size is never static.
1686
1687 2011-09-06  Robert Dewar  <dewar@adacore.com>
1688
1689         * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1690
1691 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1692
1693         * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1694         non-static.
1695
1696 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1697
1698         * sem_res.adb (Resolve): An expression that is the body of an
1699         expression function does not freeze.
1700
1701 2011-09-06  Matthew Heaney  <heaney@adacore.com>
1702
1703         * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1704         a-cuprqu.adb: Changed copyright notice to indicate current
1705         year only.
1706
1707 2011-09-06  Vincent Celier  <celier@adacore.com>
1708
1709         * prj.adb: Minor spelling error fix in comment
1710         * sem_res.adb: Minor reformatting
1711
1712 2011-09-06  Pascal Obry  <obry@adacore.com>
1713
1714         * sysdep.c (winflush_nt): Removed as not needed anymore.
1715         (winflush_95): Likewise.
1716         (winflush_init): Likewise.
1717         (winflush_function): Likewise.
1718         (getc_immediate_common): Remove call to winflush_function.
1719
1720 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1721
1722         * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1723         processing for Descriptor_Size.
1724         * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1725         to account for its broader usage.
1726         * sem_attr.adb (Analyze_Attribute): Change the error detection
1727         circuitry for Descriptor_Size as the attribute is now applicable
1728         to all types.
1729
1730 2011-09-06  Robert Dewar  <dewar@adacore.com>
1731
1732         * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1733
1734 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1735
1736         * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1737         in a parameter association must not set the Referenced flag on
1738         the formal.
1739         * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1740
1741 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1742
1743         * gnat_rm.texi: Add a section on attribute Descriptor_Size
1744
1745 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1746
1747         * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1748         gnatlink-re): Speed up by using -j0.
1749
1750 2011-09-06  Yannick Moy  <moy@adacore.com>
1751
1752         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1753         Set_Corresponding_Aspect when creating pragma from aspect.
1754         (Add_Predicates): Use new field Corresponding_Aspect.
1755         * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1756         name when present, for the purpose of issuing error messages;
1757         remove local procedure Error_Pragma_Arg_Alternate_Name.
1758         * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1759         N_Pragma node.
1760         (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1761         N_Pragma node.
1762
1763 2011-09-06  Robert Dewar  <dewar@adacore.com>
1764
1765         * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1766
1767 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1768
1769         * exp_ch6.adb (Build_Heap_Allocator): Add new
1770         local variable Desig_Typ. Code and comment reformatting. Add
1771         machinery to ensure that the allocation uses a fat pointer when
1772         the type of the return object is a constrained array and the
1773         function return type is an unconstrained array.
1774
1775 2011-09-06  Vincent Celier  <celier@adacore.com>
1776
1777         * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1778         parameters in subprograms.
1779
1780 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1781
1782         * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1783
1784 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1785
1786         * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1787         (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1788         subprogram.
1789         (System.Tasking.Primitive_Operations.Specific.Set): If argument
1790         is null, destroy task specific data, to make API consistent with
1791         other platforms, and thus compatible with the shared version
1792         of s-tpoaal.adb.
1793         (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1794         Document the above assumption.
1795
1796 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1797
1798         * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1799         variable for type of return value when return type is
1800         unconstrained and context is an assignment.
1801
1802 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1803
1804         * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1805         class-wide operation if expansion is not enabled.
1806
1807 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
1808
1809         * checks.adb (Apply_Scalar_Range_Check): Deal with access
1810         type prefix.
1811
1812 2011-09-06  Yannick Moy  <moy@adacore.com>
1813
1814         * sem_ch13.adb (Analyze_Aspect_Specifications, case
1815         Aspect_Invariant): Do not issue error at this point on illegal
1816         pragma placement, as this is checked later on when analyzing
1817         the corresponding pragma.
1818         * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1819         similar to Error_Pragma_Arg, except the source name of the
1820         aspect/pragma to use in warnings may be equal to parameter
1821         Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1822         message to distinguish source name of pragma/aspect, and whether
1823         the illegality resides in the type being public, or being private
1824         without a public declaration
1825
1826 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1827
1828         * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1829         size check (fd_set is implemented differently on that platform).
1830
1831 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1832
1833         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1834         s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1835         s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1836         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1837         (ATCB_Allocation): New subpackage of
1838         System.Tasking.Primitive_Operations, shared across all targets
1839         with full tasking runtime.
1840         (ATCB_Allocation.New_ATCB): Moved there (from target specific
1841         s-taprop bodies).
1842         (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1843         taking care of establishing a local temporary ATCB if the one
1844         being deallocated is Self, to avoid a reference to the freed
1845         ATCB in Abort_Undefer.
1846
1847 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1848
1849         * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1850         terminated, mark it for deallocation upon termination.
1851         (Terminate_Task): Call Free_Task again if the task is marked
1852         for automatic deallocation upon termination.
1853
1854 2011-09-06  Robert Dewar  <dewar@adacore.com>
1855
1856         * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1857         a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1858         a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1859         a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1860         a-intnam-solaris.ads, a-intnam-tru64.ads,
1861         a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1862         cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1863         * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1864         * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1865         * s-rident.ads: Add new restriction No_Implementation_Identifiers
1866         Add new profile No_Implementation_Extensions
1867         * sem_prag.adb: Implement pragma Implementation_Defined Implement
1868         profile No_Implementation_Extensions
1869         * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1870         Check violation of restriction No_Implementation_Identifiers
1871         * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1872         Add entry for Name_No_Implementation_Extensions
1873
1874 2011-09-06  Robert Dewar  <dewar@adacore.com>
1875
1876         * impunit.ads: Minor reformatting.
1877
1878 2011-09-06  Robert Dewar  <dewar@adacore.com>
1879
1880         * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1881
1882 2011-09-06  Pascal Obry  <obry@adacore.com>
1883
1884         * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1885         types.
1886
1887 2011-09-06  Robert Dewar  <dewar@adacore.com>
1888
1889         * g-socket.adb: Minor reformatting
1890
1891 2011-09-06  Javier Miranda  <miranda@adacore.com>
1892
1893         * ali.adb (Scan_ALI): Add missing support to load references of
1894         entities imported from other languages.
1895         * ali.ads (Xref_Record): Adding new fields to store the language and
1896         name of an imported entity.
1897         * lib-xref.adb (Output_Import_Export_Info): Fix typo
1898         in comment.
1899
1900 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1901
1902         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1903         is allowed on a full type declaration if it is the completion of
1904         a private declarations.
1905         * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1906         aspect is allowed on a full type declaration in the private part
1907         of a package.
1908
1909 2011-09-06  Robert Dewar  <dewar@adacore.com>
1910
1911         * sem_ch8.ads: Minor reformatting
1912
1913 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1914
1915         * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1916         Guard against socket values that are not in [0;FD_SETSIZE[
1917
1918 2011-09-06  Robert Dewar  <dewar@adacore.com>
1919
1920         * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1921         reformatting.
1922
1923 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1924
1925         * s-linux-alpha.ads: Minor reformatting
1926         * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1927         Use sizeof instead of corresponding C defines in s-oscons template.
1928
1929 2011-09-06  Vadim Godunko  <godunko@adacore.com>
1930
1931         * a-convec.ads, a-iteint.ads: Minor reformatting.
1932
1933 2011-09-06  Vincent Celier  <celier@adacore.com>
1934
1935         * projects.texi: Add menus and @node lines.
1936
1937 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1938
1939         * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1940         where the return type is an unconstrained array and the context
1941         is an assignment. Optimize the case when the target of the
1942         assignment is a selected component.
1943
1944 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1945
1946         * s-solita.adb: Update comments.
1947
1948 2011-09-06  Pascal Obry  <obry@adacore.com>
1949
1950         * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1951         s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1952         * s-oscons-tmplt.c: Add support for generating pthread related
1953         types size on GNU/Linux as done for Darwin.
1954         * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1955
1956 2011-09-06  Robert Dewar  <dewar@adacore.com>
1957
1958         * exp_ch6.adb: Fix minor typo.
1959
1960 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1961
1962         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1963         (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1964         (Double_Size_Of): Alphabetized. Update the comment on usage.
1965         (Make_Finalize_Address_Stmts): Update comments and reformat code.
1966         (Nearest_Multiple_Rounded_Up): New routine.
1967         (Size_Of): Update comment on usage. The generated expression now
1968         accounts for alignment gaps by rounding the size of the type to the
1969         nearest multiple rounded up of the type's alignment.
1970
1971 2011-09-06  Robert Dewar  <dewar@adacore.com>
1972
1973         * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1974
1975 2011-09-06  Steve Baird  <baird@adacore.com>
1976
1977         * exp_ch4.adb (Expand_Allocator_Expression): Look through
1978         derived subprograms in checking for presence of an
1979         Extra_Accessibility_Of_Result formal parameter.
1980         * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1981         checking for presence of an Extra_Accessibility_Of_Result formal
1982         parameter.
1983         (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1984         case where the Parameter_Associatiations attribute is already set,
1985         but set to an empty list.
1986         (Needs_Result_Accessibility_Level):
1987         Unconditionally return False. This is a temporary
1988         change, disabling the Extra_Accessibility_Of_Result
1989         mechanism.
1990         (Expand_Simple_Function_Return): Check for
1991         Extra_Accessibility_Of_Result parameter's presence instead of
1992         testing Ada_Version when generating a runtime accessibility
1993         check which makes use of the parameter.
1994
1995 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1996
1997         * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1998         expression in a given case alternative must be attached to the
1999         statement list of the ccrresponding case statement alternative
2000         They cannot be propagated ahead of the case statement, because
2001         the validity of the expression that generated the action may
2002         hold only for that alternative.
2003
2004 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2005
2006         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2007         (Alignment_Of): Remove the code for strict alignment targets.
2008         (Double_Alignment_Of): Removed.
2009         (Double_Size_Of): New routine.
2010         (Make_Finalize_Address_Stmts): Change the
2011         calculation of the dope's size.  Update relevant comments.
2012         (Size_Of): New routine.
2013
2014 2011-09-06  Steve Baird  <baird@adacore.com>
2015
2016         * einfo.ads (Extra_Accessibility): Update associated comment to use
2017         the term "present" correctly ("present" just means that it is not
2018         an error to query the value of the attribute - it does not imply
2019         that the value must be non-null).
2020         (Extra_Constrained): Ditto.
2021         (Is_Visible_Formal): Ditto.
2022         (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
2023         (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
2024         * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
2025         * exp_ch6.adb (Expand_Call): The callee may require an
2026         Extra_Accessibility_Of_Result actual parameter even if Ada_Version
2027         < Ada_2012. This can occur if the callee is exported from a Gnat
2028         runtimes unit. Also improve a comment.
2029
2030 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2031
2032         * exp_ch7.adb: Add with and use clauses for Get_Targ.
2033         (Alignment_Of): Rename formal parameter Some_Typ
2034         to Typ, update related comment. Use the allocator alignment on
2035         strict alignment targets such as SPARC.
2036         (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
2037         related comment.
2038
2039 2011-09-06  Gary Dismukes  <dismukes@adacore.com>
2040
2041         * sem_ch9.adb (Check_Interfaces): Test
2042         Is_Limited_Type rather than Is_Limited_Record when checking that
2043         the partial view of a synchronized full view must be limited.
2044
2045 2011-09-06  Emmanuel Briot  <briot@adacore.com>
2046
2047         * g-comlin.adb (Free): Fix memory leak.
2048
2049 2011-09-06  Robert Dewar  <dewar@adacore.com>
2050
2051         * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
2052
2053 2011-09-06  Steve Baird  <baird@adacore.com>
2054
2055         * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
2056         (Ada2012) cases described in AI05-0234 where the accessibility
2057         level of a function result is "determined by the point of
2058         call", an implicit parameter representing that accessibility
2059         level is passed in. Extra_Accessibilty_Of_Result yields this
2060         additional formal parameter. Extra_Accessibility_Of_Result
2061         is analogous to the existing Extra_Accessibility
2062         function used in the implementation of access parameters.
2063         (Set_Extra_Accessibility_Of_Result): New procedure; sets
2064         Extra_Accessibility_Of_Result attribute.
2065         * einfo.adb (Extra_Accessibility_Of_Result): New function.
2066         (Set_Extra_Accessibility_Of_Result): New procedure.
2067         (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2068         * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2069         an accessibility level literal to Natural; introduce a nested
2070         function, Make_Level_Literal, to do this.
2071         * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2072         determines whether a given function (or access-to-function
2073         type) needs to have an implicitly-declared accessibility-level
2074         parameter added to its profile.
2075         (Add_Extra_Actual_To_Call): Export an existing procedure which was
2076         previously declared in the body of Exp_Ch6.
2077         * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2078         it to exp_ch6.ads.
2079         (Has_Unconstrained_Access_Discriminants): New Function; a
2080         predicate on subtype entities which returns True if the given
2081         subtype is unconstrained and has one or more access discriminants.
2082         (Expand_Call): When expanding a call to a function which takes an
2083         Extra_Accessibility_Of_Result parameter, pass in the appropriate
2084         actual parameter value. In the case of a function call which is
2085         used to initialize an allocator, this may not be possible because
2086         the Etype of the allocator may not have been set yet. In this
2087         case, we defer passing in the parameter and handle it later in
2088         Expand_Allocator_Expression.
2089         (Expand_Simple_Function_Return): When returning from a function which
2090         returns an unconstrained subtype having at least one access
2091         discriminant, generate the accessibility check needed to ensure that
2092         the function result will not outlive any objects designated by its
2093         discriminants.
2094         (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2095         description.
2096         * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2097         is used to initialize an allocator, we may need to pass in "the
2098         accessibility level determined by the point of call" (AI05-0234)
2099         to the function. Expand_Call, where such actual parameters are
2100         usually generated, is too early in this case because the Etype of
2101         the allocator (which is used in determining the level to be passed
2102         in) may not have been set yet when Expand_Call executes. Instead,
2103         we generate code to pass in the appropriate actual parameter
2104         in Expand_Allocator_Expression.
2105         * sem_ch6.adb (Create_Extra_Formals): Create
2106         the new Extra_Accessibility_Of_Result formal if
2107         Needs_Result_Accessibility_Level returns True. This includes the
2108         introduction of a nested procedure, Check_Against_Result_Level.
2109
2110 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2111
2112         * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2113         declaration.
2114
2115 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2116
2117         * s-finmas.adb (Set_Finalize_Address): Explain the reason
2118         for the synchronization. Move the test for null from
2119         s-stposu.Allocate_Any_Controlled to this routine since the check
2120         needs to be protected too.
2121         (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2122         synchronization code.
2123         * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2124         explaining the context in which this routine is used.
2125         * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2126         to s-finmas.Set_Finalize_Address.
2127
2128 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2129
2130         * einfo.ads: Document that itypes have no parent field.
2131
2132 2011-09-05  Robert Dewar  <dewar@adacore.com>
2133
2134         * rtsfind.adb (Check_CRT): Check for overloaded entity
2135         * rtsfind.ads: Document that entities to be found by rtsfind
2136         cannot be overloaded
2137         * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2138         (Lock_Entries_With_Status): New name for Lock_Entries with two
2139         arguments (changed to meet rtsfind no overloading rule).
2140
2141 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2142
2143         * s-finmas.adb (Set_Finalize_Address (Address,
2144         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2145         (Set_Finalize_Address (in out Finalization_Master,
2146         Finalize_Address_Ptr): Add synchronization code.
2147         * s-finmas.ads (Set_Finalize_Address (Address,
2148         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2149         * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2150         Set_Finalize_Address for the heterogeneous case.
2151
2152 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2153
2154         * sem_ch3.adb: Undo previous change, not suitable after all.
2155
2156 2011-09-05  Robert Dewar  <dewar@adacore.com>
2157
2158         * einfo.ads: Minor comment clarification.
2159
2160 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2161
2162         * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2163         no longer needs to search through the entities of the return
2164         statement scope to find the _chain.
2165         * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2166         (Analyze_Block_Statement): Add local variable
2167         Is_BIP_Return_Statement. Add machinery to install all entities
2168         produced by the expansion of the return object declaration.
2169         (Install_Return_Entities): New routine.
2170         * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2171
2172 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2173
2174         * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2175         of subunit is incomplete.
2176         (Analyze_Proper_Body): If parent spec is not available, do not
2177         attempt analysis.
2178
2179 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2180
2181         * sem_disp.adb (Find_Controlling_Arg): Add checks for
2182         interface type conversions, that are expanded into dereferences.
2183
2184 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2185
2186         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2187         Examine the parameter and return profile of a subprogram and swap
2188         any incomplete types coming from a limited context with their
2189         corresponding non-limited views.
2190         (Exchange_Limited_Views): New routine.
2191
2192 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2193
2194         * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2195         of internal entity to the subtype declaration, so that when
2196         entities are subsequently exchanged in a package body, the tree
2197         remains properly formatted for ASIS.
2198
2199 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2200
2201         * g-comlin.adb (Set_Usage): Additional optional argument to set help
2202         message.
2203         (Display_Help): display the user given help message, if available.
2204
2205 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2206
2207         * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2208         is legal if the original node is an identifier that is a
2209         parameterless function call.
2210
2211 2011-09-05  Pascal Obry  <obry@adacore.com>
2212
2213         * prj-nmsc.adb: Minor reformatting.
2214         Add support for standalone aggregate library.
2215         (Check_Stand_Alone_Library): Handle standalone aggregate library.
2216         * projects.texi: Fix documentation for aggregate library projects.
2217
2218 2011-09-05  Robert Dewar  <dewar@adacore.com>
2219
2220         * sem_ch6.adb: Minor reformatting.
2221
2222 2011-09-05  Matthew Gingell  <gingell@adacore.com>
2223
2224         * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2225         stack guard page on PPC Linux. This patch ensures the 64K guard page at
2226         the bottom of the stack is not overwritten.
2227
2228 2011-09-05  Thomas Quinot  <quinot@adacore.com>
2229
2230         * exp_intr.adb, s-tasini.adb: Minor reformatting.
2231
2232 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2233
2234         * sem_ch3.adb (Access_Definition): If an access type declaration
2235         appears in a child unit, the scope of whatever anonymous type
2236         may be generated is the child unit itself.
2237
2238 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2239
2240         * sem_ch6.adb (Analyze_Expression_Function): Do not set
2241         Comes_From_Source on rewritten body.
2242         (Analyze_Subprogram_Body_Helper): Check that the original node for
2243         the body comes from source, when determining whether expansion
2244         of a protected operation is needed.
2245
2246 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2247
2248         * exp_aggr.adb (Replace_Type): If the target of the assignment is
2249         a selected component and the right-hand side is a self-referential
2250         access, the proper prefix of the rewritten attribute is a copy
2251         of the left-hand side, not of its prefix.
2252
2253 2011-09-05  Robert Dewar  <dewar@adacore.com>
2254
2255         * sem_ch5.adb: Minor reformatting.
2256         * sem_ch3.adb: Minor code clean up.
2257
2258 2011-09-05  Jose Ruiz  <ruiz@adacore.com>
2259
2260         * exp_ch9.adb (Make_Initialize_Protection): The fact that
2261         restriction No_Dynamic_Attachment is in effect or not should
2262         not influence the default priority associated to a protected
2263         object. With this change, when the restriction is in effect (as
2264         is the case for the Ravenscar profile) the default priority of
2265         a protected object with an interrupt handler is in the range of
2266         interrupt priorities (Default_Interrupt_Priority) as required
2267         by D.3(10).
2268
2269 2011-09-05  Arnaud Charlet  <charlet@adacore.com>
2270
2271         * a-iteint.ads: Fix header.
2272
2273 2011-09-05  Vincent Celier  <celier@adacore.com>
2274
2275         * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2276         with a directory separator to avoid output such as:
2277           "/path/to/objauto.cgpr" has been deleted.
2278
2279 2011-09-05  Robert Dewar  <dewar@adacore.com>
2280
2281         * sem_ch3.adb: Minor reformatting.
2282
2283 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2284
2285         * sem_ch5.adb: Better error message.
2286
2287 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2288
2289         * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2290         (Expand_Array_Aggregate): Detect a special case of an aggregate
2291         which contains tasks in the context of an unexpanded return
2292         statement of a build-in-place function.
2293         * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2294         (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2295         which contains tasks and expand it now that the original simple
2296         return statement has been rewritten.
2297         * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2298         reformatting. Do not create a chain for an extended return
2299         statement if one is already available.
2300         (Has_Activation_Chain): New routine.
2301
2302 2011-09-05  Marc Sango  <sango@adacore.com>
2303
2304         * sem_ch3.adb (Analyze_Object_Declaration): Remove
2305         the wrong test and add the correct test to detect the violation
2306         of illegal use of unconstrained string type in SPARK mode.
2307
2308 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2309
2310         * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2311         message on an iterator over an array.
2312
2313 2011-09-05  Robert Dewar  <dewar@adacore.com>
2314
2315         * lib-xref-alfa.adb: Minor reformatting.
2316
2317 2011-09-05  Robert Dewar  <dewar@adacore.com>
2318
2319         * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2320         exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2321
2322 2011-09-05  Gary Dismukes  <dismukes@adacore.com>
2323
2324         * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2325
2326 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2327
2328         * lib-xref-alfa.adb: Update comments.
2329
2330 2011-09-05  Thomas Quinot  <quinot@adacore.com>
2331
2332         * sem_res.adb: Minor reformatting
2333
2334 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2335
2336         * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2337         present, create them now.  Needed in case the return type was
2338         a limited view in the function declaration.
2339         (Make_Build_In_Place_Call_In_Allocator): If return type contains
2340         tasks, build the activation chain for it.  Pass a reference to
2341         the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2342         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2343         with build_in_place calls.
2344         * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2345         incomplete, inatialize its Corresponding_Record_Type component.
2346         * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2347         of limited views.
2348
2349 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2350
2351         * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2352         information.
2353
2354 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2355
2356         * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2357         appears within a package specification and the token after "IS"
2358         is not a parenthesis, assume that this is an unparenthesized
2359         expression function, even if the token appears in a line by
2360         itself.
2361         * par.adb: Clarify use of Labl field of scope stack in error
2362         recovery.
2363
2364 2011-09-05  Bob Duff  <duff@adacore.com>
2365
2366         * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2367         conversions instead of normal type conversions in all cases where a
2368         type conversion would be illegal. In particular, use unchecked
2369         conversions when the operand types are private.
2370
2371 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2372
2373         * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2374         objects of task type or protected type.
2375
2376 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2377
2378         * sem_ch6.adb (Analyze_Expression_Function): If the expression
2379         function comes from source, indicate that so does its rewriting,
2380         so it is compatible with any subsequent expansion of the
2381         subprogram body (e.g. when it is a protected operation).
2382         * sem_ch4.adb: minor reformatting
2383
2384 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2385
2386         * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2387         Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2388         may lead to wrong ancestor package in the case of instantiated subunit
2389         bodies. If a subunit is instantiated, follow the chain of instantiations
2390         rather than the stub structure.
2391
2392 2011-09-02  Robert Dewar  <dewar@adacore.com>
2393
2394         * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2395         * gcc-interface/Make-lang.in: Update dependencies.
2396
2397 2011-09-02  Marc Sango  <sango@adacore.com>
2398
2399         * sem_ch3.adb (Analyze_Object_Declaration): Change
2400         comment and add additional check to differentiate constant of
2401         type string from others unconstrained type.
2402
2403 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2404
2405         * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2406         present in incomplete type declarations to refine the error
2407         message the full declaration is in the same unit.
2408         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2409         an incomplete type, set the Premature_Use for additional message.
2410         * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2411         and Premature_Use is set, place additional information at the
2412         point of premature use.
2413
2414 2011-09-02  Bob Duff  <duff@adacore.com>
2415
2416         * sem_ch6.adb: (Check_Post_State): Suppress warning
2417         "postcondition refers only to pre-state" when the expression has not
2418         yet been analyzed, because it causes false alarms. This can happen when
2419         the postcondition contains a quantified expression, because those are
2420         analyzed later. This is a temporary/partial fix.
2421         (Process_Post_Conditions): Minor: change wording of warning.
2422
2423 2011-09-02  Marc Sango  <sango@adacore.com>
2424
2425         * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2426         illegal use of unconstrained string type in SPARK mode.
2427         * sem_res.adb (Analyze_Operator_Symbol): Set the
2428         right place where the string operand of concatenation should be
2429         violate in SPARK mode.
2430
2431 2011-09-02  Robert Dewar  <dewar@adacore.com>
2432
2433         * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2434         exp_ch3.adb: Minor reformatting.
2435
2436 2011-09-02  Vincent Celier  <celier@adacore.com>
2437
2438         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2439         as the compiler driver so Is_Compilable returns True for sources.
2440         * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2441         for the body.
2442
2443 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2444
2445         * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2446         condition, a reference to a controlling formal must be interpreted
2447         as having the class-wide type (or an access to such) so that the
2448         inherited condition can be properly applied to any overriding
2449         operation (see ARM12 6.6.1 (7)).
2450
2451 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2452
2453         * init.c (__gnat_is_vms_v7): Fix case and add prototype
2454         for LIB$GETSYI.
2455
2456 2011-09-02  Javier Miranda  <miranda@adacore.com>
2457
2458         * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2459         initializing expression of a class-wide interface object declaration
2460         if its type is limited.
2461
2462 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2463
2464         * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2465         literals, take into account the type name; the type is *not*
2466         the scope for an enumeration literal.
2467
2468 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2469
2470         * sem_ch6.adb (Check_Overriding_Indicator): add special check
2471         to reject an overriding indicator on a user-defined Adjust
2472         subprogram for a limited controlled type.
2473
2474 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2475
2476         * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2477         for an actual that is a function call returning an unconstrained
2478         limited controlled type.
2479
2480 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2481
2482         * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2483
2484 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2485
2486         * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2487         from "HEAP" to __HEAP Change comment that refers to that variable
2488         * put_alfa.adb: Change comment that refers to that variable
2489
2490 2011-09-02  Robert Dewar  <dewar@adacore.com>
2491
2492         * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2493
2494 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2495
2496         * exp_util.adb (Extract_Renamed_Object): Renamed to
2497         Find_Renamed_Object. This routine has been reimplemented and now uses
2498         tree traversal to locate a renamed object.
2499         (Is_Aliased): Replace call to Extract_Renamed_Object with
2500         Find_Renamed_Object.
2501
2502 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2503
2504         * init.c: (__gnat_is_vms_v7): New function.
2505
2506 2011-09-02  Olivier Hainque  <hainque@adacore.com>
2507
2508         * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2509         that have a misaligned backchain, necessarily bogus.
2510
2511 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2512
2513         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2514         TSS routine Finalize_Address when compiling in Alfa mode.
2515         (Expand_Freeze_Record_Type): Do not create TSS routine
2516         Finalize_Address when compiling in Alfa mode.
2517         * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2518         call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2519         not built.
2520         (Expand_N_Allocator): Do not produce a call to
2521         Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2522         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2523         produce a call to primitive Set_Finalize_Address in Alfa mode because
2524         Finalize_Address is not built.
2525         * exp_ch7.adb (Build_Finalization_Master): Do not create
2526         finalization masters in Afa mode since they are not needed.
2527         (Build_Finalizer): Do not create scope and library-level
2528         finalizers in Alfa mode since they are not needed.
2529         * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2530         "new" and "free" when applied to controlled objects in Alfa mode since
2531         this is not needed.
2532
2533 2011-09-02  Vincent Celier  <celier@adacore.com>
2534
2535         * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2536         only library names with the syntax of Ada identifiers, to avoid errors
2537         when compiling the binder generated files.
2538         * projects.texi: Document restriction on SAL library names
2539
2540 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2541
2542         * a-chtgbo.adb: Minor comment fix.
2543
2544 2011-09-02  Robert Dewar  <dewar@adacore.com>
2545
2546         * lib-xref.adb: Minor reformatting
2547
2548 2011-09-02  Vincent Celier  <celier@adacore.com>
2549
2550         * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2551         gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2552         --version and --help in usage.
2553         * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2554
2555 2011-09-02  Bob Duff  <duff@adacore.com>
2556
2557         * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2558         compilers don't understand it.
2559
2560 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2561
2562         * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2563         underlying subtype rather than its base type on the call to
2564         Build_Record_Or_Elementary_Input_Function, so that any
2565         constraints on a discriminated subtype will be available for
2566         doing the check required by AI05-0192.
2567         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2568         If the prefix subtype of the 'Input attribute is a constrained
2569         discriminated subtype, then check each constrained discriminant value
2570         against the corresponding value read from the stream.
2571
2572 2011-09-02  Yannick Moy  <moy@adacore.com>
2573
2574         * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2575         warnings on suspicious contracts, and enable them with -gnatwa.
2576
2577 2011-09-02  Robert Dewar  <dewar@adacore.com>
2578
2579         * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2580         reformatting.
2581
2582 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2583
2584         * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2585         which ensure that restriction No_Dynamic_Attachment has not been
2586         violated.
2587         (Make_Initialize_Protection): Protected types with attach or
2588         interrupt handlers must not violate restriction No_Dynamic_Attachment.
2589         * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2590         which ensures that restriction No_Dynamic_Attachment has not been
2591         violated.
2592         * sem_attr.adb: (Eval_Attribute): Transform
2593         VAX_Float_Type'First and 'Last into references to
2594         the temporaries which store the corresponding bounds. The
2595         transformation is needed since the back end cannot evaluate
2596         'First and 'Last on VAX.
2597         (Is_VAX_Float): New routine.
2598
2599 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2600
2601         * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2602         generic unit is not intrinsic and has an explicit convention,
2603         the instance inherits it.
2604
2605 2011-09-02  Robert Dewar  <dewar@adacore.com>
2606
2607         * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2608         prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2609
2610 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2611
2612         * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2613         Guard against a prefix that is an N_Has_Entity but has no
2614         associated entity.
2615
2616 2011-09-02  Yannick Moy  <moy@adacore.com>
2617
2618         * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2619         references.
2620
2621 2011-09-02  Yannick Moy  <moy@adacore.com>
2622
2623         * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2624         * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2625         contracts.
2626         * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2627         procedure looking for suspicious postconditions.
2628         * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2629         * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2630         options -gnatw.t and -gnatw.T.
2631
2632 2011-09-02  Pascal Obry  <obry@adacore.com>
2633
2634         * prj.adb: Minor code refactoring. Move check for null project in
2635         Project_Changed.
2636         * projects.texi: Fix minor typos.
2637
2638 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2639
2640         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2641         of iteration is an expression, its value must be captured in a
2642         renaming declaration, so that modification of the elements is
2643         propagated to the original container.
2644
2645 2011-09-02  Pascal Obry  <obry@adacore.com>
2646
2647         * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2648         prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2649         prj-tree.adb: Minor reformatting and style fixes.
2650
2651 2011-09-02  Robert Dewar  <dewar@adacore.com>
2652
2653         * s-rident.ads: Add new restriction No_Implicit_Aliasing
2654         * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2655         No_Implicit_Aliasing
2656         (Analyze_Attribute, case Address): ditto
2657         (Analyze_Attribute, case Unrestricted_Access): ditto
2658         * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2659         No_Implicit_Aliasing restriction.
2660         * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2661
2662 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2663
2664         * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2665         is an unchecked conversion, apply test to its expression.
2666
2667 2011-09-02  Javier Miranda  <miranda@adacore.com>
2668
2669         * sem_ch3.adb (Check_Abstract_Overriding): When
2670         traversing the chain of aliased subprograms avoid reporting a
2671         redundant error on the current entity.
2672
2673 2011-09-02  Sergey Rybin  <rybin@adacore.com>
2674
2675         * gnat_ugn.texi: Minor clean up.
2676
2677 2011-09-02  Bob Duff  <duff@adacore.com>
2678
2679         * s-htable.adb (Set_If_Not_Present): Use renaming
2680         instead of ":=", because the type Key is limited in the generic (even
2681         if not in the instances).
2682
2683 2011-09-02  Robert Dewar  <dewar@adacore.com>
2684
2685         * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2686         g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2687         reformatting.
2688
2689 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2690
2691         * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2692         inherited component with the enclosing derived type. Code reformatting.
2693
2694 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2695
2696         * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2697         return done when overflow checks are enabled, since comparisons against
2698         Lor and Hir should not be done when OK1 is False.
2699
2700 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2701
2702         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2703         Add new formal Master_Exp. When present, add that expression to the
2704         call as an extra actual.
2705         (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2706         Fmaster_Actual and in the case of a BIP call initializing a return
2707         object of an enclosing BIP function set it to a
2708         new reference to the implicit finalization master
2709         formal of the enclosing function. Fmaster_Actual is
2710         then passed to the new formal Master_Exp on the call to
2711         Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2712         initializations of Enclosing_Func to its declaration.
2713
2714 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2715
2716         * csets.ads: Minor reformatting
2717
2718 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2719
2720         * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2721         the full view of a private type coming from an instantiation.
2722         * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2723         loop to iterate over the declarations rather than use the
2724         First_Entity / Next_Entity scheme.
2725
2726 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2727
2728         * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2729         X'range (N) into X'First (N) ..  X'Last (N), do not share the
2730         dimension indicator N, if present. Even though it is a static
2731         constant, its source location may be modified when printing
2732         expanded code under -gnatDL, and node sharing will lead to chaos
2733         in Sprint on large files, by generating a sloc value that does
2734         not correspond to any source file.
2735
2736 2011-09-02  Bob Duff  <duff@adacore.com>
2737
2738         * einfo.adb: (Has_Xref_Entry): Do not call
2739         Implementation_Base_Type. Lib.Xref has been
2740         rewritten to avoid the need for it, and it was costly.
2741         * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2742         functions in support of efficient xref.
2743         * lib-xref-alfa.adb: Misc changes related to Key component of
2744         type Xref_Entry.
2745         * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2746         (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2747         no longer does. This is the one place where it is needed.
2748
2749 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2750
2751         * g-comlin.adb (Getopt): New optional argument Concatenate to have
2752         similar interface as the other Getopt function.
2753
2754 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2755
2756         * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2757         a call to Set_Finalize_Address if there is no allocator available.
2758         * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2759         a case of allocator expansion where the allocator is not expanded but
2760         needs a custom allocate routine. Code reformatting.
2761         (Is_Finalizable_Transient): Remove local variables Has_Rens and
2762         Ren_Obj. Code reformatting.
2763         (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2764         through the use of 'reference.
2765         * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2766         as part of build-in-place expansion. They are intentionally marked as
2767         coming from source, but their parents are not.
2768
2769 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2770
2771         * sem_ch10.adb (Analyze_With_Clause): If the library unit
2772         is the generated subprogram declaration for a child unit body
2773         that acts as spec, use the original body in the with_clause,
2774         to prevent binding errors.
2775
2776 2011-09-02  Vincent Celier  <celier@adacore.com>
2777
2778         * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2779         qualifier /MULTI_UNIT_INDEX=
2780
2781 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2782
2783         * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2784         instead of calling the callback function
2785
2786 2011-09-02  Robert Dewar  <dewar@adacore.com>
2787
2788         * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2789         prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2790
2791 2011-09-02  Vincent Celier  <celier@adacore.com>
2792
2793         * prj-nmsc.adb: (Find_Sources): When the list of sources is
2794         explicitly declared in an extending project, do not warn if a source
2795         for an inherited naming exception is not found.
2796
2797 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2798
2799         * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2800         expansion is inactive.
2801
2802 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2803
2804         * sem_util.adb (Note_Possible_Modification): If the entity
2805         being modified is the renaming generated for an Ada2012 iterator
2806         element, the enclosing container or array is modified as well.
2807
2808 2011-09-02  Jose Ruiz  <ruiz@adacore.com>
2809
2810         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2811         Initialize): Define and initialize the
2812         mutex attributes and condition variable attributes locally.
2813
2814 2011-09-02  Vincent Celier  <celier@adacore.com>
2815
2816         * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2817         exception replaced in an extending project.
2818         (Check_Object): No error when the other source is locally removed.
2819
2820 2011-09-02  Yannick Moy  <moy@adacore.com>
2821
2822         * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2823         unresolved calls.
2824
2825 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
2826
2827         * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2828         run-time files.
2829         * gcc-interface/Make-lang.in: Update dependencies.
2830
2831 2011-09-01  Robert Dewar  <dewar@adacore.com>
2832
2833         * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2834
2835 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2836
2837         * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2838         * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2839         __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2840         specific for systems where their glibc version does not define the
2841         routines to handle dynamically allocated CPU sets.
2842
2843 2011-09-01  Vincent Celier  <celier@adacore.com>
2844
2845         * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2846         prj-env.adb: Implement inheritance of naming exceptions in extending
2847         projects.
2848
2849 2011-09-01  Romain Berrendonner  <berrendo@adacore.com>
2850
2851         * gnatls.adb: Display simple message instead of content of
2852         gnatlic.adl.
2853
2854 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
2855
2856         * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2857         access discriminant and anonymous access component scopes.
2858         (Inherit_Component): Reuse the itype of an access discriminant
2859         or anonymous access component by copying it in order to set the proper
2860         scope. This is done only when the parent and the derived type
2861         are in different scopes.
2862         (Set_Anonymous_Etype): New routine.
2863
2864 2011-09-01  Robert Dewar  <dewar@adacore.com>
2865
2866         * a-convec.adb: Minor reformatting throughout.
2867
2868 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2869
2870         * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2871         __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2872         CPU_ALLOC_SIZE and CPU_FREE linux macros.
2873         (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2874         CPU_SET_S respectively because we are now using dynamically allocated
2875         CPU sets which are more portable across different glibc versions.
2876         * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2877         CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2878         masks dynamically according to the number of processors in the target
2879         platform.
2880         (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2881         respectively, so we need to pass the size of the masks as
2882         parameters.
2883         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2884         created cpu_set_t masks
2885         with the number of processors available in the target platform,
2886         instead of static bit arrays. It enhances portability because
2887         it uses the information from the target platform.
2888         * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2889         are using a restricted run-time library, use the flag
2890         Configurable_Run_Time_Mode instead of Restricted_Profile.
2891
2892 2011-09-01  Vincent Celier  <celier@adacore.com>
2893
2894         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2895         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2896
2897 2011-09-01  Nicolas Roche  <roche@adacore.com>
2898
2899         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2900         on VxWorks in kernel mode.
2901
2902 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2903
2904         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2905         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2906         directly the bit array.
2907         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2908         the linux macros with the same name.
2909         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2910         wrappers around the CPU_ZERO and CPU_SET linux macros.
2911
2912 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
2913
2914         * exp_ch7.adb (Find_Insertion_List): Removed.
2915         (Process_Transient_Objects): Insert the declarations of the hook
2916         access type and the hook object before the associated transient object.
2917
2918 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2919
2920         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2921         package System.Aux_Dec when using restricted run-time libraries which
2922         do not have this package.
2923
2924 2011-09-01  Tristan Gingold  <gingold@adacore.com>
2925
2926         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2927
2928 2011-09-01  Bob Duff  <duff@adacore.com>
2929
2930         * sem_attr.adb (Analyze_Access_Attribute): Do not call
2931         Kill_Current_Values for P'Unrestricted_Access, where P is library level
2932
2933 2011-09-01  Thomas Quinot  <quinot@adacore.com>
2934
2935         * exp_ch5.adb: Minor reformatting
2936         * gnat_ugn.texi: Fix minor typos.
2937         * gcc-interface/Make-lang.in: Update dependencies.
2938
2939 2011-09-01  Robert Dewar  <dewar@adacore.com>
2940
2941         * inline.adb, sem_aggr.adb: Minor reformatting.
2942
2943 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
2944
2945         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2946
2947 2011-09-01  Robert Dewar  <dewar@adacore.com>
2948
2949         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2950
2951 2011-09-01  Bob Duff  <duff@adacore.com>
2952
2953         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2954         body" the same as "in inlined body", because visibility shouldn't
2955         apply there.
2956
2957 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
2958
2959         * inline.adb (Add_Inlined_Body): Refine previous change.
2960
2961 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
2962
2963         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2964         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2965         Test for case where call
2966         initializes an object of a return statement before testing for
2967         a constrained call, to ensure that all such cases get handled
2968         by simply passing on the caller's parameters. Also, in that
2969         case call Needs_BIP_Alloc_Form to determine whether to pass on
2970         the BIP_Alloc_Form parameter of the enclosing function rather
2971         than testing Is_Constrained. Add similar tests for the return
2972         of a BIP call to later processing to ensure consistent handling.
2973         (Needs_BIP_Alloc_Form): New utility function.
2974         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2975         a BIP_Alloc_Form formal with call to new utility function
2976         Needs_BIP_Alloc_Form.
2977
2978 2011-09-01  Pascal Obry  <obry@adacore.com>
2979
2980         * prj-part.adb: Minor reformatting.
2981
2982 2011-09-01  Vincent Celier  <celier@adacore.com>
2983
2984         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2985         half character in the unit name.
2986
2987 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
2988
2989         * exp_ch4.adb: Minor code and comment reformatting.
2990
2991 2011-09-01  Thomas Quinot  <quinot@adacore.com>
2992
2993         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2994         for Is_Limited_Type and Is_Tagged_Type in condition checking
2995         for by-reference type.
2996         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2997         subprograms may have a completion because of a previous
2998         Inline_Always clause, but the enclosing package must be marked
2999         inlined for the subprogram body to become visible to the backend.
3000
3001 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3002
3003         * sem_aux.adb, exp_ch4.adb: Minor reformatting
3004
3005 2011-09-01  Pascal Obry  <obry@adacore.com>
3006
3007         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
3008
3009 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3010
3011         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
3012         the formals of a subprogram stub that acts as a spec.
3013
3014 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3015
3016         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
3017         type, declare a renaming for it, not an object declaration.
3018
3019 2011-09-01  Yannick Moy  <moy@adacore.com>
3020
3021         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
3022         Ignore_Errors to ignore failures to read ALI files when True.
3023
3024 2011-09-01  Javier Miranda  <miranda@adacore.com>
3025
3026         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
3027         constructor calls associated with non-tagged record types.
3028
3029 2011-09-01  Robert Dewar  <dewar@adacore.com>
3030
3031         * g-socthi-vms.adb: Minor reformatting.
3032
3033 2011-09-01  Nicolas Roche  <roche@adacore.com>
3034
3035         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
3036         in order to avoid impact of imcompatible changes.
3037         * cstreams.c: Likewise
3038         * cio.c: Likewise
3039         * aux-io.c: Likewise
3040
3041 2011-09-01  Yannick Moy  <moy@adacore.com>
3042
3043         * lib-writ.adb (Write_With_Lines): Always output complete information
3044         on "with" line in Alfa mode, as this is required by formal verification
3045         back-end.
3046
3047 2011-09-01  Tristan Gingold  <gingold@adacore.com>
3048
3049         * g-socthi-vms.adb: Add comments.
3050
3051 2011-09-01  Pascal Obry  <obry@adacore.com>
3052
3053         * prj.ads: Minor reformatting.
3054
3055 2011-09-01  Vincent Celier  <celier@adacore.com>
3056
3057         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
3058         exceptions in the config pragmas file.
3059
3060 2011-09-01  Tristan Gingold  <gingold@adacore.com>
3061
3062         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
3063
3064 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3065
3066         * exp_ch7.adb (Find_Insertion_List): New routine.
3067         (Process_Transient_Objects): Add code to handle the abnormal
3068         finalization of a controlled transient associated with a subprogram
3069         call. Since transients are cleaned up right after the associated
3070         context, an exception raised during a subprogram call may bypass the
3071         finalization code.
3072
3073 2011-09-01  Robert Dewar  <dewar@adacore.com>
3074
3075         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3076         aliased.
3077
3078 2011-09-01  Robert Dewar  <dewar@adacore.com>
3079
3080         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3081
3082 2011-09-01  Robert Dewar  <dewar@adacore.com>
3083
3084         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3085
3086 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3087
3088         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3089         GNATRTL_NONTASKING_OBJS.
3090
3091 2011-09-01  Robert Dewar  <dewar@adacore.com>
3092
3093         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3094         possibility of this flag being set for formals in Ada 2012 mode.
3095         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3096         2012.
3097         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3098         mode.
3099         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3100         Ada 2012.
3101         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3102         Ada 2012.
3103
3104 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3105
3106         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3107         insertion node in a tree of nested Expression_With_Actions nodes.
3108         (Process_Transient_Object): In the case where a complex if statement
3109         has been converted into nested Expression_With_Actions nodes, the
3110         "hook" object and the associated access type must be inserted before
3111         the top most Expression_With_Actions.
3112
3113 2011-09-01  Robert Dewar  <dewar@adacore.com>
3114
3115         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3116         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3117
3118 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3119
3120         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3121
3122 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3123
3124         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3125         aspect.
3126         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3127         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3128         in a similar way as we do for the Priority or Dispatching_Domain aspect.
3129         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3130         Dispatching_Domains_Frozen): Move this local data to package
3131         System.Tasking because with the CPU aspect we need to have access
3132         to this data when creating the task in System.Tasking.Stages.Create_Task
3133         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3134         Move these variables from the body of
3135         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3136         we need to have access to this data when creating the task in
3137         System.Tasking.Stages.Create_Task.
3138         * s-taskin.adb (Initialize): Signal the allocation of the environment
3139         task to a CPU, if any, so that we know whether the CPU can be
3140         transferred to a different dispatching domain.
3141         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3142         is being allocated belongs to the dispatching domain where the task
3143         lives. Signal the allocation of the task to a CPU, if any, so that we
3144         know whether the CPU can be transferred to a different dispatching
3145         domain.
3146
3147 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3148
3149         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3150         attributes Same_Storage and Overlaps_Storage.
3151
3152 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3153
3154         * exp_strm.adb: Remove with and use clause for Opt.
3155         (Build_Array_Input_Function): Remove the version-dependent generation
3156         of the return statement. The Ada 2005 tree is now the default.
3157
3158 2011-09-01  Yannick Moy  <moy@adacore.com>
3159
3160         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3161         it is never empty when compiling in Alfa mode.
3162
3163 2011-09-01  Robert Dewar  <dewar@adacore.com>
3164
3165         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3166         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3167         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3168         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3169
3170 2011-09-01  Matthew Heaney  <heaney@adacore.com>
3171
3172         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3173         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3174         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3175         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3176         unbounded queue container.
3177         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3178         bounded queue container.
3179         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3180         unbounded priority queue container.
3181         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3182         bounded priority queue container.
3183
3184 2011-08-31  Pascal Obry  <obry@adacore.com>
3185
3186         * a-direct.adb: Do not try to create an UNC path on Windows.
3187         (Create_Path): Skip leading computer name in UNC path if any.
3188
3189 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3190
3191         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3192         version-dependent generation of the return statement. The Ada 2005 tree
3193         is now the default.
3194
3195 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3196
3197         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3198         types Stream_Element_Offset and Storage_Offset have a different native
3199         type depending on whether the platform is 32 or 64 bits. When
3200         exchanging them, always convert to 64 bits.
3201
3202 2011-08-31  Yannick Moy  <moy@adacore.com>
3203
3204         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3205         --force-alfa to gnat2why.
3206
3207 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3208
3209         * sem_ch12.adb (Save_References): If the node has aspects, save
3210         references within the corresponding expressions in a separate step,
3211         because the aspects are not directly in the tree for the declaration
3212         to which they belong.
3213
3214 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3215
3216         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3217         in CodePeer mode, since representation clauses are partially ignored.
3218         * gcc-interface/Make-lang.in: Update dependencies.
3219
3220 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3221
3222         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3223         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3224         to any dispatching domain.
3225
3226 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3227
3228         * exp_ch4.adb: Minor reformatting.
3229
3230 2011-08-31  Bob Duff  <duff@adacore.com>
3231
3232         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3233         on nodes for which it is not defined.
3234         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3235         parent type.
3236
3237 2011-08-31  Bob Duff  <duff@adacore.com>
3238
3239         * sem_ch3.adb (Process_Full_View): Disable legality check if
3240         In_Instance, to avoid spurious errors.
3241         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3242         if In_Instance, to avoid spurious errors.
3243
3244 2011-08-31  Pascal Obry  <obry@adacore.com>
3245
3246         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3247         directory speparators.
3248         (Compose): Use Dir_Seps to handle both forms.
3249         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3250         changes.
3251         (Extension): Use Dir_Seps to handle both forms.
3252
3253 2011-08-31  Pascal Obry  <obry@adacore.com>
3254
3255         * prj-conf.adb: Minor reformatting.
3256
3257 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3258
3259         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3260         dispatching domain aspect.
3261         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3262         aspect.
3263         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3264         Dispatching_Domain aspect in a similar way as we do for the Priority
3265         aspect.
3266         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3267         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3268         is present.
3269         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3270         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3271         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3272         Dispatching_Domain and add it to the task definition.
3273         (Sig_Flags): Add Pragma_Dispatching_Domain.
3274         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3275         support to find the types Dispatching_Domain and
3276         Dispatching_Domain_Access.
3277         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3278         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3279         query the availability of a pragma Dispatching_Domain.
3280         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3281         the expander to pass the Dispatching_Domain when creating a task.
3282         (Name_Dispatching_Domain): Add this new name for a pragma.
3283         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3284         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3285         task has been allocated at creation time.
3286         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3287         Ravenscar is always null.
3288         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3289         the task has been allocated at creation time.
3290         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3291         a specific dispatching domain.
3292         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3293         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3294         and CPU are specified for the task, and the CPU value is not contained
3295         within the range of processors for the domain.
3296
3297 2011-08-31  Vincent Celier  <celier@adacore.com>
3298
3299         * make.adb (Original_Gcc) : New constant String_Access.
3300         (Gnatmake): For VM targets, do not use VM version of the compiler if
3301         --GCC= has been specified.
3302
3303 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3304
3305         * sem_ch5.adb: Minor reformatting.
3306
3307 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3308
3309         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3310         not reanalyze it.
3311
3312 2011-08-31  Bob Duff  <duff@adacore.com>
3313
3314         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3315         the access type is private; we don't care about privacy in expansion.
3316
3317 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3318
3319         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3320         subcomponents tnat may be limited, because they originate in view
3321         conflicts. If the original aggregate is legal and the actuals are
3322         legal, the aggregate itself is legal.
3323
3324 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3325
3326         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3327         status.
3328
3329 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3330
3331         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3332         errors in B tests.
3333
3334 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3335
3336         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3337         Interrupt_Priority aspects, force the analysis of the aspect expression
3338         (when building the equivalent pragma). Otherwise, its analysis is done
3339         too late, after the task or protected object has been created.
3340         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3341         Analyze_Single_Task_Declaration): Remove the code to move the aspects
3342         to the object declaration because they are needed in the type
3343         declaration.
3344
3345 2011-08-31  Robert Dewar  <dewar@adacore.com>
3346
3347         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3348         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3349         reformatting.
3350
3351 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3352
3353         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3354         if the corresponding type is malformed due to restriction violations.
3355
3356 2011-08-31  Robert Dewar  <dewar@adacore.com>
3357
3358         * s-ransee.ads, s-ransee.adb: Minor reformatting.
3359
3360 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3361
3362         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3363         would cause the generation of Set_Finalize_Address if the target is a
3364         VM and the designated type is not derived from [Limited_]Controlled.
3365
3366 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3367
3368         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3369         subprogram.
3370         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3371         case of a compilation error.
3372
3373 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3374
3375         * init.c (__gnat_error_handler): Standardize the stack overflow or
3376         erroneous memory access message.
3377         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3378         or erroneous memory access message.
3379
3380 2011-08-31  Robert Dewar  <dewar@adacore.com>
3381
3382         * sem_ch4.adb: Minor reformatting.
3383         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3384
3385 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3386
3387         * scos.ads: Minor documentation clarification.
3388         * put_scos.adb: Do not generate SCO unit header line for a unit that
3389         has no SCO lines.
3390
3391 2011-08-31  Robert Dewar  <dewar@adacore.com>
3392
3393         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3394
3395 2011-08-31  Tristan Gingold  <gingold@adacore.com>
3396
3397         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3398         hold variables between these following subprograms.
3399         (Build_Exception_Handler, Build_Object_Declarations,
3400         Build_Raise_Statement): Use the above type as parameter.
3401         Make the above adjustments.
3402         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3403
3404 2011-08-31  Pascal Obry  <obry@adacore.com>
3405
3406         * projects.texi: Minor reformatting.
3407
3408 2011-08-31  Tristan Gingold  <gingold@adacore.com>
3409
3410         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3411         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3412
3413 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3414
3415         * exp_ch5.adb: Minor code cleanup.
3416         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3417         prevent cascaded errors.
3418         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3419         variable of an iterator specification in current scope.
3420         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3421         postconditions on the stack, as they contain no return statements.
3422
3423 2011-08-31  Yannick Moy  <moy@adacore.com>
3424
3425         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3426         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3427         call Qualify_Entity_Names.
3428         (Expand_Alfa): call Qualify_Entity_Names in more cases
3429         * lib-xref-alfa.adb: Take into account system package.
3430         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3431         CodePeer mode in which we are interested in finding bugs even if
3432         compiler cannot compile source.
3433         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3434         deferred constant.
3435
3436 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3437
3438         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3439         denoted by the subtype mark to ensure getting the concurrent type in
3440         the case where the subtype mark denotes a private subtype of a
3441         concurrent type (needed when using -gnatc).
3442         (Process_Subtype): For the processing specific to type kinds, case on
3443         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3444         subtype denotes a private subtype whose base type is nonprivate (needed
3445         for subtypes of private fulfilled by task types when compiling with
3446         -gnatc).
3447
3448 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3449
3450         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3451         late primitives that override interface operations when the full
3452         expander is not active, to avoid blowups in Register_Primitive when
3453         types don't have associated secondary dispatch tables.
3454
3455 2011-08-31  Yannick Moy  <moy@adacore.com>
3456
3457         * alfa_test.adb: Code clean up.
3458
3459 2011-08-31  Marc Sango  <sango@adacore.com>
3460
3461         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3462         by Comes_From_Source (Original_Node (N)) in order to treat also the
3463         nodes which have been rewritten.
3464         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3465         explicit dereference and slice violation in spark mode on the nodes 
3466         coming only from the source code.
3467
3468 2011-08-31  Robert Dewar  <dewar@adacore.com>
3469
3470         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3471         lib-xref-alfa.adb: Minor reformatting.
3472
3473 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3474
3475         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3476
3477 2011-08-31  Javier Miranda  <miranda@adacore.com>
3478
3479         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3480         only for class-wide subprograms conflicting with entities of concurrent
3481         tagged types.
3482
3483 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3484
3485         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3486         node to null value.
3487
3488 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3489
3490         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3491         general description of the routine.
3492
3493 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3494
3495         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3496         doubly-linked lists.
3497
3498 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3499
3500         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3501         check is needed for a left-hand side that is a dereference, and the
3502         base type is private without discriminants (whereas the full type does
3503         have discriminants), an extra retrieval of the underlying type may be
3504         needed in the case where the subtype is a record subtype whose base
3505         type is private. Update comments.
3506
3507 2011-08-31  Javier Miranda  <miranda@adacore.com>
3508
3509         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3510         found check if there is a class-wide subprogram covering the primitive.
3511         
3512 2011-08-31  Yannick Moy  <moy@adacore.com>
3513
3514         * sem_res.adb: Further cases where full expansion test is needed,
3515         rather than expansion test.
3516
3517 2011-08-31  Pascal Obry  <obry@adacore.com>
3518
3519         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3520
3521 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3522
3523         * exp_ch5.adb: Handle iterators over derived container types.
3524
3525 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3526
3527         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3528         (Has_Anonymous_Master): New routine.
3529         (Set_Has_Anonymous_Master): New routine.
3530         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3531         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3532         (Current_Anonymous_Master): New routine.
3533         (Current_Unit_First_Declaration): Removed.
3534         (Current_Unit_Scope): Removed.
3535         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3536         their objects on a per-unit heterogeneous finalization master.
3537
3538 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3539
3540         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3541         array.
3542
3543 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3544
3545         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3546         when not needed.
3547
3548 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3549
3550         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3551         where the actual is an unexpanded call to 'Input.
3552
3553 2011-08-31  Yannick Moy  <moy@adacore.com>
3554
3555         * sem_ch4.adb: Code clean up.
3556
3557 2011-08-31  Yannick Moy  <moy@adacore.com>
3558
3559         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3560
3561 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3562
3563         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3564         and TSS primitive Finalize_Address if finalization is suppressed.
3565         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3566         primitive Finalize_Address if finalization is suppressed.
3567
3568 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3569
3570         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3571         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3572         sure that the underlying task has already been created before trying
3573         to change its affinity.
3574         (Set_CPU): Use the term processor instead of CPU, as we do in
3575         Assign_Task.
3576
3577 2011-08-31  Vincent Celier  <celier@adacore.com>
3578
3579         * prj-attr.adb: New Compiler attribute Source_File_Switches.
3580         * prj-nmsc.adb (Process_Compiler): Process attribute
3581         Source_File_Switches.
3582         * prj.ads (Language_Config): New name list component
3583         Name_Source_File_Switches.
3584         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3585
3586 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3587
3588         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3589         discriminated component of an actual, expand at once to prevent
3590         ouf-of-order references with generated subtypes.
3591
3592 2011-08-31  Yannick Moy  <moy@adacore.com>
3593
3594         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3595         reference to operator in Alfa xrefs.
3596
3597 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3598
3599         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3600         where the parent instance was frozen before the current instance due to
3601         the presence of a source body. Update calls to Insert_After_Last_Decl.
3602         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3603         Update the comment which illustrates the purpose of the routine.
3604         Package instances are now frozen by source bodies which appear after
3605         the instance. This ensures that entities coming from within the
3606         instance are available for use in the said bodies.
3607         (Install_Body): Add code to handle the case where the parent instance
3608         was frozen before the current instance due to the presence of a source
3609         body. Update calls to Insert_After_Last_Decl.
3610
3611 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3612
3613         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3614         access types.
3615         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3616
3617 2011-08-31  Yannick Moy  <moy@adacore.com>
3618
3619         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3620         full-expander test.
3621         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3622         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3623         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3624         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3625         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3626         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3627         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3628         ALFA in Alfa (we dropped acronym).
3629         * einfo.adb (Primitive_Operations): Correctly return list of primitive
3630         operations in a case where it returned previously No_Elist.
3631
3632 2011-08-31  Robert Dewar  <dewar@adacore.com>
3633
3634         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3635         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3636         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3637         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3638         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3639         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3640         reformatting.
3641
3642 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3643
3644         * sem_ch12 (Check_Private_View): Revert previous change.
3645         * sem_res.adb (Conversion_Check): Do not emit the error message if the
3646         conversion is in a generic instance.
3647
3648 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3649
3650         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3651         * a-chtgbo.adb (Free): Allow 0 as index value.
3652
3653 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3654
3655         * a-cborma.adb (Insert): Add comment to explain why no element
3656         assignment.
3657
3658 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3659
3660         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3661         spec discriminant is already a concurrent type, in which case just use
3662         it, otherwise fetch the Corresponding_Concurrent_Type as before.
3663
3664 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3665
3666         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3667         system-linux-mips.ads, system-linux-mipsel.ads,
3668         system-linux-mips64el.ads, system-linux-ppc64.ads,
3669         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3670
3671 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3672
3673         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3674         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3675         (build_unary_op): Likewise.
3676
3677 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3678
3679         * raise-gcc.c: Do not include coretypes.h and tm.h.
3680         (setup_to_install): Remove test for compiler macro.
3681         * targext.c: Document use for the library.
3682         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3683
3684 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3685
3686         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3687         the expression to the nominal type if the latter is a record type with
3688         a variant part and the type of the former is a record type without one.
3689
3690 2011-08-30  Yannick Moy  <moy@adacore.com>
3691
3692         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3693         expansion in Alfa mode.
3694         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3695         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3696         Alfa mode.
3697         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3698         * sem_res.adb: Ditto.
3699         * gcc-interface/Make-lang.in: Update dependencies.
3700
3701 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3702
3703         * g-socket.ads: Minor documentation adjustment.
3704
3705 2011-08-30  Robert Dewar  <dewar@adacore.com>
3706
3707         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3708
3709 2011-08-30  Yannick Moy  <moy@adacore.com>
3710
3711         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3712         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3713         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3714         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3715         Revert change which introduced files for "light"
3716         expansion, to be replaced by a single file for Alfa expansion.
3717
3718 2011-08-30  Robert Dewar  <dewar@adacore.com>
3719
3720         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3721         Minor code reorg/reformatting.
3722
3723 2011-08-30  Yannick Moy  <moy@adacore.com>
3724
3725         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3726         common shorthand for (Expander_Active and not ALFA_Mode) that can be
3727         used for testing full expansion, that is active expansion not in the
3728         reduced mode for Alfa
3729         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3730         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3731         of the verbose (Expander_Active and not ALFA_Mode)
3732
3733 2011-08-30  Tristan Gingold  <gingold@adacore.com>
3734
3735         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3736         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3737         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3738         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3739
3740 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
3741
3742         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3743         access conversions to check that the conversion is a rewritten node,
3744         rather than just having Comes_From_Source set to False, which wasn't
3745         sufficient.
3746
3747 2011-08-30  Robert Dewar  <dewar@adacore.com>
3748
3749         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3750         g-socket.ads: Minor reformatting.
3751
3752 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3753
3754         * sem_util.adb: Minor reformatting.
3755
3756 2011-08-30  Tristan Gingold  <gingold@adacore.com>
3757
3758         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3759         to be compliant with the ABI.
3760
3761 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
3762
3763         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3764         of a designated type when the related access type is an actual in an
3765         instance. This ensures that the full view of designated type is
3766         available when inside the body of the instance.
3767
3768 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3769
3770         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3771         in a position to be modified, a slice is treated like an indexed
3772         component.
3773
3774 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3775
3776         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3777         field tv_sec in struct timeval.
3778
3779 2011-08-30  Yannick Moy  <moy@adacore.com>
3780
3781         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3782         blocks of code doing full expansion, previously only guarded by
3783         Expander_Active, by anding the test that ALFA_Mode is not set
3784
3785 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3786
3787         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3788         add the function to the list of private dependents, for subsequent
3789         legality check on Taft amendment types.
3790         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3791         Private_Dependents, as for other incomplete types.
3792         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3793         Taft-amendment type is used as the return type of a function.
3794
3795 2011-08-30  Javier Miranda  <miranda@adacore.com>
3796
3797         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3798         which emits an error by a call to a new routine which report the error.
3799         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3800         entity does not cover an existing interface.
3801         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3802         code.
3803         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3804         protected procedures or entries whose mode is not conformant.
3805         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3806         an error by a call to a new routine which report the error.
3807
3808 2011-08-30  Robert Dewar  <dewar@adacore.com>
3809
3810         * gnat_rm.texi: Minor change.
3811         * exp_attr_light.adb: Minor reformatting.
3812
3813 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3814
3815         * sem_ch3.adb: Patch inheritance of aspects in
3816         Complete_Private_Subtype, to avoid infinite loop.
3817
3818 2011-08-30  Javier Miranda  <miranda@adacore.com>
3819
3820         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3821         been reported and a subprogram covering an interface primitive is not
3822         found then skip generating the internal entity. Done to avoid crashing
3823         the frontend.
3824         (Check_Abstract_Overriding): Change text of error of wrong formal of
3825         protected subprogram or entry. Done for consistency to emit exactly the
3826         same error reported by Check_Synchronized_Overriding. In addition, the
3827         error is restricted to protected types (bug found working on AI05-0090)
3828
3829 2011-08-30  Yannick Moy  <moy@adacore.com>
3830
3831         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3832         expansion in Alfa mode.
3833         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3834         * exp_light.adb, exp_light.ads: New package defining light expansion.
3835         * expander.adb (Expand): Call light expansion in Alfa mode
3836         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3837         constructs.
3838         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3839         constructs.
3840         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3841         * gnat1drv.adb (Adjust_Global_Switches): Comment
3842
3843 2011-08-30  Yannick Moy  <moy@adacore.com>
3844
3845         * lib-xref-alfa.adb: Minor refactoring.
3846
3847 2011-08-30  Yannick Moy  <moy@adacore.com>
3848
3849         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3850         mode.
3851         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3852         expansion in Alfa mode.
3853         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3854         mode.
3855
3856 2011-08-30  Robert Dewar  <dewar@adacore.com>
3857
3858         * debug_a.adb: Update comment.
3859
3860 2011-08-30  Robert Dewar  <dewar@adacore.com>
3861
3862         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3863         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3864         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3865         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3866
3867 2011-08-30  Robert Dewar  <dewar@adacore.com>
3868
3869         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3870         volatile.
3871
3872 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
3873
3874         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3875         Build_Finalization_Master by supplying an insertion node and enclosing
3876         scope. In its old version, the call did not generate a finalization
3877         master.
3878         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3879         recognize anonymous access-to-controlled components. Rewrite the
3880         machinery which creates finalization masters to service anonymous
3881         access-to-controlled components of a record type. In its current state,
3882         only one heterogeneous master is necessary to handle multiple anonymous
3883         components.
3884         (Freeze_Type): Comment reformatting.
3885         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3886         RE_Unit_Table.
3887         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3888         associates TSS primitive Finalize_Address with either the master itself
3889         or with the internal hash table depending on the mode of operation of
3890         the master.
3891
3892 2011-08-30  Javier Miranda  <miranda@adacore.com>
3893
3894         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3895         interface type then do not generate code to compare this component.
3896         Required since they have no components and their equality operator is
3897         abstract.
3898
3899 2011-08-30  Steve Baird  <baird@adacore.com>
3900
3901         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3902         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3903         returns the (static) accessibility level of the object. Otherwise, the
3904         same as Type_Access_Level.
3905         (Dynamic_Accessibility_Level): New function; given an expression which
3906         could occur as the rhs of an assignment to a saooaaat (i.e., an
3907         expression of an access-to-object type), return the new value for the
3908         saooaaat's associated Extra_Accessibility object.
3909         (Effective_Extra_Accessibility): New function; same as
3910         Einfo.Extra_Accessibility except that object renames are looked through.
3911         * sem_util.adb 
3912         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3913         (Dynamic_Accessibility_Level): New function; see sem_util.ads
3914         description.
3915         (Effective_Extra_Accessibility): New function; see sem_util.ads
3916         description.
3917         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3918         (Extra_Accessibility): Update comments.
3919         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3920         except RM_Size field (which is only for types) is unaffected.
3921         * einfo.adb
3922         (Extra_Accessibility): Expand domain to allow objects, not just formals.
3923         (Set_Extra_Accessibility): Expand domain to allow objects, not just
3924         formals.
3925         (Init_Size): Add assertion that we are not trashing the
3926         Extra_Accessibility attribute of an object.
3927         (Init_Size_Align): Add assertion that we are not trashing the
3928         Extra_Accessibility attribute of an object.
3929         (Init_Object_Size_Align): New procedure; see einfo.ads description.
3930         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3931         differently for the type of a (non-library-level) saooaaat depending
3932         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3933         is queried in this set of changes - everything else (in particular,
3934         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3935         driven off of the setting of the Is_Local_Anonymous_Access attribute.
3936         The special treatment of library-level saooaaats is an optimization,
3937         not required for correctnesss. This is based on the observation that the
3938         Ada2012 rules (static and dynamic) for saooaaats turn out to be
3939         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3940         * exp_ch3.adb
3941         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3942         false for the type of a saooaaat, declare and initialize its
3943         accessibility level object and set the Extra_Accessibility attribute
3944         of the saooaaat to refer to this object.
3945         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3946         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3947         calls to Effective_Extra_Accessibility in order to support
3948         renames of saooaaats.
3949         (Expand_N_Type_Conversion): Add new local function,
3950         Has_Extra_Accessibility, and call it when determining whether an
3951         accessibility check is needed.
3952         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3953         evaluate to True (without raising an exception).
3954         * exp_ch5.adb
3955         (Expand_N_Assignment_Statement): When assigning to an Ada2012
3956         saooaaat, update its associated Extra_Accessibility object (if
3957         it has one). This includes an accessibility check.
3958         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3959         a saooaaat, update its Extra_Accessibility object too (if it
3960         has one).
3961         (Expand_Call): Replace a couple of calls to Type_Access_Level
3962         with calls to Dynamic_Access_Level to handle cases where
3963         passing a literal (any literal) is incorrect.
3964         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3965         checks associated with "Saooaat := Some_Object'Access;"; this must
3966         be rejected if Some_Object is declared in a more nested scope
3967         than Saooaat.
3968         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3969         assignment to a saooaaat even if Is_Local_Anonymous_Access
3970         returns False for its type (indicating a 2012-style saooaaat).
3971         * sem_ch8.adb
3972         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3973         (which is only appropriate for objects, not types) with a call
3974         of Init_Object_Size_Align in order to avoid trashing the
3975         Extra_Accessibility attribute of a rename (the two attributes
3976         share storage).
3977         * sem_res.adb
3978         (Valid_Conversion) Replace six calls to Type_Access_Level with
3979         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3980         Ada2012 non-library-level saooaaat, the former returns library level
3981         while the latter returns the (static) accessibility level of the
3982         saooaaat. A type conversion to the anonymous type of a saooaaat
3983         can only occur as part of an assignment to the saooaaat, so we
3984         know that such a conversion must be in a lhs context, so Deepest
3985         yields the result that we need. If such a conversion could occur,
3986         say, as the operand of an equality operator, then this might not
3987         be right. Also add a test so that static accessibilty checks are
3988         performed for converting to a saooaaat's type even if
3989         Is_Local_Anonymous_Access yields False for the type.
3990
3991 2011-08-30  Javier Miranda  <miranda@adacore.com>
3992
3993         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3994         controls generation of a warning associated with late declaration of
3995         dispatching functions. Required to avoid generating spurious
3996         warnings.
3997
3998 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
3999
4000         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
4001         return object has an anonymous access type and the function's type is
4002         a named access type.
4003         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
4004         conversions on implicit conversions, since such conversions can occur
4005         for anonymous access cases due to expansion. Issue error for attempt
4006         to rename an anonymous expression as an object of a named access type.
4007         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
4008         to indicate whether this function should report errors on invalid
4009         conversions.
4010         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
4011         the expression is of an anonymous access type and the expected type is
4012         a named general access type, rewrite the expression as a type
4013         conversion, unless this is an expression of a membership test.
4014         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
4015         calling of Error_Msg_N on new formal Report_Errs.
4016         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
4017         calling of Error_Msg_NE on new formal Report_Errs.
4018         (Valid_Conversion): Move declaration of this function to the package
4019         spec, to allow calls from membership test processing. For Ada 2012,
4020         enforce legality restrictions on implicit conversions of anonymous
4021         access values to general access types, disallowing such conversions in
4022         cases where the expression has a dynamic accessibility level (access
4023         parameters, stand-alone anonymous access objects, or a component of a
4024         dereference of one of the first two cases).
4025         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
4026         in the context of a named general access expected type.
4027         * exp_ch4.adb Add with and use of Exp_Ch2.
4028         (Expand_N_In): Add processing for membership tests applied to
4029         expressions of an anonymous access type. First, Valid_Conversion is
4030         called to check whether the test is statically False, and then the
4031         conversion is expanded to test that the expression's accessibility
4032         level is no deeper than that of the tested type. In the case of
4033         anonymous access-to-tagged types, a tagged membership test is applied
4034         as well.
4035         (Tagged_Membership): Extend to handle access type cases, applying the
4036         test to the designated types.
4037         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
4038         accessibility level, and the actual is a 'Access applied to a current
4039         instance, pass the accessibility level of the type of the current
4040         instance rather than applying Object_Access_Level to the prefix. Add a
4041         ??? comment, since this level isn't quite right either (will eventually
4042         need to pass an implicit level parameter to init procs).
4043
4044 2011-08-30  Bob Duff  <duff@adacore.com>
4045
4046         * s-taskin.ads: Minor comment fix.
4047
4048 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
4049
4050         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
4051         component and the selector is a dispatching operation, check if it is
4052         a prefixed call before rewriting as a parameterless function call.
4053
4054 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
4055
4056         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
4057         tsystem.h into $(RTSDIR) instead of rts.
4058
4059 2011-08-29  Robert Dewar  <dewar@adacore.com>
4060
4061         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4062         reformatting.
4063         * gcc-interface/Make-lang.in: Update dependencies.
4064
4065 2011-08-29  Yannick Moy  <moy@adacore.com>
4066
4067         * alfa.ads (Name_Of_Heap_Variable): New constant name.
4068         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4069         table to hold dereferences.
4070         (Add_ALFA_Xrefs): Take into account dereferences as special
4071         reads/writes to the variable "HEAP".
4072         (Enclosing_Subprogram_Or_Package): Move subprogram here.
4073         (Generate_Dereference): New procedure to store a read/write dereferencew
4074         in the table Drefs.
4075         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4076         the special "HEAP" var.
4077         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4078         in ALFA mode.
4079         * sem_util.adb (Note_Possible_Modification): Store write dereference
4080         in ALFA mode.
4081
4082 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4083
4084         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4085         ensures that the level of the subpool access type is not deeper than
4086         that of the pool object.
4087         * sem_util.adb (Object_Access_Level): Expand to handle defining
4088         identifiers.
4089         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4090         subpool handle name of a rewritten allocator.
4091
4092 2011-08-29  Robert Dewar  <dewar@adacore.com>
4093
4094         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4095
4096 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4097
4098         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4099         values, we generate multiple triples of parameters in the TypeCode.
4100         Bump Choice_Index for each such triple so that a subsequent default
4101         choice is associated with the correct index in the typecode.
4102
4103 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4104
4105         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4106         container.
4107         (First, Last): Handle properly an iterator over a null container.
4108
4109 2011-08-29  Bob Duff  <duff@adacore.com>
4110
4111         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4112         processing if we run across a node with no Scope. This can happen if
4113         we're with-ing an library-level instance, and that instance got errors
4114         that caused "instantiation abandoned".
4115         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4116         an exception instead of using Assert, so it won't go into an infinite
4117         loop, even when assertions are turned off.
4118
4119 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4120
4121         * a-coorse.adb: Proper handling of empty ordered sets.
4122
4123 2011-08-29  Johannes Kanig  <kanig@adacore.com>
4124
4125         * debug.adb: Add comments.
4126
4127 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4128
4129         * a-except.adb, a-except-2005.adb: Minor comment rewording and
4130         reformatting.
4131
4132 2011-08-29  Yannick Moy  <moy@adacore.com>
4133
4134         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4135         declaration for Itypes in Alfa mode.
4136
4137 2011-08-29  Robert Dewar  <dewar@adacore.com>
4138
4139         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4140         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4141         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4142         reformatting.
4143
4144 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4145
4146         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4147         package spec.
4148         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4149         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4150         while raising PE.
4151
4152 2011-08-29  Robert Dewar  <dewar@adacore.com>
4153
4154         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4155
4156 2011-08-29  Javier Miranda  <miranda@adacore.com>
4157
4158         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4159         renamings of formal subprograms when the actual for a formal type is
4160         class-wide.
4161
4162 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4163
4164         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4165         to Target.
4166
4167 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4168
4169         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4170         components of record type.
4171         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4172         to Target.
4173
4174 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4175
4176         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4177         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4178         container packages.
4179
4180 2011-08-29  Robert Dewar  <dewar@adacore.com>
4181
4182         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4183         reformatting.
4184
4185 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4186
4187         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4188         components of record type.
4189
4190 2011-08-29  Bob Duff  <duff@adacore.com>
4191
4192         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4193         by the termination handler.
4194
4195 2011-08-29  Yannick Moy  <moy@adacore.com>
4196
4197         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4198         created in Alfa mode, instead of inserting artificial declarations of
4199         non-Itypes in the tree.
4200         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4201         know if an Itype has a corresponding declaration, as defined in
4202         itypes.ads.
4203
4204 2011-08-29  Yannick Moy  <moy@adacore.com>
4205
4206         * gnat1drv.adb: Minor rewrite.
4207
4208 2011-08-29  Bob Duff  <duff@adacore.com>
4209
4210         * s-tasuti.adb (Make_Passive): Work around race condition in
4211         Make_Independent, which can cause Wait_Count to be zero. So instead of
4212         asserting that Wait_Count > 0, and then decrementing it, decrement it
4213         only if Wait_Count > 0.
4214         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4215         should be nonnegative, so declare them Natural instead of Integer.
4216
4217 2011-08-29  Robert Dewar  <dewar@adacore.com>
4218
4219         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4220         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4221         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4222         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4223         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4224
4225 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4226
4227         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4228
4229 2011-08-29  Vadim Godunko  <godunko@adacore.com>
4230
4231         * s-parint.ads: Minor comment clarification.
4232
4233 2011-08-29  Vincent Celier  <celier@adacore.com>
4234
4235         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4236         may be used as identifiers.
4237
4238 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4239
4240         * a-coinho.ads: Minor reformating.
4241
4242 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4243
4244         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4245         container of a derived type.
4246
4247 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4248
4249         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4250         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4251
4252 2011-08-29  Pascal Obry  <obry@adacore.com>
4253
4254         * exp_disp.adb: Minor comment fix.
4255         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4256         to avoid warnings when compiling with -Wall.
4257         (Make_Disp_Conditional_Select_Body): Likewise.
4258         (Make_Disp_Timed_Select_Body): Likewise.
4259
4260 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4261
4262         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4263         an entity name, generate reference for it.
4264
4265 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4266
4267         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4268         iterator form.
4269         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4270         the class-wide type.
4271         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4272
4273 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4274
4275         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4276         subtype for an object whose type is an unconstrained union.
4277
4278 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4279
4280         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4281         is allowed in a component definition, by AI95-406.
4282
4283 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4284
4285         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4286
4287 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4288
4289         * a-except-2005.adb: Alphabetize all routines.
4290         (Triggered_By_Abort): New routine.
4291         * a-except-2005.ads (Triggered_By_Abort): New routine.
4292         * a-except.adb Alphabetize all routines.
4293         (Triggered_By_Abort): New routine.
4294         * a-except.ads (Triggered_By_Abort): New routine.
4295         * exp_ch7.adb: Update all comments involving the detection of aborts in
4296         finalization code.
4297         (Build_Object_Declarations): Do not generate code to detect the
4298         presence of an abort at the start of finalization code, use a runtime
4299         routine istead.
4300         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4301         RE_Unit_Table.
4302         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4303         allocate a task on a subpool.
4304         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4305         The flag disables all actions related to the maintenance of
4306         Finalize_Address_Table when subpools are not in use.
4307         (Allocate_Any_Controlled): Signal the machinery that subpools are in
4308         use.
4309         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4310         performs costly task locking when subpools are not in use.
4311
4312 2011-08-29  Yannick Moy  <moy@adacore.com>
4313
4314         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4315         types and dispatching calls in Alfa mode.
4316         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4317         correspondance between body and spec scopes, to reuse utility functions
4318         (Traverse_Declarations_Or_Statements): Protect access to body for stub
4319         by testing the presence of the library unit for the body
4320         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4321         mode the expansion of accept statements is skipped
4322         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4323         the unique entity corresponding to the one returned by
4324         Unique_Defining_Entity applied to the enclosing declaration of the
4325         argument.
4326
4327 2011-08-29  Bob Duff  <duff@adacore.com>
4328
4329         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4330         gdb when x is not a node (it can be a node list, name_id, etc). pp is
4331         an alias for pn. ppp is an alias for pt.
4332
4333 2011-08-29  Javier Miranda  <miranda@adacore.com>
4334
4335         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4336         aggregate to take a consistent decision on the need to convert into
4337         assignments aggregates that initialize constant objects.
4338
4339 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4340
4341         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4342         Build_Allocate_Deallocate_Proc in order to handle allocation of
4343         non-controlled objects on subpools.
4344         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4345         to be end-user visible.
4346         * s-finmas.adb: Add with and use clause for System.HTable.
4347         Add an instantiation of Simple_HTable which provides a mapping between
4348         the address of a controlled object and the corresponding
4349         Finalize_Address used to clean up the object. The table is used when a
4350         master is operating in heterogeneous mode.
4351         (Attach): Explain why the input node is not verified on being already
4352         attached.
4353         (Delete_Finalize_Address): New routine.
4354         (Detach): Add pragma Assert which ensures that a node is already
4355         attached.
4356         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4357         since nodes are no longer removed on traversal. Explain why node
4358         detachment is undesirable in this case.
4359         (Get_Finalize_Address): New routine.
4360         (Hash): New routine.
4361         (Is_Empty_List): Removed.
4362         (pm): Renamed to Print_Master. Add output for discriminant
4363         Is_Homogeneous.
4364         Comment reformatting.
4365         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4366         * s-finmas.ads: Various comments additions / improvements.
4367         Type Finalization_Master has a discriminant which determines the mode of
4368         operation.
4369         (Delete_Finalize_Address): New routine.
4370         (Get_Finalize_Address): New routine.
4371         (pm): Renamed to Print_Master.
4372         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4373         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4374         use clause for System.IO.
4375         (Allocate_Any_Controlled): Add machinery to set TSS primitive
4376         Finalize_Address depending on the mode of allocation and the mode of
4377         the master.
4378         (Deallocate_Any_Controlled): Remove the relation pair object -
4379         Finalize_Address regardless of the master mode. Add comment explaining
4380         the reason.
4381         (Detach): Ensure that fields Prev and Next are null after detachment.
4382         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4383         scheme to check whether the list of subpools is empty. There is no
4384         longer need to store the next subpool or advance the current pointer.
4385         (Is_Empty_List): New routine.
4386         (Print_Pool): New routine.
4387         (Print_Subpool): New routine.
4388         * s-stposu.ads: Various comments additions / improvements.
4389         Field Master of type Root_Subpool is now a heterogeneous collection.
4390         (Print_Pool): New routine.
4391         (Print_Subpool): New routine.
4392
4393 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4394
4395         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4396         forms, using aspects of container types.
4397         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4398         Has_Implicit_Dereference flags, that may be set on the partial view.
4399         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4400         container type with an indexing aspect.
4401         (Analyze_Quantified_Expression): Analyze construct with expansion
4402         disabled, because it will be rewritten as a loop during expansion.
4403         (Try_Container_Indexing): The prefix itself may be a container type
4404         with an indexing aspect, as with a vector of vectors.
4405         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4406         the original doamin of iteration, for name capture.
4407         (Analyze_Iterator_Specification): If the domain is an expression that
4408         needs finalization, create a separate declaration for it.
4409         For an iterator with "of" retrieve default iterator info from aspect of
4410         container type. For "in" iterator, retrieve type of Iterate function.
4411         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4412         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4413         analysis, to prevent spurious errors about late attributes.
4414         * sprint.adb: Handle quantified expression with either loop or iterator
4415         specification.
4416         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4417         iterator.
4418
4419 2011-08-29  Vincent Celier  <celier@adacore.com>
4420
4421         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4422         Binder or Linker of the main project file.
4423
4424 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4425
4426         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4427         unit.
4428
4429 2011-08-29  Yannick Moy  <moy@adacore.com>
4430
4431         * exp_ch9.adb: Partial revert of previous change for Alfa mode
4432
4433 2011-08-29  Yannick Moy  <moy@adacore.com>
4434
4435         * exp_ch11.adb: Minor expansion of comment.
4436
4437 2011-08-29  Yannick Moy  <moy@adacore.com>
4438
4439         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4440
4441 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4442
4443         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4444         interpretation, set the type before resolving the operands, because
4445         legality checks on an exponention operand need to know the type of the
4446         context.
4447
4448 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4449
4450         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4451         cleanups on a master if the instance is within a generic unit.
4452         Complement to the corresponding fix to inline.adb for K520-030.
4453
4454 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4455
4456         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4457         occurrence.
4458         * exp_intr.adb: Minor comment fix.
4459
4460 2011-08-29  Bob Duff  <duff@adacore.com>
4461
4462         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4463         Delay_Required was used as an uninitialized variable.
4464
4465 2011-08-29  Robert Dewar  <dewar@adacore.com>
4466
4467         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4468         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4469         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4470
4471 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4472
4473         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4474         Remove unused variables.
4475
4476 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4477
4478         * sem_res.adb: Remove Build_Explicit_Dereference.
4479         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4480         from sem_res.adb, used in analysis of additional constructs.
4481         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4482         expansion of iterators.
4483         (Is_Object_Reference): Recognize variables rewritten as explicit
4484         dereferences in Ada2012.
4485         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4486         Reversible_Iterator names, for expansion of Ada2012 iterators.
4487         * aspects.ads, aspects.adb (Find_Aspect): Utility.
4488         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4489         linked list container.
4490         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4491         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4492
4493 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4494
4495         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4496         containers.
4497
4498 2011-08-29  Vincent Celier  <celier@adacore.com>
4499
4500         * make.adb (Gnatmake): Get the maximum number of simultaneous
4501         compilation processes after the Builder switches has been scanned, as
4502         there may include -jnn.
4503
4504 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4505
4506         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4507
4508 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4509
4510         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4511         GNAT_DRIVER_COMMAND_LINE to 255.
4512
4513 2011-08-29  Pascal Obry  <obry@adacore.com>
4514
4515         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4516         reformatting and style fix (class attribute casing).
4517
4518 2011-08-29  Yannick Moy  <moy@adacore.com>
4519
4520         * exp_ch11.adb: Yet another case where expansion should be common
4521         between CodePeer and Alfa.
4522
4523 2011-08-29  Yannick Moy  <moy@adacore.com>
4524
4525         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4526
4527 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4528
4529         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4530         incomplete type and its completion match.
4531
4532 2011-08-29  Yannick Moy  <moy@adacore.com>
4533
4534         * exp_ch13.adb: Adjust previous change.
4535
4536 2011-08-29  Robert Dewar  <dewar@adacore.com>
4537
4538         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4539         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4540         Minor reformatting.
4541
4542 2011-08-29  Emmanuel Briot  <briot@adacore.com>
4543
4544         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4545         initialize aggregated projects.
4546
4547 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4548
4549         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4550         depth of candidates to resolve a potentially spurious ambiguity between
4551         two visible subprograms.
4552
4553 2011-08-29  Yannick Moy  <moy@adacore.com>
4554
4555         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4556         Requires/Ensures.
4557         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4558         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4559         Requires/Ensures.
4560
4561 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
4562
4563         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4564         Add comment.
4565
4566 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4567
4568         * sem_res.adb: Minor reformatting.
4569
4570 2011-08-29  Johannes Kanig  <kanig@adacore.com>
4571
4572         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4573         mode.
4574         * gnat1drv.adb (Adjust_Global_Switches): Set
4575         Use_Expressions_With_Actions to False in ALFA mode.
4576         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4577         ALFA mode.
4578
4579 2011-08-29  Yannick Moy  <moy@adacore.com>
4580
4581         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4582         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4583         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4584         tagged types and dispatching calls in Alfa mode.
4585
4586 2011-08-29  Javier Miranda  <miranda@adacore.com>
4587
4588         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4589         we do not report an error on an Empty node.
4590
4591 2011-08-29  Geert Bosch  <bosch@adacore.com>
4592
4593         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4594         a-nlrear.o and a-nurear.o.
4595
4596 2011-08-29  Robert Dewar  <dewar@adacore.com>
4597
4598         * freeze.adb: Minor code reorganization.
4599         Minor reformatting.
4600         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4601         sem_ch6.adb: Minor reformatting
4602
4603 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4604
4605         * s-except.ads, s-except.adb: Provide dummy body.
4606
4607 2011-08-29  Yannick Moy  <moy@adacore.com>
4608
4609         * sem_warn.adb (Within_Postcondition): Take into account the case of
4610         an Ensures component in a Test_Case.
4611
4612 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4613
4614         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4615         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4616         System_Exceptions_Debug
4617         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4618         * a-except.adb: With and use System.Exceptions_Debug instead of
4619         System.Exceptions.
4620         * a-except-2005.adb: Likewise.
4621         * s-assert.adb: Likewise.
4622         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4623         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
4624         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4625         s-excdeb. Update dependencies.
4626         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4627         as these no longer need external libraries.
4628
4629 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4630
4631         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4632         exponentiation operator on universal values in a context that requires
4633         a fixed-point type.
4634
4635 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4636
4637         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
4638         before calling notify_handled_exception.
4639         * a-exextr.adb: Fix comment.
4640
4641 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4642
4643         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4644         Finalize_Address of the access type's finalization master.
4645         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4646         access type's finalization master. Add a guard to prevent
4647         Associated_Storage_Pool from being set on .NET/JVM.
4648         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4649         attribute Finalize_Address of the access type's finalization master.
4650         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4651         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4652         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4653         RE_Unit_Table.
4654         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4655         use clause for System.IO
4656         (Detach): Relax the assertion, to be reinstated later.
4657         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4658         Relax the assertion on Finalize_Address, to be reinstated later.
4659         (Is_Empty_List): New routine.
4660         (pm): New debug routine.
4661         (Set_Finalize_Address): New routine.
4662         * s-finmas.ads (pm): New debug routine.
4663         (Set_Finalize_Address): New routine.
4664         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4665
4666 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4667
4668         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4669         Remove convention C.
4670
4671 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4672
4673         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4674         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4675         (Finalize_TCB): Remove its finalization.
4676         (Initialize): Remove assignment of GET_Exc_Stack_Addr
4677         * s-soflin.adb (NT_Exc_Stack): Remove
4678         (Get_Exc_Stack_Addr_NT): Likewise.
4679         (Get_Exc_Stack_Addr_Soft): Likewise.
4680         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4681         (Get_Exc_Stack_Addr): Likewise.
4682         (Get_Exc_Stack_Addr_Soft): Likewise
4683         * s-taspri-vms.ads (Exc_Stack_T): Remove.
4684         (Exc_Stack_Ptr_T): Likewise.
4685         (Private_Data): Remove Exc_Stack_Ptr component.
4686
4687 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4688
4689         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4690
4691 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4692
4693         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4694
4695 2011-08-29  Geert Bosch  <bosch@adacore.com>
4696
4697         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4698         L2_Norm, Swap_Column): New generic subprograms
4699         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4700         L2_Norm, Swap_Column): Implement new subprograms in order to
4701         eliminate dependency on BLAS and LAPACK libraries in
4702         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4703         version. Forward_Eliminate/Back_Substitute can be used to put a
4704         matrix in row echelon or reduced row echelon form using partial
4705         pivoting.
4706         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4707         Swap_Column): Instantiate from System.Generic_Array_Operations.
4708         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4709         (Sqrt): Local function for simple computation of square root without
4710         adding dependencies on Generic_Elementary_Functions.
4711         (Swap): New subprogram to exchange floating point numbers.
4712         (Inverse): Reimplement using Jordan-Gauss elimination.
4713         (Jacobi): New procedure implementing Jacobi's method for computation
4714         of eigensystems, based on Rutishauser's implementation.
4715         (L2_Norm): Implement directly using the inner product.
4716         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4717         decreasing eigenvalue as required by the Ada RM.
4718         (Swap_Column): New helper procedure for Sort_Eigensystem.
4719         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4720         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4721         Sort_Eigensystems.
4722
4723 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4724
4725         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4726         statements line.
4727
4728 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4729
4730         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4731         than the current node.
4732         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4733         Finalization_Master. The list headers have two fields instead of three.
4734         This should fix alignment issue but subpool allocations are now
4735         unusable. Alphabetize subprograms.
4736         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4737         the size of the header when converting the beginning of the object to
4738         a FM_Node. Set the master's Finalize_Address attribute if not already
4739         set.
4740         (Deallocate_Any_Controlled): Use the offset rather than the size of the
4741         header when converting the beginning of the object to a FM_Node.
4742
4743 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
4744
4745         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4746         reraise when compiling for CodePeer.
4747
4748 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
4749
4750         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4751         now needed by a-convec.adb. Fix warning.
4752
4753 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4754
4755         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4756         processing of TSS routine Finalize_Address when compiling in
4757         CodePeer_Mode.
4758
4759 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4760
4761         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4762         sem_warn.adb: Minor reformatting.
4763
4764 2011-08-29  Emmanuel Briot  <briot@adacore.com>
4765
4766         * prj-conf.adb (Get_Config_Switches): Also collect the list of
4767         languages from aggregated projects.
4768
4769 2011-08-29  Yannick Moy  <moy@adacore.com>
4770
4771         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4772         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4773         Traverse_Package_Declaration, Traverse_Subprogram_Body,
4774         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4775         for stubs are traversed too when parameter is set
4776         (Traverse_All_Compilation_Units): Traverse without going inside stubs
4777         (Traverse_Declarations_Or_Statements): Do the special traversing for
4778         stubs when required.
4779         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4780         return subprogram or package body from stub.
4781         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4782         stubs without prior subprogram decl.
4783
4784 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
4785
4786         * gnat_ugn.texi: Fix typo.
4787
4788 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4789
4790         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4791         which accounts for size vs alignment issues and calculates the size of
4792         the list header.
4793         (Deallocate_Any_Controlled): Ditto.
4794         (Nearest_Multiple_Rounded_Up): New routine.
4795
4796 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4797
4798         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4799         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4800         (Set_Exception_Msg): Ditto.
4801         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
4802         Private_Data.
4803         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4804         Use Save_Occurrence instead of Save_Occurrence_No_Private.
4805         (Raise_With_Msg): Remove Cleanup_Flag.
4806         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4807         Clean_Flag and Private_Data components.
4808
4809 2011-08-29  Yannick Moy  <moy@adacore.com>
4810
4811         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4812         in CodePeer mode.
4813         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4814         of an explicitly declared type, so that the base types of the original
4815         type and this generated type are the same, and a "type" (not a subtype
4816         like previously).
4817         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4818         small" in Alfa mode, like in CodePeer mode.
4819         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4820         clauses in Alfa mode.
4821
4822 2011-08-29  Javier Miranda  <miranda@adacore.com>
4823
4824         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4825         function to the package spec.
4826         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4827         internally generated bodies of null procedures locate the internally
4828         generated spec enforcing mode conformance.
4829         (Is_Interface_Conformant): Ensure that the controlling formal of the
4830         primitives match.
4831
4832 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4833
4834         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4835         reject the pragma if it appears to apply to a formal subprogram.
4836
4837 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4838
4839         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4840         inner expression, to prevent double evaluation.
4841
4842 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4843
4844         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4845         they were unused.
4846         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4847         * a-except-2005.adb (Propagate_Exception): Adjust spec.
4848         (Raise_Current_Excep): Adjust call.
4849         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4850
4851 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4852
4853         * exp_disp.adb: Minor reformatting.
4854
4855 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4856
4857         * a-exexpr.adb (Setup_Exception): Removed.
4858         * a-exexpr-gcc.adb (Setup_Exception): Removed.
4859         * a-except.adb (Exception_Propagation): Removed.
4860         * a-except-2005.adb (Setup_Exception): Removed.
4861         (Reraise): Remove call to Setup_Exception.
4862         (Reraise_Occurrence): Ditto.
4863         (Reraise_Occurrence_Always): Ditto.
4864         (Reraise_Occurrence_No_Defer): Ditto.
4865         (Transfer_Occurrence): Ditto.
4866         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4867         (Set_Exception_Msg): Ditto.
4868
4869 2011-08-29  Robert Dewar  <dewar@adacore.com>
4870
4871         * a-convec.adb, exp_disp.adb: Minor reformatting.
4872
4873 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4874
4875         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4876
4877 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
4878
4879         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4880         Exception_Handlers to No_List instead of Empty_List in the case where
4881         there are no handlers.
4882
4883 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4884
4885         * gcc-interface/gigi.h (enum standard_datatypes): Add
4886         ADT_reraise_zcx_decl
4887         (reraise_zcx_decl): New macro.
4888         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4889         (gigi): Set reraise_zcx_decl.
4890         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4891         (gnat_to_gnu): Handle N_Raise_Statement.
4892
4893 2011-08-29  Robert Dewar  <dewar@adacore.com>
4894
4895         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4896         a-undesu.adb: Minor reformatting.
4897
4898 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4899
4900         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4901         table, accept an unfrozen untagged component if it is an actual for a
4902         formal incomplete type.
4903         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4904         provide new iterator forms over vectors.
4905         Introduce type Iterator in package body to implement operations of
4906         Reversible_Iterator interface.
4907         * a-iteint.ads: Make package pure so it is usable with new container
4908         packages, that are categorized Remote_Types.
4909
4910 2011-08-29  Robert Dewar  <dewar@adacore.com>
4911
4912         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4913
4914 2011-08-29  Bob Duff  <duff@adacore.com>
4915
4916         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4917         of <>, because this is the routine that checks for dimensionality
4918         errors (for example, for a two-dimensional array, (others => <>) should
4919         be (others => (others => <>)).
4920
4921 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4922
4923         * impunit.adb: Add new run-time units.
4924         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4925         s-stposu.ads, s-stposu.adb: Code clean up.
4926         Handle protected class-wide or task class-wide types
4927         Handle C/C++/CIL/Java types.
4928         * s-spsufi.adb, s-spsufi.ads: New files.
4929
4930 2011-08-29  Yannick Moy  <moy@adacore.com>
4931
4932         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4933         library-level subprogram.
4934         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4935         placement.
4936         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4937         component.
4938         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4939         component.
4940         * gnat_rm.texi: Update doc for Test_Case pragma.
4941
4942 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4943
4944         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4945         convention C.
4946         (GCC_Exception_Access): New type.
4947         (Unwind_DeleteException): New imported procedure
4948         (Foreign_Exception): Import it.
4949         (GNAT_GCC_Exception): Simply have the occurrence inside.
4950         (To_GCC_Exception): New function.
4951         (To_GNAT_GCC_Exception): New function.
4952         (GNAT_GCC_Exception_Cleanup): New procedure..
4953         (Propagate_GCC_Exception): New procedure.
4954         (Reraise_GCC_Exception): New procedure.
4955         (Setup_Current_Excep): New procedure.
4956         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4957         (Unwind_RaiseException): Ditto.
4958         (Unwind_ForcedUnwind): Ditto.
4959         (Remove): Removed.
4960         (Begin_Handler): Change type of parameter.
4961         (End_Handler): Ditto. Now delete the exception if still present.
4962         (Setup_Key): Removed.
4963         (Is_Setup_And_Not_Propagated): Removed.
4964         (Set_Setup_And_Not_Propagated): Ditto.
4965         (Clear_Setup_And_Not_Propagated): Ditto.
4966         (Save_Occurrence_And_Private): Ditto.
4967         (EID_For): Add 'not null' constraint on parameter.
4968         (Setup_Exception): Does nothing.
4969         (Propagate_Exception): Simplified.
4970         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4971         re-raise is not expanded anymore.
4972         * s-except.ads (Foreign_Exception): New exception - placeholder for
4973         non Ada exceptions.
4974         * raise-gcc.c (__gnat_setup_current_excep): Declare
4975         (CXX_EXCEPTION_CLASS): Define (not yet used)
4976         (GNAT_EXCEPTION_CLASS): Define.
4977         (is_handled_by): Handle foreign exceptions.
4978         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4979
4980 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
4981
4982         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4983
4984 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4985
4986         * a-synbar-posix.adb: Minor reformatting.
4987
4988 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
4989
4990         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4991         a-exetim-default.ads (Interrupt_Clocks_Supported,
4992         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4993         definitions to be compliant with AI-0171. The target systems do not
4994         support separate account for the execution time of interrupt handlers.
4995
4996 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
4997
4998         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4999         in the barrier to put first the easiest to evaluate (and the one which
5000         will be True more often). More efficient.
5001
5002 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
5003
5004         * s-atocou-x86.adb: Fix constraint in machine code insertion.
5005
5006 2011-08-29  Bob Duff  <duff@adacore.com>
5007
5008         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
5009         attributes that are now aspects, as specified by AI05-0229-1.
5010         * sem_ch13.adb (Analyze_Aspect_Specifications,
5011         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
5012         pragmas or attribute references, as appropriate.
5013
5014 2011-08-29  Robert Dewar  <dewar@adacore.com>
5015
5016         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
5017         a-synbar-posix.ads: Minor reformatting.
5018
5019 2011-08-29  Yannick Moy  <moy@adacore.com>
5020
5021         * snames.ads-tmpl: Add name Force.
5022
5023 2011-08-29  Pascal Obry  <obry@adacore.com>
5024
5025         * prj-nmsc.adb: Minor reformatting.
5026
5027 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5028
5029         * a-exetim.ads (Interrupt_Clocks_Supported,
5030         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5031         definitions to be compliant with AI-0171.
5032
5033 2011-08-29  Robert Dewar  <dewar@adacore.com>
5034
5035         * a-ngelfu.adb: Add comments.
5036
5037 2011-08-29  Geert Bosch  <bosch@adacore.com>
5038
5039         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
5040         the closest machine number to Pi / 2.0.
5041
5042 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5043
5044         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
5045         package Ada.Synchronous_Barriers.
5046         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
5047         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
5048         default implementation using protected objects and another one
5049         a-synbar-posix using POSIX barriers as the underlying support.
5050         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
5051         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
5052         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
5053         Clean up dependencies.
5054         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
5055
5056 2011-08-29  Robert Dewar  <dewar@adacore.com>
5057
5058         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
5059         exp_dist.adb: Minor code reorganization.
5060         Minor reformatting.
5061
5062 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5063
5064         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
5065         primitive operation must support external streaming if it is not a
5066         controlling access result.
5067
5068 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5069
5070         * sinfo.ads, sem_ch7.adb: Minor reformatting.
5071
5072 2011-08-29  Bob Duff  <duff@adacore.com>
5073
5074         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5075         restriction on allocators, as required by AI05-0013-1.
5076         * restrict.ads: Minor comment fix.
5077
5078 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5079
5080         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5081         (To_Jmpbuf_Address): Ditto
5082         (builtin_longjmp): Ditto
5083
5084 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5085
5086         * sem_res.adb: Minor reformatting.
5087
5088 2011-08-29  Vincent Celier  <celier@adacore.com>
5089
5090         * make.adb (Gnatmake): Move special processing for VM targets after the
5091         call to Get_Target_Parameters.
5092
5093 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5094
5095         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5096
5097 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5098
5099         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5100         where an anonymous access discriminant of a limited designated type
5101         appears in a non-immutably limited discriminated type and issue an
5102         error message. Add local variable Desig_T and replace all occurrences
5103         of Designated_Type.
5104
5105 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5106
5107         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5108         implementation is compliant to RM D.15(15/2) after the modification
5109         imposed by AI05-0094-1 (binding interpretation).
5110
5111 2011-08-29  Robert Dewar  <dewar@adacore.com>
5112
5113         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5114         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5115
5116 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5117
5118         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5119         the scope name, do not report a missing label as a style violation (it
5120         will be diagnosed as an illegality).
5121         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5122         variant records: Get_Enum_Lit_From_Pos already returns a usage
5123         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5124         on Expr in Integer_Literal case so that it can be used by
5125         Build_To_Any_Call.
5126
5127 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5128
5129         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5130         Adjust comment.
5131         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5132         (Build_Abort_Block_Handler): New function to build an Abort_Signal
5133         exception handler.
5134         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5135         Build_Abort_Block_Handler to build the exception handler. Do not
5136         undefer aborts for the Abort_Signal exception handler if back-end
5137         exception mechanism.
5138         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5139         back_end exceptions for all others and abort_signal.
5140         * s-except.ads (ZCX_By_Default): New constant.
5141         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5142         (Raise_Exception_Always): Ditto.
5143         (Raise_From_Signal_Handler): Ditto.
5144         (Raise_With_Location_And_Msg): Ditto.
5145         (Raise_With_Msg): Ditto.
5146         (Reraise): Ditto.
5147         (Reraise_Occurence): Ditto.
5148         (Reraise_Occurrence_Always): Ditto.
5149         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5150         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5151
5152 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5153
5154         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5155
5156 2011-08-29  Robert Dewar  <dewar@adacore.com>
5157
5158         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5159         Minor code reorganization.
5160
5161 2011-08-29  Bob Duff  <duff@adacore.com>
5162
5163         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5164         2012, not just Ada 2005.
5165
5166 2011-08-29  Vincent Celier  <celier@adacore.com>
5167
5168         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5169         with a project file or with gprbuid, if -gnatep= is specified, the
5170         builder may need to be invoked with -x.
5171
5172 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5173
5174         * a-exexpr-gcc.adb: Minor comment fix.
5175
5176 2011-08-29  Robert Dewar  <dewar@adacore.com>
5177
5178         * sem_ch8.adb: Minor reformatting.
5179
5180 2011-08-29  Bob Duff  <duff@adacore.com>
5181
5182         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5183         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5184         treating "some" as unreserved in earlier Ada versions. This is now
5185         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5186         rather than Name_Some, since Tok_Some is now recognized as reserved.
5187         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5188         reserved word.
5189         * scans.ads: Minor comment fixes.
5190         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5191         for other language versions.
5192         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5193         treating "some" as unreserved in earlier Ada versions. This is now
5194         handled in Snames.Is_Keyword_Name.
5195         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5196         Ada 2012.
5197         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5198         unreserved in earlier Ada versions. This is now handled in
5199         Snames.Is_Keyword_Name.
5200         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5201         words as for other language versions.
5202         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5203         Ada 2012, not just Ada 2005.
5204
5205 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5206
5207         * sem_ch13.adb: Additional semantic checks for aspects involved in
5208         iterators.
5209
5210 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5211
5212         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5213         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5214         Container parameter.
5215         (Ancestor_Find): ditto.
5216
5217 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5218
5219         * par-endh.adb: Minor reformatting.
5220
5221 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5222
5223         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5224         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5225         (Adjust_N_CLeanups_For): Remove.
5226         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5227         stack is reached.
5228         (Propgate_Exception): Adjust.
5229         * raise-gcc.c: Add a few static/const.
5230         (Adjust_N_Cleanups_For): Remove declaration.
5231         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5232
5233 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5234
5235         * sem_ch8.adb: Use type of function return when rewriting as object
5236         declaration.
5237
5238 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
5239
5240         * sem_type.adb: Minor reformatting.
5241
5242 2011-08-29  Robert Dewar  <dewar@adacore.com>
5243
5244         * makeutl.adb: Minor reformatting.
5245
5246 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5247
5248         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5249         function call of a limited type, the expansion of the renaming is
5250         complicated by the presence of various temporaries and subtypes that
5251         capture constraints of the renamed object.
5252         Rewrite node as an object declaration, whose expansion is simpler.
5253         Given that the object is limited there is no copy involved and no
5254         performance hit.
5255
5256 2011-08-29  Robert Dewar  <dewar@adacore.com>
5257
5258         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5259         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5260
5261 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5262
5263         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5264         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5265         system-linux-hppa.ads, system-linux-s390.ads,
5266         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5267         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5268         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5269         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5270         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5271         system-solaris-sparc.ads, system-lynxos-x86.ads,
5272         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5273         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5274         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5275         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5276         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5277         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5278         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5279         * opt.ads: Adjust comment.
5280         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5281         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5282         * system.ads: Move GCC_ZCX_Support to obsolete entries.
5283
5284 2011-08-29  Emmanuel Briot  <briot@adacore.com>
5285
5286         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5287         file name is specified on the gnatmake or gprbuild command line, and
5288         before we search for that file in the project.
5289
5290 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5291
5292         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5293         used to determine whether a possible interpretation for an overloadable
5294         entity is declared within the current instantiation and should be
5295         included in the candidate set.
5296
5297 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
5298
5299         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5300
5301 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5302
5303         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5304         access subtype is access_to_subprogram, when applying checks for
5305         RM 3.10.2 (27).
5306
5307 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5308
5309         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5310         for sibling when common parent.
5311
5312 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5313
5314         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5315         "pragma_".
5316
5317 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5318
5319         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5320         for the return type when in ASIS mode.
5321
5322 2011-08-29  Vincent Celier  <celier@adacore.com>
5323
5324         * make.adb (Gnatmake): Get the default search dirs, then the target
5325         parameters after getting the Builder switches, as the Builder switches
5326         may include --RTS= and that could change the default search dirs.
5327
5328 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5329
5330         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5331         Make_Final_Call. Move the processing for class-wide types before the
5332         processing for derivations from [Limited_]Controlled.
5333         (Make_Final_Call): Move the processing for class-wide types before the
5334         processing for derivations from [Limited_]Controlled.
5335         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5336         Add code to account for alignments larger than the list header. Add a
5337         comment illustrating the structure of the allocated object + padding +
5338         header.
5339         (Deallocate_Any_Controlled): Add code to account for alignments larger
5340         than the list header.
5341
5342 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5343
5344         * sinfo.ads, sinfo.adb: New node kind
5345         N_Formal_Incomplete_Type_Definition, related flags.
5346         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5347         Parse formal incomplete types.
5348         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5349         sem_ch12.
5350         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5351         Formal incomplete types do not need completion.
5352         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5353         Validate_Incomplete_Type_Instance): New procedures to handle formal
5354         incomplete types.
5355         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5356         that corresponds to a formal incomplete type.
5357         * sprint.adb: Handle formal incomplete type declarations.
5358         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5359         an insertion point.
5360
5361 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5362
5363         * a-fihema.ads, a-fihema.adb: Unit removed.
5364         * a-undesu.ads, a-undesu.adb: New unit implementing
5365         Ada.Unchecked_Deallocate_Subpool.
5366         * einfo.adb: Remove Associated_Collection from the node usage.
5367         Add Finalization_Master to the node usage.
5368         (Associated_Collection): Removed.
5369         (Finalization_Master): New routine.
5370         (Set_Associated_Collection): Removed.
5371         (Set_Finalization_Master): New routine.
5372         (Write_Field23_Name): Remove Associated_Collection from the output. Add
5373         Finalization_Master to the output.
5374         * einfo.ads: Remove attribute Associated_Collection and its uses in
5375         entities.
5376         Add new attribute Finalization_Master along with its uses in entitites.
5377         (Associated_Collection): Removed along with its pragma import.
5378         (Finalization_Master): New routine along with a pragma import.
5379         (Set_Associated_Collection): Removed along with its pragma import.
5380         (Set_Finalization_Master): New routine along with a pragma import.
5381         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5382         Build_Finalization_Collection with Build_Finalization_Master.
5383         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5384         before the bodies of the predefined routines. Add comment explaining
5385         this. Replace call to Build_Finalization_Collection with
5386         Build_Finalization_Master.
5387         (Freeze_Type): Replace call to Build_Finalization_Collection with
5388         Build_Finalization_Master.
5389         (Make_Finalize_Address_Body): Comment reformatting.
5390         (Make_Predefined_Primitive_Specs): Code reformatting.
5391         (Stream_Operation_OK): Update comment mentioning finalization
5392         collections. Replace RE_Finalization_Collection with
5393         RE_Finalization_Master.
5394         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5395         Associated_Collection with Finalization_Master. Replace call to
5396         Build_Finalization_Collection with Build_Finalization_Master.
5397         (Expand_Allocator_Expression): Replace call to Associated_Collection
5398         with Finalization_Master. Replace call to Set_Associated_Collection with
5399         Set_Finalization_Master. Remove the generation of
5400         Set_Finalize_Address_Ptr.
5401         (Expand_N_Allocator): Replace call to Associated_Collection with
5402         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5403         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5404         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5405         comment on usage. Replace call to Needs_BIP_Collection with
5406         Needs_BIP_Finalization_Master Remplace BIP_Collection with
5407         BIP_Finalization_Master. Update all comments which mention finalization
5408         collections. Replace Associated_Collection with
5409         Finalization_Master. Replace Build_Finalization_Collection with
5410         Build_Finalization_Master.
5411         (BIP_Formal_Suffix): Update BIP_Collection's case.
5412         (Build_Heap_Allocator): Update the related comment. Rename local
5413         variable Collect to Fin_Mas_Id and update its occurrences. Update
5414         comments which mention finalization collections. Replace
5415         Set_Associated_Collection with Set_Finalization_Master.
5416         (Expand_Call): Update the code which detects a special piece of library
5417         code for .NET/JVM.
5418         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5419         Add_Collection_Actual_To_Build_In_Place_Call with
5420         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5421         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5422         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5423         Add_Collection_Actual_To_Build_In_Place_Call with
5424         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5425         (Make_Build_In_Place_Call_In_Assignment): Replace call to
5426         Add_Collection_Actual_To_Build_In_Place_Call with
5427         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5428         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5429         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5430         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5431         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5432         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5433         Replace call to Set_Associated_Collection with Set_Finalization_Master.
5434         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5435         Replace the call to Associated_Collection with Finalization_Master.
5436         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5437         Update the way finalization master names are generated. Update the
5438         retrieval of the correct access type which will carry the pool and
5439         master attributes.
5440         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5441         (Make_Finalize_Address_Body): Abstract types do not need
5442         Finalize_Address. Code reformatting.
5443         (Make_Finalize_Address_Stmts): Update comment on usage.
5444         (Make_Set_Finalize_Address_Ptr_Call): Removed.
5445         (Process_Declarations): Update comments.
5446         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5447         Build_Finalization_Master. Update associated comment.
5448         (Make_Set_Finalize_Address_Ptr_Call): Removed.
5449         * exp_ch13.adb: Update comments which mention finalization collections.
5450         (Expand_N_Free_Statement): Replace the call to Associated_Collection
5451         with Finalization_Master.
5452         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5453         create calls to routines Allocate_Any_Controlled and
5454         Deallocate_Any_Controlled.
5455         (Find_Finalize_Address): New routine.
5456         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5457         comparison.
5458         (Requires_Cleanup_Actions): Update the comment on freeze node
5459         inspection.
5460         * exp_util.ads: Remove comment on generated code for
5461         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5462         is better to simply look in the body.
5463         * freeze.adb (Freeze_All): Update the comment of finalization
5464         collections. Replace the call to Associated_Collection with
5465         Finalization_Master. Replace the call to Build_Finalization_Collection
5466         with Build_Finalization_Master.
5467         * impunit.adb: Add a-undesu and s-stposu to the list of units.
5468         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5469         a-fihema.
5470         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5471         Ada.Finalization. Add processing for children of System.Storage_Pools.
5472         * rtsfind.ads: Remove the naming of second level children of
5473         Ada.Finalization.
5474         Remove Ada_Finalization_Heap_Management from the list of units.
5475         Remove subtype Ada_Finalization_Child.
5476         Remove the following subprogram entities:
5477         
5478            RE_Allocate
5479            RE_Deallocate
5480            RE_Finalization_Collection
5481            RE_Finalization_Collection_Ptr
5482            RE_Set_Finalize_Address_Ptr
5483         
5484         Add the naming of second level children of System.Storage_Pools.
5485         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5486         the list of units.
5487         Add subtype System_Storage_Pools_Child.
5488         Add the following subprogram entities to System.Finalization_Masters:
5489         
5490            RE_Finalization_Master
5491            RE_Finalization_Master_Ptr
5492         
5493         Add the following subprogram entities to System.Storage_Pools.Subpools:
5494         
5495            RE_Allocate_Any_Controlled
5496            RE_Deallocate_Any_Controlled
5497            RE_Root_Storage_Pool_With_Subpools
5498            RE_Root_Subpool
5499            RE_Subpool_Handle
5500         
5501         Move the following subprogram entities from
5502         Ada.Finalization.Heap_Management to System.Finalization_Masters:
5503         
5504            RE_Add_Offset_To_Address
5505            RE_Attach
5506            RE_Base_Pool
5507            RE_Detach
5508         
5509         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5510         Set_Associated_Collection with Set_Finalization_Master.
5511         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5512         BIP_Finalization_Master is created.
5513         * s-finmas.adb: New unit System.Finalization_Masters.
5514         * s-finmas.ads: New unit System.Finalization_Masters.
5515         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5516         * s-stposu.ads, s-stposu.adb: New unit implementing
5517         System.Storage_Pools.Subpools.
5518
5519 2011-08-29  Bob Duff  <duff@adacore.com>
5520
5521         * tbuild.adb: Add assertion.
5522
5523 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5524
5525         * s-pooglo.adb: Minor reformatting.
5526
5527 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5528
5529         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5530         an indexed component of a packed array whose element type is a record
5531         with a representation clause different from that of the right-hand
5532         side, generate a temporary to minimuze the number of bit-field
5533         operations generated.
5534
5535 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5536
5537         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5538         declarations, and thus are likely insertion points for actions.
5539
5540 2011-08-29  Bob Duff  <duff@adacore.com>
5541
5542         * einfo.ads: Minor comment fix.
5543
5544 2011-08-29  Robert Dewar  <dewar@adacore.com>
5545
5546         * frontend.adb, gnat1drv.adb: Minor reformatting.
5547
5548 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5549
5550         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5551         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
5552         space in front of the header.
5553
5554 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5555
5556         * frontend.adb (Frontend): Exit after creating Standard package when
5557         -gnatd.H is present.
5558         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5559         present.
5560
5561 2011-08-29  Robert Dewar  <dewar@adacore.com>
5562
5563         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5564         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5565         snames.ads-tmpl: Minor reformatting.
5566
5567 2011-08-29  Philippe Gil  <gil@adacore.com>
5568
5569         * prj.adb (Reset_Units_In_Table): New procedure.
5570         Reset units to avoid access to freed memory.
5571
5572 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5573
5574         * get_scos.adb: When reading a P statement SCO without a pragma name
5575         (from an older ALI file), ensure that the Pragma_Name component is set
5576         to Unknown_Pragma (not left uninitialized).
5577
5578 2011-08-29  Vincent Celier  <celier@adacore.com>
5579
5580         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5581         modified to compute correctly the object path of a SAL project that is
5582         extending another library project.
5583         (Write_Path_File): New procedure.
5584         * makeutl.ads (Directories): New table moved from Buildgpr
5585         (Get_Directories): New procedure moved from Buildgpr
5586         (Write_Path_File): New procedure
5587         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5588         paths before binding SALs, instead of Set_Ada_Paths.
5589         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5590         Prj.
5591         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5592         (Current_Source_Path_File_Of): New function
5593         (Set_Current_Object_Path_File_Of): New procedure
5594         (Current_Source_Object_File_Of): New function
5595         (Set_Current_Object_Path_File_Of): New procedure
5596         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5597         (Current_Source_Path_File_Of): New function
5598         (Set_Current_Object_Path_File_Of): New procedure
5599         (Current_Source_Object_File_Of): New function
5600         (Set_Current_Object_Path_File_Of): New procedure
5601
5602 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5603
5604         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5605         packed entity, use a bit-field assignment only if there is no change of
5606         representation.
5607
5608 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5609
5610         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5611         Is_RTU instead of using Chars comparisons.
5612
5613 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5614
5615         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5616         temporary object if the actual is constrained, and the discriminants
5617         read from the stream don't match.
5618
5619 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5620
5621         * sem_attr.adb, exp_attr.adb: Add handling of
5622         Attribute_System_Allocator_Alignment
5623         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5624         Attribute_System_Allocator_Alignment.
5625         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5626         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5627         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5628         get_target_system_allocator_alignment.
5629
5630 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5631
5632         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5633         dependencies.
5634
5635 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5636
5637         * exp_ch3.adb (In_Runtime): Fix typo.
5638
5639 2011-08-29  Bob Duff  <duff@adacore.com>
5640
5641         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5642
5643 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5644
5645         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5646         and a separate tag assignment is generated, ensure that the tag
5647         assignment is analyzed.
5648
5649 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5650
5651         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5652         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5653         of statement lists that may contain local declarations.
5654         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5655         duplicate the triggering statements needed for the expansion of this
5656         construct, when the trigger is a dispatching call to a synchronized
5657         primitive.
5658
5659 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5660
5661         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5662         * bindgen.adb: Add comments.
5663         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5664         in CodePeer mode.
5665
5666 2011-08-29  Robert Dewar  <dewar@adacore.com>
5667
5668         * exp_attr.adb: Minor reformatting.
5669         Minor code reorganization and commenting.
5670         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5671         reformatting.
5672
5673 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5674
5675         * get_scos.adb: Ignore chaining indicators not currently supported
5676         by Ada.
5677
5678 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5679
5680         * system.ads: Minor editing.
5681
5682 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5683
5684         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5685         CodePeer mode.
5686         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5687         Attribute_Elab_Subp_Body.
5688         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5689         * sem_util.adb: Update comments.
5690
5691 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5692
5693         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5694         pragma name for each SCO statement corresponding to a pragma.
5695
5696 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5697
5698         * opt.ads: Minor editing.
5699
5700 2011-08-29  Yannick Moy  <moy@adacore.com>
5701
5702         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5703         that only made sense for CodePeer mode.
5704
5705 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5706
5707         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5708         which is no longer used.
5709         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5710         handling of the 64-bit division check.
5711         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5712         division available.
5713         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5714         longer used.
5715
5716 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5717
5718         * get_scos.adb: Minor reformatting.
5719
5720 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5721
5722         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5723         statement list is wrapped in a block, the block is explicitly analyzed
5724         in order to properly redecorate the entities and create a servicing
5725         finalizer.
5726
5727 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5728
5729         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5730         (Set_Zero_Cost_Handling): Remove.
5731
5732 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5733
5734         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5735
5736 2011-08-29  Geert Bosch  <bosch@adacore.com>
5737
5738         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5739         instruction, as the latter may produce -0.0, which is not a valid VAX
5740         F float number.
5741         (Neg_G): Likewise for VAX F float.
5742
5743 2011-08-29  Robert Dewar  <dewar@adacore.com>
5744
5745         * exp_util.adb: Minor reformatting.
5746
5747 2011-08-29  Yannick Moy  <moy@adacore.com>
5748
5749         * sem_ch3.adb: Minor comment update.
5750
5751 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5752
5753         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5754         the operand type.
5755
5756 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5757
5758         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5759         current statement sequence on a generic instantiation or a subprogram
5760         declaration.
5761
5762 2011-08-29  Robert Dewar  <dewar@adacore.com>
5763
5764         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5765         Minor reformatting.
5766
5767 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5768
5769         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5770         Correct the check which involves the freeze node of a controlled or
5771         access-to-controlled type.
5772
5773 2011-08-29  Geert Bosch  <bosch@adacore.com>
5774
5775         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5776         statements.
5777         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5778         Asm statements.
5779
5780 2011-08-29  Yannick Moy  <moy@adacore.com>
5781
5782         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5783         for every index type and component type that is not a subtype_mark.
5784         (Process_Subtype): Set Etype of subtype.
5785
5786 2011-08-29  Robert Dewar  <dewar@adacore.com>
5787
5788         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5789         reorganization.  Minor reformatting.
5790
5791 2011-08-29  Steve Baird  <baird@adacore.com>
5792
5793         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5794         for CodePeer and ALFA modes.
5795
5796 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5797
5798         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5799         that comes from an enclosing scope if it is not the renaming of an
5800         actual, to handle properly a spurious ambiguity in an instance.
5801
5802 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
5803
5804         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5805         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
5806         use it instead of the Esize of the first parameter.
5807         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5808         above change.
5809         <Size>: Likewise.  Call it for composite types on the RM size.
5810
5811 2011-08-29  Yannick Moy  <moy@adacore.com>
5812
5813         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5814         * sem_util.adb (Unique_Name): Correct behaviour for names of
5815         compilation units.
5816
5817 2011-08-29  Yannick Moy  <moy@adacore.com>
5818
5819         * sem_prag.adb (Check_Precondition_Postcondition): In formal
5820         verification mode, analyze pragma expression for correctness, for
5821         pre/post on library-level subprogram, as it is not expanded later.
5822
5823 2011-08-29  Yannick Moy  <moy@adacore.com>
5824
5825         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5826         in formal verification.
5827
5828 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5829
5830         * sem_util.adb: Minor reformatting.
5831         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5832         there's no pragma.
5833         * par_sco.ads, par_sco.adb: Update comments.
5834
5835 2011-08-29  Yannick Moy  <moy@adacore.com>
5836
5837         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5838         associated getter/setter.
5839         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5840
5841 2011-08-29  Vincent Celier  <celier@adacore.com>
5842
5843         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5844         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5845         with declarations for Language_Kind and Dependency_Kind for Ada.
5846         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5847         (Process_Compiler): Take into account the new attributes Dependency_Kind
5848         and Language_Kind.
5849         (Check_Configuration): Check if language kind is unit based, not if the
5850         language name is Ada.
5851         (Process_Exceptions_Unit_Based): Ditto
5852         (Add_Language): Remove default additions of language and dependency kind
5853         * prj.ads: Minor comment change
5854         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5855
5856 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5857
5858         * debug.adb: Update comments.
5859
5860 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
5861
5862         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5863         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5864         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5865         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5866         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5867
5868 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5869
5870         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5871         (GNATLIBCFLAGS_FOR_C): Replace
5872         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5873         (gnatlib-shared-default, gnatlib-shared-dual-win32)
5874         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5875         (gnatlib-sjlj, gnatlib-zcx): Likewise.
5876
5877 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
5878
5879         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5880
5881         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5882
5883         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5884
5885 2011-08-05  Nicolas Roche  <roche@adacore.com>
5886
5887         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5888         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5889         canadian cross.
5890         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5891
5892 2011-08-05  Matthew Heaney  <heaney@adacore.com>
5893
5894         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5895         subprogram bodies declared out-of-order.
5896
5897 2011-08-05  Yannick Moy  <moy@adacore.com>
5898
5899         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5900         entities directly in package Standard, otherwise skip the standard
5901         prefix.
5902
5903 2011-08-05  Robert Dewar  <dewar@adacore.com>
5904
5905         * a-cbmutr.adb: Minor reformatting
5906         (Allocate_Node): refactor node allocation algorithm
5907
5908 2011-08-05  Robert Dewar  <dewar@adacore.com>
5909
5910         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5911         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5912         mode.
5913         (Analyze_Pragma, case Check_Policy): Ditto.
5914         * sem_prag.ads (Check_Disabled): New function
5915         * snames.ads-tmpl: Add Name_Disable.
5916
5917 2011-08-05  Robert Dewar  <dewar@adacore.com>
5918
5919         * gnat_rm.texi: Document implementation-defined policy DISABLE for
5920         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5921
5922 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
5923
5924         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5925         that appears in a generic formal part and applies to a formal
5926         subprogram.
5927
5928 2011-08-05  Robert Dewar  <dewar@adacore.com>
5929
5930         * a-cbmutr.ads: Minor reformatting.
5931
5932 2011-08-05  Matthew Heaney  <heaney@adacore.com>
5933
5934         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5935         to check count, check sign of value instead.
5936         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5937         (Copy_Subtree): allocate copy of source element
5938         (Equal_Subtree): compare elements, not access objects
5939
5940 2011-08-05  Vincent Celier  <celier@adacore.com>
5941
5942         * gnat_ugn.texi: Fix VMS alternative.
5943
5944 2011-08-05  Thomas Quinot  <quinot@adacore.com>
5945
5946         * sem_ch11.adb: Add comment.
5947
5948 2011-08-05  Robert Dewar  <dewar@adacore.com>
5949
5950         * exp_util.adb: Minor comment fix.
5951
5952 2011-08-05  Robert Dewar  <dewar@adacore.com>
5953
5954         * scng.adb (Error_Unterminated_String): Improve flag position when
5955         comma present.
5956
5957 2011-08-05  Matthew Heaney  <heaney@adacore.com>
5958
5959         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5960         tree containers).
5961         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5962         multiway tree containers.
5963
5964 2011-08-05  Robert Dewar  <dewar@adacore.com>
5965
5966         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5967         * stylesw.adb: Implement -gnatyC to control comment spacing
5968         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5969         -gnatyc/C).
5970         * usage.adb: Add line for -gnatyC.
5971
5972 2011-08-05  Robert Dewar  <dewar@adacore.com>
5973
5974         * gnat_ugn.texi: Document -gnatyC.
5975         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5976         synonym for COMMENTS2).
5977
5978 2011-08-05  Robert Dewar  <dewar@adacore.com>
5979
5980         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5981         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5982         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5983         a-comutr.ads, lib-xref.adb: Minor reformatting.
5984
5985 2011-08-05  Robert Dewar  <dewar@adacore.com>
5986
5987         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5988         warning if there is an exception handler present.
5989
5990 2011-08-05  Pascal Obry  <obry@adacore.com>
5991
5992         * a-iteint.ads: Fix copyright year.
5993
5994 2011-08-05  Thomas Quinot  <quinot@adacore.com>
5995
5996         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5997         statement SCO for a USE clause or a representation clause.
5998
5999 2011-08-05  Yannick Moy  <moy@adacore.com>
6000
6001         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
6002         between body and spec for stub.
6003         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
6004         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
6005         pragma precondition or postcondition, for which the enclosing
6006         subprogram or package in the AST is not the desired one, return empty.
6007
6008 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6009
6010         * g-expect.adb: Minor reformatting.
6011
6012 2011-08-05  Bob Duff  <duff@adacore.com>
6013
6014         * a-fihema.adb: Comment out OS_Lib.
6015
6016 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6017
6018         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
6019         (unbounded multiway tree containers) and a-iteint.ads.
6020         * a-comutr.ads, a-comutr.adb:
6021         This is the new Ada 2012 unit for unbounded multiway tree containers
6022         * a-cimutr.ads, a-cimutr.adb
6023         This is the new Ada 2012 unit for indefinite multiway tree containers
6024         * a-iteint.ads: New file.
6025
6026 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6027
6028         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
6029
6030 2011-08-05  Bob Duff  <duff@adacore.com>
6031
6032         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
6033         subpools.
6034         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
6035
6036 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6037
6038         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
6039         general indexing aspects of Ada2012. Called when analyzing indexed
6040         components when other interpretations fail.
6041         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
6042         in an expression context where overloading is meaningful. This excludes
6043         the occurrence in an aspect specification (efficiency only).
6044         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
6045         related to iterators can be set by an attribute specification, but
6046         cannot be queried.
6047         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
6048         Constant_Indexing and Variable_Indexing.
6049         (Check_Indexing_Functions): New procedure to perform legality checks.
6050         Additional semantic checks at end of declarations.
6051
6052 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6053
6054         * tree_io.ads: Update ASIS_Version_Number because of the change of the
6055         order of calling Tree_Write/Tree_Read routines made for aspects.
6056
6057 2011-08-05  Bob Duff  <duff@adacore.com>
6058
6059         * a-fihema.adb (Finalize): Fix race condition.
6060
6061 2011-08-05  Yannick Moy  <moy@adacore.com>
6062
6063         * sem_ch12.adb (Analyze_Package_Instantiation,
6064         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6065         mode.
6066
6067 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6068
6069         * sem_type.adb (Specific_Type): in an instance, the type-specific
6070         operand of an equality check that involves null may have a private
6071         type. Use full view to determine legality of construct.
6072
6073 2011-08-05  Vincent Celier  <celier@adacore.com>
6074
6075         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6076         delete or close the file when the call to gnatmake was successful.
6077
6078 2011-08-05  Yannick Moy  <moy@adacore.com>
6079
6080         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6081         Global_Discard_Names.
6082
6083 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6084
6085         * sinfo.ads: comments on use of entity field for aspect specifications.
6086
6087 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6088
6089         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6090         node is not itself an entity but a selected component, it is a
6091         rewritten parameterless call to an en enclosing synchronized operation,
6092         and this expansion will be performed again in the instance, so there is
6093         no global information to preserve.
6094
6095 2011-08-05  Javier Miranda  <miranda@adacore.com>
6096
6097         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6098         for renamings of predefined primitives.
6099         (In_Predef_Prims_DT): New subprogram.
6100
6101 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6102
6103         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6104         possible interpretation of name is a reference type, add an
6105         interpretation that is the designated type of the reference
6106         discriminant of that type.
6107         * sem_res.adb (resolve): If the interpretation imposed by context is an
6108         implicit dereference, rewrite the node as the deference of the
6109         reference discriminant.
6110         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6111         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6112         parent type or base type.
6113         * sem_ch4.adb (Process_Indexed_Component,
6114         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6115         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6116         Check for implicit dereference.
6117         (List_Operand_Interps): Indicate when an implicit dereference is
6118         ambiguous.
6119         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6120
6121 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6122
6123         * scos.ads: Update documentation of SCO table. Pragma statements can now
6124         be marked as disabled (using 'p' instead of 'P' as the statement kind).
6125         * par_sco.ads, par_sco.adb: Implement the above change.
6126         (Process_Decisions_Defer): Generate a P decision for the first parameter
6127         of a dyadic pragma Debug.
6128         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6129         necessary.
6130         * put_scos.adb: Code simplification based on above change.
6131
6132 2011-08-05  Robert Dewar  <dewar@adacore.com>
6133
6134         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6135         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6136         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6137         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6138
6139 2011-08-05  Bob Duff  <duff@adacore.com>
6140
6141         * a-stunau.ads, g-spipat.adb: Update comments.
6142
6143 2011-08-05  Bob Duff  <duff@adacore.com>
6144
6145         * a-fihema.ads: Minor comment fix.
6146         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6147         correct.
6148         (Attach, Detach): Remove some unnecessary code.
6149         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6150
6151 2011-08-05  Bob Duff  <duff@adacore.com>
6152
6153         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6154         allocation for Objects component. This simplifies the code somewhat. It
6155         is also a little more efficient in the not-so-unusual case where there
6156         are no controlled objects allocated.
6157         Make Finalization_Started flag atomic.
6158         (Finalize): Avoid unnecessary detachment of items from the list.
6159         (pcol): Minor cleanup.
6160
6161 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6162
6163         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6164         package whose name is the same as that of the generic unit, or its
6165         ultimate prefix.
6166
6167 2011-08-05  Bob Duff  <duff@adacore.com>
6168
6169         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6170         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6171         Minor comment fixes.
6172
6173 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
6174
6175         * make.adb (Linking_Phase): No longer need to set source search path
6176         before calling gnatlink in CodePeer mode.
6177         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6178         gcc in CodePeer mode, since the binder generated file no longer has a
6179         'with Main'.
6180         * switch.ads, switch.adb (Is_Language_Switch): Removed.
6181         * switch-c.adb: Update comment.
6182
6183 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6184
6185         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6186
6187 2011-08-05  Nicolas Roche  <roche@adacore.com>
6188
6189         * gnat_ugn.texi: Fix minor syntax error issue.
6190
6191 2011-08-05  Vincent Celier  <celier@adacore.com>
6192
6193         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6194         delete or close the file when the call to gnatmake returns a non
6195         successful return code.
6196
6197 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6198
6199         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6200         check, indicate that the copy of the original node does not come from
6201         source, to prevent an infinite recursion of the expansion.
6202
6203 2011-08-05  Johannes Kanig  <kanig@adacore.com>
6204
6205         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6206         VC generation for subprogram bodies.
6207
6208 2011-08-05  Yannick Moy  <moy@adacore.com>
6209
6210         * einfo.ads: Typo.
6211         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6212         the base type with the smallest allowed base type.
6213
6214 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6215
6216         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6217         aspects.
6218
6219 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6220
6221         * sem_ch12.ads: minor comment updates.
6222
6223 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6224
6225         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6226         instantiation and a formal package the compiler generates a package
6227         renaming declaration so that the generic name within the declaration
6228         is interpreted as a renaming of the instance. At the end of a formal
6229         package declaration, this renaming must become invisible.
6230
6231 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6232
6233         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6234         comparison and rely on concrete entities instead.
6235
6236 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6237
6238         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6239         and discriminants, to indicate that the type has an access discriminant
6240         that supports implicit dereference.
6241         * snames.ads-tmpl: Add names of aspects and attributes related to
6242         Ada2012 iterators: constant_indexing, default_iterator,
6243         iterator_element, implicit_dereference, variable_indexing.
6244         * aspects.ads, aspects.adb: entries for iterator-related aspects.
6245         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6246         iterator-related aspects.
6247         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6248
6249 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6250
6251         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6252         metrics in gnatmetric to cover new kinds of coupling mentrics.
6253
6254 2011-08-05  Steve Baird  <baird@adacore.com>
6255
6256         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6257         of calling the user-defined main subprogram.
6258         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
6259         is set) Call_Main_Subprogram ahead of, as opposed to
6260         inside of, Main.
6261         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6262         generation of a "with" of the user-defined main subprogram.
6263         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6264         (which is now called from Gen_Main instead).
6265
6266 2011-08-05  Emmanuel Briot  <briot@adacore.com>
6267
6268         * projects.texi: Added reference to the Makefile package.
6269
6270 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6271
6272         * exp_ch7.adb: Minor comment rewording.
6273
6274 2011-08-05  Ed Falis  <falis@adacore.com>
6275
6276         * env.c: Fix comment.
6277
6278 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6279
6280         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6281         character comparison and rely on concrete entities instead.
6282
6283 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6284
6285         * sem_ch3.adb: (Check_Private_Overriding): better error message,
6286         suggested by AI95-0068.
6287
6288 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6289
6290         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6291         the two potential initialization calls. This accounts for any
6292         access-before-elaboration checks which may precede the initialization
6293         calls.
6294         (Next_Suitable_Statement): New routine. Returns the next real statement
6295         after the input node while skipping generated checks.
6296         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6297         with comment on usage.
6298         Do not generate Elaborate_All when the trigger is a finalization call
6299         coming from a type init proc.
6300         (Check_Elab_Call): Propagate the initialization procedure context to
6301         subsequent calls to Check_A_Call.
6302         (Check_Internal_Call_Continue): Propagate the initialization procedure
6303         context to subsequent calls to Check_Elab_Call.
6304         (Is_Finalization_Procedure): New routine. Returns True if the input
6305         entity denotes a [Deep_]Finalize routine.
6306         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6307         along with comment on usage.
6308
6309 2011-08-05  Vadim Godunko  <godunko@adacore.com>
6310
6311         * s-atocou.ads: Add list of supported platforms.
6312
6313 2011-08-05  Yannick Moy  <moy@adacore.com>
6314
6315         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6316
6317         * opt.ads (Disable_ALI_File): new Boolean flag
6318         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6319
6320 2011-08-05  Ed Falis  <falis@adacore.com>
6321
6322         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6323         environ is properly defined.
6324
6325 2011-08-05  Vincent Celier  <celier@adacore.com>
6326
6327         * make.adb (Compilation_Phase): Exit immediately when all objects have
6328         been found up to date, to avoid multiple exit messages.
6329         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6330         same project for languages with no compiler.
6331         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6332         -eI.
6333 2011-08-05  Robert Dewar  <dewar@adacore.com>
6334
6335         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6336         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6337         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6338         s-atocou-builtin.adb: Minor reformatting.
6339
6340 2011-08-05  Yannick Moy  <moy@adacore.com>
6341
6342         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6343         if the node to wrap is a pragma check, this node and enclosed
6344         expression are not expanded, so do not apply any transformations here.
6345         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6346         introducing transient scopes.
6347
6348 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
6349
6350         * adaint.c (__gnat_set_writable, __gnat_set_readable,
6351         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6352         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6353         routine is available, so we use the default implementation of these
6354         functions.
6355         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6356         support for copying attributes on VxWorks 6.
6357
6358 2011-08-05  Yannick Moy  <moy@adacore.com>
6359
6360         * debug.adb: Remove use of -gnatd.D.
6361         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6362         * opt.ads: Simplify variables for ALFA mode, to keep one only
6363         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6364         to ALFA mode.
6365
6366 2011-08-05  Vincent Celier  <celier@adacore.com>
6367
6368         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6369         Builder'Default_Switches.
6370
6371 2011-08-05  Vincent Celier  <celier@adacore.com>
6372
6373         * makeusg.adb: Add lines for --create-map-file switches.
6374
6375 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6376
6377         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6378         profile is incomplete and the full view is available, replace it with
6379         the full view.
6380         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6381         incomplete, freezing the subprogram is delayed until the full view is
6382         frozen.
6383         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6384         fixed-point multiplication operator and the predefined operator is
6385         resolved in favor of the user-defined one.
6386
6387 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6388
6389         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6390         CONST_CAST.
6391
6392 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6393
6394         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6395         whether a type lacks user-defined Read or Write operations, or has a
6396         component that lacks them.
6397         * sem_attr.adb (Check_Stream_Attribute): if restriction
6398         No_Default_Stream_Attributes is active, verify that all subcomponent
6399         types of the target have user-defined stream operations, and report
6400         error otherwise.
6401         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6402         * exp_strm.adb: Build_Elementary_Input_Call,
6403         Build_Elementary_Write_Call): remove checks for restriction
6404         No_Default_Stream_Attributes, now checked in semantics.
6405
6406 2011-08-04  Vincent Celier  <celier@adacore.com>
6407
6408         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6409         switches on the command line, look for all valid --RTS switches in the
6410         Builder switches and for each language use the first runtime name found
6411         to invoke gprconfig.
6412         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6413         command line and there is no auto-configuration.
6414         (Runtime_Name_Set_For): New function.
6415
6416 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6417
6418         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6419         elaborate initialization expression for variable Abort when processing
6420         a package body or a declaration.
6421         (Create_Finalizer): Propagate the package context when creating the
6422         exception-related variables.
6423         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6424         For_Package along with usage comment.
6425
6426 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6427
6428         * gcc-interface/Makefile.in: Clean up targets.
6429         Enable new package for atomic counters and copy-on-write implementation
6430         of unbounded strings on x86 platforms.
6431         * gcc-interface/Make-lang.in: Update dependencies.
6432
6433 2011-08-04  Robert Dewar  <dewar@adacore.com>
6434
6435         * exp_ch7.adb: Minor reformatting.
6436
6437 2011-08-04  Robert Dewar  <dewar@adacore.com>
6438
6439         * exp_strm.adb: Minor reformatting.
6440
6441 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6442
6443         * s-atocou.adb: Replace by dummy version and use on targets where atomic
6444         operations are not supported.
6445         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6446         * s-atocou-x86.adb: New file.
6447         * Makefile.rtl: Add s-atocou.o file
6448
6449 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6450
6451         * make.adb (Compile): Move setting of CodePeer_Mode to ...
6452         (Compilation_Phase): ... here.
6453         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6454
6455 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6456
6457         * Make-generated.in: Fix minor typo in comment.
6458
6459 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6460
6461         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6462         the project path.
6463
6464 2011-08-04  Robert Dewar  <dewar@adacore.com>
6465
6466         * a-coinho.adb: Minor reformatting.
6467
6468 2011-08-04  Robert Dewar  <dewar@adacore.com>
6469
6470         * a-coinho.ads: Minor reformatting.
6471
6472 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6473
6474         * s-atocou.ads, s-atocou.adb: New files.
6475         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6476         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6477         direct use of GCC's atomic builtins and replace them by use of new
6478         atomic counter package.
6479
6480 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6481
6482         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6483
6484 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6485
6486         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6487         with a call to Get_External_Tag.
6488         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6489         subprogram usage. Remove the guard against package declarations and
6490         bodies since Build_Cleanup_Statements is no longer invoked in that
6491         context.
6492         (Build_Components): Initialize Tagged_Type_Stmts when the context
6493         contains at least one library-level tagged type.
6494         (Build_Finalizer): New local variables Has_Tagged_Types and
6495         Tagged_Type_Stmts along with associated comments on usage. Update the
6496         logic to include tagged type processing.
6497         (Create_Finalizer): Insert all library-level tagged type unregistration
6498         code before the jump block circuitry.
6499         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6500         (Expand_N_Package_Declaration): Remove the call to
6501         Build_Cleanup_Statements.
6502         (Process_Tagged_Type_Declaration): New routine. Generate a call to
6503         unregister the external tag of a tagged type.
6504         (Processing_Actions): Reimplemented to handle tagged types.
6505         (Process_Declarations): Detect the declaration of a library-level
6506         tagged type and carry out the appropriate actions.
6507         (Unregister_Tagged_Types): Removed. The machinery has been directly
6508         merged with Build_Finalizer.
6509
6510 2011-08-04  Robert Dewar  <dewar@adacore.com>
6511
6512         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6513         gnatls.adb, exp_ch3.adb: Minor reformatting.
6514
6515 2011-08-04  Marc Sango  <sango@adacore.com>
6516
6517         * sem_attr.adb (Analyze_Attribute): Replace the message
6518         "invisible attribute of}" of the spark restriction violation in
6519         attribute reference by the simple message "invisible attribute of type".
6520         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6521         two insertion characters: '&' and '}'.
6522
6523 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6524
6525         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6526         * a-coinho.ads, a-coinho.adb: New file.
6527         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6528
6529 2011-08-04  Nicolas Roche  <roche@adacore.com>
6530
6531         * alfa_test.adb: Not all ali files are containing alfa information even
6532         if compiled with -gnatd.F. So suppress warning about missing ALFA
6533         information.
6534
6535 2011-08-04  Yannick Moy  <moy@adacore.com>
6536
6537         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6538         scope.
6539         * put_alfa.adb: Check that scope name is not empty.
6540
6541 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6542
6543         * exp_ch3.adb (Stream_Operation_Ok): new predicate
6544         Needs_Elementary_Stream_Operation, to determine whether user-defined
6545         Read and Write attributes are available for the elementary components
6546         of the given type. If only the predefined attributes are available,
6547         then when restriction No_Default_Stream_Attributes is active the
6548         predefined stream attributes for the composite type cannot be created.
6549
6550 2011-08-04  Robert Dewar  <dewar@adacore.com>
6551
6552         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6553         Put routines in alpha order
6554
6555 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
6556
6557         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6558         * gcc-interface/Make-lang.in: Update dependencies.
6559
6560 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6561
6562         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6563         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6564         gnat1why).
6565
6566 2011-08-04  Robert Dewar  <dewar@adacore.com>
6567
6568         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6569         lib-xref-alfa.adb: Minor reformatting.
6570
6571 2011-08-04  Marc Sango  <sango@adacore.com>
6572
6573         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6574         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6575         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6576         mode.
6577
6578 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6579
6580         * bindgen.adb (Gen_Adainit_C): Remove.
6581         (Gen_Adafinal_C): Ditto.
6582         (Gen_Elab_Externals_C): Ditto.
6583         (Gen_Elab_Calls_C): Ditto.
6584         (Gen_Elab_Order_C): Ditto.
6585         (Gen_Elab_Defs_C): Ditto.
6586         (Gen_Finalize_Library_C): Ditto.
6587         (Gen_Finalize_Library_Defs_C): Ditto.
6588         (Gen_Main_C): Ditto.
6589         (Gen_Output_File_C): Ditto.
6590         (Gen_Restrictions_C): Ditto.
6591         (Gen_Versions_C): Ditto.
6592         (Write_Info_Ada_C): Ditto.
6593         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6594         (Gen_Output_File): Do not force Ada_Bind_File anymore.
6595         Always call Gen_Output_File_Ada.
6596         * gnatlink.adb (Begin_Info): Now a constant.
6597         (End_Info): Ditto.
6598         (Ada_Bind_File): Remove
6599         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
6600         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6601         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6602         * opt.ads (Ada_Bind_File): Remove.
6603
6604 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6605
6606         * projects.texi: Document target-specific directory in default project
6607         path for gnatmake.
6608
6609 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6610
6611         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6612         path in all cases .
6613
6614 2011-08-04  Yannick Moy  <moy@adacore.com>
6615
6616         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6617         opt.ads, lib-xref.ads: Code clean up.
6618
6619 2011-08-04  Yannick Moy  <moy@adacore.com>
6620
6621         * gnat_rm.texi: Update description of Test_Case
6622         * gnat_ugn.texi: Typo.
6623
6624 2011-08-04  Ed Falis  <falis@adacore.com>
6625
6626         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6627
6628 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6629
6630         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6631         it is of type Root_Controlled. This action eliminates fields Prev and
6632         Next from type equality.
6633
6634 2011-08-04  Yannick Moy  <moy@adacore.com>
6635
6636         * lib-xref-alfa.adb: Correct typo.
6637
6638 2011-08-04  Matthew Heaney  <heaney@adacore.com>
6639
6640         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6641         component.
6642
6643 2011-08-04  Yannick Moy  <moy@adacore.com>
6644
6645         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6646         (Analyze_Pragma): allow static string expression for name of Test_Case,
6647         instead of simply string literals.
6648         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6649         expressions.
6650
6651 2011-08-04  Vincent Celier  <celier@adacore.com>
6652
6653         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6654         case suffixes to find truncated main sources.
6655
6656 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6657
6658         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6659         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6660         (Compute_Current_Task): Ditto.
6661
6662 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6663
6664         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6665
6666 2011-08-04  Yannick Moy  <moy@adacore.com>
6667
6668         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6669         library-level constant.
6670         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6671         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6672         used as selector of parameter association, in ALFA mode.
6673
6674 2011-08-04  Robert Dewar  <dewar@adacore.com>
6675
6676         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6677         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6678         reformatting.
6679
6680 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6681
6682         * make.adb (Linking_Phase): Set source search path before calling
6683         gnatlink in CodePeer mode.
6684
6685 2011-08-04  Javier Miranda  <miranda@adacore.com>
6686
6687         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6688         Remove code which takes care of building TSDs.
6689         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6690         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6691         the accessibility check in VM targets.
6692         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6693         (Building_Static_DT): Now returns false for VM targets.
6694         (Build_VM_TSDs): Removed.
6695         (Expand_Interface_Conversion): Generate missing runtime check for
6696         conversions to interface types whose target type is unknown at compile
6697         time.
6698         (Make_VM_TSD): Add missing code to disable the generation of calls to
6699         Check_TSD if the tagged type is not defined at library level, or not
6700         has a representation clause specifying its external tag, or -gnatdQ is
6701         active.
6702         * exp_disp.ads (Build_VM_TSDs): Removed.
6703         (Make_VM_TSDs): Spec relocated from exp_disp.adb
6704         * sem_disp.adb (Check_Dispatching_Operation): No code required to
6705         register primitives in the dispatch tables in VM targets.
6706         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6707         initialization of class-wide interface objects in VM targets.
6708         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6709         of Make_DT).
6710
6711 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
6712
6713         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6714         when dotnet-ld cannot be found.
6715
6716 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6717
6718         * bindgen.adb: Simplify significantly generation of binder body file in
6719         CodePeer mode.
6720         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6721         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6722         not expanded).
6723
6724 2011-08-04  Yannick Moy  <moy@adacore.com>
6725
6726         * sem_prag.adb, sem.ads: Code cleanup.
6727
6728 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6729
6730         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6731         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6732         results if possible.
6733         * s-stusta.adb (Print): Adjust after changes in s-stausa.
6734         * gnat_ugn.texi: Update dynamic stack usage section.
6735
6736 2011-08-04  Steve Baird  <baird@adacore.com>
6737
6738         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6739         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6740         contains only a call to the user-defined main subprogram.
6741         (Gen_Main_Ada) - If CodePeer_Mode is set, then
6742         call the "wrapper" subprogram instead of directly
6743         calling the user-defined main subprogram.
6744
6745 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6746
6747         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6748         alternatives of a case statement for controlled objects. Rename local
6749         variable A to Dead_Alt.
6750         (Expand_N_If_Statement): Check the then and else statements of an if
6751         statement for controlled objects. Check the then statements of all
6752         elsif parts of an if statement for controlled objects.
6753         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6754         objects.
6755         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6756         detects a loop associated with the expansion of an array object.
6757         Augment the processing of the loop statements to account for a possible
6758         wrap done by Process_Statements_For_Controlled_Objects.
6759         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6760         statements and abortable part of an asynchronous select for controlled
6761         objects.
6762         (Expand_N_Conditional_Entry_Call): Check the else statements of a
6763         conditional entry call for controlled objects.
6764         (Expand_N_Selective_Accept): Check the alternatives of a selective
6765         accept for controlled objects.
6766         (Expand_N_Timed_Entry_Call): Check the entry call and delay
6767         alternatives of a timed entry call for controlled objects.
6768         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6769         exception handler for controlled objects.
6770         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6771         Add formal parameter Nested_Constructs along with its associated
6772         comment.
6773         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6774         Requires_Cleanup_Actions.
6775         (Process_Statements_For_Controlled_Objects): New routine.
6776         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6777         routine. Inspect a node which contains a non-handled sequence of
6778         statements for controlled objects. If such an object is found, the
6779         statements are wrapped in a block.
6780
6781 2011-08-04  Bob Duff  <duff@adacore.com>
6782
6783         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6784         need to compare with Class_Wide_Type (T2), in order to get at the
6785         original class-wide type node.
6786         * sem_type.ads (Covers): Improve the comment.
6787         * einfo.ads (Class_Wide_Type): Improve the comment.
6788         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6789         the type of the Deref.
6790
6791 2011-08-04  Yannick Moy  <moy@adacore.com>
6792
6793         * gnat_rm.texi: Document that Test_Case pragma can only appear on
6794         separate declarations.
6795         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6796         check identifier of pragma argument.
6797         (Chain_TC): check that no other test case associated to the same entity
6798         share the same name.
6799         (Check_Test_Case): disallow test case inside subprogram body
6800         (Analyze_Pragma): correct call to check identifier and not argument
6801         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6802         function gets name from test case pragma.
6803
6804 2011-08-04  Yannick Moy  <moy@adacore.com>
6805
6806         * gnat_rm.texi: Document new pragma and aspect.
6807         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6808         (No_Duplicates_Allowed): new constant array defining whether duplicates
6809         aspects of each kind can appear on the same declaration.
6810         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6811         field, which points to a node holding the previous Spec_PPC_List.
6812         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6813         through the indirection with Contract.
6814         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6815         * par-prag.adb (Prag): do nothing on Test_Case pragma
6816         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6817         be called directly.
6818         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6819         component Ensures of Test_Case.
6820         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6821         (Analyze_Generic_Subprogram_Declaration,
6822         Analyze_Subprogram_Instantiation,
6823         Analyze_Abstract_Subprogram_Declaration,
6824         Analyze_Subprogram_Body_Helper,
6825         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6826         insert contract in subprogram node at point of definition
6827         * sem_ch13.adb
6828         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6829         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6830         corresponding pragma
6831         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6832         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6833         similar to the analysis of pre/post
6834         (Derive_Subprogram): insert contract in subprogram node at point of
6835         derivation.
6836         * sem_prag.adb, sem_prag.ads
6837         (Check_Arg_Is_String_Literal, Check_Identifier):
6838         new checking procedures to be called in treatment of pragmas
6839         (Check_Test_Case): new procedure to check that a Test_Case aspect or
6840         pragma is well-formed. This does not check currently that 'Result is
6841         used only in the Ensures component of a Test_Case.
6842         (Analyze_Pragma): add case for Test_Case
6843         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6844         components of a Test_Case.
6845         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6846         expressions in the 3rd (and 4th if present) arguments of a Test_Case
6847         pragma, treated as spec expressions.
6848         (Sig_Flags): add value -1 for Test_Case.
6849         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6850         Get_Requires_From_Test_Case_Pragma): getters for both expression
6851         components of a Test_Case.
6852         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6853         indirection between an entry or [generic] subprogram entity and its
6854         pre/post + test-cases.
6855         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6856         get/set for fields of an N_Contract node.
6857         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6858         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6859         names and pragma for Test_Case.
6860         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6861
6862 2011-08-04  Vincent Celier  <celier@adacore.com>
6863
6864         * gnat_ugn.texi: Improve documentation of gnatmake switch
6865         --source-info-file=.
6866
6867 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6868
6869         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6870         type). Initialize Atyp to the appropriate type which is later checked
6871         for completion. Rewrite the assertion associated with private type
6872         completion.
6873
6874 2011-08-04  Ed Falis  <falis@adacore.com>
6875
6876         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6877         initialize the number of CPUs.
6878
6879 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6880
6881         * sem_type.adb (Disambiguate): New subsidiary routine
6882         In_Same_Declaration_List, to implement AI05-0020: a user-defined
6883         equality on an anonymous access type whose designated type is private
6884         does not lead to an ambiguity with the universal access equality
6885         operator in the body or child units of the defining package. The same
6886         is true for a multiplication operator on a private type completed with
6887         a fixed-point-type.
6888
6889 2011-08-04  Javier Miranda  <miranda@adacore.com>
6890
6891         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6892         (Normalize_Scalars_Config): Removed.
6893         * opt.adb
6894         (Register_Opt_Config_Switches): Remove registering config values of
6895         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6896         (Restore_Opt_Config_Switches): Remove code which restores the values of
6897         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6898         Init_Or_Norm_Scalars.
6899         (Save_Opt_Config_Switches): Remove code which saves values of
6900         Init_Or_Norm_Scalars and Normalize_Scalars.
6901         (Set_Opt_Config_Switches): Remove code which restores config values of
6902         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6903         Init_Or_Norm_Scalars.
6904
6905 2011-08-04  Yannick Moy  <moy@adacore.com>
6906
6907         * frontend.adb (Frontend): remove previous patch to avoid full
6908         qualification in ALFA mode.
6909         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6910         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6911         unique name for an entity, which could be used to identify the entity
6912         across compilation units.
6913
6914 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6915
6916         * prj-env.adb
6917         (Initialize_Default_Project_Path): Add target specific directory
6918         ($prefix/$target/lib/gnat) in front of project path in all cases
6919         (making gnatmake's behaviour consistent with gprbuild).
6920         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6921         Pass target name from Sdefault to project subsystem.
6922         * gnatls.adb: Show new target specific default project directory.
6923
6924 2011-08-04  Johannes Kanig  <kanig@adacore.com>
6925
6926         * cstand.adb: Add Information to Identifier in Standard
6927         (Identifer_For): Set Entity to the corresponding entity
6928
6929 2011-08-04  Sergey Rybin  <rybin@adacore.com>
6930
6931         * gnat_ugn.texi: Update doc on gnatcheck.
6932
6933 2011-08-04  Yannick Moy  <moy@adacore.com>
6934
6935         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6936         xrefs in a scope.
6937
6938 2011-08-04  Yannick Moy  <moy@adacore.com>
6939
6940         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6941         performing expansion.
6942         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6943         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6944         it is not called in ALFA mode.
6945
6946 2011-08-04  Emmanuel Briot  <briot@adacore.com>
6947
6948         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6949         after all, so removed.
6950
6951 2011-08-04  Sergey Rybin  <rybin@adacore.com>
6952
6953         * vms_data.ads: Add missing VMS qualifiers.
6954
6955 2011-08-04  Emmanuel Briot  <briot@adacore.com>
6956
6957         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6958         the list of files on the command line after processing it through
6959         Complete_Mains.
6960
6961 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6962
6963         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6964         processing for .NET/JVM. These targets can now benefit from
6965         Raise_From_Controlled_Operation and they share the same processing with
6966         standard targets.
6967         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6968         These targets need transient scopes in order to properly finalize short
6969         lived controlled objects.
6970         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6971          NET/JVM. These targets can now benefit from
6972         Raise_From_Controlled_Operation and they share the same processing with
6973         standard targets.
6974
6975 2011-08-04  Geert Bosch  <bosch@adacore.com>
6976
6977         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6978
6979 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6980
6981         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6982         Expand_Record_Aggregate, to determine whether aggregate must be
6983         expanded into assignments. This is the case if the ancestor part is
6984         private, regarless of the setting of the flag Has_Private_Ancestor.
6985
6986 2011-08-04  Ed Falis  <falis@adacore.com>
6987
6988         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6989
6990 2011-08-04  Bob Duff  <duff@adacore.com>
6991
6992         * sinfo.ads: Fix comment.
6993
6994 2011-08-04  Steve Baird  <baird@adacore.com>
6995
6996         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6997         choose a package name in much the same way as is
6998         done for JGNAT when VM_Target /= No_VM, except that
6999         a slightly more distinctive prefix string is used.
7000
7001 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7002
7003         * makeutl.adb (Complete_Mains): no longer accept unit names on the
7004         gnatmake command line.
7005         This behavior was never documented (and was supported only because of
7006         an early bug in the code). This case might lead to ambiguous cases
7007         (between unit names and truncated base names without suffixes).
7008
7009 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7010
7011         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
7012         Remove the external tag of a tagged type from the internal hash table.
7013         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
7014         expanded usage of the routine. Strenghten the check for Is_Master. Add
7015         processing for tagged types.
7016         (Build_Finalizer): Create all the necessary lists used in finalizer
7017         creation when the processed context is a package that may contain
7018         tagged types.
7019         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
7020         Requires_Cleanup_Actions.
7021         (Expand_N_Package_Body): Package bodies may need clean up code
7022         depending on whether they contain tagged types.
7023         (Expand_N_Package_Declaration): Package declarations may need clean up
7024         code depending on whether they contain tagged types.
7025         (Unregister_Tagged_Types): New routine. Search through a list of
7026         declarations or statements, looking for non-abstract Ada tagged types.
7027         For each such type, generate code to unregister the external tag.
7028         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
7029         Requires_Cleanup_Actions.
7030         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
7031         through a list of declarations or statements looking for non-abstract
7032         Ada tagged types or controlled objects.
7033         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
7034         Requires_Cleanup_Actions.
7035         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
7036         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
7037         RE_Unit_Table.
7038
7039 2011-08-04  Vincent Celier  <celier@adacore.com>
7040
7041         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
7042         has Ada sources, not project Project, because if the root project
7043         Project has no sources of its own, all projects will be deemed without
7044         sources.
7045
7046 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7047
7048         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
7049         of the No_Param_Proc acc-to-subp type used for initialization of
7050         __gnat_finalize_library_objects so that it's declared at library level
7051         rather than nested inside of the adainit routine.
7052
7053 2011-08-04  Javier Miranda  <miranda@adacore.com>
7054
7055         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
7056         if the tagged type has a representation clause which specifies its
7057         external tag.
7058
7059 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7060
7061         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
7062         Remove previous procedure with that name.
7063         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
7064         when appropriate.
7065         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7066         subtype mark, the ancestor cannot have unknown discriminants.
7067         (Resolve_Record_Aggregate): if the type has invisible components
7068         because of a private ancestor, the aggregate is illegal.
7069
7070 2011-08-04  Vincent Celier  <celier@adacore.com>
7071
7072         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7073         account switches -gnat2005, -gnat12 and -gnat2012.
7074
7075 2011-08-04  Bob Duff  <duff@adacore.com>
7076
7077         * s-tasdeb.ads: Minor comment fix.
7078
7079 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7080
7081         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7082         CodePeer mode.
7083         * switch.ads, switch.adb (Is_Language_Switch): New function.
7084
7085 2011-08-04  Vincent Celier  <celier@adacore.com>
7086
7087         * switch-c.adb: Minor comment addition.
7088
7089 2011-08-04  Vincent Celier  <celier@adacore.com>
7090
7091         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7092         ending with '=' is followed by a space (missing file name).
7093
7094 2011-08-04  Pascal Obry  <obry@adacore.com>
7095
7096         * g-regist.ads: Fix size of HKEY on x86_64-windows.
7097
7098 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7099
7100         * sem_ch12.adb (Analyze_Associations): New routine
7101         Check_Overloaded_Formal_Subprogram to reject a formal package when
7102         there is a named association or a box initialisation for an overloaded
7103         formal subprogram of the corresponding generic.
7104
7105 2011-08-04  Yannick Moy  <moy@adacore.com>
7106
7107         * alfa.ads (ALFA_Xref_Record): add component for type of entity
7108         * get_alfa.adb, put_alfa.adb: Read and write new component of
7109         cross-reference.
7110         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7111
7112 2011-08-04  Pascal Obry  <obry@adacore.com>
7113
7114         * urealp.adb: Minor reformatting.
7115
7116 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7117
7118         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7119         Handle the case when Cleanup_Protected_Object returns Empty.
7120
7121 2011-08-04  Yannick Moy  <moy@adacore.com>
7122
7123         * frontend.adb (Frontend): only qualify names in non-ALFA mode
7124
7125 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7126
7127         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7128         call, ignore functions.
7129
7130 2011-08-04  Geert Bosch  <bosch@adacore.com>
7131
7132         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7133         point.
7134
7135 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7136
7137         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7138         as an index for Builder'Switches. This conforms to the documentation.
7139         * make.adb (Insert_Project_Sources): avoid duplicate code
7140
7141 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7142
7143         * makeutl.adb (Complete_Mains): if the user has passed a relative file
7144         name on the command line (for instance "../dummy"), never assume it can
7145         be a unit name.
7146
7147 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7148
7149         * bindgen.adb: Remove code the reference or create the
7150         Break_Start/__gnat_break_start procedure.
7151         * s-stalib.adb (Break_Start): Removed.
7152
7153 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7154
7155         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7156         shared with gprbuild.
7157
7158 2011-08-04  Yannick Moy  <moy@adacore.com>
7159
7160         * par-ch4.adb (P_Primary): preferentially issue an error message about
7161         a missing parenthesis arount a conditional or case expression in Ada
7162         2012 mode, if we detect that the alignment is not correct for a
7163         statement.
7164
7165 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7166
7167         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7168         tag-to-class-wide conversion as needing finalization actions.
7169         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7170         a tag-to-class-wide conversion as needing finalization actions.
7171         (Is_Finalizable_Transient): The result of a tag-to-class-wide
7172         conversion does not need finalization actions.
7173         (Is_Tag_To_CW_Conversion): New routine.
7174         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7175         whether an object is the result of a tag-to-class-wide conversion.
7176
7177 2011-08-04  Yannick Moy  <moy@adacore.com>
7178
7179         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7180         the left-hand-side and right-hand-side of a conjunct are inserted when
7181         translating a pre- or postcondition
7182         * sem_ch6.adb: Correct typo in comment
7183
7184 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7185
7186         * gnat_rm.texi: Ravenscar does not prohibit dependence on
7187         Unchecked_Conversion and Unchecked_Deallocation.
7188
7189 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7190
7191         * make.adb: Minor reformatting.
7192
7193 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7194
7195         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7196         sources in the project and its imported projects, but not in the whole
7197         tree.
7198
7199 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7200
7201         * make.adb: Remove debug trace.
7202
7203 2011-08-04  Vincent Celier  <celier@adacore.com>
7204
7205         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7206         path in canonical form, to be able to compare path names on platforms
7207         such as Windows or Darwin.
7208
7209 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7210
7211         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7212         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7213         * scos.ads: Update documentation accordingly.
7214         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7215         pragmas.
7216
7217 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7218
7219         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7220         attribute only if prefix type is scalar.
7221
7222 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7223
7224         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7225         in gnatmake for specifying mains on the command line that do not belong
7226         to the main project. These mains must currently all belong to the same
7227         project, though.
7228         (Ultimate_Extension_Of): removed, since duplicated
7229         Ultimate_Extending_Project.
7230
7231 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7232
7233         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7234         instead.
7235         (CodePeer_Mode_String): New.
7236         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7237         CodePeer mode.
7238         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7239         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7240         mode, since no useful elaboration subprogram is needed by CodePeer.
7241         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7242         In this mode, compile binder file with -gnatC and do stop after this
7243         step.
7244
7245 2011-08-04  Vincent Celier  <celier@adacore.com>
7246
7247         * exp_ch7.adb: Minor comment fix.
7248
7249 2011-08-04  Robert Dewar  <dewar@adacore.com>
7250
7251         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7252         exp_ch4.adb, makeutl.adb: Minor reformatting.
7253
7254 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7255
7256         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7257         Create several new subprograms to move code out of Make. This makes the
7258         code more readable, removes code duplication, and is a preparation work
7259         for adding support for aggregate projects.
7260
7261 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7262
7263         * s-po32gl.ads, s-po32gl.adb: New files.
7264         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7265         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7266         (Build_Finalization_Collection): Use it.
7267         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7268         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7269         literals.
7270         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7271         * gcc-interface/Make-lang.in: Update dependencies.
7272
7273 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7274
7275         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7276         the command line.
7277
7278 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7279
7280         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7281         command line is not a file name, also check whether it could be a unit
7282         name.
7283
7284 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7285
7286         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7287         the header of the finalization routine.
7288         If the unit has no finalizer but is a body whose spec has one, then
7289         generate the decrement of the elaboration entity only.
7290         If the unit has a finalizer and is a spec, then do not generate the
7291         decrement of the elaboration entity.
7292         (Gen_Finalize_Library_C): Likewise.
7293
7294 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7295
7296         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7297         (Bounds_Size_Expression): Removed.
7298         (Double_Alignment_Of): New subsidiary routine.
7299         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7300         for a hole in the dope vector of unconstrained arrays due to different
7301         index and element alignments.
7302
7303 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7304
7305         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7306         raise program_error because body has not been seen yet.
7307
7308 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7309
7310         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7311         an unresolved name.
7312
7313 2011-08-04  Vincent Celier  <celier@adacore.com>
7314
7315         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7316
7317 2011-08-04  Yannick Moy  <moy@adacore.com>
7318
7319         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7320         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7321
7322 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7323
7324         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7325         instantiation in RCI.
7326
7327 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7328
7329         * make.adb: Share more code with gprbuild
7330
7331 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7332
7333         * projects.texi: Added documentation for the IDE'Gnat project file
7334         attribute.
7335
7336 2011-08-04  Nicolas Roche  <roche@adacore.com>
7337
7338         * gnat_rm.texi: Minor editing.
7339
7340 2011-08-04  Javier Miranda  <miranda@adacore.com>
7341
7342         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7343         and the library case for VM targets.
7344         (Gen_Adainit_Ada): Likewise.
7345
7346 2011-08-04  Robert Dewar  <dewar@adacore.com>
7347
7348         * g-altive.ads: Minor comment updates.
7349         * prj-nmsc.adb: Minor reformatting.
7350
7351 2011-08-04  Javier Miranda  <miranda@adacore.com>
7352
7353         * opt.ads
7354         (Normalize_Scalars_Config): Value of the configuration switch set by
7355         pragma Normalize_Scalars when it appears in the gnat.adc file.
7356         (Normalize_Scalars): New field for record Config_Switches_Type. Used
7357         to save and restore settings of this pragma.
7358         * opt.adb
7359         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7360         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7361
7362 2011-08-04  Vincent Celier  <celier@adacore.com>
7363
7364         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7365
7366 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7367
7368         * makeutl.adb: Minor reformatting.
7369
7370 2011-08-04  Olivier Hainque  <hainque@adacore.com>
7371
7372         * g-altive.ads: Update comments to reflect that only the soft
7373         binding is available today.
7374
7375 2011-08-04  Robert Dewar  <dewar@adacore.com>
7376
7377         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7378         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7379         * gcc-interface/Make-lang.in: Update dependencies.
7380
7381 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7382
7383         * prj-env.adb: Remove local debug traces.
7384
7385 2011-08-04  Yannick Moy  <moy@adacore.com>
7386
7387         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7388         was used instead of Hi_OK, which could cause a read of an uninitialized
7389         value later on. Detected while working on the new warning.
7390         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7391         to local variable.
7392         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7393         in more cases, in order to detect more unreferenced values.
7394         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7395         object for expression, if any.
7396
7397 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7398
7399         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7400         the operand types instead of the Esize.
7401
7402 2011-08-04  Steve Baird  <baird@adacore.com>
7403
7404         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7405         enable CodePeer_Mode.
7406         * bindusg.adb (Display): Add help message describing -P binder switch.
7407         * gnat_ugn.texi: Document -P binder switch.
7408         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7409         user-defined main program directly.
7410         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7411         user-defined main program in the context clause of the package body.
7412
7413 2011-08-04  Yannick Moy  <moy@adacore.com>
7414
7415         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7416         duplicate of Defining_Entity
7417         (Get_Unique_Entity_For_Decl): rename function into
7418         Unique_Defining_Entity
7419         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7420         (Formal_Proof_On): remove synthesized flag
7421         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7422         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7423         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7424         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7425         Annotate (Formal_Proof)
7426
7427 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7428
7429         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7430         source files with non-standard naming schemes, in imported projects
7431
7432 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7433
7434         * makeutl.adb (Complete_Mains): when a multi-unit source file is
7435         specified on the gprbuild command line, we need to compile all units
7436         within that file, not just the first one we find
7437         Fix error message for mains that are not found.
7438
7439 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7440
7441         * sem_ch6.adb: Update comment.
7442         * sem_ch12.adb: Minor reformatting.
7443
7444 2011-08-04  Bob Duff  <duff@adacore.com>
7445
7446         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7447         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7448         race condition whose symptom is to fail to lock Parent. That, in turn,
7449         causes Parent.Awake_Count to be accessed without locking Parent, which
7450         causes another race condition whose symptom is that Parent.Awake_Count
7451         can be off by 1 (either too high or too low). The solution is to lock
7452         Parent unconditionally, and then lock Acceptor, before reading
7453         Acceptor.Terminate_Alternative.
7454
7455 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7456
7457         * debug.adb: Update comment.
7458
7459 2011-08-04  Robert Dewar  <dewar@adacore.com>
7460
7461         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7462         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7463         exp_ch6.adb: Minor reformatting.
7464
7465 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7466
7467         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7468         checks for -gnateE.
7469
7470 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7471
7472         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7473
7474 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7475
7476         * sinfo.ads: Minor reformatting.
7477
7478 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7479
7480         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7481         even if there is no location.
7482
7483 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7484
7485         * sem_res.adb, sem_ch4.adb: move check for restriction
7486         No_Task_Hierarchy to resolve_allocator.
7487
7488 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7489
7490         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7491         This flag of N_Pragma nodes is not used, remove it as well as all of
7492         the associated circuitry.
7493
7494 2011-08-04  Javier Miranda  <miranda@adacore.com>
7495
7496         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7497         runtime check on duplicated externa tags
7498         * debug.adb Document switch -gnatdQ.
7499
7500 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7501
7502         * a-fihema.ads: Minor typo fix.
7503
7504 2011-08-04  Yannick Moy  <moy@adacore.com>
7505
7506         * sem_ch10.adb: Minor comment update.
7507
7508 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7509
7510         * einfo.adb: Update the node field usage to reflect the renaming of
7511         Return_Flag to Return_ Flag_Or_Transient_Decl.
7512         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7513         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7514         (Write_Field15_Name): Change Return_Flag to
7515         Return_Flag_Or_Transient_Decl.
7516         * einfo.ads: Rename node field Return_Flag to
7517         Return_Flag_Or_Transient_Decl. Update the associated comment and all
7518         occurrences in entities.
7519         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7520         associated Inline pragma.
7521         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7522         associated Inline pragma.
7523         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7524         routine.
7525         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7526         Return_Flag and Set_Return_Flag.
7527         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7528         objects generated for controlled transients declared inside an
7529         Exception_With_Actions. Update the calls to Return_Flag.
7530         (Process_Object_Declaration): Add code to add a null guard for hook
7531         objects generated for controlled transients declared inside an
7532         Exception_With_Actions. Update related comment.
7533         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7534         objects generated for controlled transients declared inside an
7535         Exception_With_Actions. Update the calls to Return_Flag.
7536         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7537
7538 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7539
7540         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7541         positional aggregate.
7542
7543 2011-08-04  Vincent Celier  <celier@adacore.com>
7544
7545         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7546         SLOC only for pragmas.
7547
7548 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7549
7550         * projects.texi: Minor typo fix.
7551
7552 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7553
7554         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7555         on case-sensitive file systems.
7556
7557 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7558
7559         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7560         nested in a disabled pragma.
7561         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7562         enclosing pragma, if any, for X decisions.
7563
7564 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7565
7566         * sem_prag.adb: Minor reformatting.
7567
7568 2011-08-04  Vincent Celier  <celier@adacore.com>
7569
7570         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7571         allowed in no run time mode.
7572
7573 2011-08-04  Vincent Celier  <celier@adacore.com>
7574
7575         * make.adb (Check): When -gnatc is used, check for the source file
7576         inside the ALI file with a canonical case file name.
7577
7578 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7579
7580         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7581         overriding the separator.
7582
7583 2011-08-04  Robert Dewar  <dewar@adacore.com>
7584
7585         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7586         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7587
7588 2011-08-04  Robert Dewar  <dewar@adacore.com>
7589
7590         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7591
7592 2011-08-04  Yannick Moy  <moy@adacore.com>
7593
7594         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7595         'Result only appears in postcondition of function.
7596
7597 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7598
7599         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7600         external tag, include the value of the external tag in the exception
7601         message.
7602
7603 2011-08-04  Yannick Moy  <moy@adacore.com>
7604
7605         * sem_attr.adb (Result): modify error message for misplaced 'Result
7606
7607 2011-08-04  Sergey Rybin  <rybin@adacore.com>
7608
7609         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7610         clear that the second argument must be an identifier.
7611
7612 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7613
7614         * exp_ch9.adb (Build_Barrier_Function): When compiling with
7615         -fpreserve-control-flow, insert an IF statement on the barrier
7616         condition to ensure that a conditional branch instruction is generated.
7617
7618 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7619
7620         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7621         (Processing_Flags.Ignore_Missing_With): new flag.
7622
7623 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7624
7625         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7626         Source_List_File on case-insensitive systems where the file is actually
7627         on a case-sensitive file system (NFS,...).
7628
7629 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7630
7631         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7632         function return contains a controlled [extension] aggregate and the
7633         return statement is not part of a handled sequence of statements, wrap
7634         the return in a block. This ensures that all controlled temporaries
7635         generated during aggregate resolution will be picked up by the
7636         finalization machinery.
7637
7638 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7639
7640         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7641         components, freeze type before resolution, to ensure that default
7642         initializations are present for all components.
7643         * sem_res.adb (Resolve_Actuals): the designated object of an
7644         accces-to-constant type is a legal actual in a call to an
7645         initialization procedure.
7646
7647 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7648
7649         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7650         N_Unchecked_Type_Conversion to the possible containers of a renamed
7651         transient variable.
7652
7653 2011-08-04  Yannick Moy  <moy@adacore.com>
7654
7655         * par-ch13.adb (Aspect_Specifications_Present): recognize
7656         "with Identifier'Class =>" as an aspect, so that a meaningful warning
7657         is issued in Strict mode.
7658         * par.adb: Fix typos in comments.
7659
7660 2011-08-04  Yannick Moy  <moy@adacore.com>
7661
7662         * sem_attr.adb (Result): modify error message to take into account Post
7663         aspect when compiling Ada 2012 (or newer) code.
7664
7665 2011-08-04  Nicolas Roche  <roche@adacore.com>
7666
7667         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7668         remove need for GCC exceptions.
7669
7670 2011-08-04  Vincent Celier  <celier@adacore.com>
7671
7672         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7673         project, not the source file name.
7674         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7675         excluded, continue looking. This excluded source will only be returned
7676         if there is no other source with the same base name that is not locally
7677         removed.
7678
7679 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7680
7681         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7682         private and one of the operands is a real literal, use a qualified
7683         expression rather than a conversion which is not meaningful to the
7684         back-end.
7685
7686 2011-08-04  Yannick Moy  <moy@adacore.com>
7687
7688         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7689         corresponding aspect X'Class are allowed, proceed with analysis of the
7690         aspect instead of skipping it.
7691
7692 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7693
7694         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7695         This will allow to have an Ada implementation for the subprogram.
7696
7697 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7698
7699         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7700         completion and aspects are present, apply them to the entity for the
7701         type which is currently the partial view, but which is the one that
7702         will be frozen.
7703         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7704         applies to a partial view, indicate that the full view has predicates
7705         and delayed aspects.
7706         (Replace_Type_Reference): Handle properly predicates that apply to the
7707         full view of a private completion.
7708
7709 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7710
7711         * layout.adb (Layout_Type): For composite types, do not set Esize.
7712         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7713         set Esize.
7714         (Size_Known): Look at the RM size of components instead of the Esize.
7715         (Freeze_Record_Type): Look at the RM size instead of the Esize to
7716         issue warning and activate Implicit_Packing.
7717         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
7718         if the Esize is not known.
7719         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7720         for elementary types only.
7721         (Analyze_Record_Representation_Clause): Look at the RM size instead
7722         of the Esize to issue errors.
7723         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7724         is not known.
7725         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
7726         obsolete block.
7727         Look at the RM size instead of the Esize for types if the latter is
7728         not known.
7729         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7730
7731 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7732
7733         * sem_type.adb: proper handling of equality not involving anonymous
7734         access types.
7735
7736 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7737
7738         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7739         Vis_Decls. When creating a library-level finalizer for a package spec,
7740         both the declaration and body of the finalizer are inserted either in
7741         the visible or private declarations of the package spec.
7742
7743 2011-08-04  Javier Miranda  <miranda@adacore.com>
7744
7745         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7746         use of the full-view of a type when invoking Is_Ancestor.
7747         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7748         the full-view of private parents is requested, then use also the
7749         full-view of the parent of the first derivation.
7750
7751 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7752
7753         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7754         instead of the locally imported procedure.
7755         * s-taprop-mingw.adb (Enter_Task): Ditto.
7756         * s-valrea.adb (Scan_Real): Ditto.
7757         * s-imgrea.adb (Set_Image_Real): Ditto.
7758         * s-flocon.ads: Make the package pure.
7759
7760 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7761
7762         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7763         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7764         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7765         New subprogram, moved here from...
7766         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7767         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7768         rewriting of the last argument into a procedure call statement here...
7769         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7770         instead.
7771
7772 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7773
7774         * par_sco.adb: Minor reformatting.
7775
7776 2011-08-04  Robert Dewar  <dewar@adacore.com>
7777
7778         * erroutc.adb: Minor reformatting.
7779
7780 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7781
7782         * par_sco.adb: Comment update.
7783
7784 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7785
7786         * s-flocon.ads: New file.
7787         * g-flocon.ads: Now a renaming of s-flocon.
7788         * Makefile.rtl: Add s-flocon.o
7789
7790 2011-08-04  Javier Miranda  <miranda@adacore.com>
7791
7792         * exp_strm.adb (Build_Array_Input_Function): if the array type is
7793         constrained, do not attempt to build a subtype of it.
7794
7795 2011-08-04  Yannick Moy  <moy@adacore.com>
7796
7797         * errout.ads Change comments: remove 'R'M as an example where quotes
7798         are needed; add ALFA as another case where quotes are not needed
7799         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7800         case where quotes are not needed.
7801         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7802         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7803         Remove all occurrences of 'A'L'F'A
7804
7805 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7806
7807         * sem_ch13.adb: check legality of invariant pragma.
7808
7809 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7810
7811         * bindgen.adb: Add comments.
7812
7813 2011-08-04  Yannick Moy  <moy@adacore.com>
7814
7815         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7816         synthesized flag.
7817         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7818         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7819
7820 2011-08-04  Robert Dewar  <dewar@adacore.com>
7821
7822         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7823         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7824         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7825
7826 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7827
7828         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7829
7830 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7831
7832         PR ada/47880
7833         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7834         allocated object.
7835
7836 2011-08-04  Robert Dewar  <dewar@adacore.com>
7837
7838         * einfo.ads, exp_ch4.adb: Minor reformatting.
7839
7840 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7841
7842         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7843
7844 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7845
7846         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7847         type in all cases to compute list of primitive operations, because full
7848         view may be an itype that is not attached to the list of declarations.
7849
7850 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7851
7852         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7853         library has already been finalized.
7854         (Gen_Adafinal_C): Likewise.
7855         (Gen_Adainit_Ada): Generate an early return if the library has
7856         already been elaborated.
7857         (Gen_Adainit_C): Likewise.
7858         (Gen_Output_File_Ada): Generate an elaboration flag.
7859         (Gen_Output_File_C): Likewise.
7860
7861 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7862
7863         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7864         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7865         built in the first place.
7866         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7867         for CodePeer because Finalize_Address was not built to begin with.
7868         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7869
7870 2011-08-04  Pascal Obry  <obry@adacore.com>
7871
7872         * adaint.c (__gnat_tmp_name): Use current process id to create temp
7873         filenames, this ensures unicity of filenames across processes.
7874
7875 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7876
7877         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7878         Raise_Controlled to Raise_From_Controlled_Operation. Update the
7879         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7880         Add False as the actual to From_Abort in the generated call to
7881         Raise_From_Controlled_Operation.
7882
7883 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7884
7885         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7886         so that the ali file name can be retrieved from outside of this package.
7887         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7888         doing nothing in the general case, but used to update the object file
7889         timestamp if directly generated by the backend.
7890         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7891         to a later time than the ali file one.
7892
7893 2011-08-04  Yannick Moy  <moy@adacore.com>
7894
7895         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7896         entities whose body contains an Annotate pragma which forces formal
7897         proof on this body.
7898         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7899         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7900         Mark_Non_ALFA_Subprogram to pass in a message and node.
7901         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7902         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7903         surrounding subprogram.
7904         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7905         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7906         as not in ALFA is annotated with Formal_Proof being On, then an error
7907         is issued based on the additional parameters for message and node.
7908         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7909         * gcc-interface/Make-lang.in: Update dependencies.
7910
7911 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7912
7913         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7914         Finalize_Address when CodePeer is enabled.
7915
7916 2011-08-04  Pascal Obry  <obry@adacore.com>
7917
7918         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7919         the latter returns a pointer to a static buffer which is deallocated
7920         at the end of the routine.
7921
7922 2011-08-04  Yannick Moy  <moy@adacore.com>
7923
7924         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7925         after index creation; mark unconstrained base array type generated as
7926         being in/not in ALFA as well
7927         (Make_Index): mark subtype created as in/not in ALFA
7928         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7929         over a loop as in/not in ALFA, depending on its type and form of loop
7930         iteration.
7931
7932 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7933
7934         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7935         directly to False on .NET and JVM.
7936
7937 2011-08-04  Yannick Moy  <moy@adacore.com>
7938
7939         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7940         constraint that subtype must come from source code to be in ALFA, so
7941         that anonymous subtypes can be in ALFA too.
7942
7943 2011-08-04  Yannick Moy  <moy@adacore.com>
7944
7945         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7946         reference for ALFA mode.
7947         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7948         procedure public so as to use it from formal verification back-end.
7949
7950 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7951
7952         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7953         invalid checks of the Parameter, making Remove_Switch not working
7954         correctly.
7955
7956 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7957
7958         * targparm.ads: Update header: no run-time exception is needed on this
7959         file.
7960
7961 2011-08-04  Vincent Celier  <celier@adacore.com>
7962
7963         * a-fihema.adb: Use System.IO instead of GNAT.IO
7964
7965 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7966
7967         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7968         are forbidden in Compiler_Unit mode.
7969
7970 2011-08-04  Robert Dewar  <dewar@adacore.com>
7971
7972         * sem_util.adb: Minor reformatting.
7973
7974 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7975
7976         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7977         library-level finalizers.
7978         (Gen_Finalize_Library_C): Update the import string for library-level
7979         finalizers.
7980         (Gen_Finalize_Library_Defs_C): Update the definition name of a
7981         library-level finalizer.
7982         * exp_ch7.adb: Remove with and use clauses for Stringt.
7983         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7984         Spec_Decl. Add local variable Body_Id. The names of library-level
7985         finalizers are now manually fully qualified and are no longer external.
7986         A single name is now capable of servicing .NET, JVM and non-VM targets.
7987         Pragma Export is no longer required to provide visibility for the name.
7988         (Create_Finalizer_String): Removed.
7989         (New_Finalizer_Name): New routine which mimics New_..._Name.
7990
7991 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7992
7993         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7994         elaboration counter to Standard_Short_Integer.
7995         * sem_util.adb (Build_Elaboration_Entity): Likewise.
7996         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7997         (Gen_Elab_Externals_C): Likewise.
7998
7999 2011-08-04  Ed Falis  <falis@adacore.com>
8000
8001         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
8002         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
8003         system-vxworks-mips.ads, system-vxworks-x86.ads
8004         (Always_Compatible_Rep): set to False for all VxWorks targets.
8005
8006 2011-08-04  Robert Dewar  <dewar@adacore.com>
8007
8008         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
8009         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
8010         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
8011         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
8012         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
8013         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
8014         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
8015         Minor reformatting and code reorganization.
8016
8017 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8018
8019         * projects.texi: Added doc for aggregate projects.
8020
8021 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8022
8023         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
8024         Add support for overriding the Project_Path in aggregate projects.
8025
8026 2011-08-04  Robert Dewar  <dewar@adacore.com>
8027
8028         * a-cofove.ads: Minor reformatting.
8029
8030 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8031
8032         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
8033         on the generated code.
8034         (Build_Finalize_Statements): Update the comment on the generated code.
8035         (Build_Initialize_Statements): Update the comment on the generated code.
8036         (Build_Object_Declarations): Add local variable Result. The object
8037         declarations are now built in sequence.
8038         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
8039         RE_Unit_Table.
8040
8041 2011-08-04  Robert Dewar  <dewar@adacore.com>
8042
8043         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
8044
8045 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8046
8047         * einfo.ads (Elaboration_Entity): Document new definition and use.
8048         (Elaboration_Entity_Required): Adjust to above change.
8049         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
8050         * exp_ch12.adb: And with and use for Snames.
8051         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
8052         * exp_util.adb (Set_Elaboration_Flag): Likewise.
8053         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
8054         <Check_Unit_Name>: Deal with N_Expanded_Name.
8055         <Attribute_Elaborated>: Extend to all unit names.
8056         * sem_elab.adb: And with and use for Uintp.
8057         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
8058         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
8059         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
8060         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
8061         from Gen_Adainit_Ada.
8062         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
8063         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
8064         case, do not call System.Standard_Library.Adafinal; instead call
8065         finalize_library if needed.
8066         (Gen_Adafinal_C): Likewise.
8067         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8068         non-main program case.
8069         (Gen_Adainit_C): Generate a couple of external declarations here.
8070         In the main program case, set SSL.Finalize_Library_Objects.
8071         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8072         (Gen_Elab_Calls_C): Likewise.
8073         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
8074         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
8075         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8076         objects here.
8077         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8078         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
8079         Gen_Adafinal_Ada.
8080         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8081         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
8082         of external declarations.  Call Gen_Finalize_Library_C.
8083
8084 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8085
8086         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8087         Compute_Compilation_Phases): new subprogram.
8088         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8089         The number of mains as well as the various compilation phases that
8090         need to be run are now project tree specific, since various
8091         aggregated trees might have different requirements. In particular,
8092         they do not all require bind or link phases.
8093
8094 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8095
8096         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8097         (Project_Tree_Appdata): New type.
8098         It is now possible to associate application-specific data to a project
8099         tree. In particular, this is used in the gprbuild builder to avoid a
8100         number of global tables and htables, especially now that there can be
8101         several project trees loaded at once because of aggregate projects.
8102         (Debug_Name): new procedure.
8103         * projects.texi: Clarify syntax of "**" for Source_Dirs
8104
8105 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8106
8107         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8108         the "roots" for a main.
8109         (Fill_From_Project): add support for aggregate projects. Main units
8110         in aggregated projects are now automatically added in the list of
8111         files to build (although this fails later on in gprbuild, because
8112         these files are not using the root proejct tree, so this needs
8113         further cleanup)
8114         * gcc-interface/Make-lang.in: Update dependencies.
8115
8116 2011-08-03  Yannick Moy  <moy@adacore.com>
8117
8118         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8119         conditional expression in ALFA.
8120         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8121         expressions as not in ALFA.
8122
8123 2011-08-03  Robert Dewar  <dewar@adacore.com>
8124
8125         * a-cofove.adb: Minor reformatting.
8126
8127 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8128
8129         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8130         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8131         gprbuild sources.
8132         These packages are more logically placed in the Queue package, since
8133         they manipulate the queue. It is also likely that they can be adapted
8134         for gnatmake, thus sharing more code.
8135         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8136         that we could move the above.
8137
8138 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8139
8140         * errutil.adb (Finalize): clean up the list of error messages on exit.
8141         Calling this subprogram multiple times will no longer show duplicate
8142         error messages on stderr.
8143
8144 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8145
8146         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8147         Getopt_Switches when we have already define a command line
8148         configuration.
8149
8150 2011-08-03  Yannick Moy  <moy@adacore.com>
8151
8152         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8153         in ALFA. Instead, they are considered as assertions to prove.
8154         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8155         nodes as not in ALFA. Instead, include conditional expressions in ALFA
8156         if they have no ELSE part, or if they occur in pre- and postconditions,
8157         where the Condition cannot have side-effects in ALFA
8158         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8159         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8160         Instead, include type conversion between scalar types in ALFA.
8161         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8162         if-and-only-if its type is in ALFA.
8163
8164 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8165
8166         * scos.adb, get_scos.adb, put_scos.adb
8167         New code letter for decisions: G (entry guard)
8168         * par_sco.adb
8169         (Traverse_Subprogram_Body): Rename to...
8170         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8171         (Traverse_Protected_Body): New subprogram
8172         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8173         protected bodies and entry bodies.
8174
8175 2011-08-03  Yannick Moy  <moy@adacore.com>
8176
8177         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8178         entities with get/set subprograms, which is set on procedure entities
8179         generated by the compiler for a postcondition.
8180         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8181         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8182         entity for a declaration
8183         (Get_Unique_Entity_For_Decl): new function returning an entity which
8184         represents a declaration, so that matching spec and body have the same
8185         entity.
8186
8187 2011-08-03  Robert Dewar  <dewar@adacore.com>
8188
8189         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8190         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8191
8192 2011-08-03  Yannick Moy  <moy@adacore.com>
8193
8194         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8195         library-level because retriction No_Implicit_Dynamic_Code in the
8196         front-end prevents its definition as a local subprogram
8197         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8198         for reuse in other contexts
8199         (Traverse_Declarations_Or_Statements,
8200         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8201         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8202         procedures take a callback parameter to be called on all declarations
8203         * lib-xref.ads
8204         (Traverse_All_Compilation_Units): new generic function to traverse a
8205         compilation unit and call a callback parameter on all declarations
8206
8207 2011-08-03  Javier Miranda  <miranda@adacore.com>
8208
8209         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8210         in Java since they are always enclosed in a namespace that
8211         differentiates them, and overloaded entities are supported by the VM.
8212
8213 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8214
8215         * checks.adb (Determine_Range): If a computed bound of an operation is
8216         outside the range of the base type of the expression, and overflow
8217         checks are enabled, the result is unknown and cannot be used for any
8218         subsequent constant folding.
8219         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8220         unknown, so is the result of the comparison.
8221
8222 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8223
8224         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8225         From_Abort. When finalization was triggered by an abort, propagate
8226         Standard'Abort_Signal rather than Program_Error.
8227         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8228         From_Abort.
8229         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8230         From_Abort. When finalization was triggered by an abort, propagate
8231         Standard'Abort_Signal rather than Program_Error.
8232         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8233         From_Abort.
8234         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8235         Abort_Id. Update the calls to Build_Object_Declarations and
8236         Build_Raise_Statement to include Abort_Id.
8237         (Build_Adjust_Statements): New local variable Abort_Id. Update the
8238         calls to Build_Object_Declarations and Build_Raise_Statement to include
8239         Abort_Id.
8240         (Build_Finalize_Statements): New local variable Abort_Id. Update the
8241         calls to Build_Object_Declarations and Build_Raise_Statement to include
8242         Abort_Id.
8243         (Build_Components): Create an entity for Abort_Id when exceptions are
8244         allowed on the target.
8245         (Build_Finalizer): New local variable Abort_Id.
8246         (Build_Initialize_Statements): New local variable Abort_Id. Update the
8247         calls to Build_Object_Declarations and Build_Raise_Statement to include
8248         Abort_Id.
8249         (Build_Object_Declarations): Add new formal Abort_Id. Create the
8250         declaration of flag Abort_Id to preserve the original abort status
8251         before finalization code is executed.
8252         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8253         runtime routine Raise_From_Controlled_Operation.
8254         (Create_Finalizer): Update the call to Build_Raise_Statement to include
8255         Abort_Id. Update the call to Build_Object_Declarations to include
8256         Abort_Id. Update the layout of the finalizer body.
8257         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8258         (Process_Transient_Objects): New local variable Abort_Id. Remove the
8259         clunky code to create all flags and objects related to
8260         exception propagation and replace it with a call to
8261         Build_Object_Declarations. Update the call to Build_Raise_Statement to
8262         include Abort_Id.
8263         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8264         Add new formal Abort_Id and associated comment on its use.
8265         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8266         on its use.
8267         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8268         Remove the clunky code to create all flags and objects related to
8269         exception propagation and replace it with a call to
8270         Build_Object_Declarations. Update the call to Build_Raise_Statement.
8271
8272 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
8273
8274         * s-tassta.adb: Fix minor typos.
8275
8276 2011-08-03  Robert Dewar  <dewar@adacore.com>
8277
8278         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8279         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8280
8281 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8282
8283         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8284         to packages. This ensures that the finalizer body will not end up
8285         inside the freeze node.
8286         (Process_Declarations): Add code to detect whether a freeze node has a
8287         nested finalization collection.
8288
8289 2011-08-03  Pascal Obry  <obry@adacore.com>
8290
8291         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8292         (Current_Session): Return a not null access to Session_Type.
8293         (Default_Session): Likewise.
8294
8295 2011-08-03  Robert Dewar  <dewar@adacore.com>
8296
8297         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8298         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8299
8300 2011-08-03  Pascal Obry  <obry@adacore.com>
8301
8302         * g-awk.ads: Minor comment fix.
8303
8304 2011-08-03  Sergey Rybin  <rybin@adacore.com>
8305
8306         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8307         the tree structure related to discriminant constraints.
8308         Original_Discriminant cannot be used any more for computing the
8309         defining name for the reference to a discriminant.
8310
8311 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8312
8313         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8314         function is not visibly tagged, this is not a dispatching call and
8315         therfore is not Tag_Indeterminate, even if the function is marked as
8316         dispatching on result.
8317
8318 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8319
8320         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8321         (Expand_N_Free_Statement): Add a guard to protect against run-times
8322         which do not support controlled types.
8323         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8324         against run-times which do not support controlled types.
8325         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8326         against run-times which do not support controlled types.
8327         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8328         against run-times which do not support controlled types.
8329         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8330         protect against run-times which do not support controlled types.
8331
8332 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
8333
8334         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8335         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8336
8337 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8338
8339         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8340         modified in the source, to prevent spurious warnings when compiling
8341         with -gnatg.
8342
8343 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8344
8345         * a-except-2005.adb: Minor reformatting.
8346
8347 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8348
8349         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8350         is a renaming declaration in the private part of a package, do not emit
8351         a warning that the with_clause could be moved because the renaming may
8352         be used in the body or in a child unit.
8353
8354 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8355
8356         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8357         Propagate the Comes_From_Source attribute from the original return
8358         object to the renaming.
8359
8360 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
8361
8362         * exp_ch7.adb (Build_Raise_Statement): Do not call
8363         Raise_From_Controlled_Operation when this routine is not present in
8364         the run-time library.
8365         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8366         libraries (Ravenscar), tasks are non-terminating, and protected objects
8367         and tasks can only appear at library level, so we do not want
8368         finalization of protected objects nor tasks.
8369         * exp_intr.adb: Minor clarification in comment.
8370         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8371         Gen_Output_File_C): Remove references to finalization of library-level
8372         objects when using restricted run-time libraries.
8373
8374 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8375
8376         * sem_ch3.adb (Build_Discriminant_Constraints): Set
8377         Original_Discriminant only if the parent type is a generic formal.
8378
8379 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8380
8381         * exp_ch13.adb: Add with and use clause for Targparm;
8382         (Expand_N_Free_Statement): Prevent the generation of a custom
8383         Deallocate on .NET/JVM targets since this requires pools and address
8384         arithmetic.
8385         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8386         .NET/JVM targets, attach the newly allocated object to the access
8387         type's finalization collection. Do not generate a call to
8388         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8389         exist in the runtime.
8390         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8391         create a custom Allocate for object that do not require initialization.
8392         Attach a newly allocated object to the access type's finalization
8393         collection on .NET/JVM.
8394         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8395         assignment of controlled types on .NET/JVM. The two hidden pointers
8396         Prev and Next and stored and later restored after the assignment takes
8397         place.
8398         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8399         kludge for .NET/JVM to recognize a particular piece of code coming from
8400         Heap_Management and change the call to Finalize into Deep_Finalize.
8401         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8402         finalization collections on .NET/JVM only for types derived from
8403         Controlled. Separate the association of storage pools with a collection
8404         and only allow it on non-.NET/JVM targets.
8405         (Make_Attach_Call): New routine.
8406         (Make_Detach_Call): New routine.
8407         (Process_Object_Declarations): Suppress the generation of
8408         build-in-place return object clean up code on .NET/JVM since it uses
8409         pools.
8410         * exp_ch7.ads (Make_Attach_Call): New routine.
8411         (Make_Detach_Call): New routine.
8412         * exp_intr.adb Add with and use clause for Targparm.
8413         (Expand_Unc_Deallocation): Detach a controlled object from a collection
8414         on .NET/JVM targets.
8415         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8416         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8417         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8418         names used in finalization.
8419
8420 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8421
8422         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8423         (Attach, Detach): Lock the current task when chaining an object onto a
8424         collection.
8425
8426 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8427
8428         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8429         Rewritten to create the message strings when the exception is not
8430         raised by an abort during finalization.
8431         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8432         Raise_From_Controlled_Operation and update its associated comment.
8433         * a-fihema.ads, a-fihema.adb: New GNAT unit.
8434         Ada.Finalization.Heap_Management provides key functionality
8435         associated with controlled objects on the heap, their creation,
8436         finalization and reclamation. Type Finalization_Collection is
8437         effectively a wrapper which sits ontop of a storage pool and performs
8438         all necessary bookkeeping for all the objects it contains. Each
8439         access-to-controlled or access-to-class-wide type receives a collection
8440         as part of its expansion. The compiler generates buffer code and
8441         invokes Allocate / Deallocate to create and destroy allocated
8442         controlled objects.
8443         * a-finali.adb ("="): Removed.
8444         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8445         fields Prev and Next.
8446         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8447         A library unit with at least one controlled object on the library level
8448         has a special finalizer which is invoked by the binder. To signal this,
8449         ali files carry field PF.
8450         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8451         associated comment on field usage.
8452         * a-tags.adb (Get_RC_Offset): Removed.
8453         (Needs_Finalization): New routine.
8454         * a-tags.ads: Update the structure of the GNAT dispatch tables.
8455         Dispatch tables now carry field Needs_Finalization which provides
8456         runtime indication whether a type is controlled or has controlled
8457         components or both. Remove field RC_Offset.
8458         (Get_RC_Offset): Removed along with its associated pragma Export.
8459         Since tagged types with controlled components no longer carry hidden
8460         field _controller, the special mechanism to retrieve its location is no
8461         longer needed.
8462         (Needs_Finalization): New routine.
8463         * atree.ads, atree.adb (Elist24): New routine.
8464         (Set_Elist24): New routine.
8465         * atree.h: Add a define clause for Elist24.
8466         * bindgen.adb New library-level variable Lib_Final_Built.
8467         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8468         presence of a VM target, the routine generates calls to the proper
8469         library finalization routine.
8470         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8471         targets. Set the correct library finalization routine depending on
8472         whether the library has controlled objects or this is a VM compilation.
8473         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8474         to library-level finalizers of compiled units in reverse order of
8475         elaboration. It also produces exception management code and reraises a
8476         potential exception after all units have been finalized.
8477         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8478         library-level finalizers of compiled units in reverse order of
8479         elaboration.
8480         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8481         definitions of all library-level finalizers available to the compilation
8482         (Gen_Main_Ada): Directly call Adafinal which now contails all target
8483         dependent code.
8484         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8485         System.Standard_Library.Adafinal directly. If the library needs
8486         finalization actions, create the sequence of finalization calls.
8487         (Gen_Output_File_Ada): Alphabetize local variables and constants.
8488         Generate a with clause for System.Soft_Links when compiling for a VM.
8489         Remove the code which imports System.Standard_Library.Adafinal as
8490         Do_Finalize. Generate the library finalization routine.
8491         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8492         If the library needs finalization actions, create all the definitions
8493         of library- level finalizers.
8494         (Has_Finalizer): New routine. Determines whether at least one compiled
8495         unit has a library-level finalizer.
8496         Add type Qualification_Mode.
8497         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8498         * einfo.adb: New usage of field 15 as Return_Flag.
8499         Remove Finalization_Chain_Entity from the usages of field 19.
8500         Remove Associated_Final_Chain from the usages of field 23.
8501         New usage of field 23 as Associated_Collection.
8502         New usage of field 24 as Finalizer.
8503         New usage of flag 252 as Is_Processed_Transient.
8504         (Associated_Final_Chain): Removed.
8505         (Associated_Collection): New routine.
8506         (Finalization_Chain_Entity): Removed.
8507         (Finalizer): New routine.
8508         (Is_Finalizer): New routine.
8509         (Is_Processed_Transient): New routine.
8510         (Return_Flag): New routine.
8511         (Set_Associated_Final_Chain): Removed.
8512         (Set_Associated_Collection): New routine.
8513         (Set_Finalization_Chain_Entity): Removed.
8514         (Set_Finalizer): New routine.
8515         (Set_Is_Processed_Transient): New routine.
8516         (Set_Return_Flag): New routine.
8517         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8518         displayed flags.
8519         (Write_Field8_Name): Alphabetize the output.
8520         (Write_Field11_Name): Alphabetize the output.
8521         (Write_Field12_Name): Alphabetize the output.
8522         (Write_Field13_Name): Alphabetize the output.
8523         (Write_Field14_Name): Alphabetize the output.
8524         (Write_Field15_Name): Alphabetize the output.
8525         (Write_Field16_Name): Alphabetize the output.
8526         (Write_Field17_Name): Alphabetize the output.
8527         (Write_Field18_Name): Alphabetize the output.
8528         (Write_Field19_Name): Alphabetize the output. Remove the output of
8529         Finalization_Chain_Entity.
8530         (Write_Field20_Name): Alphabetize the output.
8531         (Write_Field21_Name): Alphabetize the output.
8532         (Write_Field22_Name): Alphabetize the output.
8533         (Write_Field23_Name): Alphabetize the output. Remove the output of
8534         Associated_Final_Chain. Add output for Associated_Collection.
8535         (Write_Field24_Name): Alphabetize the output.
8536         (Write_Field25_Name): Add output for Finalizer.
8537         (Write_Field26_Name): Alphabetize the output.
8538         (Write_Field27_Name): Alphabetize the output.
8539         (Write_Field28_Name): Alphabetize the output.
8540         * einfo.ads: Add new field description for Associated_Collection and
8541         its uses in nodes.
8542         Remove Associated_Final_Chain and its uses in nodes.
8543         Remove Finalization_Chain_Entity and its uses in nodes.
8544         Add new field description for Finalizer and its uses in nodes.
8545         Add new synthesized attribute Is_Finalizer.
8546         Add new flag description for Is_Processed_Transient and its uses in
8547         nodes.
8548         Add new field description for Return_Flag and its uses in nodes.
8549         (Associated_Final_Chain): Removed along with its pragma Inline.
8550         (Associated_Collection): New routine and pragma Inline.
8551         (Finalization_Chain_Entity): Removed along with its pragma Inline.
8552         (Finalizer): New routine and pragma Inline.
8553         (Is_Finalizer): New routine and pragma Inline.
8554         (Is_Processed_Transient): New routine and pragma Inline.
8555         (Return_Flag): New routine and pragma Inline.
8556         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8557         (Set_Associated_Collection): New routine and pragma Inline.
8558         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8559         (Set_Finalizer): New routine and pragma Inline.
8560         (Set_Is_Processed_Transient): New routine and pragma Inline.
8561         (Set_Return_Flag): New routine and pragma Inline.
8562         * exp_aggr.adb: Alphabetize subprograms.
8563         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8564         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8565         associated comments. Remove local variables External_Final_List and
8566         Attach.
8567         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8568         Ancestor. Remove the retrieval of finalization lists. Update the call to
8569         Make_Adjust_Call.
8570         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8571         lists. Update the call to Late_Expansion.
8572         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8573         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8574         (Gen_Assign): Remove the retrieval of the finalization list used to
8575         build the assignment. Update the calls to Make_Init_Call and
8576         Make_Adjust_Call.
8577         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8578         Remove the mechanism to determine attachment levels and finalization
8579         list retrieval. Remove the processing for coextensions.
8580         (Init_Controller): Removed. Controllers no longer exist.
8581         (Late_Expansion): Remove formals Flist and Obj along with their
8582         associated comments. Update the calls to Build_Record_Aggr_Code and
8583         Build_Array_Aggr_Code.
8584         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8585         (Expand_N_Freeze_Entity): Add special processing for finalizers which
8586         appear in entry bodies, protected subprograms and task bodies.
8587         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8588         * exp_ch3.adb (Add_Final_Chain): Removed.
8589         (Build_Array_Init_Proc): Alphabetize local variables.
8590         (Build_Assignment): Alphabetize local variables. Update the call to
8591         Maked_Adjust_Call.
8592         (Build_Class_Wide_Master): Rename local variables to better reflect
8593         their role.
8594         (Build_Discriminant_Assignments): Code reformatting.
8595         (Build_Init_Call_Thru): Code reformatting.
8596         (Build_Init_Procedure): Code reformatting. Generate a special version
8597         of Deep_Finalize which is capable of finalizing all initialized
8598         components and ignore the rest.
8599         (Build_Init_Statements): Rename local variables to better reflect their
8600         role.
8601         Reimplement the mechanism to include the creation and update of an index
8602         variable called a "counter". It is used as a bookmark for tracing
8603         initialized and non-initialized components.
8604         (Build_Initialization_Call): Remove local variable Controller_Typ.
8605         Alphabetize all local variables. Remove the initialization of the
8606         record controller and update the call to Make_Init_Call.
8607         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8608         New local variable Counter.
8609         (Constrain_Array): Alphabetize.
8610         (Expand_Freeze_Array_Type): Create a collection instead of a
8611         finalization list.
8612         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8613         Finalize_Address which is used in conjunction with allocated controlled
8614         objects.
8615         (Expand_N_Object_Declaration): Remove the creation of a finalization
8616         list for anonymous access types. Update the calls to Make_Init_Call and
8617         Make_Adjust_Call.
8618         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8619         retrieval of finalization lists. Remove the expansion of the record
8620         controller. Create TSS primitive Finalize_Address used in conjunction
8621         with controlled objects on the heap. Create finalization collections
8622         for access-to-controlled record components.
8623         (Expand_Record_Controller): Removed.
8624         (Freeze_Type): Remove the freezing of record controllers. Freezing of
8625         class-wide types now requires additional processing. Create
8626         finalization collections for access-to-controlled types.
8627         (Increment_Counter): New routine.
8628         (Make_Counter): New routine.
8629         (Make_Eq_If): Remove the mention of Name_uController.
8630         (Make_Predefined_Primitive_Specs): There is no longer need to skip
8631         types coming from System.Finalization_Root.
8632         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8633         (Predefined_Primitive_Bodies): There is no longer need to skip types
8634         coming from System.Finalization_Root.
8635         (Stream_Operation_OK): Do not generate stream routines for
8636         type Ada.Finalization.Heap_Management.Finalization_Collection.
8637         * exp_ch3.ads: Alphabetize subprograms.
8638         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8639         Add with and use clause for Lib.
8640         (Complete_Coextension_Finalization): Removed.
8641         (Complete_Controlled_Allocation): New routine. Create a finalization
8642         collection for anonymous access-to-controlled types. Create a custom
8643         Allocate which interfaces with the back end and the machinery in
8644         Heap_Management.
8645         (Expand_Allocator_Expression): Add necessary calls to
8646         Complete_Controlled_Allocation. Remove the retrieval of finalization
8647         lists. Update the calls to Make_Adjust_Call. Generate a call to
8648         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8649         the associated collection.
8650         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8651         Code clean up. Remove the retrieval of finalization lists and
8652         attachment levels.
8653         Update the call to Make_Init_Call. Generate a call to
8654         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8655         the associated collection.
8656         (Get_Allocator_Final_List): Removed. Finalization lists are not
8657         available.
8658         (Suitable_Element): Remove the mention of Name_uController.
8659         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8660         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8661         the left hand side, carry out the assignment and adjust the left hand
8662         side.
8663         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8664         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8665         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8666         BIP_Collection and BIPcollection.
8667         (Build_Heap_Allocator): New routine used to allocate the return object
8668         of a build-in-place function onto a collection.
8669         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8670         (Expand_Call): Do not replace direct calls to Deep routines with their
8671         aliases.
8672         (Expand_N_Extended_Return_Statement): Give all variables shorter names
8673         and update their occurrences. Add a special return flag to monitor the
8674         [ab]normal execution of the function. The flag is set right before the
8675         return statement.
8676         Rewrite the mechanism used to allocate a build-in-place return object
8677         on the heap or on a storage pool.
8678         (Is_Direct_Deep_Call): New routine.
8679         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8680         build-in-place function call instead of a final list. Build a call to
8681         Set_Finalize_Address_Ptr to decorate the associated collection.
8682         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8683         order to name the build-in-place function call's result for later
8684         finalization. Add a collection to a build-in-place function call
8685         instead of a final list.
8686         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8687         build-in-place function call instead of a final list. Remove the code
8688         which moves one final list and transforms it into the actual in a
8689         nested build-in-place call.
8690         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8691         build-in-place function call instead of a final list.
8692         (Move_Final_List): Removed.
8693         (Needs_BIP_Collection): New routine.
8694         (Needs_BIP_Final_List): Removed.
8695         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8696         enumeration type BIP_Formal_Kind.
8697         Update the related comment.
8698         (Needs_BIP_Collection): New routine.
8699         (Needs_BIP_Final_List): Removed.
8700         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8701         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8702         majority of subprograms in this unit. Add Name_Finalize_Address to
8703         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8704         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8705         statements for an array type.
8706         (Build_Adjust_Statements): Create the adjust statements for a record
8707         type.
8708         (Build_Cleanup_Statements): New routine. A procedure which given any
8709         construct containing asynchronous calls, references to _master, or is a
8710         task body, a task allocation or a protected body produces the necessary
8711         runtime calls to clean up these constructs.
8712         (Build_Exception_Handler): New routine.
8713         (Build_Final_List): Removed.
8714         (Build_Finalization_Collection): New routine. A core procedure which
8715         creates a collection to service heap allocated controlled objects
8716         associated with an access-to-controlled type.
8717         (Build_Finalize_Statements): Create the finalization statements for a
8718         record types.
8719         (Build_Finalizer): New routine. A core procedure which given any
8720         construct with declarations and/or statements detects all objects which
8721         need any type of clean up (controlled objects, protected objects) and
8722         generates all necessary code to clean up the said objects in the proper
8723         order.
8724         (Build_Finalizer_Call): New routine.
8725         (Build_Initialize_Statements): Create the initialization statements for
8726         an array type. The generated routine contains code to finalize partially
8727         initialized arrays.
8728         (Build_Object_Declarations): New routine.
8729         (Build_Raise_Statement): New routine.
8730         (Clean_Simple_Protected_Objects): Removed.
8731         (Controller_Component): Removed.
8732         (Enclosing_Function): New routine.
8733         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8734         either declarations or statements or both.
8735         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8736         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8737         package.
8738         (Find_Final_List): Removed.
8739         (Global_Flist_Ref): Removed.
8740         (In_Finalization_Root): Removed.
8741         (Insert_Actions_In_Scope_Around): Determine the range of the transient
8742         scope in terms of tree nodes. Process all transient variables within
8743         that range.
8744         (Make_Adjust_Call): Rewritten. There is no longer an attach call
8745         generated after the adjust.
8746         (Make_Attach_Call): Removed.
8747         (Make_Call): New routine.
8748         (Make_Clean): Removed.
8749         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8750         build routines.
8751         (Make_Deep_Proc): Rewritten to generate the new profile signature used
8752         in Deep routines.
8753         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8754         build routines.
8755         (Make_Final_Call): Modified to simply create a call to either
8756         Deep_Finalize or Finalize.
8757         (Make_Finalize_Address_Body): New routine.
8758         (Make_Finalize_Address_Stmts): New routine. A function which produces
8759         TSS primitive Finalize_Address used in conjunction with heap allocated
8760         controlled objects.
8761         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8762         (Make_Init_Call): Rewritten. There is no longer an attach call
8763         generated after initialization.
8764         (Make_Local_Deep_Finalize): New routine.
8765         (Make_Set_Finalize_Address_Ptr_Call): New routine.
8766         (Make_Transient_Block): Remove the finalization list retrieval and
8767         manipulation.
8768         (Needs_Finalization): Moved to Exp_Util.
8769         (Parent_Field_Type): New routine.
8770         (Preprocess_Components): New routine.
8771         (Process_Transient_Objects): New routine.
8772         (Wrap_HSS_In_Block): New routine.
8773         (Wrap_Transient_Declaration): Remove finalization list management and
8774         controller insertion.
8775         (Wrap_Transient_Expression): Code reformatting.
8776         (Wrap_Transient_Statement): Code reformatting.
8777         * exp_ch7.ads (Build_Final_List): Removed.
8778         (Build_Finalization_Collection): New routine.
8779         (Build_Raise_Statement): New routine.
8780         (Controller_Component): Removed.
8781         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8782         (Find_Final_List): Removed.
8783         (In_Finalization_Root): Removed.
8784         (Is_Simple_Protected_Type): Update related comment.
8785         (Make_Adjust_Call): New parameter profile and associated comments.
8786         (Make_Attach_Call): Removed.
8787         (Make_Final_Call): New parameter profile and associated comments.
8788         (Make_Finalize_Address_Body): New routine.
8789         (Make_Init_Call): New parameter profile and associated comments.
8790         (Make_Local_Deep_Finalize): New routine.
8791         (Make_Set_Finalize_Address_Ptr_Call): New routine.
8792         (Needs_Finalization): Moved to Exp_Util.
8793         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8794         (Expand_N_Protected_Body): Remove the handling of finalization lists.
8795         (Find_Protection_Type): Moved to Exp_Util.
8796         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8797         (Make_DT): Update sequence of dispatch table initialization. Remove the
8798         initialization of field RC_Offset. Add initialization of field Needs_
8799         Finalization.
8800         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8801         Reimplement how an object is first finalized, then deallocated.
8802         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8803         Code reformatting.
8804         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8805         Register TSS_Finalize_Address with type TSS_Names.
8806         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8807         procedure provides the interface between an allocation / deallocation
8808         and the support machinery in Ada.Finalization.Heap_Management.
8809         (Find_Init_Call): Code reformatting.
8810         (Find_Init_Call_In_List): Code reformatting.
8811         (Find_Protection_Type): Moved from Exp_Ch9.
8812         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8813         (Has_Controlled_Coextensions): Removed.
8814         (Has_Controlled_Objects): New routine.
8815         (In_Library_Level_Package_Body): New routine.
8816         (Insert_Action_After): New routine.
8817         (Is_Finalizable_Transient): New routine. This predicate determines
8818         whether an object declaration is one of the many variants of controlled
8819         transients.
8820         (Is_Null_Access_BIP_Func_Call): New routine.
8821         (Is_Non_BIP_Func_Call): New routine.
8822         (Is_Related_To_Func_Return): New routine.
8823         (Needs_Finalization): Moved from Exp_Ch7.
8824         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8825         (Find_Protection_Type): Moved from Exp_Ch9.
8826         (Has_Controlled_Coextensions): Removed.
8827         (Has_Controlled_Objects): New routine.
8828         (In_Library_Level_Package_Body): New routine.
8829         (Insert_Action_After): New routine.
8830         (Is_Finalizable_Transient): New routine.
8831         (Is_Null_Access_BIP_Func_Call): New routine.
8832         (Is_Non_BIP_Func_Call): New routine.
8833         (Is_Related_To_Func_Return): New routine.
8834         (Needs_Finalization): Moved from Exp_ch7.
8835         * expander.adb (Expand): Add a case for N_Free_Statement.
8836         * freeze.adb (Freeze_All): Replace the generation of a finalization
8837         list with a collection for access-to-controlled types.
8838         (Freeze_Entity): Code reformatting.
8839         (Freeze_Record_Type): Remove the freezing of a record controller
8840         component.
8841         (Freeze_Subprogram): Code reformatting.
8842         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8843         finalization list.
8844         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8845         has a library-level finalizer.
8846         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8847         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8848         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8849         files. Add a-fihema to the list of object files.
8850         * par-ch4.adb:
8851         Alphabetize the associations in type Is_Parameterless_Attribute.
8852         * rtsfind.ads: Ada.Finalization_List.Controller and
8853         System.Finalization_Implementation are no longer a GNAT unit.
8854         Update the range of type Ada_Finalization_Child. Remove the following
8855         recoverable entities:
8856
8857            RE_Attach_To_Final_List
8858            RE_Deep_Tag_Attach
8859            RE_Finalize_List
8860            RE_Finalize_One
8861            RE_Finalizable_Ptr_Ptr
8862            RE_Global_Final_List
8863            RE_Limited_Record_Controller
8864            RE_List_Controller
8865            RE_Move_Final_List
8866            RE_Record_Controller
8867            RE_Simple_List_Controller
8868
8869         Add the following recoverable entities:
8870
8871            RE_Add_Offset_To_Address
8872            RE_Allocate
8873            RE_Base_Pool
8874            RE_Deallocate
8875            RE_Exception_Identity
8876            RE_Finalization_Collection
8877            RE_Finalization_Collection_Ptr
8878            RE_Needs_Finalization
8879            RE_Save_Library_Occurrence
8880            RE_Set_Finalize_Address_Ptr
8881            RE_Set_Storage_Pool_Ptr
8882            RE_Storage_Count
8883         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8884         Name_uController.
8885         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8886         (First_Stored_Discriminant): Remove the mention of Name_uController.
8887         * sem_aux.ads: Comment reformatting.
8888         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8889         to redecorate an already existing class-wide type.
8890         (Decorate_Tagged_Type): New parameter profile and associated comment.
8891         Create a "shadow class-wide type" for a shadow entity.
8892         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8893         of the final chain along with the associated comment.
8894         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8895         Full_Desig and set it to the full view of the designated type.
8896         Initialize the finalization collection to empty.
8897         (Build_Derived_Record_Type): Alphabetize local variables. Code
8898         reformatting.
8899         (Collect_Fixed_Components): Remove the mention of Name_uController.
8900         (Create_Constrained_Components): Remove the mention of Name_uController.
8901         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8902         class-wide type of a shadow entity.
8903         (Process_Full_View): Update the machinery which marks type
8904         Limited_Controlled's entity as limited.
8905         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8906         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8907         list, instead make a collection build-in-place formal.
8908         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8909         a designated type in order to establish a match between the renaming
8910         and the renamed entity.
8911         (Find_Selected_Component): Add guard to prevent spurious exceptions
8912         from being raised on .NET/JVM.
8913         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8914         to the list of primitive that need special processing. Update arrays
8915         C_Names and D_Names.
8916         (Replace_Types): Handle class-wide types.
8917         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8918         different parameter profile, look at the first formal.
8919         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8920         use clauses for Exp_Util.
8921         * sem_res.adb: Remove with and use clauses for Elists.
8922         (Propagate_Coextensions): Removed.
8923         (Resolve_Allocator): Do not propagate the list of coextensions from one
8924         allocator to another.
8925         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8926         Deaccessed_T to Desig_Typ.
8927         (Enter_Name): Remove the mention of Name_uController.
8928         (Gather_Components): Remove the mention of Name_uController.
8929         (Incomplete_Or_Private_View): New routine.
8930         (Is_Coextension_Root): Removed.
8931         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8932         * sem_util.ads (Incomplete_Or_Private_View): New routine.
8933         (Is_Coextension_Root): Removed.
8934         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8935         Controlled types are now derived from a null tagged record. Remove
8936         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8937         * sinfo.adb (Coextensions): Removed.
8938         (Set_Coextensions): Removed.
8939         * sinfo.ads: Remove Coextensions from the explanation of node fields
8940         and its uses in nodes.
8941         Update the field usage of N_Allocator.
8942         (Coextensions): Removed along with its pragma Inline.
8943         (Set_Coextensions): Removed along with its pragma Inline.
8944         * snames.ads-tmpl: Remove names
8945
8946           Name_uClean
8947           Name_uController
8948           Name_uFinal_List
8949           Name_uLocal_Final_List
8950           Name_Finalization_Root
8951           Name_Next
8952           Name_Prev
8953
8954         Add names
8955
8956           Name_uFinalizer
8957           Name_Finalize_Address
8958         * s-pooglo.adb (Allocate): Add overriding indicator.
8959         (Deallocate): Add overriding indicator.
8960         (Storage_Size): Add overriding indicator.
8961         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8962         than Finalize_Global_List.
8963         (Null_Finalize_Global_List): Removed.
8964         (Save_Library_Occurrence): New routine.
8965         * s-soflin.ads: Remove variable Finalize_Global_List along with its
8966         initialization. Add variable Finalize_Library_Objects along with its
8967         pragma Export. Add variables Library_Exception and
8968         Library_Exception_Set along with their pragma Export.
8969         (Null_Finalize_Global_List): Removed.
8970         (Save_Library_Occurrence): New routine.
8971         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8972         rather than Finalize_Global_List.
8973         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8974         of the constructed node.
8975
8976 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8977
8978         * link.c: Include "auto-host.h" before system headers.
8979
8980 2011-08-03  Vincent Celier  <celier@adacore.com>
8981
8982         * make.adb (Gnatmake): Add to table Library_Projs only library projects
8983         that are not extended. Do not check if a library project that is
8984         extended should be regenerated. Do not add to table Library_Paths the
8985         libraries that are in extended projects. Link only with libraries that
8986         are in libray projects that are not extended.
8987         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8988         for a library project that is extended.
8989
8990 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
8991
8992         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8993         conforming subprogram renamings that appear to be completions if they
8994         are not fully conformant.
8995         Such renamings are homographs but not completions.
8996         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8997         names in a subprogram renaming that appears in an instance.
8998
8999 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9000
9001         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
9002         not immutably limited, build actual subtype from expression to provide
9003         proper bounds to caller.
9004
9005 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9006
9007         * sem_ch8.adb: Minor comment correction.
9008
9009 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9010
9011         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
9012         returning a limited array, use an extended return statement.
9013
9014 2011-08-03  Vincent Celier  <celier@adacore.com>
9015
9016         * make.adb (Initialize): If --subdirs= is used, but no project file is
9017         specified, attempt to create the specify subdir if it does not already
9018         exist and use it as the object directory as if -D had been specified.
9019
9020 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9021
9022         * s-tpopsp-vms.adb: New file.
9023         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
9024         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
9025
9026 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9027
9028         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
9029         package.
9030
9031 2011-08-03  Yannick Moy  <moy@adacore.com>
9032
9033         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
9034         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
9035         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
9036         detect that an array has static bounds.
9037
9038 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9039
9040         * exp_dist.adb: Minor reformatting.
9041
9042 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9043
9044         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
9045         (ATCB_Key): Removed, not always used.
9046
9047 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9048
9049         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
9050         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
9051         most remaining global variables.
9052
9053 2011-08-03  Robert Dewar  <dewar@adacore.com>
9054
9055         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
9056         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
9057         reformatting.
9058
9059 2011-08-03  Javier Miranda  <miranda@adacore.com>
9060
9061         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
9062         that must be passed by copy in VM targets.
9063
9064 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9065
9066         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9067         duplicates a similar htable now in the project tree.
9068
9069 2011-08-03  Claire Dross  <dross@adacore.com>
9070
9071         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9072         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9073         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9074         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9075         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9076         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9077         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9078         update.
9079
9080 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9081
9082         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9083         (ATCB_Key): Removed, not always used.
9084         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9085         s-taprop-posix.adb.
9086         * s-tpopsp-tls.adb: New file.
9087         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9088         x86/x64/ia64/powerpc/sparc Linux.
9089
9090 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9091
9092         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9093         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9094
9095 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9096
9097         * rtsfind.ads, exp_dist.adb, exp_dist.ads
9098         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9099         Fix type selection for mapping integer types to PolyORB types.
9100
9101 2011-08-03  Bob Duff  <duff@adacore.com>
9102
9103         * sem_ch7.adb: Minor comment clarification.
9104
9105 2011-08-03  Bob Duff  <duff@adacore.com>
9106
9107         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9108         an error analyzing a choice, skip further processing. Further
9109         processing could cause a crash or cascade errors.
9110
9111 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9112
9113         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9114         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9115         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9116         prj-env.ads (Shared_Project_Tree_Data): new type
9117         An aggregate project and its aggregated trees need to share the common
9118         data structures used for lists of strings, packages,... This makes the
9119         code simpler since otherwise we have to pass the root tree (also used
9120         for the configuration file data) in addition to the current project
9121         tree. This also avoids ambiguities as to which tree should be used.
9122         And finally this saves a bit of memory.
9123         (For_Every_Project_Imported): new parameter Tree.
9124         Since aggregated projects are using a different tree, we need to let
9125         the caller know which tree to use to manipulate the returned project.
9126
9127 2011-08-03  Robert Dewar  <dewar@adacore.com>
9128
9129         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9130         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9131         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9132         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9133
9134 2011-08-03  Javier Miranda  <miranda@adacore.com>
9135
9136         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9137         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9138
9139 2011-08-03  Bob Duff  <duff@adacore.com>
9140
9141         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9142         the Base_Type.
9143
9144 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
9145
9146         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9147         g-sehash.ads: Fix typo. Update header.
9148
9149 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9150
9151         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9152         expansion.
9153
9154 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9155
9156         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9157         prefixes of private types along with records, since the selector may be
9158         a discriminant.
9159         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9160         private types along with records, since the selector may be a
9161         discriminant.
9162
9163 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9164
9165         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9166
9167 2011-08-03  Javier Miranda  <miranda@adacore.com>
9168
9169         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9170         Tagged_Type_Expansion.
9171
9172 2011-08-03  Yannick Moy  <moy@adacore.com>
9173
9174         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9175         violation when the argument of concatenation is the name of a
9176         constant.
9177
9178 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9179
9180         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9181         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9182         (Process_Declarative_Items): new parameter Child_Env.
9183
9184 2011-08-03  Yannick Moy  <moy@adacore.com>
9185
9186         * alfa.ads: Update format of ALFA section in ALI file in order to
9187         add a mapping from bodies to specs when both are present.
9188         (ALFA_Scope_Record): Add components for spec file/scope.
9189         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9190         present.
9191         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9192         collected, fill in the spec information when relevant.
9193         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9194         present.
9195
9196 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9197
9198         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9199         code unit to decide whether to add internally generated subprograms.
9200
9201 2011-08-03  Javier Miranda  <miranda@adacore.com>
9202
9203         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9204         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9205         be handled by copy in VM targets.
9206
9207 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9208
9209         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9210         code with Makeutl.Get_Switches.
9211         * prj-tree.adb: Update comment.
9212
9213 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9214
9215         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9216         subprogram with a limited formal that does not support external
9217         streaming.
9218
9219 2011-08-03  Yannick Moy  <moy@adacore.com>
9220
9221         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9222         continuation line
9223         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9224         not from current unit in two phases, because it is not possible to
9225         change the table while iterating over its content.
9226         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9227
9228 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9229
9230         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9231         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9232
9233 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9234
9235         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9236         and the component type is composite, this is ambiguous for predefined
9237         concatenation, but if the node is not overloaded and the entity is a use
9238         -defined function its profile can be used to resolve that aggregate.
9239
9240 2011-08-03  Robert Dewar  <dewar@adacore.com>
9241
9242         * exp_ch4.adb: Minor code cleanup.
9243
9244 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9245
9246         * exp_dist.adb: Do not generate distribution stubs if serious errors
9247         have been diagnosed.
9248
9249 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9250
9251         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9252         the first formal of a primitive operation, go to the base type to
9253         handle properly an access to a derived type with constrained
9254         discriminants.
9255         * sem_type.adb (Disambiguate): an immediately visible operator hides a
9256         user-defined function that is only use-visible.
9257
9258 2011-08-03  Robert Dewar  <dewar@adacore.com>
9259
9260         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9261         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9262         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9263         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9264         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9265         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9266         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9267         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9268
9269 2011-08-03  Robert Dewar  <dewar@adacore.com>
9270
9271         * repinfo.adb (List_Mechanism): Add handling of
9272         Convention_Ada_Pass_By_XXX.
9273         * sem_mech.adb (Set_Mechanism): Ditto.
9274         * sem_prag.adb (Process_Convention): Add entries for
9275         Convention_Ada_Pass_By_XXX.
9276         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9277
9278 2011-08-03  Pascal Obry  <obry@adacore.com>
9279
9280         * makeutl.adb: Minor reformatting.
9281
9282 2011-08-03  Vincent Celier  <celier@adacore.com>
9283
9284         * fname-uf.adb
9285         (Get_File_Name) If the file cannot be found when there are no config
9286         pragmas file and May_Fail is True, return No_File instead of the file
9287         name, to be consistent.
9288
9289 2011-08-03  Pascal Obry  <obry@adacore.com>
9290
9291         * adaint.c (__gnat_is_executable_file_attr): Avoid access
9292         to null pointer.
9293
9294 2011-08-03  Javier Miranda  <miranda@adacore.com>
9295
9296         * sem_ch13.adb
9297         (Same_Representation): In VM targets the representation of arrays with
9298         aliased components differs from arrays with non-aliased components.
9299
9300 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9301
9302         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9303         not systematically lower case attribute indexes that contain no "."
9304         Fix definition of several Naming attributes, which take
9305         a unit name as index and therefore should be case insensitive.
9306         Minor refactoring (reduce length of variable names).
9307
9308 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9309
9310         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9311
9312 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9313
9314         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9315         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9316         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9317         prj-tree.ads (Prj.Tree.Environment): new type.
9318
9319 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9320
9321         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9322         prj-tree.adb, prj-tree.ads (Environment): new type.
9323
9324 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9325
9326         * prj-tree.ads: Remove unused variable.
9327
9328 2011-08-03  Yannick Moy  <moy@adacore.com>
9329
9330         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9331         issuing messages related to SPARK restriction violation.
9332
9333 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9334
9335         * sem_ch6.adb: guard against error nodes in return statements.
9336
9337 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9338
9339         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9340         a warning can only appear on a configuration file, so emit warning
9341         without further checks.
9342
9343 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9344
9345         * s-interr.ads: add overriding keyword.
9346
9347 2011-08-03  Geert Bosch  <bosch@adacore.com>
9348
9349         * exp_attr.adb: Fix minor typo.
9350
9351 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9352
9353         * par-ch4.adb: improve error recovery.
9354
9355 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9356
9357         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9358         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9359         to Errout_Handling.
9360
9361 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9362
9363         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9364         "external" as an attribute name in aggregate projects.
9365
9366 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9367
9368         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9369         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9370         from 0, so we need to adjust.
9371
9372 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9373
9374         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9375         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9376
9377 2011-08-03  Yannick Moy  <moy@adacore.com>
9378
9379         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9380         restriction on overloaded entity if the entity is not an operator.
9381
9382 2011-08-03  Yannick Moy  <moy@adacore.com>
9383
9384         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9385         restrict.ads: Rename remaining Check_Formal_Restriction* into
9386         Check_SPARK_Restriction*.
9387
9388 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9389
9390         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9391         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9392         qualifier.
9393         (Project_Empty): removed
9394         (Empty_Project): new parameter Qualifier
9395         This is used to have fields specific to aggregate projects, cleaner
9396         New field to store the list of aggregated projects.
9397         (Check_Aggregate_Project): removed
9398         (Process_Aggregated_Projects, Free): new subprograms.
9399
9400 2011-08-03  Olivier Hainque  <hainque@adacore.com>
9401
9402         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9403
9404 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9405
9406         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9407         explicit dereference of an unconstrained type, create a constrained
9408         subtype for it, as is done for function calls that return an
9409         unconstrained type.
9410
9411 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9412
9413         * g-pehage.adb (Finalize): Avoid possible double-free.
9414
9415 2011-08-03  Steve Baird  <baird@adacore.com>
9416
9417         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9418         Elab_Spec/Body attrs in CodePeer_Mode.
9419
9420 2011-08-03  Javier Miranda  <miranda@adacore.com>
9421
9422         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9423         low bound is not known at compile time but they have no others choice.
9424         Done because in this case the bounds can be obtained directly from the
9425         aggregate.
9426
9427 2011-08-03  Ed Falis  <falis@adacore.com>
9428
9429         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9430         on VxWorks SMP. Remove unusable constant ANY_CPU.
9431
9432 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9433
9434         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9435         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9436         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9437         Prj.Env.Initialize_Empty): new subprograms
9438         (Get_Env, Find_Project): remove parameter Target_Name.
9439
9440 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9441
9442         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9443         as a condition for the delayed call to Derived_Subprograms done for the
9444         case of the rewriting of a derived type that constrains the
9445         discriminants of its parent type.
9446         Avoids redundant subprogram derivations for private subtype derivations.
9447
9448 2011-08-03  Javier Miranda  <miranda@adacore.com>
9449
9450         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9451         Build_Record_Aggr_Code.
9452         (Build_Record_Aggr_Code): Add missing support to initialize hidden
9453         discriminants in extension aggregates.
9454
9455 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9456
9457         * prj-pp.adb (Print): also output project qualifiers, since in
9458         particular "aggregate" is mandatory in an aggregate project.
9459
9460 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9461
9462         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9463         (Debug_Output): new function.
9464
9465 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9466
9467         * gnat_ugn.texi: Document -Wstack-usage.
9468         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9469
9470 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9471
9472         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9473         have keyword LIMITED.
9474
9475 2011-08-03  Yannick Moy  <moy@adacore.com>
9476
9477         * alfa.adb, alfa.ads, alfa_test.adb: New files.
9478         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9479         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9480         section (does not happen in compiler, only if code directly calls
9481         Scan_ALI).
9482         * get_alfa.adb, get_alfa.ads: New files.
9483         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9484         needed.
9485         * lib-xref-alfa.adb: New file.
9486         * lib-xref.adb, lib-xref.ads
9487         (Xref_Entry): redefine information needed in cross-references for ALFA.
9488         Push ALFA treatments in separated local package.
9489         (Enclosing_Subpragram_Or_Package): treat specially subprogram
9490         identifiers. Return entity of package body instead of spec. Return
9491         Empty for a scope with no location.
9492         (Generate_Reference): adapt to new components for ALFA information.
9493         Remove the need for D references on definitions.
9494         (Is_Local_Reference): moved to ALFA local package
9495         (Output_References): extract subfunction as Extract_Source_Name
9496         (Output_Local_References): remove procedure, replaced by filtering of
9497         cross-references in package ALFA and printing in Put_ALFA.
9498         (Write_Entity_Name): remove procedure
9499         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9500         print exact name of entity as it appears in source file
9501         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9502         * put_alfa.adb, put_alfa.ads: New files.
9503         * xref_lib.adb (Search_Xref): protect read of cross-references against
9504         reading other sections of the ALI file, in gnatxref
9505         (Search): protect read of cross-references against reading other
9506         sections of the ALI file, in gnatfind.
9507         * gcc-interface/Make-lang.in: Update dependencies.
9508
9509 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9510
9511         * sem_ch3.adb: Minor reformatting.
9512
9513 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9514
9515         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9516         raising an exception.
9517
9518 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9519
9520         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9521         type, always use 1 as the lower bound or string, even if lower bound of
9522         context is not static, to handle properly null strings in a non-static
9523         context.
9524
9525 2011-08-03  Bob Duff  <duff@adacore.com>
9526
9527         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9528         always legal on the right-hand side of an assignment statement; there
9529         is always an applicable index constraint in this case. Therefore, the
9530         check for Pkind = N_Assignment_Statement is now unconditional -- it
9531         doesn't depend on whether Is_Constrained (Typ).
9532
9533 2011-08-03  Robert Dewar  <dewar@adacore.com>
9534
9535         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9536
9537 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9538
9539         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9540         for an itype created within a generic unit.
9541
9542 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9543
9544         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9545         suppresses all inlining.
9546
9547 2011-08-03  Robert Dewar  <dewar@adacore.com>
9548
9549         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9550         exp_aggr.adb: Minor reformatting.
9551
9552 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9553
9554         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9555         tagged assignment when discriminant checks are suppressed. This is
9556         useless and extremely costly in terms of static stack usage.
9557
9558 2011-08-03  Bob Duff  <duff@adacore.com>
9559
9560         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9561         of generics, because this leads to the wrong entity in the wrong scope,
9562         causing (e.g.) pragma Export_Procedure to get an error if the entity is
9563         an instance.
9564         (Process_Interface_Name): Follow Alias for instances of generics, to
9565         correct for the above change.
9566
9567 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9568
9569         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9570         is an integer literal it is always safe to replace the reference. In
9571         addition, if the reference appears in the generated code for an object
9572         declaration it is necessary to copy because otherwise the reference
9573         might be to the uninitilized value of the discriminant of the object
9574         itself.
9575
9576 2011-08-03  Pascal Obry  <obry@adacore.com>
9577
9578         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9579         ACL used, in this case we want to check for ending .exe, not .exe
9580         anywhere in the path.
9581
9582 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9583
9584         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9585         the tree structure (semantic decoration of references to record
9586         discriminants).
9587
9588 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9589
9590         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9591         choices of a named array aggregate, bail out when any choices are
9592         marked as Errors_Posted.
9593
9594 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9595
9596         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9597         in which entity is frozen, to handle properly loop variables in
9598         iterators.
9599
9600 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9601
9602         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9603         subtype is not static, compute the upper bound using attributes, to
9604         handle properly index types that are not integer types.
9605
9606 2011-08-03  Bob Duff  <duff@adacore.com>
9607
9608         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9609         Update copyright notice.
9610
9611 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9612
9613         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9614         Original_Discriminant if within an instance.
9615         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9616
9617 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9618
9619         * einfo.ads: Minor reformatting.
9620
9621 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9622
9623         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9624         composite type with an unfrozen subcomponent, in the profile of a
9625         primitive operation.
9626
9627 2011-08-03  Robert Dewar  <dewar@adacore.com>
9628
9629         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9630
9631 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9632
9633         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9634         unconstrained type with discriminants is initialized with an aggregate,
9635         use the constrained subtype of the aggregate as the type of the object,
9636         because it is immutable, and this allows the back-end to generate no
9637         code for the object declaration.
9638
9639 2011-08-03  Robert Dewar  <dewar@adacore.com>
9640
9641         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9642         comparison operand is variable, and turns out to be zero or negative.
9643
9644 2011-08-03  Javier Miranda  <miranda@adacore.com>
9645
9646         * exp_intr.adb
9647         (Expand_Dispatching_Constructor_Call): Disable expansion of
9648         code required for native targets. Done to avoid generating
9649         references to unavailable runtime entities in VM targets.
9650         * exp_ch3.adb
9651         (Expand_N_Object_Declaration): Add missing support to handle
9652         the explicit initialization of class-wide interface objects.
9653         Fix documentation.
9654
9655 2011-08-03  Matthew Heaney  <heaney@adacore.com>
9656
9657         * a-cobove.adb (Merge): Move source onto target, instead of using
9658         Assign.
9659
9660 2011-08-03  Matthew Heaney  <heaney@adacore.com>
9661
9662         * a-cbdlli.adb (Splice): Move source items from first to last.
9663
9664 2011-08-03  Yannick Moy  <moy@adacore.com>
9665
9666         * sem_util.ads: Add comment.
9667
9668 2011-08-03  Javier Miranda  <miranda@adacore.com>
9669
9670         * exp_aggr.adb
9671         (Expand_Record_Aggregate): In VM targets disable the expansion into
9672         assignments of aggregates whose type is not known at compile time.
9673
9674 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9675
9676         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9677         protected entries and task entries, to build the proper renaming
9678         declaration for entry formals, used in debugging.
9679         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9680         parameters in the same way.
9681
9682 2011-08-02  Robert Dewar  <dewar@adacore.com>
9683
9684         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9685         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9686         code reorganization.
9687
9688 2011-08-02  Robert Dewar  <dewar@adacore.com>
9689
9690         * debug.adb: Debug flag d.P to suppress length comparison optimization
9691         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9692         comparison of Length by comparing First/Last instead.
9693
9694 2011-08-02  Matthew Heaney  <heaney@adacore.com>
9695
9696         * a-cobove.ads: Code clean up.
9697
9698 2011-08-02  Vincent Celier  <celier@adacore.com>
9699
9700         * adaint.c (file_names_case_sensitive_cache): New static int.
9701         (__gnat_get_file_names_case_sensitive): Cache the return value in
9702         file_names_case_sensitive_cache at the first invocation, to avoid
9703         multiple calls to getenv.
9704
9705 2011-08-02  Bob Duff  <duff@adacore.com>
9706
9707         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9708
9709 2011-08-02  Yannick Moy  <moy@adacore.com>
9710
9711         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9712         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9713         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9714         indicate that we are in a precondition or postcondition. This is used in
9715         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9716         decide whether to flag the spec or body of the current subprogram as
9717         not in ALFA.
9718
9719 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
9720
9721         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9722         list.
9723         * a-extiin.ads: New file.
9724
9725 2011-08-02  Bob Duff  <duff@adacore.com>
9726
9727         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9728         now raises Name_Error instead of Use_Error in certain cases. The other
9729         parts of this AI were already implemented properly.
9730
9731 2011-08-02  Vincent Celier  <celier@adacore.com>
9732
9733         * link.c: Only import "auto-host.h" when building the gnattools.
9734
9735 2011-08-02  Yannick Moy  <moy@adacore.com>
9736
9737         * sem_util.adb: Inter-unit inlining does not work for a subprogram
9738         which calls a local subprogram, so extract subprogram
9739         from Mark_Non_ALFA_Subprogram_Body.
9740
9741 2011-08-02  Javier Miranda  <miranda@adacore.com>
9742
9743         * exp_ch9.adb
9744         (Extract_Dispatching_Call): If the type of the dispatching object is an
9745         access type then return an explicit dereference in the Object out-mode
9746         parameter.
9747
9748 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9749
9750         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9751         compatibility checks for all indexes of an array subtype, not just the
9752         first. Reset Has_Dynamic_Range_Check on the subtype before each
9753         potential check to ensure that Insert_Range_Checks will not elide any
9754         of the dynamic checks.
9755
9756 2011-08-02  Yannick Moy  <moy@adacore.com>
9757
9758         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9759         SPARK restriction at parsing time.
9760         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9761         directive only if the SPARK restriction is set for this unit.
9762
9763 2011-08-02  Yannick Moy  <moy@adacore.com>
9764
9765         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9766         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9767         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9768         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9769         Mark_Non_ALFA_Subprogram_Body.
9770         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9771         inlined.
9772
9773 2011-08-02  Yannick Moy  <moy@adacore.com>
9774
9775         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9776         might be costly.
9777
9778 2011-08-02  Robert Dewar  <dewar@adacore.com>
9779
9780         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9781         exp_ch3.adb: Minor reformatting.
9782
9783 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9784
9785         * adaint.c (__gnat_locate_exec_on_path): only returns executable
9786         files, not any regular file.
9787         (__gnat_locate_file_with_predicate): new subprogram.
9788
9789 2011-08-02  Yannick Moy  <moy@adacore.com>
9790
9791         * sinfo.adb, sinfo.ads: Restrict the use of flags
9792         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9793         nodes, plus N_Subtype_Declaration for the 2nd one.
9794
9795 2011-08-02  Sergey Rybin  <rybin@adacore.com>
9796
9797         * gnat_rm.texi: Ramification of pragma Eliminate documentation
9798          - fix bugs in the description of Source_Trace;
9799          - get rid of UNIT_NAME;
9800
9801 2011-08-02  Javier Miranda  <miranda@adacore.com>
9802
9803         * exp_ch9.adb
9804         (Build_Dispatching_Requeue): Adding support for VM targets
9805         since we cannot directly reference the Tag entity.
9806         * exp_sel.adb (Build_K): Adding support for VM targets.
9807         (Build_S_Assignment): Adding support for VM targets.
9808         * exp_disp.adb
9809         (Default_Prim_Op_Position): In VM targets do not restrict availability
9810         of predefined interface primitives to compiling in Ada 2005 mode.
9811         (Is_Predefined_Interface_Primitive): In VM targets this service is not
9812         restricted to compiling in Ada 2005 mode.
9813         (Make_VM_TSD): Generate code that declares and initializes the OSD
9814         record. Needed to support dispatching calls through synchronized
9815         interfaces.
9816         * exp_ch3.adb
9817         (Make_Predefined_Primitive_Specs): Enable generation of predefined
9818         primitives associated with synchronized interfaces.
9819         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9820         primitives associated with synchronized interfaces.
9821
9822 2011-08-02  Yannick Moy  <moy@adacore.com>
9823
9824         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9825         statements hidden in SPARK if preceded by the HIDE directive
9826         (Parse_Exception_Handlers): mark each exception handler in a sequence of
9827         exception handlers as hidden in SPARK if preceded by the HIDE directive
9828         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9829         if starting with the HIDE directive
9830         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9831         starting with the HIDE directive; mark the declarations in a private
9832         part as hidden in SPARK if the private part starts with the HIDE
9833         directive
9834         * restrict.adb, restrict.ads
9835         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9836         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9837         argument node belongs to a part which is hidden in SPARK
9838         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9839         parts in SPARK; protect the possibly costly call to
9840         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9841         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9842         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9843         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9844         Tok_SPARK_Hide.
9845         (Scan): recognize special comment starting with '#' and followed by
9846         SPARK keyword "hide" as a HIDE directive.
9847
9848 2011-08-02  Yannick Moy  <moy@adacore.com>
9849
9850         * types.ads, erroutc.ads: Minor reformatting.
9851
9852 2011-08-02  Vincent Celier  <celier@adacore.com>
9853
9854         * link.c: Add response file support for cross platforms.
9855
9856 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9857
9858         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9859         in an association, set parent field of copy before partial analysis.
9860         * sem_res.adb (Resolve_Slice): create reference to itype only when
9861         expansion is enabled.
9862
9863 2011-08-02  Yannick Moy  <moy@adacore.com>
9864
9865         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9866         for new flag denoting which subprogram bodies are in ALFA
9867         * restrict.adb, sem_ch7.adb: Update comment
9868         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9869         sem_ch9.adb, sem_res.adb: Add calls to
9870         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9871         * sem_ch6.adb (Analyze_Function_Return): add calls to
9872         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9873         middle of the body, and extended return.
9874         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9875         False when missing return.
9876         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9877         to True for subprograms whose spec is in ALFA. Remove later on the flag
9878         on the entity used for a subprogram body when there exists a separate
9879         declaration.
9880         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9881         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9882         False, otherwise do nothing.
9883
9884 2011-08-02  Robert Dewar  <dewar@adacore.com>
9885
9886         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9887
9888 2011-08-02  Yannick Moy  <moy@adacore.com>
9889
9890         * sem_ch4.ads: minor formatting.
9891
9892 2011-08-02  Yannick Moy  <moy@adacore.com>
9893
9894         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9895         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9896         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9897         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9898         opt.ads: cleanup of SPARK mode
9899
9900 2011-08-02  Yannick Moy  <moy@adacore.com>
9901
9902         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9903         types.
9904         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9905         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9906         * sem_ch3.adb
9907         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9908         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9909         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9910         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9911         types.
9912         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9913         non-static range.
9914         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9915         functions whose return type is not in ALFA.
9916         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9917         specifications.
9918         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9919         parameter's type is not in ALFA.
9920         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9921         types are in ALFA.
9922
9923 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9924
9925         * sem_ch6 (Analyze_Expression_Function): treat the function as
9926         Inline_Always, and introduce a subprogram declaration for it when it is
9927         not a completion.
9928         * inline.adb (Add_Inlined_Body): recognize bodies that come from
9929         expression functions, so that the back-end can determine whether they
9930         can in fact be inlined.
9931         * sem_util.adb (Is_Expression_Function): predicate to determine whether
9932         a function body comes from an expression function.
9933
9934 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9935
9936         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9937         null exclusions to test Can_Never_Be_Null on the anonymous access types
9938         of the formals rather than testing the formals themselves. Exclude this
9939         check in cases where the Old_Formal is marked as a controlling formal,
9940         to avoid issuing spurious errors for bodies completing dispatching
9941         operations (due to the flag not getting set on controlling access
9942         formals in body specs).
9943         (Find_Corresponding_Spec): When checking full and subtype conformance of
9944         subprogram bodies in instances, pass Designated and E in that order, for
9945         consistency with the expected order of the formals (New_Id followed by
9946         Old_Id).
9947
9948 2011-08-02  Robert Dewar  <dewar@adacore.com>
9949
9950         * sem_ch8.adb: Minor reformatting.
9951
9952 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9953
9954         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9955         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9956         primitive operations of class-wide actuals.
9957
9958 2011-08-02  Javier Miranda  <miranda@adacore.com>
9959
9960         * exp_atag.ads, exp_atag.adb
9961         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9962         since its value is implicitly passed in argument Typ.
9963         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9964         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9965         Build_Common_Dispatching_Select_Statements.
9966
9967 2011-08-02  Robert Dewar  <dewar@adacore.com>
9968
9969         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9970         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9971         Minor reformatting.
9972
9973 2011-08-02  Robert Dewar  <dewar@adacore.com>
9974
9975         * sem_res.adb: Minor reformatting.
9976         * sem_prag.adb: Minor reformatting.
9977
9978 2011-08-02  Javier Miranda  <miranda@adacore.com>
9979
9980         * exp_atag.adb, exp_atags.ads
9981         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9982         by the tagged type Entity. Required to use this routine in the VM
9983         targets since we do not have available the Tag entity in the VM
9984         platforms.
9985         * exp_ch6.adb
9986         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9987         Ada.Tags has not been previously loaded.
9988         * exp_ch7.adb
9989         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9990         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9991         * sem_aux.adb
9992         (Enclosing_Dynamic_Scope): Add missing support to handle the full
9993         view of enclosing scopes. Required to handle enclosing scopes that
9994         are synchronized types whose full view is a task type.
9995         * exp_disp.adb
9996         (Build_VM_TSDs): Minor code improvement to avoid generating and
9997         analyzing lists with empty nodes.
9998         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9999         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10000         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10001         (Make_Disp_Timed_Select_Body): Add support for VM targets.
10002         (Make_Select_Specific_Data_Table): Add support for VM targets.
10003         (Make_VM_TSD): Generate code to initialize the SSD structure of
10004         the TSD.
10005
10006 2011-08-02  Yannick Moy  <moy@adacore.com>
10007
10008         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10009         cross-references section in ALI.
10010         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10011         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10012         Sub).
10013         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10014         subprogram or package entity of a node
10015         (Is_Local_Reference_Type): new function returns True for references
10016         selected in local cross-references.
10017         (Lt): function extracted from Lt in Output_References
10018         (Write_Entity_Name): function extracted from Output_References
10019         (Generate_Definition): generate reference with type 'D' for definition
10020         of objects (object declaration and parameter specification), with
10021         appropriate locations and units, for use in local cross-references.
10022         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10023         references of type 'I' for initialization in object definition.
10024         (Output_References): move part of function Lt and procedure
10025         Write_Entity_Name outside of the body. Ignore references of types 'D'
10026         and 'I' introduced for local cross-references.
10027         (Output_Local_References): new procedure to output the local
10028         cross-references sections.
10029         (Lref_Entity_Status): new array defining whether an entity is a local
10030         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10031         with 'I' type when initialization expression is present.
10032         * get_scos.adb, get_scos.ads: Correct comments and typos
10033
10034 2011-08-02  Javier Miranda  <miranda@adacore.com>
10035
10036         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10037         the JVM target.
10038         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10039         the JVM target.
10040         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10041         TSD support.
10042
10043 2011-08-02  Vincent Celier  <celier@adacore.com>
10044
10045         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10046         (No_Space_Img): New function
10047         (Find_Excluded_Sources): When reading from a file, record the file name
10048         and the line number for each excluded source.
10049         (Mark_Excluded_Sources): When reporting an error, if the excluded
10050         sources were read from a file, include file name and line number in
10051         the error message.
10052
10053 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10054
10055         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10056
10057 2011-08-02  Robert Dewar  <dewar@adacore.com>
10058
10059         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10060
10061 2011-08-02  Javier Miranda  <miranda@adacore.com>
10062
10063         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10064         generation of TSDs to the DOTNET compiler.
10065         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10066         generation of TSDs to the DOTNET compiler.
10067
10068 2011-08-02  Javier Miranda  <miranda@adacore.com>
10069
10070         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10071         record of all the tagged types declared inside library level package
10072         declarations, library level package bodies or library level subprograms.
10073         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10074         associated with a given tagged type.
10075         (Build_VM_TSDs): New subprogram.
10076         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10077         compilation units that are subprograms.
10078         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10079         compilation units that are package bodies.
10080         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10081         units that are a package declaration or a package instantiation.
10082         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10083         reorganization to improve the error generated by the frontend when the
10084         function Ada.Tags.Secondary_Tag is not available.
10085         * rtsfind.ads (RE_Register_TSD): New runtime entity.
10086         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10087
10088 2011-08-02  Javier Miranda  <miranda@adacore.com>
10089
10090         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10091
10092 2011-08-02  Robert Dewar  <dewar@adacore.com>
10093
10094         * s-imenne.ads: Minor reformatting.
10095
10096 2011-08-02  Robert Dewar  <dewar@adacore.com>
10097
10098         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10099         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10100         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10101
10102 2011-08-02  Robert Dewar  <dewar@adacore.com>
10103
10104         * einfo.ads (Materialize_Entity): Document this is only for renamings
10105         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10106         required debug information in the case where we transform the object
10107         declaration into a renaming declaration.
10108         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10109         object
10110         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10111         Materialize_Entity.
10112
10113 2011-08-02  Robert Dewar  <dewar@adacore.com>
10114
10115         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10116         Suppress_Init_Procs.
10117         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10118         Suppress_Initialization/Initialization_Suppressed.
10119         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10120         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10121         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10122         * sem_prag.adb: New processing for pragma Suppress_Initialization.
10123
10124 2011-08-02  Robert Dewar  <dewar@adacore.com>
10125
10126         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10127         Minor reformatting.
10128
10129 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10130
10131         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10132         only have inheritable classwide pre/postconditions.
10133
10134 2011-08-02  Javier Miranda  <miranda@adacore.com>
10135
10136         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10137         * rtsfind.ads (RE_Check_TSD): New runtime entity.
10138         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10139         checks if the external tag of a type is the same as the external tag
10140         of some other declaration.
10141
10142 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10143
10144         * s-taskin.ads: Minor reformatting.
10145
10146 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10147
10148         * g-comlin.adb (Display_Help): swap the order in which it prints the
10149         short help and the general usage.
10150
10151 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10152
10153         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10154         the aspect declarations and attach them to the generic copy for
10155         subsequent analysis.
10156         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10157         declarations of the generic tree to the new subprogram declarations.
10158         * sem_attr.adb (Check_Precondition_Postcondition): recognize
10159         conditions that apply to a subprogram instance.
10160
10161 2011-08-02  Robert Dewar  <dewar@adacore.com>
10162
10163         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10164
10165 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10166
10167         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10168         private type with a tagged full view is not derived in the immediate
10169         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10170
10171 2011-08-02  Robert Dewar  <dewar@adacore.com>
10172
10173         * exp_ch4.adb: Minor reformatting.
10174
10175 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10176
10177         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
10178         Ada2012 iterator, the loop will be rewritten during expansion into a
10179         while loop with a cursor and an element declaration. Do not analyze the
10180         body in this case, because if the container is for indefinite types the
10181         actual subtype of the elements will only be determined when the cursor
10182         declaration is analyzed.
10183
10184 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10185
10186         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10187         size/alignment related attributes in CodePeer_Mode.
10188
10189 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10190
10191         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10192         Prepend_Element, since this can result in the operation getting the
10193         wrong slot in the full type's dispatch table if the full type has
10194         inherited operations. The incomplete type's operation will get added
10195         to the proper position in the full type's primitives
10196         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10197         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10198         dispatching operations, since there are cases where nonprimitive
10199         subprograms can get added to the list of incomplete dependents (such
10200         as subprograms in nested packages).
10201         * sem_ch6.adb (Process_Formals): First, remove test for being in a
10202         private part when determining whether to add a primitive with a
10203         parameter of a tagged incomplete type to the Private_Dependents list.
10204         Such primitives can also occur in the visible part, and should not have
10205         been excluded from being private dependents.
10206         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10207         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10208         list of a Taft-amendment incomplete type is a primitive before issuing
10209         an error that the full type must appear in the same unit. There are
10210         cases where nonprimitives can be in the list (such as subprograms in
10211         nested packages).
10212         * sem_disp.adb (Derives_From): Use correct condition for checking that
10213         a formal's type is derived from the type of the corresponding formal in
10214         the parent subprogram (the condition was completely wrong). Add
10215         checking that was missing for controlling result types being derived
10216         from the result type of the parent operation.
10217
10218 2011-08-02  Yannick Moy  <moy@adacore.com>
10219
10220         * errout.adb (First_Node): minor renaming
10221         * restrict.adb (Check_Formal_Restriction): put restriction warning on
10222         first node.
10223
10224 2011-08-02  Yannick Moy  <moy@adacore.com>
10225
10226         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10227         before accessing operands.
10228         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10229         decide whether an initialization expression respects SPARK rules, as
10230         the plain node is the expanded one. This allows for more valid warnings
10231         to be issued.
10232         * gnat_rm.texi: Minor update.
10233
10234 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10235
10236         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10237         previous change.
10238
10239 2011-08-02  Robert Dewar  <dewar@adacore.com>
10240
10241         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10242
10243 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10244
10245         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10246         loop statements and the element renaming declaration with a block when
10247         the element type is controlled.
10248
10249 2011-08-02  Yannick Moy  <moy@adacore.com>
10250
10251         * sinfo.ads: Minor formatting.
10252
10253 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10254
10255         * sem_aggr.adb (Add_Association): if the association has a box and no
10256         expression, use the Sloc of the aggregate itself for the new
10257         association.
10258         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10259         the Original_Node.
10260
10261 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10262
10263         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10264         When a container is provided via a function call, generate a renaming
10265         of the function result. This avoids the creation of a transient scope
10266         and the premature finalization of the container.
10267         * exp_ch7.adb (Is_Container_Cursor): Removed.
10268         (Wrap_Transient_Declaration): Remove the supression of the finalization
10269         of the list controller when the declaration denotes a container cursor,
10270         it is not needed.
10271
10272 2011-08-02  Yannick Moy  <moy@adacore.com>
10273
10274         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10275         node is from source, instead of the original node being from source.
10276         * sem_aggr.adb
10277         (Resolve_Array_Aggregate): refine the check for a static expression, to
10278         recognize also static ranges
10279         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10280         Array_Type_Declaration): postpone the test for the type being a subtype
10281         mark after the type has been resolved, so that component-selection and
10282         expanded-name are discriminated.
10283         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10284         to distinguish the case of an iteration scheme, so that an error is
10285         issed on a non-static range in SPARK except in an iteration scheme.
10286         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10287         In_Iter_Schm = True.
10288         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10289         user-defined operators so that they are allowed in renaming
10290         * sem_ch8.adb
10291         (Find_Selected_Component): refine the check for prefixing of operators
10292         so that they are allowed in renaming. Move the checks for restrictions
10293         on selector name after analysis discriminated between
10294         component-selection and expanded-name.
10295         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10296         concatenation argument of string type if it is static.
10297         * sem_util.adb, sem_util.ads
10298         (Check_Later_Vs_Basic_Declarations): add a new function
10299         Is_Later_Declarative_Item to decice which declarations are allowed as
10300         later items, in the two different modes Ada 83 and SPARK. In the SPARK
10301         mode, add that renamings are considered as later items.
10302         (Enclosing_Package): new function to return the enclosing package
10303         (Enter_Name): correct the rule for homonyms in SPARK
10304         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10305         from source (result of expansion) to avoid issuing wrong warnings.
10306
10307 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10308
10309         * errout.adb: On anything but an expression First_Node returns its
10310         argument.
10311
10312 2011-08-02  Pascal Obry  <obry@adacore.com>
10313
10314         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10315
10316 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10317
10318         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10319         Set the associated loop as the related expression of internally
10320         generated cursors.
10321         * exp_ch7.adb (Is_Container_Cursor): New routine.
10322         (Wrap_Transient_Declaration): Supress the finalization of the list
10323         controller when the declaration denotes a container cursor.
10324
10325 2011-08-02  Yannick Moy  <moy@adacore.com>
10326
10327         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10328         command line now.
10329         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10330         expression is a simple expression. This check cannot be performed in
10331         the semantics, so just drop it.
10332         (P_Index_Or_Discriminant_Constraint): move check that the index or
10333         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10334         semantics. Other cases were previously checked in the semantics.
10335         * par-ch4.adb (P_Name): move checks that a selector name is not
10336         character literal or an operator symbol to Find_Selected_Component in
10337         the semantics
10338         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10339         declarations are not placed after later declarations in a separate
10340         procedure in Sem_Util (possibly not the best choice?), to be used both
10341         during parsing, for Ada 83 mode, and during semantic analysis, for
10342         SPARK mode.
10343         * par-endh.adb (Check_End): move check that end label is not missing
10344         to Process_End_Label in the semantics
10345         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10346         the special case for SPARK restriction
10347         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10348         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10349         parameter Force to issue the error message even on internal node (used
10350         for generated end label). Call Check_Restriction to check when an error
10351         must be issued. In SPARK mode, issue an error message even if the
10352         restriction is not set.
10353         (Check_Restriction): new procedure with an additional out parameter to
10354         inform the caller that a message has been issued
10355         * sem_aggr.adb: Minor modification of message
10356         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10357         instead of issuing an error message directly
10358         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10359         declarations are not placed after later declarations, by calling
10360         Check_Later_Vs_Basic_Declarations
10361         (Analyze_Subtype_Declaration): move here the check that an index or
10362         discriminant constraint must be a subtype mark. Change the check that
10363         a subtype of String must start at one so that it works on subtype marks.
10364         * sem_ch4.adb (Analyze_Call): move here the check that a named
10365         association cannot follow a positional one in a call
10366         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10367         instead of issuing an error message directly
10368         * sem_ch8.adb (Find_Selected_Component): move here the check that a
10369         selector name is not a character literal or an operator symbol. Move
10370         here the check that the prefix of an expanded name cannot be a
10371         subprogram or a loop statement.
10372         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10373         procedure called from parsing and semantics to check that basic
10374         declarations are not placed after later declarations
10375         (Process_End_Label): move here the check that end label is not missing
10376
10377 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10378
10379         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10380         representation clause in codepeer mode, since it confuses CodePeer and
10381         does not bring useful info.
10382
10383 2011-08-02  Ed Falis  <falis@adacore.com>
10384
10385         * init.c: initialize fp hw on MILS.
10386
10387 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10388
10389         * errout.adb (First_Node): for bodies, return the node itself (small
10390         optimization). For other nodes, do not check source_unit if the node
10391         comes from Standard.
10392
10393 2011-08-02  Robert Dewar  <dewar@adacore.com>
10394
10395         * exp_ch3.adb: Minor comment additions.
10396         * sem_ch13.adb: Minor reformatting.
10397
10398 2011-08-02  Pascal Obry  <obry@adacore.com>
10399
10400         * make.adb, makeutl.adb: Removes some superfluous directory separator.
10401
10402 2011-08-02  Robert Dewar  <dewar@adacore.com>
10403
10404         * sem_attr.adb: Minor reformatting.
10405
10406 2011-08-02  Robert Dewar  <dewar@adacore.com>
10407
10408         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10409         (Has_Default_Component_Value): Removed
10410         * einfo.ads Comment updates
10411         (Has_Default_Aspect): Replaces Has_Default_Value
10412         (Has_Default_Component_Value): Removed
10413         * exp_ch13.adb
10414         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10415         * exp_ch3.adb
10416         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10417         (Get_Simple_Init_Val): Handle Default_Value aspect
10418         (Needs_Simple_Initialization): Handle Default_Value aspect
10419         * exp_ch3.ads: Needs_Simple_Initialization
10420         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10421         * par-prag.adb (Pragma_Default[_Component]Value) Removed
10422         * sem_ch13.adb
10423         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10424         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10425         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10426
10427 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10428
10429         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10430         package containing iteration primitives.
10431         exp_ch5.adb (Expand_Iterator_Loop): ditto.
10432
10433 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10434
10435         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10436         "of", pre-analyze expression in case it is a function call with
10437         finalization actions that must be placed ahead of the loop.
10438         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10439         on an Ada2012 iterator, insert them ahead of the rewritten loop.
10440
10441 2011-08-02  Geert Bosch  <bosch@adacore.com>
10442
10443         * cstand.adb (Create_Float_Types): Only consider C's long double for
10444         Long_Long_Float, in addition to double.
10445
10446 2011-08-02  Robert Dewar  <dewar@adacore.com>
10447
10448         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10449         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10450         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10451         Minor reformatting.
10452
10453 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10454
10455         * sem_attr.adb: handle properly 'Result when it is a prefix of an
10456         indexed component.
10457
10458 2011-08-02  Javier Miranda  <miranda@adacore.com>
10459
10460         * einfo.ads, einfo.adb
10461         (Original_Access_Type): Move this attribute to Node26 since there was
10462         an undocumented use of Node21 in E_Access_Subprogram_Type entities
10463         which causes conflicts and breaks the generation of the .NET compiler.
10464         (Interface_Name): Add missing documentation on JGNAT only uses of
10465         this attribute.
10466
10467 2011-08-02  Geert Bosch  <bosch@adacore.com>
10468
10469         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10470         (Find_Back_End_Float_Type): Likewise
10471         (Create_Back_End_Float_Types): Likewise
10472         (Create_Float_Types): Likewise
10473         (Register_Float_Type): Likewise
10474         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10475         Nlist and split out type selection in new local Find_Base_Type function.
10476         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10477         Nlist
10478         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10479
10480 2011-08-02  Robert Dewar  <dewar@adacore.com>
10481
10482         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10483         alpha order).
10484         * opt.ads: Minor comment change.
10485         * sem_ch12.adb: Minor code reorganization.
10486
10487 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10488
10489         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10490         subtype's list of rep items to the list on the full subtype in the case
10491         where the lists are the same.
10492
10493 2011-08-02  Geert Bosch  <bosch@adacore.com>
10494
10495         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10496         using the one from System.Strings, which also deallocates all strings.
10497
10498 2011-08-02  Geert Bosch  <bosch@adacore.com>
10499
10500         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10501         function.
10502         * gcc-interface/Make-lang.in: Update dependencies.
10503
10504 2011-08-02  Olivier Hainque  <hainque@adacore.com>
10505
10506         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10507         end_locus.
10508
10509 2011-08-02  Javier Miranda  <miranda@adacore.com>
10510
10511         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10512         associated with anonymous access to subprograms.
10513
10514 2011-08-02  Geert Bosch  <bosch@adacore.com>
10515
10516         * opt.ads
10517         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10518         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10519         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10520         (Add_Symbol_Definition): Move to switch-c.adb
10521         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10522         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10523         (Add_Symbol_Definition): Move to switch-c.adb.
10524         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10525         * sem_warn.adb
10526         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10527         Move to warnsw.adb.
10528         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10529         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10530         Move to warnsw.adb.
10531         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10532         (Add_Symbol_Definition): Moved from Prepcomp.
10533         * switch-c.ads: Update copyright notice. Use String_List instead of
10534         Argument_List, removing dependency on System.OS_Lib.
10535
10536 2011-08-02  Yannick Moy  <moy@adacore.com>
10537
10538         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10539         mode on initialization expression which does not respect SPARK
10540         restrictions.
10541         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10542         if the tree referenced by its argument represents an initialization
10543         expression in SPARK, suitable for initializing an object in an object
10544         declaration.
10545
10546 2011-08-02  Javier Miranda  <miranda@adacore.com>
10547
10548         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10549         internally generated access to subprogram with its associated protected
10550         subprogram type.
10551         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10552
10553 2011-08-02  Geert Bosch  <bosch@adacore.com>
10554
10555         * cstand.adb (Register_Float_Type): Print information about type to
10556         register, if the Debug_Flag_Dot_B is set.
10557         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10558         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10559         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10560         with a requested precision of more than Max_Digits digits and no more
10561         than Max_Base_Digits digits, if a range specification is present and the
10562         Predefined_Float_Types list has a suitable type to derive from.
10563         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10564         case of type completion with pragma Import
10565         * sem_prag.adb
10566         (Process_Import_Predefined_Type): Processing to complete a type
10567         with pragma Import. Currently supports floating point types only.
10568         (Set_Convention_From_Pragma): Do nothing without underlying type.
10569         (Process_Convention): Guard against absence of underlying type,
10570         which may happen when importing incomplete types.
10571         (Process_Import_Or_Interface): Handle case of importing predefined
10572         types. Tweak error message.
10573
10574 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10575
10576         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10577         functions to previous change.  Reorganize code slightly.
10578
10579 2011-08-02  Geert Bosch  <bosch@adacore.com>
10580
10581         * back_end.ads (Register_Type_Proc): New call back procedure type for
10582         allowing the back end to provide information about available types.
10583         (Register_Back_End_Types): New procedure to register back end types.
10584         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10585         available types.
10586         * cstand.adb (Back_End_Float_Types): New list for floating point types
10587         supported by the back end.
10588         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10589         (Copy_Float_Type): New procedure to make new copies of predefined types.
10590         (Register_Float_Type): New call back procedure to populate the BEFT list
10591         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10592         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10593         (Create_Float_Types): New procedure to create entities for floating
10594         point types predefined in Standard, and put these and any remaining
10595         BEFTs on the Predefined_Float_Types list.
10596         * stand.ads (Predefined_Float_Types): New list for predefined floating
10597         point types that do not have declarations in package Standard.
10598
10599 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10600
10601         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
10602         entity node for the unit containing the parameter.
10603         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10604         (Add_Inlined_Subprogram): Likewise.
10605         * gcc-interface/Make-lang.in: Update dependencies.
10606
10607 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10608
10609         * s-stusta.adb (Print): Make sure Pos is always initialized to a
10610         suitable value.
10611
10612 2011-08-02  Geert Bosch  <bosch@adacore.com>
10613
10614         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10615
10616 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10617
10618         * sem_type.adb (Covers): Move trivial case to the top and reuse the
10619         computed value of Base_Type.
10620
10621 2011-08-02  Yannick Moy  <moy@adacore.com>
10622
10623         * restrict.adb (Check_Restriction): issue an error for any use of
10624         class-wide, even if the No_Dispatch restriction is not set.
10625         * sem_aggr.adb: Correct typos in comments and messages in formal mode
10626         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10627         when completing a private extension, the type named in the private part
10628         is not the same as that named in the visible part.
10629         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10630         of an inherited primitive operations of a tagged type or type extension
10631         that returns the tagged type.
10632         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10633         function which returns True for an implicit operation inherited by the
10634         derived type declaration for the argument type.
10635         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10636         order.
10637
10638 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10639
10640         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10641         Process_Bounds, to perform analysis with expansion of a range or an
10642         expression that is the iteration scheme for a loop.
10643         (Analyze_Iterator_Specification): If domain of iteration is given by a
10644         function call with a controlled result, as is the case if call returns
10645         a predefined container, ensure that finalization actions are properly
10646         generated.
10647         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10648
10649 2011-08-02  Javier Miranda  <miranda@adacore.com>
10650
10651         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10652         * gcc-interface/Make-lang.in: Update dependencies.
10653
10654 2011-08-02  Javier Miranda  <miranda@adacore.com>
10655
10656         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10657         determine if the analysis is performed using N or Original_Node (N).
10658         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10659         functionality of routine Is_Variable avoids code duplication.
10660         * checks.adb (Determine_Range): Handle temporaries generated by
10661         Remove_Side_Effects.
10662
10663 2011-08-02  Javier Miranda  <miranda@adacore.com>
10664
10665         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10666         expansion of the condition. Required since the previous analysis was
10667         done with expansion disabled (see Resolve_Quantified_Expression) and
10668         hence checks were not inserted and record comparisons have not been
10669         expanded.
10670
10671 2011-08-02  Ed Falis  <falis@adacore.com>
10672
10673         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10674         Update header.
10675
10676 2011-08-02  Bob Duff  <duff@adacore.com>
10677
10678         * opt.ads: Minor comment fix.
10679
10680 2011-08-02  Bob Duff  <duff@adacore.com>
10681
10682         * sem_ch12.adb (Analyze_Package_Instantiation,
10683         Analyze_Subprogram_Instantiation): Turn off style checking while
10684         analyzing an instance. Whatever style checks that apply to the generic
10685         unit should apply, so it makes no sense to apply them in an instance.
10686         This was causing trouble when compiling an instance of a runtime
10687         unit that violates the -gnatyO switch.
10688         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10689         one of the two case statements, causing spurious errors.
10690
10691 2011-08-02  Robert Dewar  <dewar@adacore.com>
10692
10693         * uname.adb: Minor reformatting.
10694         * gnatcmd.adb: Minor reformatting.
10695         * exp_attr.adb: Minor reformatting.
10696
10697 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10698
10699         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10700         No_Dispatching_Calls, do not look for the Assign primitive, because
10701         predefined primitives are not created in this case.
10702
10703 2011-08-02  Bob Duff  <duff@adacore.com>
10704
10705         * stylesw.ads: Minor comment fixes.
10706
10707 2011-08-02  Robert Dewar  <dewar@adacore.com>
10708
10709         * freeze.adb (Add_To_Result): New procedure.
10710
10711 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10712
10713         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10714         time, if the specific run-time routines for handling streams of strings
10715         are not available, use the default mechanism.
10716
10717 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10718
10719         * s-regpat.ads: Fix typo.
10720
10721 2011-08-02  Vincent Celier  <celier@adacore.com>
10722
10723         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10724         not null, call it to create the in memory config project file without
10725         parsing an existing default config project file.
10726
10727 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10728
10729         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10730
10731 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10732
10733         * sem_elim.adb: an abstract subprogram does not need an eliminate
10734         pragma for its descendant to be eliminable.
10735
10736 2011-08-02  Ed Falis  <falis@adacore.com>
10737
10738         * init.c: revert to handling before previous checkin for VxWorks
10739         * s-intman-vxworks.adb: delete unnecessary declarations related to
10740         using Ada interrupt facilities for handling signals.
10741         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10742         * s-intman-vxworks.ads: Import __gnat_install_handler as
10743         Initialize_Interrupts.
10744         * s-taprop-vxworks.adb: Delete Signal_Mask.
10745         (Abort_Handler): change construction of mask to unblock exception
10746         signals.
10747
10748 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10749
10750         * a-except-2005.adb (Raise_From_Signal_Handler): Call
10751         Debug_Raise_Exception before propagation starts.
10752
10753 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10754
10755         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10756         to Restriction_Check_Required.
10757         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10758         * sem_res.adb (Resolve_Call): Likewise.
10759         * sem_attr.adb (Check_Stream_Attribute): Likewise.
10760
10761 2011-08-02  Bob Duff  <duff@adacore.com>
10762
10763         * stylesw.ads: Update comment.
10764         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10765         * errout.ads: Remove obsolete comment.
10766
10767 2011-08-02  Javier Miranda  <miranda@adacore.com>
10768
10769         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10770         (Set_Is_Safe_To_Reevaluate): new procedure.
10771         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10772         assignment is allowed on safe-to-reevaluate variables.
10773         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10774         temporary created to remove side effects in expressions that use
10775         the secondary stack as safe-to-reevaluate.
10776         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10777         variables that are not true constants.
10778
10779 2011-08-02  Robert Dewar  <dewar@adacore.com>
10780
10781         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10782         sem_res.adb, sem_ch6.adb: Minor reformatting.
10783
10784 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10785
10786         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10787
10788 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10789
10790         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10791         not set Overridden_Operation if subprogram is an initialization
10792         procedure.
10793
10794 2011-08-02  Yannick Moy  <moy@adacore.com>
10795
10796         * par-ch6.adb: Correct obsolete name in comments
10797         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10798         which takes two message arguments (existing function takes one), with
10799         second message used for continuation.
10800         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10801         block statements that originate from a source block statement, not
10802         generated block statements
10803         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10804         symmetry with procedure case
10805         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10806         function to issue an error in formal mode if a package specification
10807         contains more than one tagged type or type extension.
10808         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10809         parameters matching formals of tagged types are objects (or ancestor
10810         type conversions of objects), not general expressions. Issue an error
10811         on view conversions that are not involving ancestor conversion of an
10812         extended type.
10813         (Resolve_Type_Conversion): in formal mode, issue an error on the
10814         operand of an ancestor type conversion which is not an object
10815         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10816         procedure so that it works also for actuals of function calls
10817         (Is_Actual_Tagged_Parameter): new function which determines if its
10818         argument is an actual parameter of a formal of tagged type in a
10819         subprogram call
10820         (Is_SPARK_Object_Reference): new function which determines if the tree
10821         referenced by its argument represents an object in SPARK
10822
10823 2011-08-02  Robert Dewar  <dewar@adacore.com>
10824
10825         * sem_ch3.adb: Minor reformatting
10826         Minor comment addition
10827         Minor error msg text change
10828
10829 2011-08-02  Javier Miranda  <miranda@adacore.com>
10830
10831         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10832         function. Used to be more precise when we generate a variable plus one
10833         assignment to remove side effects in the evaluation of the Bound
10834         expressions.
10835         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10836         of the bound expression to force its re-analysis and thus expand the
10837         associated transient scope (if required). Code cleanup replacing the
10838         previous code that declared the constant entity by an invocation to
10839         routine Force_Evaluation which centralizes this work in the frontend.
10840
10841 2011-08-02  Robert Dewar  <dewar@adacore.com>
10842
10843         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10844         (Base_Type): Now uses improved Is_Base_Type function
10845         * einfo.ads (Base_Type): Inline this function
10846
10847 2011-08-02  Robert Dewar  <dewar@adacore.com>
10848
10849         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10850         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10851
10852 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10853
10854         * gcc-interface/Make-lang.in: Update dependencies.
10855         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10856         targets.
10857
10858 2011-08-02  Yannick Moy  <moy@adacore.com>
10859
10860         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10861         non-simple expression used in delta constraint
10862         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10863         index constraint which is not a subtype mark
10864         * par.adb: With and use Restrict
10865         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10866         mode on component type which is not a subtype mark and default
10867         expression on component
10868         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10869         of string which does not have a lower index bound equal to 1
10870         (Array_Type_Declaration): issue an error in formal mode on index or
10871         component type which is not a subtype mark, and on aliased keyword on
10872         component
10873         (Derived_Type_Declaration): issue an error in formal mode on interface,
10874         limited or abstract type
10875         (Record_Type_Declaration): issue an error in formal mode on interface
10876         (Record_Type_Definition): issue an error in formal mode on tagged types
10877         and type extensions not declared in the specification of a library unit
10878         package; on null non-tagged record; on variant part
10879
10880 2011-08-02  Vincent Celier  <celier@adacore.com>
10881
10882         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10883         not declared for qualified library project when Library_Name is not
10884         declared, but Library_Dir is.
10885
10886 2011-08-02  Robert Dewar  <dewar@adacore.com>
10887
10888         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10889         pragmas (affects aspects [Component_]Default_Value
10890         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10891         component type for the resolution
10892
10893 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10894
10895         * einfo.adb (Base_Type): Tune implementation for speed.
10896
10897 2011-08-02  Robert Dewar  <dewar@adacore.com>
10898
10899         * freeze.adb: Minor reformatting.
10900
10901 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10902
10903         * scos.ads: Update comments.
10904
10905 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10906
10907         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10908         base type, because the parent may be a subtype of a private type whose
10909         convention is established in a private part.
10910
10911 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10912
10913         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10914         statement in a block when the expansion of the return expression has
10915         created a finalization chain.
10916         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10917         with the parent node.
10918         Add N_Extended_Return_Statement to handle the case where a transient
10919         object declaration appears in the Return_Object_Declarations list of
10920         an extended return statement.
10921
10922 2011-08-02  Matthew Gingell  <gingell@adacore.com>
10923
10924         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10925         unused parameter 'name'.
10926
10927 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10928
10929         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10930         inherited operation, check whether its alias, which is the source
10931         operastion that it renames, has been marked eliminated.
10932
10933 2011-08-02  Javier Miranda  <miranda@adacore.com>
10934
10935         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10936         in-mode parameter whose type is an access type since it can be used to
10937         modify its designated object. Enforce code that handles as safe an
10938         access type that is not access-to-constant but it is the result of a
10939         previous removal of side-effects.
10940         (Remove_Side_Effects): Minor code reorganization of cases which require
10941         no action. Done to incorporate documentation on new cases uncovered
10942         working in this ticket: no action needed if this routine was invoked
10943         too early and the nodes are not yet decorated.
10944         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10945         to routine Remove_Side_Effects by calls to Force_Evaluation since they
10946         were issued with actuals that are implicitly provided by
10947         Force_Evaluation.
10948
10949 2011-08-02  Robert Dewar  <dewar@adacore.com>
10950
10951         * sem_ch3.adb, sem_res.adb: Minor reformatting.
10952
10953 2011-08-02  Yannick Moy  <moy@adacore.com>
10954
10955         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10956         to issue an error in formal mode on attribute not supported in this mode
10957         (Analyze_Attribute): issue errors on standard attributes not supported
10958         in formal mode.
10959         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10960         comment, and issue error in formal mode on modulus which is not a power
10961         of 2.
10962         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10963         range.
10964         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10965         subtype mark.
10966         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10967         operator on modular type (except 'not').
10968
10969 2011-08-02  Robert Dewar  <dewar@adacore.com>
10970
10971         * gnat_rm.texi: Minor reformatting.
10972
10973 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10974
10975         * s-osinte-linux.ads: Minor comment update and reformatting.
10976         * i-cexten.ads: Make this unit pure, as for its parent.
10977         Will allow its usage in more contexts if needed.
10978
10979 2011-08-02  Robert Dewar  <dewar@adacore.com>
10980
10981         * s-utf_32.ads: Minor comment fix.
10982
10983 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10984
10985         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10986         operation of a tagged synchronized type, handle the case where the
10987         controlling argument is overloaded.
10988
10989 2011-08-02  Yannick Moy  <moy@adacore.com>
10990
10991         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10992         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10993         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10994         SPARK mode and formal verification mode on processing SPARK restriction
10995         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10996         requiring consistency checking.
10997
10998 2011-08-02  Robert Dewar  <dewar@adacore.com>
10999
11000         * sem_res.adb: Minor reformatting.
11001
11002 2011-08-02  Robert Dewar  <dewar@adacore.com>
11003
11004         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11005         a-cforse.ads: Remove unneeded with of Ada.Containers
11006         Remove commented out pragma Inline's
11007         Move specifications of new subprograms to the actual specs
11008
11009 2011-08-02  Yannick Moy  <moy@adacore.com>
11010
11011         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11012         a-cforse.ads: Update comments.
11013
11014 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11015
11016         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11017
11018 2011-08-02  Robert Dewar  <dewar@adacore.com>
11019
11020         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11021         a-cforse.ads, a-cofove.ads: Minor reformatting.
11022
11023 2011-08-02  Claire Dross  <dross@adacore.com>
11024
11025         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11026         a-cofove.ads: Add comments.
11027
11028 2011-08-02  Yannick Moy  <moy@adacore.com>
11029
11030         * gnat_rm.texi: Document formal containers.
11031
11032 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11033
11034         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11035         are empty sections.
11036
11037 2011-08-02  Robert Dewar  <dewar@adacore.com>
11038
11039         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11040         reformatting.
11041
11042 2011-08-02  Robert Dewar  <dewar@adacore.com>
11043
11044         * aspects.adb: New aspects Default_Value and Default_Component_Value
11045         New format of Aspect_Names table checks for omitted entries
11046         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11047         handling of boolean aspects for derived types.
11048         New aspects Default_Value and Default_Component_Value
11049         New format of Aspect_Names table checks for omitted entries
11050         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11051         (Has_Default_Value): New flag
11052         (Has_Default_Component_Value): New flag
11053         (Has_Default_Value): New flag
11054         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11055         table.
11056         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11057         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11058         Default_Value and Default_Component_Value
11059         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11060         New aspects Default_Value and Default_Component_Value
11061         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11062         * sprint.adb: Print N_Aspect_Specification node when called from gdb
11063
11064 2011-08-02  Vincent Celier  <celier@adacore.com>
11065
11066         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11067         inherit library kind.
11068
11069 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11070
11071         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11072         Minor reformatting.
11073
11074 2011-08-02  Robert Dewar  <dewar@adacore.com>
11075
11076         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11077
11078 2011-08-02  Yannick Moy  <moy@adacore.com>
11079
11080         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11081
11082 2011-08-02  Robert Dewar  <dewar@adacore.com>
11083
11084         * impunit.adb: Add comment.
11085
11086 2011-08-02  Yannick Moy  <moy@adacore.com>
11087
11088         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11089         qualification of aggregates in formal mode
11090         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11091         another aggregate
11092         (Resolve_Aggregate): complete the test that an aggregate is adequately
11093         qualified in formal mode
11094
11095 2011-08-02  Pascal Obry  <obry@adacore.com>
11096
11097         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11098         * mlib-prj.adb: Supress warning when compiling binder generated file.
11099         (Build_Library): Supress all warnings when compiling the binder
11100         generated file.
11101
11102 2011-08-02  Yannick Moy  <moy@adacore.com>
11103
11104         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11105         from here...
11106         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11107         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11108         Add with/use clauses to make Check_Formal_Restriction visible
11109
11110 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11111
11112         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11113         in-parameters when type of the generic formal is private in the generic
11114         spec and non-private in the body.
11115
11116 2011-08-02  Claire Dross  <dross@adacore.com>
11117
11118         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11119         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11120         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11121         * impunit.adb, Makefile.rtl: Take new files into account.
11122
11123 2011-08-02  Robert Dewar  <dewar@adacore.com>
11124
11125         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11126         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11127
11128 2011-08-02  Yannick Moy  <moy@adacore.com>
11129
11130         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11131         formal mode
11132         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11133         matching static array bounds, taking into account the special case of
11134         string literals
11135         * sem_ch3.adb: Typo in comment.
11136
11137 2011-08-02  Yannick Moy  <moy@adacore.com>
11138
11139         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11140         which issues an error in formal mode if its argument node is originally
11141         from source
11142         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11143         has a discriminant specification so that it does not include the case
11144         of derived types
11145         (Derived_Type_Declaration): move here the test that a derived type has a
11146         discriminant specification
11147         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11148         first element of a component association before accessing its choices
11149         (presence of component association is not enough)
11150         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11151         declaration is a library item before accessing the next element in a
11152         list, as library items are not member of lists
11153         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11154         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11155         Check_Formal_Restriction whenever possible.
11156
11157 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11158
11159         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11160         reference when needed.
11161
11162 2011-08-02  Bob Duff  <duff@adacore.com>
11163
11164         * gnat_ugn.texi: Fix typo.
11165
11166 2011-08-02  Vincent Celier  <celier@adacore.com>
11167
11168         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11169         archive file name. Do not use the full path name of archives for Open
11170         VMS.
11171
11172 2011-08-02  Robert Dewar  <dewar@adacore.com>
11173
11174         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11175         Analyze_Aspect_Specifications
11176         * sem_ch13.adb
11177         (Analyze_Aspect_Specifications): New handling for boolean aspects
11178         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11179         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11180         sequence for Analyze_Aspect_Specifications
11181         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11182         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11183
11184 2011-08-02  Robert Dewar  <dewar@adacore.com>
11185
11186         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11187         aspects, since these no longer exist.
11188
11189 2011-08-02  Robert Dewar  <dewar@adacore.com>
11190
11191         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11192         semicolon, do not try to see if there are aspects following it.
11193         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11194         aspect spec.
11195
11196 2011-08-02  Robert Dewar  <dewar@adacore.com>
11197
11198         * sem_ch8.adb, aspects.ads: Minor reformatting.
11199
11200 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11201
11202         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11203         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11204         extracted from...
11205         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
11206
11207 2011-08-02  Yannick Moy  <moy@adacore.com>
11208
11209         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11210         mode on subprogram declaration outside of package specification, unless
11211         it is followed by a pragma Import
11212         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11213         Access_Type_Declaration): issue error in formal mode on access type
11214         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11215         incomplete type
11216         (Analyze_Object_Declaration): issue error in formal mode on object
11217         declaration which does not respect SPARK restrictions
11218         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11219         declaration which does not respect SPARK restrictions
11220         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11221         error in formal mode on digits or delta constraint
11222         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11223         decimal fixed point type
11224         (Derived_Type_Declaration): issue error in formal mode on derived type
11225         other than type extensions of tagged record types
11226         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11227         with check on access definition
11228         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11229         mode on protected definition.
11230         (Analyze_Task_Definition): issue error in formal mode on task definition
11231
11232 2011-08-02  Robert Dewar  <dewar@adacore.com>
11233
11234         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11235
11236 2011-08-02  Javier Miranda  <miranda@adacore.com>
11237
11238         * sem_ch6.adb (Can_Override_Operator): New function.
11239         (Verify_Overriding_Indicator): Add missing code to check overriding
11240         indicator in operators. Fixes regression.
11241         (Check_Overriding_Indicator): Minor reformating after replacing the
11242         code that evaluates if the subprogram can override an operator by
11243         invocations to the above new function.
11244         * einfo.adb
11245         (Write_Field26_Name): Add missing code to ensure that, following
11246         the documentation in einfo.ads, this field is not shown as attribute
11247         "Static_Initialization" on non-dispatching functions.
11248
11249 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11250
11251         * sem_res.adb (Resolve_Call): A call to
11252         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11253         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11254         i.e., when the second parameter is of type Time_Span.
11255
11256 2011-08-02  Vincent Celier  <celier@adacore.com>
11257
11258         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11259         with an archive instead of -L<library dir> -l<library name>.
11260
11261 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11262
11263         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11264         mark the base types In_Use in addition to making the operations
11265         use_visible.
11266
11267 2011-08-02  Ed Falis  <falis@adacore.com>
11268
11269         * init.c: add and setup __gnat_signal_mask for the exception signals
11270         * s-inmaop-vxworks.adb: new file.
11271         * s-intman-vxworks.adb: remove unnecessary initializations and
11272         simplify remaining
11273         * s-intman-vxworks.ads: remove unnecessary variable
11274         * s-taprop-vxworks.adb: simplify signal initialization
11275
11276 2011-08-02  Robert Dewar  <dewar@adacore.com>
11277
11278         * sem_ch8.adb: Minor code reorganization, comment updates.
11279
11280 2011-08-02  Robert Dewar  <dewar@adacore.com>
11281
11282         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11283         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11284         here from Sem_Res.
11285         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11286         (Matching_Static_Array_Bounds): Moved here from Sem_Res
11287
11288 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11289
11290         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11291         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11292         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11293         use_type_clauses, to handle more efficiently use_type and use_all_type
11294         constructs.
11295         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11296         Ada2012 Use_All_Type clause.
11297         (Use_Class_Wide_Operations): new procedure.
11298
11299 2011-08-02  Robert Dewar  <dewar@adacore.com>
11300
11301         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11302         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11303         expression to expression function.
11304
11305 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11306
11307         * sem_ch4.adb: transform simple Ada2012 membership into equality only
11308         if types are compatible.
11309
11310 2011-08-02  Yannick Moy  <moy@adacore.com>
11311
11312         * sem_res.adb (Matching_Static_Array_Bounds): new function which
11313         returns True if its argument array types have same dimension and same
11314         static bounds at each index.
11315         (Resolve_Actuals): issue an error in formal mode on actuals passed as
11316         OUT or IN OUT paramaters which are not view conversions in SPARK.
11317         (Resolve_Arithmetic_Op): issue an error in formal mode on
11318         multiplication or division with operands of fixed point types which are
11319         not qualified or explicitly converted.
11320         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11321         Boolean or array type (except String) operands.
11322         (Resolve_Equality_Op): issue an error in formal mode on equality
11323         operators for array types other than String with non-matching static
11324         bounds.
11325         (Resolve_Logical_Op): issue an error in formal mode on logical operators
11326         for array types with non-matching static bounds. Factorize the code in
11327         Matching_Static_Array_Bounds.
11328         (Resolve_Qualified_Expression): issue an error in formal mode on
11329         qualified expressions for array types with non-matching static bounds.
11330         (Resolve_Type_Conversion): issue an error in formal mode on type
11331         conversion for array types with non-matching static bounds
11332
11333 2011-08-02  Robert Dewar  <dewar@adacore.com>
11334
11335         * par-ch10.adb: Minor code reorganization (use Nkind_In).
11336
11337 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11338
11339         * par-ch9.adb: save location of entry for proper error message.
11340
11341 2011-08-02  Javier Miranda  <miranda@adacore.com>
11342
11343         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11344         (Use_Full_View) which permits this routine to climb through the
11345         ancestors using the full-view of private parents.
11346         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11347         Use_Full_View to true in calls to Is_Ancestor.
11348         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11349         true in call to Is_Ancestor.
11350         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11351         Use_Full_View to true in call to Is_Ancestor.
11352         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11353         call to Is_Ancestor.
11354         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11355         Use_Full_View to true in calls to Is_Ancestor.
11356         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11357         Make_Select_Specific_Data_Table, Register_Primitive,
11358         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11359         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11360         to true in call to Is_Ancestor.
11361         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11362         Use_Full_View to true in calls to Is_Ancestor.
11363         * exp_cg.adb
11364         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11365         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11366
11367 2011-08-02  Robert Dewar  <dewar@adacore.com>
11368
11369         * gnat_rm.texi: Minor reformatting.
11370         * sem_prag.adb: Minor reformatting.
11371
11372 2011-08-02  Tristan Gingold  <gingold@adacore.com>
11373
11374         * vms_data.ads: Add VMS qualifier for -gnateP.
11375
11376 2011-08-02  Robert Dewar  <dewar@adacore.com>
11377
11378         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11379         * par-ch7.adb (P_Package): Proper placement of aspects for package
11380         decl/instantiation.
11381         * par-endh.adb (Check_End): Ad Is_Sloc parameter
11382         (End_Statements): Add Is_Sloc parameterr
11383         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11384         (Check_End): Ad Is_Sloc parameter
11385         (End_Statements): Add Is_Sloc parameterr
11386
11387 2011-08-02  Vincent Celier  <celier@adacore.com>
11388
11389         * ug_words: Add VMS qualifier equivalent to -gnateP:
11390         /SYMBOL_PREPROCESSING.
11391
11392 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11393
11394         * gnat-style.texi: For hexadecimal numeric literals the typical
11395         grouping of digits is 4 to represent 2 bytes.
11396         A procedure spec which is split into several lines is indented two
11397         characters.
11398
11399 2011-08-02  Yannick Moy  <moy@adacore.com>
11400
11401         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11402         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11403         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11404         properly qualified
11405         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11406         choice in array aggregate
11407         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11408         mark as ancestor
11409         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11410         positional and named aggregate for record, or others in record
11411         aggregate, or multiple choice in record aggregate
11412         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11413         array operands to logical operations AND, OR and XOR do not have the
11414         same static lower and higher bounds
11415         * sem_ch5.adb, sinfo.ads: Correct typos in comments
11416
11417 2011-08-01  Robert Dewar  <dewar@adacore.com>
11418
11419         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11420         Replaces Last_Source_Node_In_Sequence.
11421         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11422         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11423         parens and blank in string (this was inconsistently implemented).
11424         * errout.ads
11425         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11426         blank in string (this was inconsistently implemented).
11427         * gnat1drv.adb
11428         (Set_Global_Switches): Set formal mode switches appropriately
11429         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11430         * par-prag.adb
11431         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11432         call Set_Error_Msg_Lang to set "spark" as language name.
11433         * par.adb: Remove unnecessary call to set formal language for errout
11434         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11435         appropriately and call Set_Error_Msg_Lang to set "spark" as language
11436         name.
11437         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11438         calls to it, moved after resolution so that types are known
11439         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11440         result of concatenation is not of type String
11441         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11442         concatenation is not properly restricted
11443         * gnat_rm.texi: Add doc on pragma Spark_95.
11444         * gcc-interface/Makefile.in: Remove obsolete target pairs for
11445         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11446         * gcc-interface/Make-lang.in: Update dependencies.
11447
11448 2011-08-01  Javier Miranda  <miranda@adacore.com>
11449
11450         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11451         condition that detects if the overridden operation must replace an
11452         existing entity.
11453
11454 2011-08-01  Javier Miranda  <miranda@adacore.com>
11455
11456         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11457         code declarations inserted by Insert_Actions in each alternative of the
11458         N_Case_Expression node.
11459
11460 2011-08-01  Robert Dewar  <dewar@adacore.com>
11461
11462         * sem_ch6.adb: Minor code reorganization.
11463         * sem_util.adb: Minor reformatting.
11464
11465 2011-08-01  Pascal Obry  <obry@adacore.com>
11466
11467         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11468         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11469
11470 2011-08-01  Yannick Moy  <moy@adacore.com>
11471
11472         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11473         literal or operator symbol which is prefixed
11474         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11475         mode on access attributes.
11476         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11477         that concatenation operands are properly restricted in formal mode
11478         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11479         Analyze_Concatenation_Operand. Issue an error in formal mode if the
11480         result of the concatenation has a type different from String.
11481         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11482         Analyze_Quantified_Expression, Analyze_Slice,
11483         Analyze_Null): issue an error in formal mode on unsupported constructs
11484         * sem_ch5.adb
11485         (Analyze_Block_Statement): only issue error on source block statement
11486         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11487         function which returns the last node in a list of nodes for which
11488         Comes_From_Source returns True, if any
11489         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11490         Last_Source_Node_In_Sequence
11491         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11492         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11493         mode on unsupported constructs
11494         * sem_ch9.adb Do not return after issuing error in formal mode, as the
11495         rest of the actions may be needed later on since the error is marked as
11496         not serious.
11497         * sinfo.ads: Typos in comments.
11498
11499 2011-08-01  Pascal Obry  <obry@adacore.com>
11500
11501         * projects.texi: Minor editing.
11502
11503 2011-08-01  Yannick Moy  <moy@adacore.com>
11504
11505         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11506         insertion character ~~
11507         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11508         (Set_Error_Msg_Lang): new procedure which fixes the language for use
11509         with insertion character ~~
11510         (Set_Msg_Text): treat insertion character ~~
11511         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11512         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11513         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11514         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11515         errors related to the formal language restriction not serious
11516         (insertion character |).
11517         * par.adb (Par): set formal language for error messages if needed
11518         * sem_ch6.adb (Check_Missing_Return): take into account possible
11519         generated statements at the end of the function
11520         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11521         enumeration value to define a new pragma SPARK_95
11522         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11523         SPARK_Version): new type and variables to store the SPARK version
11524         (none by default).
11525         (SPARK_Mode): return True when SPARK_Version is set
11526         * par-prag.adb: Correct indentation
11527         (Prag): take Pragma_SPARK_95 into account
11528         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11529         into account.
11530
11531 2011-08-01  Robert Dewar  <dewar@adacore.com>
11532
11533         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11534         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11535         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11536
11537 2011-08-01  Pascal Obry  <obry@adacore.com>
11538
11539         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11540         Target_Name to Get_Path call.
11541         (Parse_Single_Project): Likewise.
11542         (Post_Parse_Context_Clause): Likewise.
11543         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11544         Call Initialise_Project_Path with the proper Target_Name.
11545         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11546         search path.
11547         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11548         with the proper Target_Name.
11549         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11550         Part.Parse routine.
11551         (Parse_Project_And_Apply_Config): Likewise.
11552         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11553         This is fine as this part of the code is supporting only native
11554         compilation.
11555         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11556         is fine as this part of the code is supporting only native compilation.
11557
11558 2011-08-01  Yannick Moy  <moy@adacore.com>
11559
11560         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11561         of homonym, unless the homonym is one of the cases allowed in SPARK
11562         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11563         package declaration occurring after a body.
11564
11565 2011-08-01  Robert Dewar  <dewar@adacore.com>
11566
11567         * checks.adb, exp_ch4.adb: Minor reformatting.
11568
11569 2011-08-01  Javier Miranda  <miranda@adacore.com>
11570
11571         * einfo.ads (Access_Disp_Table): Fix documentation.
11572         (Dispatch_Table_Wrappers): Fix documentation.
11573
11574 2011-08-01  Pascal Obry  <obry@adacore.com>
11575
11576         * prj-env.adb, prj-env.ads: Minor reformatting.
11577
11578 2011-08-01  Yannick Moy  <moy@adacore.com>
11579
11580         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11581         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11582         procedures out of these packages.
11583         * errout.ads, errout.adb
11584         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11585         procedures in of this package
11586         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11587         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11588         on misplaced later vs initial declarations, like in Ada 83
11589         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11590         formal mode on attribute of private type whose full type declaration
11591         is not visible
11592         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11593         package declaration inside a package specification
11594         (Analyze_Full_Type_Declaration): issue error in formal mode on
11595         controlled type or discriminant type
11596         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11597         user-defined operator means that it should come from the source
11598         (New_Overloaded_Entity): issue error in formal mode on overloaded
11599         entity.
11600         * sem_ch6.ads, sem_ch13.ads: typos in comments.
11601
11602 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11603
11604         * atree.adb: Minor reformatting.
11605         * checks.adb: Minor reformatting.
11606
11607 2011-08-01  Vincent Celier  <celier@adacore.com>
11608
11609         * s-parame-vms-ia64.ads: Fix typo in comment
11610         Minor reformatting
11611         * s-parame-vms-restrict.ads: Removed, unused.
11612
11613 2011-08-01  Javier Miranda  <miranda@adacore.com>
11614
11615         * exp_ch3.adb
11616         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11617         * sem_ch3.adb
11618         (Constrain_Index): Remove side effects in the evaluation of the bounds.
11619         * sem_ch3.ads, sem_ch3.adb
11620         (Is_Constant_Bound): New extended version of the subprogram that was
11621         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11622         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11623         * sem_aux.ads (Constant_Value): Fix typo in comment.
11624         * checks.adb (Generate_Index_Checks): New implementation which, for
11625         array objects with constant bounds, generates the runtime check
11626         referencing the bounds of the array type. For other cases this routine
11627         provides its previous behavior obtaining such values from the array
11628         object.
11629         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11630         parent type.
11631         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11632         we cannot have semantic interpretations of the new node.
11633
11634 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11635
11636         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11637         expressions.
11638
11639 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11640
11641         * sem_ch8.adb: Minor code editing.
11642         * s-vxwext.adb: Remove trailing space.
11643         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11644         consistency with other files.
11645
11646 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11647
11648         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11649
11650 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11651
11652         * par-ch10.adb: reject parameterized expressions as compilation unit.
11653         * sem_ch4.adb: handle properly conditional expression with overloaded
11654         then_clause and no else_clause.
11655
11656 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11657
11658         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11659         like done by System.Aux_DEC.
11660         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11661
11662 2011-08-01  Yannick Moy  <moy@adacore.com>
11663
11664         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11665         missing label at end of declaration (subprogram or package)
11666         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11667         of positional and named parameter association
11668         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11669         Error_Msg_SP which adds a prefix to the error message giving the name
11670         of the formal language analyzed
11671         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11672         access result type in subprogram, unconstrained array as result type,.
11673         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11674         procedure
11675         * sem_ch8.adb: Code clean up.
11676
11677 2011-08-01  Javier Miranda  <miranda@adacore.com>
11678
11679         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11680         * einfo.ads (Access_Disp_Table): Fix documentation.
11681         (Dispatch_Table_Wrappers): Fix documentation.
11682         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11683         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11684         to enforce the documentation of this attribute.
11685         (Set_Is_Interface): Cleanup the assertion.
11686         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11687         the Underlying_Type entity before reading attribute Access_Disp_Table.
11688         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11689         Locate the Underlying_Type before reading attribute Access_Disp_Table.
11690         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11691         the Underlying_Type entity before reading attribute Access_Disp_Table.
11692         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11693         Locate the Underlying_Type entity before reading attribute
11694         Access_Disp_Table.
11695
11696 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11697
11698         * s-poosiz.ads: Additional overriding indicators.
11699
11700 2011-08-01  Yannick Moy  <moy@adacore.com>
11701
11702         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11703         formal mode.
11704         (Analyze_Iteration_Scheme): issue error in formal mode when loop
11705         parameter specification does not include a subtype mark.
11706         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11707         formal mode on abstract subprogram.
11708         (Analyze_Subprogram_Specification): issue error in formal mode on
11709         user-defined operator.
11710         (Process_Formals): issue error in formal mode on access parameter and
11711         default expression.
11712         * sem_ch9.adb (Analyze_Abort_Statement,
11713         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11714         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11715         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11716         Analyze_Requeue, Analyze_Selective_Accept,
11717         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11718         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11719         issue error in formal mode on user-defined raise statement.
11720
11721 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11722
11723         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11724         declaration being hidden when overriding an implicit inherited
11725         subprogram.
11726         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11727         (-gnats), do not complain about a source file that contains only a
11728         pragma No_Body.
11729
11730 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11731
11732         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11733         variable if already set.
11734
11735 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11736
11737         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11738         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11739         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11740         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11741         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11742         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11743         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11744         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11745         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11746         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11747         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11748         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11749         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11750         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11751         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11752         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11753         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11754         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11755         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11756         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11757         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11758         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11759         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11760         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11761         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11762         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11763         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11764         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11765         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11766         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11767         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11768         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11769         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11770         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11771         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11772         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11773         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11774         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11775         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11776         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11777         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11778         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11779         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11780         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11781         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11782         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11783         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11784         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11785         s-osinte-mingw.ads: Update to GPLv3 run-time license.
11786         Use GNAT instead of GNARL.
11787
11788 2011-08-01  Bob Duff  <duff@adacore.com>
11789
11790         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11791         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11792         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11793         reformatting.
11794
11795 2011-08-01  Yannick Moy  <moy@adacore.com>
11796
11797         * debug.adb (d.D) reverve flag for the SPARK mode
11798         (d.E) reverve flag for SPARK generation mode
11799         (d.F) reverve flag for Why generation mode
11800         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11801         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
11802         functions which return True when the corresponding modes are set
11803         (Formal_Language): return "spark" or "alfa" when in formal verification
11804         mode.
11805         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11806         Error_Msg to prefix the error message with a tag giving the formal
11807         language
11808         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11809         message with a tag giving the formal language
11810         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11811         block statement
11812         (Analyze_Case_Statement): issue error in formal mode on case statement
11813         with a single "others" case alternative
11814         (Analyze_Exit_Statement): issue errors in formal mode on exit
11815         statements which do not respect SPARK restrictions
11816         (Analyze_Goto_Statement): issue error in formal mode on goto statement
11817         (Check_Unreachable_Code): always issue an error (not a warning) in
11818         formal mode on unreachable code (concerns both code after an infinite
11819         loop and after an unconditional jump, both not allowed in SPARK)
11820         * sem_ch6.adb (Analyze_Return_Statement): add call to
11821         Set_Return_Present for a procedure containing a return statement
11822         (already done for functions in Analyze_Function_Return)
11823         (Analyze_Function_Return): issue error in formal mode on extended
11824         return or if return is not last statement in function
11825         (Check_Missing_Return): issue error in formal mode if function does
11826         not end with return or if procedure contains a return
11827         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11828         function to detect if there is an inner scope of its parameter S which
11829         is a loop.
11830
11831 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11832
11833         * sem_ch6.ads: Minor reformatting.
11834
11835 2011-08-01  Javier Miranda  <miranda@adacore.com>
11836
11837         * sem_util.adb (Abstract_Interface_List): Complete condition when
11838         processing private type declarations to avoid reading unavailable
11839         attribute.
11840         (Is_Synchronized_Tagged_Type): Complete condition when processing
11841         private extension declaration nodes to avoid reading unavailable
11842         attribute.
11843
11844 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11845
11846         * sem_ch3.adb: Minor reformatting.
11847
11848 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11849
11850         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11851         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11852         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11853         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11854         for VMS, instead parametrize the common implementation with
11855         System.Parameters declarations.
11856
11857 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
11858
11859         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11860
11861 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11862
11863         * seh_init.c: Fix SEH handler installation on win64.
11864
11865 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11866
11867         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11868         double analysis of an anonymous access to subprogram, because it can
11869         lead to improper sharing of profiles and a back-end crash.
11870
11871 2011-08-01  Robert Dewar  <dewar@adacore.com>
11872
11873         * make.adb, sem_ch4.adb: Minor reformatting.
11874         * gcc-interface/Make-lang.in: Update dependencies.
11875         * sem_util.adb, exp_ch5.adb: Minor reformatting.
11876
11877 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11878
11879         * gnat_rm.texi: Fix definition of Long_Integer.
11880
11881 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11882
11883         * exp_aggr.adb: check limit size of static aggregate unconditionally,
11884         to prevent storage exhaustion.
11885         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11886         finalized is a function body, insert the cleanup code before the final
11887         return statement, to prevent spurious warnings.
11888         * s-pooglo.ads: add overriding indicator.
11889
11890 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11891
11892         * sem_ch4.adb (Operator_Check): improve error message when both a
11893         with_clause and a use_clause are needed to make operator usage legal.
11894         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11895         determine whether a compilation unit is visible within an other,
11896         either through a with_clause in the current unit, or a with_clause in
11897         its library unit or one one of its parents.
11898
11899 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11900
11901         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11902         over an arbitrary expression of an array or container type.
11903         * lib-xref.adb: clarify comment.
11904
11905 2011-08-01  Bob Duff  <duff@adacore.com>
11906
11907         * einfo.ads: Minor reformatting.
11908         * debug.adb: Minor comment improvement.
11909
11910 2011-08-01  Javier Miranda  <miranda@adacore.com>
11911
11912         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11913         consider hidden subprograms as valid candidates.
11914
11915 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11916
11917         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11918
11919 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
11920
11921         * gnat_ugn.texi: Fix typo.
11922
11923 2011-08-01  Robert Dewar  <dewar@adacore.com>
11924
11925         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11926         lib-xref.adb: Minor reformatting
11927
11928 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
11929
11930         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11931         when to generate a call to Move_Final_List.
11932         (Has_Controlled_Parts): Remove this function.
11933
11934 2011-08-01  Geert Bosch  <bosch@adacore.com>
11935
11936         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11937         "," in choice list.
11938
11939 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11940
11941         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11942         explicit raise of a predefined exception as Comes_From_Source if the
11943         original N_Raise_Statement comes from source.
11944
11945 2011-08-01  Robert Dewar  <dewar@adacore.com>
11946
11947         * sinfo.ads: Add comment.
11948         * sem_ch6.adb: Minor reformatting.
11949
11950 2011-08-01  Robert Dewar  <dewar@adacore.com>
11951
11952         * freeze.adb (Freeze_Entity): Refine check for bad component size
11953         clause to avoid rejecting confirming clause when atomic/aliased present.
11954
11955 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11956
11957         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11958         better determine whether an entity reference is a write.
11959         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11960         subcomponent.
11961         * lib-xref.adb (Output_References): Do no suppress a read reference at
11962         the same location as an immediately preceeding modify-reference, to
11963         handle properly in-out actuals.
11964
11965 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11966
11967         * env.c (__gnat_setenv) [VMS]: Refine previous change.
11968
11969 2011-08-01  Quentin Ochem  <ochem@adacore.com>
11970
11971         * i-cstrin.adb (New_String): Changed implementation, now uses only the
11972         heap to compute the result.
11973
11974 2011-08-01  Robert Dewar  <dewar@adacore.com>
11975
11976         * atree.ads: Minor reformatting.
11977
11978 2011-08-01  Emmanuel Briot  <briot@adacore.com>
11979
11980         * g-expect.adb (Get_Command_Output): Fix memory leak.
11981
11982 2011-08-01  Geert Bosch  <bosch@adacore.com>
11983
11984         * cstand.adb (P_Float_Type): New procedure to print the definition of
11985         predefined fpt types.
11986         (P_Mixed_Name): New procedure to print a name using mixed case
11987         (Print_Standard): Use P_Float_Type for printing floating point types
11988         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11989         precision IEEE float.
11990
11991 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11992
11993         * sem_ch3.adb: Minor reformatting.
11994
11995 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11996
11997         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11998         the completion of a generic function, insert the new body rather than
11999         rewriting the original.
12000
12001 2011-08-01  Yannick Moy  <moy@adacore.com>
12002
12003         * sinfo.ads, errout.ads: Typos in comments.
12004
12005 2011-08-01  Robert Dewar  <dewar@adacore.com>
12006
12007         * par-endh.adb: Minor reformatting.
12008
12009 2011-08-01  Robert Dewar  <dewar@adacore.com>
12010
12011         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12012         (Pre_Post_Aspects): New subtype.
12013         * par-ch12.adb (P_Generic): New syntax for aspects in packages
12014         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12015         * par-ch7.adb (P_Package): Remove Decl parameter
12016         (P_Package): Handle new syntax for aspects (before IS)
12017         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12018         new aspect syntax
12019         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12020         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12021         (P_Package): Remove Decl parameter
12022         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12023         aspects
12024         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12025         specs
12026         * sem_util.ads, sem_util.adb (Static_Boolean): New function
12027         * sinfo.ads: Document new syntax for aspects in packages etc.
12028         * sprint.adb: Handle new syntax of aspects before IS in package
12029
12030 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12031
12032         * atree.ads: Minor reformatting.
12033         * sem_prag.adb: Minor reformatting.
12034
12035 2011-08-01  Robert Dewar  <dewar@adacore.com>
12036
12037         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12038         case expr alternative.
12039
12040 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12041
12042         * sem_ch12.adb: Fix typo.
12043
12044 2011-08-01  Geert Bosch  <bosch@adacore.com>
12045
12046         * sem_prag.adb (Check_No_Link_Name): New procedure.
12047         (Process_Import_Or_Interface): Use Check_No_Link_Name.
12048         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12049         instead of Standard_Long_Long_Float_Size global. Preparation for
12050         eventual removal of per type constants.
12051         * exp_util.ads (Get_Stream_Size): New function returning the stream
12052         size value of subtype E.
12053         * exp_util.adb (Get_Stream_Size): Implement new function.
12054         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12055         function.
12056         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12057         * einfo.adb:
12058         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12059
12060 2011-08-01  Geert Bosch  <bosch@adacore.com>
12061
12062         * cstand.adb: Fix comments.
12063         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12064         count of arguments.
12065
12066 2011-08-01  Robert Dewar  <dewar@adacore.com>
12067
12068         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12069
12070 2011-08-01  Geert Bosch  <bosch@adacore.com>
12071
12072         * atree.ads: Fix comment.
12073
12074 2011-08-01  Robert Dewar  <dewar@adacore.com>
12075
12076         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12077         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12078         * par.adb: Add with for Namet.Sp.
12079         * par-tchk.adb: Minor reformatting.
12080
12081 2011-08-01  Vincent Celier  <celier@adacore.com>
12082
12083         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12084         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12085         of the init procedure of a SAL.
12086         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12087         New procedure.
12088
12089 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12090
12091         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12092         reformatting.
12093
12094 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12095
12096         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12097
12098 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12099
12100         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12101         conformant with its spec (return True only for types that have
12102         an overriding Initialize primitive operation that prevents them from
12103         having preelaborable initialization).
12104         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12105         initialization for controlled types in Ada 2005 or later mode.
12106
12107 2011-08-01  Robert Dewar  <dewar@adacore.com>
12108
12109         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12110         Postcondition.
12111         (Same_Aspect): New function.
12112         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12113         Type_Invariant, Precondition, Postcondition.
12114         * snames.ads-tmpl: Add Name_Type_Invariant.
12115
12116 2011-08-01  Robert Dewar  <dewar@adacore.com>
12117
12118         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12119         here.
12120         (Freeze_All_Ent): Fix error in handling inherited aspects.
12121         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12122         already analyzed, but don't skip entire processing of a declaration,
12123         that's wrong in some cases of declarations being rewritten.
12124         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12125         Don't delay for integer, string literals
12126         Treat predicates in usual manner for delay, remove special case code,
12127         not needed.
12128         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12129         (Build_Predicate_Function): Update saved expression in aspect
12130         (Build_Invariant_Procedure): Update saved expression in aspect
12131         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12132         of replacement of discriminant references if the reference is simple.
12133
12134 2011-08-01  Robert Dewar  <dewar@adacore.com>
12135
12136         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12137         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12138         Static_Predicate and Dynamic_Predicate.
12139         (Build_Predicate_Function): Add processing for Static_Predicate
12140         and Dynamic_Predicate.
12141         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12142         (From_Static_Predicate): New flag
12143         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12144
12145 2011-08-01  Robert Dewar  <dewar@adacore.com>
12146
12147         * usage.adb: Documentation cleanup for Ada version modes in usage.
12148         * expander.adb: Minor reformatting.
12149
12150 2011-08-01  Robert Dewar  <dewar@adacore.com>
12151
12152         * atree.ads: Minor comment fix.
12153         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12154         a-witeio.ads, sem_prag.adb: Minor reformatting.
12155
12156 2011-08-01  Doug Rupp  <rupp@adacore.com>
12157
12158         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12159         pointers. Use descrip.h header file for convenience. Add some
12160         comments.
12161
12162 2011-08-01  Robert Dewar  <dewar@adacore.com>
12163
12164         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12165         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12166         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12167         New procedure.
12168         (Check_Aspect_At_End_Of_Declarations): New procedure
12169         (Analye_Aspect_Specification): Minor changes for above procedures
12170         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12171         specification node as well.
12172
12173 2011-08-01  Pascal Obry  <obry@adacore.com>
12174
12175         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12176         Windows files. Use GetFilesAttributes() in this case to check for file
12177         existence instead of returning with an error code.
12178
12179 2011-08-01  Vincent Celier  <celier@adacore.com>
12180
12181         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12182         High is above Source length.
12183
12184 2011-08-01  Robert Dewar  <dewar@adacore.com>
12185
12186         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12187
12188 2011-08-01  Robert Dewar  <dewar@adacore.com>
12189
12190         * aspects.ads (Boolean_Aspects): New subtype.
12191         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12192         for derived types in cases where the parent type and derived type have
12193         aspects.
12194         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12195         with aspects when parent type also has aspects.
12196         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12197         boolean expression at this point).
12198         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12199         accordance with final decision on the Ada 2012 feature.
12200         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12201
12202 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12203
12204         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12205
12206 2011-08-01  Pascal Obry  <obry@adacore.com>
12207
12208         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12209         Fix Replace_Slice when High is above current string size.
12210         (Replace_Slice): Fix DL computation when High is above current
12211         string length.
12212
12213 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
12214
12215         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12216
12217 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12218
12219         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12220         of node.
12221
12222 2011-08-01  Pascal Obry  <obry@adacore.com>
12223
12224         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12225         reformatting.
12226
12227 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12228
12229         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12230         access to protected subprograms in generic bodies.
12231         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12232         protected type, indicate that the convention of the subprogram is
12233         Convention_Protected, because it may be used in subsequent declarations
12234         within the protected declaration.
12235
12236 2011-08-01  Vincent Celier  <celier@adacore.com>
12237
12238         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12239         and "final" procedures when the name of the library is "ada", to avoid
12240         duplicate symbols "adainit" and "adafinal" in executables.
12241
12242 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12243
12244         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12245         quantified expression that appears within a postcondition and uses the
12246         Ada2012 'Result attribute.
12247
12248 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12249
12250         * init.c (__gnat_error_handler): Cast reason to int.
12251         (__gnat_install_handler): Explain sa_sigaction use.
12252
12253 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12254
12255         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12256         subprogram has copy-in copy-out parameters, try to promote the mode of
12257         the return type if it is passed in registers.
12258
12259 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12260
12261         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12262         left operand as addressable.
12263
12264 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12265
12266         * gcc-interface/gigi.h (build_function_stub): Remove.
12267         (build_return_expr): Likewise.
12268         (convert_vms_descriptor): Declare.
12269         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12270         (build_function_stub): Move to...
12271         * gcc-interface/utils2.c (build_return_expr): Move to...
12272         * gcc-interface/trans.c (build_function_stub): ...here.
12273         (build_return_expr): ...here.
12274         (Subprogram_Body_to_gnu): Add local variable for language_function.
12275         Disconnect the parameter attributes cache, if any, once done with it.
12276         Call end_subprog_body only after setting the end_locus.
12277         Build the stub associated with the function, if any, at the very end.
12278         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12279         variables and streamline control flow.
12280
12281 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
12282
12283         PR ada/49819
12284         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12285         g-trasym-dwarf.adb.
12286
12287 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12288
12289         PR bootstrap/49794
12290         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12291         Assign to act.sa_sigaction.
12292         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12293         current->return_address to char * before arithmetic.
12294
12295 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12296
12297         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12298         Correct argument types.
12299         Extract code from reason.
12300         (__gnat_install_handler): Assign to act.sa_sigaction.
12301
12302 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
12303
12304         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12305         (GNAT1_OBJS): ...here.
12306
12307 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
12308
12309         PR ada/48711
12310         * g-socthi-mingw.adb (Fill): Fix formatting.
12311
12312         * gcc-interface/gigi.h: Move around comment.
12313
12314 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
12315
12316         PR ada/46350
12317         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12318
12319 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
12320
12321         PR ada/48711
12322         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12323
12324 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12325
12326         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12327         range comparison if Pmode is SImode.
12328
12329 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
12330             Eric Botcazou  <ebotcazou@adacore.com>
12331
12332         * adadecode.c: Wrap up in extern "C" block.
12333         * adadecode.h: Likewise.
12334         * adaint.c: Likewise.  Remove 'const' keyword.
12335         * adaint.h: Likewise.
12336         * argv.c: Likewise.
12337         * atree.h: Likewise.
12338         * cio.c: Likewise.
12339         * cstreams.c: Likewise.
12340         * env.c: Likewise.
12341         * exit.c: Likewise.
12342         * fe.h: Likewise.
12343         * final.c: Likewise.
12344         * init.c: Likewise.
12345         * initialize.c: Likewise.
12346         * link.c: Likewise.
12347         * namet.h: Likewise.
12348         * nlists.h: Likewise.
12349         * raise.c: Likewise.
12350         * raise.h: Likewise.
12351         * repinfo.h: Likewise.
12352         * seh_init.c: Likewise.
12353         * targext.c: Likewise.
12354         * tracebak.c: Likewise.
12355         * uintp.h: Likewise.
12356         * urealp.h: Likewise.
12357         * xeinfo.adb: Wrap up generated C code in extern "C" block.
12358         * xsinfo.adb: Likewise.
12359         * xsnamest.adb: Likewise.
12360         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12361         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12362         * gcc-interface/misc.c: Likewise.
12363         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12364         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
12365         ada/targext.o here...
12366         (GNAT_ADA_OBJS): ...and not here.
12367         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12368         (GNATBIND_OBJS): Reorder.
12369
12370 2011-07-07  Richard Henderson  <rth@redhat.com>
12371
12372         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12373         dwarf2out_frame_init.
12374
12375 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
12376
12377         * gcc-interface/misc.c (gnat_init): Tweak previous change.
12378
12379 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12380
12381         PR target/39150
12382         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12383
12384 2011-07-06  Richard Guenther  <rguenther@suse.de>
12385
12386         * gcc-interface/misc.c (gnat_init): Merge calls to
12387         build_common_tree_nodes and build_common_tree_nodes_2.
12388         Re-initialize boolean_false_node.
12389
12390 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
12391             Olivier Hainque  <hainque@adacore.com>
12392             Nicolas Setton  <setton@adacore.com>
12393
12394         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12395         the type according to the ARTIFICIAL_P parameter.
12396         (create_type_decl): Likewise.
12397         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12398
12399 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
12400
12401         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12402         (gnatbind): Likewise.
12403
12404 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12405
12406         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12407
12408 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12409
12410         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12411         local variable throughout.  Remove useless call to Base_Type.
12412         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12413         Take it also into account for the volatileness of the field.  Set the
12414         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
12415
12416 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12417
12418         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12419         on a dereference built for a by-ref object if it has an address clause.
12420
12421 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12422
12423         * einfo.ads (Address_Taken): Document use for the second argument of
12424         Asm_Input and Asm_Output attributes.
12425         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12426         argument is an entity name, then set Address_Taken on it.
12427         <Attribute_Asm_Output>: Likewise.
12428         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12429         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12430         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12431         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12432
12433 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
12434
12435         PR middle-end/46500
12436         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12437
12438 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
12439
12440         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12441         (ada/utils.o): Update dependencies.
12442         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12443         ../../../libcpp/libcpp.a.
12444         * gcc-interface/utils.c: Include common/common-target.h.
12445         (process_attributes): Use targetm_common.have_named_sections.
12446
12447 2011-06-07  Richard Guenther  <rguenther@suse.de>
12448
12449         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12450         set_sizetype.
12451
12452 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12453
12454         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12455         TREE_THIS_NOTRAP flag.
12456
12457 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12458
12459         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12460         Fix thinko.
12461
12462 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12463
12464         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12465         constants whose full view has discriminants specially.
12466
12467 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12468
12469         * gcc-interface/utils.c: Include diagnostic.h.
12470         (gnat_write_global_declarations): Output debug information for all
12471         global type declarations before finalizing the compilation unit.
12472         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12473
12474 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
12475
12476         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12477
12478 2011-05-25  Kai Tietz  <ktietz@redhat.com>
12479
12480         * adaint.c (__gnat_to_canonical_file_list_next): Use array
12481         initialization instead of const/none-const pointer assignment.
12482
12483 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
12484
12485         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12486         $(EXTRA_GNAT1_OBJS).
12487         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12488         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12489         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12490         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12491         libcommon-target.a instead of prefix.o.
12492
12493 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
12494
12495         PR ada/49097
12496         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12497
12498 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
12499
12500         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12501         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12502         instead of version.o.
12503
12504 2011-05-18  Kai Tietz  <ktietz@redhat.com>
12505
12506         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12507         boolean_false_node instead of integer_zero_node.
12508         (convert_with_check): Likewise.
12509         * gcc-interface/decl.c (choices_to_gnu): Likewise.
12510
12511 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
12512
12513         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12514         type of the parameter is an unconstrained array, convert the actual to
12515         the type of the formal in the In Out and Out cases as well.
12516
12517 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12518
12519         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12520         call build_function_type_array or build_varargs_function_type_array
12521         instead.
12522         (create_subprog_type): Don't call build_function_type; call
12523         build_function_type_vec instead.
12524
12525 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12526
12527         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12528         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12529         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12530
12531 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
12532
12533         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12534
12535         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12536         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12537
12538 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12539
12540         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12541
12542 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12543
12544         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12545         instead of accessing TYPE_ARG_TYPES directly.
12546         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12547
12548 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12549
12550         PR ada/48844
12551         * gcc-interface/gigi.h (get_variant_part): Declare.
12552         * gcc-interface/decl.c (get_variant_part): Make global.
12553         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12554         types have the same constant size, are record types and T1 has a
12555         variant part while T2 doesn't.
12556
12557 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12558
12559         * gcc-interface/utils.c (begin_subprog_body): Do not call
12560         get_pending_sizes.
12561         (end_subprog_body): Likewise.
12562
12563 2011-05-04  Richard Guenther  <rguenther@suse.de>
12564
12565         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12566         int_const_binop.
12567         (pos_to_constructor): Likewise.
12568
12569 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
12570             Eric Botcazou  <ebotcazou@adacore.com>
12571
12572         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12573         of build_function_type.  Adjust calls to...
12574         (build_raise_check): ...this.  Do not take a void_tree parameter.
12575         Call build_function_type_list instead of build_function_type.
12576         Fix head comment and swap couple of conditional blocks.
12577
12578 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
12579
12580         * gnatvsn.ads (Library_Version): Bump to 4.7.
12581         (Current_Year): Bump to 2011.
12582
12583 2011-04-29  Michael Matz  <matz@suse.de>
12584
12585         * gcc-interface/misc.c (gnat_handle_option): Set
12586         warn_maybe_uninitialized.
12587
12588 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
12589
12590         * gnat_ugn.texi (Complexity Metrics Control): Update link to
12591         the Watson/McCabe paper.
12592
12593 2011-04-23  Jim Meyering  <meyering@redhat.com>
12594
12595         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12596
12597 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12598
12599         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12600         onto the new type.
12601
12602 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12603
12604         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12605         parameter.
12606         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
12607         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12608         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12609         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12610         <all>: Do not set flags on the reused DECL node coming from an alias.
12611         Set DECL_IGNORED_P on the DECL node built for subprograms if they
12612         don't need debug info here...
12613         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12614         (gigi): Adjust calls to create_subprog_decl.
12615         (build_raise_check): Likewise.
12616         (establish_gnat_vms_condition_handler): Likewise.
12617         (Compilation_Unit_to_gnu): Likewise.
12618         (gnat_to_gnu): Likewise.
12619
12620 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
12621
12622         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12623         (NO_REORDER_ADAFLAGS): New variable.
12624         (EXTRA_GNATTOOLS): Always define.
12625         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12626         Clean up and adjust list of files compiled with special options.
12627         * gcc-interface/Make-lang.in: Likewise.
12628         (ada/decl.o): Cosmetical change.
12629         (ada/misc.o): Remove dependency on $(PLUGIN_H).
12630
12631 2011-04-20  Jim Meyering  <meyering@redhat.com>
12632
12633         * initialize.c (__gnat_initialize): Remove useless if-before-free.
12634
12635 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12636
12637         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12638         $(CFLAGS) on the link line.
12639
12640 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12641
12642         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12643         padded type built for the return type if it is unconstrained.
12644
12645 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
12646
12647         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12648
12649 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
12650
12651         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12652         before calling TREE_CHAIN.
12653         * gcc-interface/misc.c (gnat_init_ts): New function.
12654         (LANG_HOOKS_INIT_TS): Define.
12655
12656 2011-04-12  Martin Jambor  <mjambor@suse.cz>
12657
12658         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12659         instead of cgraph_node.
12660
12661 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12662
12663         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12664         alignment on fields of the RETURN type built for the Copy-In Copy-Out
12665         mechanism.
12666
12667 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12668
12669         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12670         of aggregate types that contain a placeholder.
12671
12672 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
12673
12674         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12675         TYPE_ARG_TYPES.
12676         (handle_type_generic_attribute): Likewise.
12677
12678 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
12679
12680         PR ada/47163
12681         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12682
12683 2011-04-04  Kai Tietz  <ktietz@redhat.com>
12684
12685         PR ada/47163
12686         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12687         to flag value.
12688
12689 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12690
12691         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12692         type case, do not strip a padding type around the array type.
12693
12694 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12695
12696         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12697         types.
12698
12699 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12700
12701         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12702         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12703         code for -feliminate-unused-debug-types.
12704         (gnat_post_options): Likewise.
12705
12706 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12707
12708         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12709         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12710         distinct copy.
12711
12712 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12713
12714         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12715         DECL_ARTIFICIAL flag on enumeration types.
12716
12717 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12718
12719         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12720         fat pointer types artificial unconditionally.
12721         <E_Array_Subtype>: Attach the base array type as a parallel type if it
12722         isn't artificial.
12723
12724 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12725
12726         * gcc-interface/gigi.h (get_dummy_type): Declare.
12727         (build_dummy_unc_pointer_types): Likewise.
12728         (finish_fat_pointer_type): Likewise.
12729         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12730         fat pointer type has been built, complete it in place.
12731         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12732         and thin pointers.  Remove useless variable.
12733         (finish_fat_pointer_type): Make global and move to...
12734         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12735         (get_dummy_type): New function.
12736         (build_dummy_unc_pointer_types): Likewise.
12737         (gnat_pushdecl): Propage the name to the anonymous variants only.
12738         (update_pointer_to): Only adjust the pointer types in the unconstrained
12739         array case.
12740
12741 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12742
12743         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12744         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12745         if this is a Taft amendment type and the full declaration is available.
12746         * gcc-interface/trans.c (process_type): Likewise.
12747         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12748         (process_freeze_entity): Likewise.
12749         * gcc-interface/utils.c (dummy_global): New static variable.
12750         (gnat_write_global_declarations): If there are types declared as used
12751         at the global level, insert them in the global hash table.
12752
12753 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12754
12755         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12756         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12757         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12758         copy.
12759         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
12760         flag of the type accordingly.
12761         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12762
12763 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12764
12765         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12766         finalizing types when updating the pointers to the designated type.
12767         <all>: Finalize the deferred types even if we didn't defer processing
12768         of incomplete types in this invocation.
12769
12770 2011-04-01  Olivier Hainque  <hainque@adacore.com>
12771             Nicolas Setton  <setton@adacore.com>
12772             Eric Botcazou  <ebotcazou@adacore.com>
12773
12774         * gcc-interface/misc.c (gnat_descriptive_type): New function.
12775         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12776
12777 2011-03-28  Kai Tietz  <ktietz@redhat.com>
12778
12779         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12780         Windows targets.
12781         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12782         * system-mingw.ads (System): Change ZCX_By_Default default to True.
12783
12784         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12785
12786 2011-03-28  Tristan Gingold  <gingold@adacore.com>
12787
12788         PR ada/44431
12789         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12790         Use ada output of gnatbind.
12791         (ada/b_gnatb.adb): Ditto.
12792         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12793         (ada.mostlyclean, ada.stage1)
12794         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12795         (ada.stagefeedback): Adjust.
12796         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12797         Use ada output of gnatbind.
12798         (b_gnatm.adb): Ditto.
12799         (b_gnatl.o, b_gnatm.o): New rules.
12800
12801 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12802
12803         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12804         for the padded type built to support a specified size or alignment.
12805
12806 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12807
12808         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12809         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12810         unconditionally to the end of the unit when the designated type is
12811         limited_with'ed.
12812         <all>: Rename local variable.  Attempt to un-defer types only and do it
12813         for limited_with'ed types as well.
12814         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
12815         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12816         consistently and remove redundant call to finalize_from_with_types.
12817
12818 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12819
12820         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12821         subprograms without a previous spec declared in the same unit.
12822         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12823         subprograms at the end of the unit instead of at the beginning.
12824         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12825         isn't public for the special handling of non-inline functions nested
12826         inside inline external functions.
12827
12828 2011-03-25  Jeff Law  <law@redhat.com>
12829
12830         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12831
12832 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12833
12834         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12835         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12836         to compute Set_Size_Depends_On_Discriminant.
12837         (Layout_Type): Call it on array types in back-end layout mode.
12838         * sem_util.adb (Requires_Transient_Scope): Return true for array
12839         types only if the size depends on the value of discriminants.
12840         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12841         type if the RHS is a call to a function that returns an unconstrained
12842         type with default discriminant.
12843
12844 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12845
12846         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12847         non-conversion to the nominal result type at the end.
12848
12849 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12850
12851         * gcc-interface/trans.c (create_temporary): New function taken from...
12852         (create_init_temporary): ...here.  Call it.
12853         (call_to_gnu): Create the temporary for the return value early, if any.
12854         Create it for a function with copy-in/copy-out parameters if there is
12855         no target; in other cases of copy-in/copy-out, use another temporary.
12856         Push the new binding level lazily.  Add and rename local variables.
12857
12858 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12859
12860         * gcc-interface/decl.c (validate_size): Improve comments and tweak
12861         error message.
12862         (set_rm_size): Likewise.
12863
12864 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12865
12866         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12867         for the padded type built in order to support a specified alignment.
12868         Fix incorrect formatting.
12869
12870 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12871
12872         PR bootstrap/48216
12873         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12874
12875 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12876
12877         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12878         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12879         to the end of the list.  Adjust recursive call.  Rename local variable.
12880         If REORDER is true, reorder components of the record type.
12881         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12882         components_to_record and adjust the parameter list.
12883
12884 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12885
12886         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12887         disabled, use the variable for bounds of loop iteration scheme.
12888
12889 2011-03-21  Kai Tietz  <ktietz@redhat.com>
12890
12891         PR target/12171
12892         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12893
12894 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12895
12896         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12897         out whether the expression is read-only.  Short-circuit placeholder
12898         case and rename a couple of local variables.
12899
12900 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
12901
12902         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12903         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12904         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12905         (convert): Deal with conversions from a smaller form type specially.
12906
12907 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
12908
12909         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12910         its argument, except for the special -I- switch.
12911
12912 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
12913
12914         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12915         "Ada Issues".
12916
12917 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
12918
12919         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12920
12921 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
12922
12923         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12924         GNAT_FORMAL.
12925         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12926         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
12927         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
12928         Do not generate the check directly, instead instantiate the template
12929         check present in the descriptor.
12930         (make_descriptor_field): Move around.
12931         (build_vms_descriptor32): Build a template check in the POINTER field.
12932         (build_vms_descriptor): Remove useless suffixes.
12933         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12934
12935 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
12936
12937         PR bootstrap/47467
12938         * targext.c: Include target files if IN_RTS is defined.
12939
12940 2011-01-26  Richard Guenther  <rguenther@suse.de>
12941
12942         PR bootstrap/47467
12943         * targext.c: Include config.h.
12944         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12945         dependency.
12946
12947 2011-01-04  Pascal Obry  <obry@adacore.com>
12948             Eric Botcazou  <ebotcazou@adacore.com>
12949
12950         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12951
12952 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12953
12954         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12955         end-of-case on the end label and its associated gotos, if any.
12956
12957 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12958
12959         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12960         expressions of the parameter cache within the statement group of
12961         the CICO mechanism.
12962
12963 2011-01-04  Olivier Hainque  <hainque@adacore.com>
12964             Eric Botcazou  <ebotcazou@adacore.com>
12965
12966         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12967         (set_end_locus_from_node): New function.
12968         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12969         make and the function end_locus.
12970         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12971         for the elaboration subprogram.
12972         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12973         set the end_locus of the expression as well.
12974
12975 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
12976
12977         PR ada/47131
12978         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12979         variables that are referenced in exception handlers volatile.
12980
12981
12982 \f
12983 Copyright (C) 2011 Free Software Foundation, Inc.
12984
12985 Copying and distribution of this file, with or without modification,
12986 are permitted in any medium without royalty provided the copyright
12987 notice and this notice are preserved.
12988
12989         * gnat_rm.texi: Ramification of pragma Eliminate documentation
12990          - fix bugs in the description of Source_Trace;
12991          - get rid of UNIT_NAME;
12992
12993 2011-08-02  Javier Miranda  <miranda@adacore.com>
12994
12995         * exp_ch9.adb
12996         (Build_Dispatching_Requeue): Adding support for VM targets
12997         since we cannot directly reference the Tag entity.
12998         * exp_sel.adb (Build_K): Adding support for VM targets.
12999         (Build_S_Assignment): Adding support for VM targets.
13000         * exp_disp.adb
13001         (Default_Prim_Op_Position): In VM targets do not restrict availability
13002         of predefined interface primitives to compiling in Ada 2005 mode.
13003         (Is_Predefined_Interface_Primitive): In VM targets this service is not
13004         restricted to compiling in Ada 2005 mode.
13005         (Make_VM_TSD): Generate code that declares and initializes the OSD
13006         record. Needed to support dispatching calls through synchronized
13007         interfaces.
13008         * exp_ch3.adb
13009         (Make_Predefined_Primitive_Specs): Enable generation of predefined
13010         primitives associated with synchronized interfaces.
13011         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
13012         primitives associated with synchronized interfaces.
13013
13014 2011-08-02  Yannick Moy  <moy@adacore.com>
13015
13016         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
13017         statements hidden in SPARK if preceded by the HIDE directive
13018         (Parse_Exception_Handlers): mark each exception handler in a sequence of
13019         exception handlers as hidden in SPARK if preceded by the HIDE directive
13020         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
13021         if starting with the HIDE directive
13022         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
13023         starting with the HIDE directive; mark the declarations in a private
13024         part as hidden in SPARK if the private part starts with the HIDE
13025         directive
13026         * restrict.adb, restrict.ads
13027         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
13028         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
13029         argument node belongs to a part which is hidden in SPARK
13030         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
13031         parts in SPARK; protect the possibly costly call to
13032         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
13033         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
13034         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
13035         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
13036         Tok_SPARK_Hide.
13037         (Scan): recognize special comment starting with '#' and followed by
13038         SPARK keyword "hide" as a HIDE directive.
13039
13040 2011-08-02  Yannick Moy  <moy@adacore.com>
13041
13042         * types.ads, erroutc.ads: Minor reformatting.
13043
13044 2011-08-02  Vincent Celier  <celier@adacore.com>
13045
13046         * link.c: Add response file support for cross platforms.
13047
13048 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13049
13050         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
13051         in an association, set parent field of copy before partial analysis.
13052         * sem_res.adb (Resolve_Slice): create reference to itype only when
13053         expansion is enabled.
13054
13055 2011-08-02  Yannick Moy  <moy@adacore.com>
13056
13057         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
13058         for new flag denoting which subprogram bodies are in ALFA
13059         * restrict.adb, sem_ch7.adb: Update comment
13060         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
13061         sem_ch9.adb, sem_res.adb: Add calls to
13062         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
13063         * sem_ch6.adb (Analyze_Function_Return): add calls to
13064         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
13065         middle of the body, and extended return.
13066         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13067         False when missing return.
13068         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13069         to True for subprograms whose spec is in ALFA. Remove later on the flag
13070         on the entity used for a subprogram body when there exists a separate
13071         declaration.
13072         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13073         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13074         False, otherwise do nothing.
13075
13076 2011-08-02  Robert Dewar  <dewar@adacore.com>
13077
13078         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13079
13080 2011-08-02  Yannick Moy  <moy@adacore.com>
13081
13082         * sem_ch4.ads: minor formatting.
13083
13084 2011-08-02  Yannick Moy  <moy@adacore.com>
13085
13086         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13087         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13088         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13089         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13090         opt.ads: cleanup of SPARK mode
13091
13092 2011-08-02  Yannick Moy  <moy@adacore.com>
13093
13094         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13095         types.
13096         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13097         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13098         * sem_ch3.adb
13099         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13100         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13101         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13102         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13103         types.
13104         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13105         non-static range.
13106         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13107         functions whose return type is not in ALFA.
13108         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13109         specifications.
13110         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13111         parameter's type is not in ALFA.
13112         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13113         types are in ALFA.
13114
13115 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13116
13117         * sem_ch6 (Analyze_Expression_Function): treat the function as
13118         Inline_Always, and introduce a subprogram declaration for it when it is
13119         not a completion.
13120         * inline.adb (Add_Inlined_Body): recognize bodies that come from
13121         expression functions, so that the back-end can determine whether they
13122         can in fact be inlined.
13123         * sem_util.adb (Is_Expression_Function): predicate to determine whether
13124         a function body comes from an expression function.
13125
13126 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13127
13128         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13129         null exclusions to test Can_Never_Be_Null on the anonymous access types
13130         of the formals rather than testing the formals themselves. Exclude this
13131         check in cases where the Old_Formal is marked as a controlling formal,
13132         to avoid issuing spurious errors for bodies completing dispatching
13133         operations (due to the flag not getting set on controlling access
13134         formals in body specs).
13135         (Find_Corresponding_Spec): When checking full and subtype conformance of
13136         subprogram bodies in instances, pass Designated and E in that order, for
13137         consistency with the expected order of the formals (New_Id followed by
13138         Old_Id).
13139
13140 2011-08-02  Robert Dewar  <dewar@adacore.com>
13141
13142         * sem_ch8.adb: Minor reformatting.
13143
13144 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13145
13146         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13147         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13148         primitive operations of class-wide actuals.
13149
13150 2011-08-02  Javier Miranda  <miranda@adacore.com>
13151
13152         * exp_atag.ads, exp_atag.adb
13153         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13154         since its value is implicitly passed in argument Typ.
13155         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13156         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13157         Build_Common_Dispatching_Select_Statements.
13158
13159 2011-08-02  Robert Dewar  <dewar@adacore.com>
13160
13161         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13162         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13163         Minor reformatting.
13164
13165 2011-08-02  Robert Dewar  <dewar@adacore.com>
13166
13167         * sem_res.adb: Minor reformatting.
13168         * sem_prag.adb: Minor reformatting.
13169
13170 2011-08-02  Javier Miranda  <miranda@adacore.com>
13171
13172         * exp_atag.adb, exp_atags.ads
13173         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13174         by the tagged type Entity. Required to use this routine in the VM
13175         targets since we do not have available the Tag entity in the VM
13176         platforms.
13177         * exp_ch6.adb
13178         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13179         Ada.Tags has not been previously loaded.
13180         * exp_ch7.adb
13181         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13182         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13183         * sem_aux.adb
13184         (Enclosing_Dynamic_Scope): Add missing support to handle the full
13185         view of enclosing scopes. Required to handle enclosing scopes that
13186         are synchronized types whose full view is a task type.
13187         * exp_disp.adb
13188         (Build_VM_TSDs): Minor code improvement to avoid generating and
13189         analyzing lists with empty nodes.
13190         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13191         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13192         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13193         (Make_Disp_Timed_Select_Body): Add support for VM targets.
13194         (Make_Select_Specific_Data_Table): Add support for VM targets.
13195         (Make_VM_TSD): Generate code to initialize the SSD structure of
13196         the TSD.
13197
13198 2011-08-02  Yannick Moy  <moy@adacore.com>
13199
13200         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13201         cross-references section in ALI.
13202         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13203         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13204         Sub).
13205         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13206         subprogram or package entity of a node
13207         (Is_Local_Reference_Type): new function returns True for references
13208         selected in local cross-references.
13209         (Lt): function extracted from Lt in Output_References
13210         (Write_Entity_Name): function extracted from Output_References
13211         (Generate_Definition): generate reference with type 'D' for definition
13212         of objects (object declaration and parameter specification), with
13213         appropriate locations and units, for use in local cross-references.
13214         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13215         references of type 'I' for initialization in object definition.
13216         (Output_References): move part of function Lt and procedure
13217         Write_Entity_Name outside of the body. Ignore references of types 'D'
13218         and 'I' introduced for local cross-references.
13219         (Output_Local_References): new procedure to output the local
13220         cross-references sections.
13221         (Lref_Entity_Status): new array defining whether an entity is a local
13222         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13223         with 'I' type when initialization expression is present.
13224         * get_scos.adb, get_scos.ads: Correct comments and typos
13225
13226 2011-08-02  Javier Miranda  <miranda@adacore.com>
13227
13228         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13229         the JVM target.
13230         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13231         the JVM target.
13232         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13233         TSD support.
13234
13235 2011-08-02  Vincent Celier  <celier@adacore.com>
13236
13237         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13238         (No_Space_Img): New function
13239         (Find_Excluded_Sources): When reading from a file, record the file name
13240         and the line number for each excluded source.
13241         (Mark_Excluded_Sources): When reporting an error, if the excluded
13242         sources were read from a file, include file name and line number in
13243         the error message.
13244
13245 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13246
13247         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13248
13249 2011-08-02  Robert Dewar  <dewar@adacore.com>
13250
13251         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13252
13253 2011-08-02  Javier Miranda  <miranda@adacore.com>
13254
13255         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13256         generation of TSDs to the DOTNET compiler.
13257         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13258         generation of TSDs to the DOTNET compiler.
13259
13260 2011-08-02  Javier Miranda  <miranda@adacore.com>
13261
13262         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13263         record of all the tagged types declared inside library level package
13264         declarations, library level package bodies or library level subprograms.
13265         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13266         associated with a given tagged type.
13267         (Build_VM_TSDs): New subprogram.
13268         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13269         compilation units that are subprograms.
13270         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13271         compilation units that are package bodies.
13272         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13273         units that are a package declaration or a package instantiation.
13274         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13275         reorganization to improve the error generated by the frontend when the
13276         function Ada.Tags.Secondary_Tag is not available.
13277         * rtsfind.ads (RE_Register_TSD): New runtime entity.
13278         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13279
13280 2011-08-02  Javier Miranda  <miranda@adacore.com>
13281
13282         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13283
13284 2011-08-02  Robert Dewar  <dewar@adacore.com>
13285
13286         * s-imenne.ads: Minor reformatting.
13287
13288 2011-08-02  Robert Dewar  <dewar@adacore.com>
13289
13290         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13291         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13292         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13293
13294 2011-08-02  Robert Dewar  <dewar@adacore.com>
13295
13296         * einfo.ads (Materialize_Entity): Document this is only for renamings
13297         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13298         required debug information in the case where we transform the object
13299         declaration into a renaming declaration.
13300         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13301         object
13302         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13303         Materialize_Entity.
13304
13305 2011-08-02  Robert Dewar  <dewar@adacore.com>
13306
13307         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13308         Suppress_Init_Procs.
13309         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13310         Suppress_Initialization/Initialization_Suppressed.
13311         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13312         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13313         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13314         * sem_prag.adb: New processing for pragma Suppress_Initialization.
13315
13316 2011-08-02  Robert Dewar  <dewar@adacore.com>
13317
13318         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13319         Minor reformatting.
13320
13321 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13322
13323         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13324         only have inheritable classwide pre/postconditions.
13325
13326 2011-08-02  Javier Miranda  <miranda@adacore.com>
13327
13328         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13329         * rtsfind.ads (RE_Check_TSD): New runtime entity.
13330         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13331         checks if the external tag of a type is the same as the external tag
13332         of some other declaration.
13333
13334 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13335
13336         * s-taskin.ads: Minor reformatting.
13337
13338 2011-08-02  Emmanuel Briot  <briot@adacore.com>
13339
13340         * g-comlin.adb (Display_Help): swap the order in which it prints the
13341         short help and the general usage.
13342
13343 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13344
13345         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13346         the aspect declarations and attach them to the generic copy for
13347         subsequent analysis.
13348         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13349         declarations of the generic tree to the new subprogram declarations.
13350         * sem_attr.adb (Check_Precondition_Postcondition): recognize
13351         conditions that apply to a subprogram instance.
13352
13353 2011-08-02  Robert Dewar  <dewar@adacore.com>
13354
13355         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13356
13357 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13358
13359         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13360         private type with a tagged full view is not derived in the immediate
13361         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13362
13363 2011-08-02  Robert Dewar  <dewar@adacore.com>
13364
13365         * exp_ch4.adb: Minor reformatting.
13366
13367 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13368
13369         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
13370         Ada2012 iterator, the loop will be rewritten during expansion into a
13371         while loop with a cursor and an element declaration. Do not analyze the
13372         body in this case, because if the container is for indefinite types the
13373         actual subtype of the elements will only be determined when the cursor
13374         declaration is analyzed.
13375
13376 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13377
13378         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13379         size/alignment related attributes in CodePeer_Mode.
13380
13381 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13382
13383         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13384         Prepend_Element, since this can result in the operation getting the
13385         wrong slot in the full type's dispatch table if the full type has
13386         inherited operations. The incomplete type's operation will get added
13387         to the proper position in the full type's primitives
13388         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13389         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13390         dispatching operations, since there are cases where nonprimitive
13391         subprograms can get added to the list of incomplete dependents (such
13392         as subprograms in nested packages).
13393         * sem_ch6.adb (Process_Formals): First, remove test for being in a
13394         private part when determining whether to add a primitive with a
13395         parameter of a tagged incomplete type to the Private_Dependents list.
13396         Such primitives can also occur in the visible part, and should not have
13397         been excluded from being private dependents.
13398         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13399         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13400         list of a Taft-amendment incomplete type is a primitive before issuing
13401         an error that the full type must appear in the same unit. There are
13402         cases where nonprimitives can be in the list (such as subprograms in
13403         nested packages).
13404         * sem_disp.adb (Derives_From): Use correct condition for checking that
13405         a formal's type is derived from the type of the corresponding formal in
13406         the parent subprogram (the condition was completely wrong). Add
13407         checking that was missing for controlling result types being derived
13408         from the result type of the parent operation.
13409
13410 2011-08-02  Yannick Moy  <moy@adacore.com>
13411
13412         * errout.adb (First_Node): minor renaming
13413         * restrict.adb (Check_Formal_Restriction): put restriction warning on
13414         first node.
13415
13416 2011-08-02  Yannick Moy  <moy@adacore.com>
13417
13418         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13419         before accessing operands.
13420         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13421         decide whether an initialization expression respects SPARK rules, as
13422         the plain node is the expanded one. This allows for more valid warnings
13423         to be issued.
13424         * gnat_rm.texi: Minor update.
13425
13426 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13427
13428         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13429         previous change.
13430
13431 2011-08-02  Robert Dewar  <dewar@adacore.com>
13432
13433         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13434
13435 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13436
13437         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13438         loop statements and the element renaming declaration with a block when
13439         the element type is controlled.
13440
13441 2011-08-02  Yannick Moy  <moy@adacore.com>
13442
13443         * sinfo.ads: Minor formatting.
13444
13445 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13446
13447         * sem_aggr.adb (Add_Association): if the association has a box and no
13448         expression, use the Sloc of the aggregate itself for the new
13449         association.
13450         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13451         the Original_Node.
13452
13453 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13454
13455         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13456         When a container is provided via a function call, generate a renaming
13457         of the function result. This avoids the creation of a transient scope
13458         and the premature finalization of the container.
13459         * exp_ch7.adb (Is_Container_Cursor): Removed.
13460         (Wrap_Transient_Declaration): Remove the supression of the finalization
13461         of the list controller when the declaration denotes a container cursor,
13462         it is not needed.
13463
13464 2011-08-02  Yannick Moy  <moy@adacore.com>
13465
13466         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13467         node is from source, instead of the original node being from source.
13468         * sem_aggr.adb
13469         (Resolve_Array_Aggregate): refine the check for a static expression, to
13470         recognize also static ranges
13471         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13472         Array_Type_Declaration): postpone the test for the type being a subtype
13473         mark after the type has been resolved, so that component-selection and
13474         expanded-name are discriminated.
13475         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13476         to distinguish the case of an iteration scheme, so that an error is
13477         issed on a non-static range in SPARK except in an iteration scheme.
13478         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13479         In_Iter_Schm = True.
13480         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13481         user-defined operators so that they are allowed in renaming
13482         * sem_ch8.adb
13483         (Find_Selected_Component): refine the check for prefixing of operators
13484         so that they are allowed in renaming. Move the checks for restrictions
13485         on selector name after analysis discriminated between
13486         component-selection and expanded-name.
13487         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13488         concatenation argument of string type if it is static.
13489         * sem_util.adb, sem_util.ads
13490         (Check_Later_Vs_Basic_Declarations): add a new function
13491         Is_Later_Declarative_Item to decice which declarations are allowed as
13492         later items, in the two different modes Ada 83 and SPARK. In the SPARK
13493         mode, add that renamings are considered as later items.
13494         (Enclosing_Package): new function to return the enclosing package
13495         (Enter_Name): correct the rule for homonyms in SPARK
13496         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13497         from source (result of expansion) to avoid issuing wrong warnings.
13498
13499 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13500
13501         * errout.adb: On anything but an expression First_Node returns its
13502         argument.
13503
13504 2011-08-02  Pascal Obry  <obry@adacore.com>
13505
13506         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13507
13508 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13509
13510         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13511         Set the associated loop as the related expression of internally
13512         generated cursors.
13513         * exp_ch7.adb (Is_Container_Cursor): New routine.
13514         (Wrap_Transient_Declaration): Supress the finalization of the list
13515         controller when the declaration denotes a container cursor.
13516
13517 2011-08-02  Yannick Moy  <moy@adacore.com>
13518
13519         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13520         command line now.
13521         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13522         expression is a simple expression. This check cannot be performed in
13523         the semantics, so just drop it.
13524         (P_Index_Or_Discriminant_Constraint): move check that the index or
13525         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13526         semantics. Other cases were previously checked in the semantics.
13527         * par-ch4.adb (P_Name): move checks that a selector name is not
13528         character literal or an operator symbol to Find_Selected_Component in
13529         the semantics
13530         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13531         declarations are not placed after later declarations in a separate
13532         procedure in Sem_Util (possibly not the best choice?), to be used both
13533         during parsing, for Ada 83 mode, and during semantic analysis, for
13534         SPARK mode.
13535         * par-endh.adb (Check_End): move check that end label is not missing
13536         to Process_End_Label in the semantics
13537         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13538         the special case for SPARK restriction
13539         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13540         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13541         parameter Force to issue the error message even on internal node (used
13542         for generated end label). Call Check_Restriction to check when an error
13543         must be issued. In SPARK mode, issue an error message even if the
13544         restriction is not set.
13545         (Check_Restriction): new procedure with an additional out parameter to
13546         inform the caller that a message has been issued
13547         * sem_aggr.adb: Minor modification of message
13548         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13549         instead of issuing an error message directly
13550         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13551         declarations are not placed after later declarations, by calling
13552         Check_Later_Vs_Basic_Declarations
13553         (Analyze_Subtype_Declaration): move here the check that an index or
13554         discriminant constraint must be a subtype mark. Change the check that
13555         a subtype of String must start at one so that it works on subtype marks.
13556         * sem_ch4.adb (Analyze_Call): move here the check that a named
13557         association cannot follow a positional one in a call
13558         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13559         instead of issuing an error message directly
13560         * sem_ch8.adb (Find_Selected_Component): move here the check that a
13561         selector name is not a character literal or an operator symbol. Move
13562         here the check that the prefix of an expanded name cannot be a
13563         subprogram or a loop statement.
13564         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13565         procedure called from parsing and semantics to check that basic
13566         declarations are not placed after later declarations
13567         (Process_End_Label): move here the check that end label is not missing
13568
13569 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13570
13571         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13572         representation clause in codepeer mode, since it confuses CodePeer and
13573         does not bring useful info.
13574
13575 2011-08-02  Ed Falis  <falis@adacore.com>
13576
13577         * init.c: initialize fp hw on MILS.
13578
13579 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13580
13581         * errout.adb (First_Node): for bodies, return the node itself (small
13582         optimization). For other nodes, do not check source_unit if the node
13583         comes from Standard.
13584
13585 2011-08-02  Robert Dewar  <dewar@adacore.com>
13586
13587         * exp_ch3.adb: Minor comment additions.
13588         * sem_ch13.adb: Minor reformatting.
13589
13590 2011-08-02  Pascal Obry  <obry@adacore.com>
13591
13592         * make.adb, makeutl.adb: Removes some superfluous directory separator.
13593
13594 2011-08-02  Robert Dewar  <dewar@adacore.com>
13595
13596         * sem_attr.adb: Minor reformatting.
13597
13598 2011-08-02  Robert Dewar  <dewar@adacore.com>
13599
13600         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13601         (Has_Default_Component_Value): Removed
13602         * einfo.ads Comment updates
13603         (Has_Default_Aspect): Replaces Has_Default_Value
13604         (Has_Default_Component_Value): Removed
13605         * exp_ch13.adb
13606         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13607         * exp_ch3.adb
13608         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13609         (Get_Simple_Init_Val): Handle Default_Value aspect
13610         (Needs_Simple_Initialization): Handle Default_Value aspect
13611         * exp_ch3.ads: Needs_Simple_Initialization
13612         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13613         * par-prag.adb (Pragma_Default[_Component]Value) Removed
13614         * sem_ch13.adb
13615         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13616         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13617         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13618
13619 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13620
13621         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13622         package containing iteration primitives.
13623         exp_ch5.adb (Expand_Iterator_Loop): ditto.
13624
13625 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13626
13627         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13628         "of", pre-analyze expression in case it is a function call with
13629         finalization actions that must be placed ahead of the loop.
13630         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13631         on an Ada2012 iterator, insert them ahead of the rewritten loop.
13632
13633 2011-08-02  Geert Bosch  <bosch@adacore.com>
13634
13635         * cstand.adb (Create_Float_Types): Only consider C's long double for
13636         Long_Long_Float, in addition to double.
13637
13638 2011-08-02  Robert Dewar  <dewar@adacore.com>
13639
13640         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13641         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13642         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13643         Minor reformatting.
13644
13645 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13646
13647         * sem_attr.adb: handle properly 'Result when it is a prefix of an
13648         indexed component.
13649
13650 2011-08-02  Javier Miranda  <miranda@adacore.com>
13651
13652         * einfo.ads, einfo.adb
13653         (Original_Access_Type): Move this attribute to Node26 since there was
13654         an undocumented use of Node21 in E_Access_Subprogram_Type entities
13655         which causes conflicts and breaks the generation of the .NET compiler.
13656         (Interface_Name): Add missing documentation on JGNAT only uses of
13657         this attribute.
13658
13659 2011-08-02  Geert Bosch  <bosch@adacore.com>
13660
13661         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13662         (Find_Back_End_Float_Type): Likewise
13663         (Create_Back_End_Float_Types): Likewise
13664         (Create_Float_Types): Likewise
13665         (Register_Float_Type): Likewise
13666         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13667         Nlist and split out type selection in new local Find_Base_Type function.
13668         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13669         Nlist
13670         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13671
13672 2011-08-02  Robert Dewar  <dewar@adacore.com>
13673
13674         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13675         alpha order).
13676         * opt.ads: Minor comment change.
13677         * sem_ch12.adb: Minor code reorganization.
13678
13679 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13680
13681         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13682         subtype's list of rep items to the list on the full subtype in the case
13683         where the lists are the same.
13684
13685 2011-08-02  Geert Bosch  <bosch@adacore.com>
13686
13687         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13688         using the one from System.Strings, which also deallocates all strings.
13689
13690 2011-08-02  Geert Bosch  <bosch@adacore.com>
13691
13692         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13693         function.
13694         * gcc-interface/Make-lang.in: Update dependencies.
13695
13696 2011-08-02  Olivier Hainque  <hainque@adacore.com>
13697
13698         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13699         end_locus.
13700
13701 2011-08-02  Javier Miranda  <miranda@adacore.com>
13702
13703         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13704         associated with anonymous access to subprograms.
13705
13706 2011-08-02  Geert Bosch  <bosch@adacore.com>
13707
13708         * opt.ads
13709         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13710         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13711         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13712         (Add_Symbol_Definition): Move to switch-c.adb
13713         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13714         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13715         (Add_Symbol_Definition): Move to switch-c.adb.
13716         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13717         * sem_warn.adb
13718         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13719         Move to warnsw.adb.
13720         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13721         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13722         Move to warnsw.adb.
13723         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13724         (Add_Symbol_Definition): Moved from Prepcomp.
13725         * switch-c.ads: Update copyright notice. Use String_List instead of
13726         Argument_List, removing dependency on System.OS_Lib.
13727
13728 2011-08-02  Yannick Moy  <moy@adacore.com>
13729
13730         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13731         mode on initialization expression which does not respect SPARK
13732         restrictions.
13733         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13734         if the tree referenced by its argument represents an initialization
13735         expression in SPARK, suitable for initializing an object in an object
13736         declaration.
13737
13738 2011-08-02  Javier Miranda  <miranda@adacore.com>
13739
13740         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13741         internally generated access to subprogram with its associated protected
13742         subprogram type.
13743         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13744
13745 2011-08-02  Geert Bosch  <bosch@adacore.com>
13746
13747         * cstand.adb (Register_Float_Type): Print information about type to
13748         register, if the Debug_Flag_Dot_B is set.
13749         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13750         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13751         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13752         with a requested precision of more than Max_Digits digits and no more
13753         than Max_Base_Digits digits, if a range specification is present and the
13754         Predefined_Float_Types list has a suitable type to derive from.
13755         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13756         case of type completion with pragma Import
13757         * sem_prag.adb
13758         (Process_Import_Predefined_Type): Processing to complete a type
13759         with pragma Import. Currently supports floating point types only.
13760         (Set_Convention_From_Pragma): Do nothing without underlying type.
13761         (Process_Convention): Guard against absence of underlying type,
13762         which may happen when importing incomplete types.
13763         (Process_Import_Or_Interface): Handle case of importing predefined
13764         types. Tweak error message.
13765
13766 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13767
13768         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13769         functions to previous change.  Reorganize code slightly.
13770
13771 2011-08-02  Geert Bosch  <bosch@adacore.com>
13772
13773         * back_end.ads (Register_Type_Proc): New call back procedure type for
13774         allowing the back end to provide information about available types.
13775         (Register_Back_End_Types): New procedure to register back end types.
13776         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13777         available types.
13778         * cstand.adb (Back_End_Float_Types): New list for floating point types
13779         supported by the back end.
13780         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13781         (Copy_Float_Type): New procedure to make new copies of predefined types.
13782         (Register_Float_Type): New call back procedure to populate the BEFT list
13783         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13784         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13785         (Create_Float_Types): New procedure to create entities for floating
13786         point types predefined in Standard, and put these and any remaining
13787         BEFTs on the Predefined_Float_Types list.
13788         * stand.ads (Predefined_Float_Types): New list for predefined floating
13789         point types that do not have declarations in package Standard.
13790
13791 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13792
13793         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
13794         entity node for the unit containing the parameter.
13795         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13796         (Add_Inlined_Subprogram): Likewise.
13797         * gcc-interface/Make-lang.in: Update dependencies.
13798
13799 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13800
13801         * s-stusta.adb (Print): Make sure Pos is always initialized to a
13802         suitable value.
13803
13804 2011-08-02  Geert Bosch  <bosch@adacore.com>
13805
13806         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13807
13808 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13809
13810         * sem_type.adb (Covers): Move trivial case to the top and reuse the
13811         computed value of Base_Type.
13812
13813 2011-08-02  Yannick Moy  <moy@adacore.com>
13814
13815         * restrict.adb (Check_Restriction): issue an error for any use of
13816         class-wide, even if the No_Dispatch restriction is not set.
13817         * sem_aggr.adb: Correct typos in comments and messages in formal mode
13818         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13819         when completing a private extension, the type named in the private part
13820         is not the same as that named in the visible part.
13821         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13822         of an inherited primitive operations of a tagged type or type extension
13823         that returns the tagged type.
13824         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13825         function which returns True for an implicit operation inherited by the
13826         derived type declaration for the argument type.
13827         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13828         order.
13829
13830 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13831
13832         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13833         Process_Bounds, to perform analysis with expansion of a range or an
13834         expression that is the iteration scheme for a loop.
13835         (Analyze_Iterator_Specification): If domain of iteration is given by a
13836         function call with a controlled result, as is the case if call returns
13837         a predefined container, ensure that finalization actions are properly
13838         generated.
13839         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13840
13841 2011-08-02  Javier Miranda  <miranda@adacore.com>
13842
13843         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13844         * gcc-interface/Make-lang.in: Update dependencies.
13845
13846 2011-08-02  Javier Miranda  <miranda@adacore.com>
13847
13848         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13849         determine if the analysis is performed using N or Original_Node (N).
13850         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13851         functionality of routine Is_Variable avoids code duplication.
13852         * checks.adb (Determine_Range): Handle temporaries generated by
13853         Remove_Side_Effects.
13854
13855 2011-08-02  Javier Miranda  <miranda@adacore.com>
13856
13857         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13858         expansion of the condition. Required since the previous analysis was
13859         done with expansion disabled (see Resolve_Quantified_Expression) and
13860         hence checks were not inserted and record comparisons have not been
13861         expanded.
13862
13863 2011-08-02  Ed Falis  <falis@adacore.com>
13864
13865         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13866         Update header.
13867
13868 2011-08-02  Bob Duff  <duff@adacore.com>
13869
13870         * opt.ads: Minor comment fix.
13871
13872 2011-08-02  Bob Duff  <duff@adacore.com>
13873
13874         * sem_ch12.adb (Analyze_Package_Instantiation,
13875         Analyze_Subprogram_Instantiation): Turn off style checking while
13876         analyzing an instance. Whatever style checks that apply to the generic
13877         unit should apply, so it makes no sense to apply them in an instance.
13878         This was causing trouble when compiling an instance of a runtime
13879         unit that violates the -gnatyO switch.
13880         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13881         one of the two case statements, causing spurious errors.
13882
13883 2011-08-02  Robert Dewar  <dewar@adacore.com>
13884
13885         * uname.adb: Minor reformatting.
13886         * gnatcmd.adb: Minor reformatting.
13887         * exp_attr.adb: Minor reformatting.
13888
13889 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13890
13891         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13892         No_Dispatching_Calls, do not look for the Assign primitive, because
13893         predefined primitives are not created in this case.
13894
13895 2011-08-02  Bob Duff  <duff@adacore.com>
13896
13897         * stylesw.ads: Minor comment fixes.
13898
13899 2011-08-02  Robert Dewar  <dewar@adacore.com>
13900
13901         * freeze.adb (Add_To_Result): New procedure.
13902
13903 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
13904
13905         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13906         time, if the specific run-time routines for handling streams of strings
13907         are not available, use the default mechanism.
13908
13909 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13910
13911         * s-regpat.ads: Fix typo.
13912
13913 2011-08-02  Vincent Celier  <celier@adacore.com>
13914
13915         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13916         not null, call it to create the in memory config project file without
13917         parsing an existing default config project file.
13918
13919 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13920
13921         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13922
13923 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13924
13925         * sem_elim.adb: an abstract subprogram does not need an eliminate
13926         pragma for its descendant to be eliminable.
13927
13928 2011-08-02  Ed Falis  <falis@adacore.com>
13929
13930         * init.c: revert to handling before previous checkin for VxWorks
13931         * s-intman-vxworks.adb: delete unnecessary declarations related to
13932         using Ada interrupt facilities for handling signals.
13933         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13934         * s-intman-vxworks.ads: Import __gnat_install_handler as
13935         Initialize_Interrupts.
13936         * s-taprop-vxworks.adb: Delete Signal_Mask.
13937         (Abort_Handler): change construction of mask to unblock exception
13938         signals.
13939
13940 2011-08-02  Jerome Guitton  <guitton@adacore.com>
13941
13942         * a-except-2005.adb (Raise_From_Signal_Handler): Call
13943         Debug_Raise_Exception before propagation starts.
13944
13945 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13946
13947         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13948         to Restriction_Check_Required.
13949         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13950         * sem_res.adb (Resolve_Call): Likewise.
13951         * sem_attr.adb (Check_Stream_Attribute): Likewise.
13952
13953 2011-08-02  Bob Duff  <duff@adacore.com>
13954
13955         * stylesw.ads: Update comment.
13956         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13957         * errout.ads: Remove obsolete comment.
13958
13959 2011-08-02  Javier Miranda  <miranda@adacore.com>
13960
13961         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13962         (Set_Is_Safe_To_Reevaluate): new procedure.
13963         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13964         assignment is allowed on safe-to-reevaluate variables.
13965         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13966         temporary created to remove side effects in expressions that use
13967         the secondary stack as safe-to-reevaluate.
13968         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13969         variables that are not true constants.
13970
13971 2011-08-02  Robert Dewar  <dewar@adacore.com>
13972
13973         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13974         sem_res.adb, sem_ch6.adb: Minor reformatting.
13975
13976 2011-08-02  Jerome Guitton  <guitton@adacore.com>
13977
13978         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13979
13980 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13981
13982         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13983         not set Overridden_Operation if subprogram is an initialization
13984         procedure.
13985
13986 2011-08-02  Yannick Moy  <moy@adacore.com>
13987
13988         * par-ch6.adb: Correct obsolete name in comments
13989         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13990         which takes two message arguments (existing function takes one), with
13991         second message used for continuation.
13992         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13993         block statements that originate from a source block statement, not
13994         generated block statements
13995         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13996         symmetry with procedure case
13997         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13998         function to issue an error in formal mode if a package specification
13999         contains more than one tagged type or type extension.
14000         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
14001         parameters matching formals of tagged types are objects (or ancestor
14002         type conversions of objects), not general expressions. Issue an error
14003         on view conversions that are not involving ancestor conversion of an
14004         extended type.
14005         (Resolve_Type_Conversion): in formal mode, issue an error on the
14006         operand of an ancestor type conversion which is not an object
14007         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
14008         procedure so that it works also for actuals of function calls
14009         (Is_Actual_Tagged_Parameter): new function which determines if its
14010         argument is an actual parameter of a formal of tagged type in a
14011         subprogram call
14012         (Is_SPARK_Object_Reference): new function which determines if the tree
14013         referenced by its argument represents an object in SPARK
14014
14015 2011-08-02  Robert Dewar  <dewar@adacore.com>
14016
14017         * sem_ch3.adb: Minor reformatting
14018         Minor comment addition
14019         Minor error msg text change
14020
14021 2011-08-02  Javier Miranda  <miranda@adacore.com>
14022
14023         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
14024         function. Used to be more precise when we generate a variable plus one
14025         assignment to remove side effects in the evaluation of the Bound
14026         expressions.
14027         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
14028         of the bound expression to force its re-analysis and thus expand the
14029         associated transient scope (if required). Code cleanup replacing the
14030         previous code that declared the constant entity by an invocation to
14031         routine Force_Evaluation which centralizes this work in the frontend.
14032
14033 2011-08-02  Robert Dewar  <dewar@adacore.com>
14034
14035         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
14036         (Base_Type): Now uses improved Is_Base_Type function
14037         * einfo.ads (Base_Type): Inline this function
14038
14039 2011-08-02  Robert Dewar  <dewar@adacore.com>
14040
14041         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
14042         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
14043
14044 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14045
14046         * gcc-interface/Make-lang.in: Update dependencies.
14047         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
14048         targets.
14049
14050 2011-08-02  Yannick Moy  <moy@adacore.com>
14051
14052         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
14053         non-simple expression used in delta constraint
14054         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
14055         index constraint which is not a subtype mark
14056         * par.adb: With and use Restrict
14057         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
14058         mode on component type which is not a subtype mark and default
14059         expression on component
14060         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
14061         of string which does not have a lower index bound equal to 1
14062         (Array_Type_Declaration): issue an error in formal mode on index or
14063         component type which is not a subtype mark, and on aliased keyword on
14064         component
14065         (Derived_Type_Declaration): issue an error in formal mode on interface,
14066         limited or abstract type
14067         (Record_Type_Declaration): issue an error in formal mode on interface
14068         (Record_Type_Definition): issue an error in formal mode on tagged types
14069         and type extensions not declared in the specification of a library unit
14070         package; on null non-tagged record; on variant part
14071
14072 2011-08-02  Vincent Celier  <celier@adacore.com>
14073
14074         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14075         not declared for qualified library project when Library_Name is not
14076         declared, but Library_Dir is.
14077
14078 2011-08-02  Robert Dewar  <dewar@adacore.com>
14079
14080         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14081         pragmas (affects aspects [Component_]Default_Value
14082         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14083         component type for the resolution
14084
14085 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14086
14087         * einfo.adb (Base_Type): Tune implementation for speed.
14088
14089 2011-08-02  Robert Dewar  <dewar@adacore.com>
14090
14091         * freeze.adb: Minor reformatting.
14092
14093 2011-08-02  Thomas Quinot  <quinot@adacore.com>
14094
14095         * scos.ads: Update comments.
14096
14097 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14098
14099         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14100         base type, because the parent may be a subtype of a private type whose
14101         convention is established in a private part.
14102
14103 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14104
14105         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14106         statement in a block when the expansion of the return expression has
14107         created a finalization chain.
14108         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14109         with the parent node.
14110         Add N_Extended_Return_Statement to handle the case where a transient
14111         object declaration appears in the Return_Object_Declarations list of
14112         an extended return statement.
14113
14114 2011-08-02  Matthew Gingell  <gingell@adacore.com>
14115
14116         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14117         unused parameter 'name'.
14118
14119 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14120
14121         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14122         inherited operation, check whether its alias, which is the source
14123         operastion that it renames, has been marked eliminated.
14124
14125 2011-08-02  Javier Miranda  <miranda@adacore.com>
14126
14127         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14128         in-mode parameter whose type is an access type since it can be used to
14129         modify its designated object. Enforce code that handles as safe an
14130         access type that is not access-to-constant but it is the result of a
14131         previous removal of side-effects.
14132         (Remove_Side_Effects): Minor code reorganization of cases which require
14133         no action. Done to incorporate documentation on new cases uncovered
14134         working in this ticket: no action needed if this routine was invoked
14135         too early and the nodes are not yet decorated.
14136         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14137         to routine Remove_Side_Effects by calls to Force_Evaluation since they
14138         were issued with actuals that are implicitly provided by
14139         Force_Evaluation.
14140
14141 2011-08-02  Robert Dewar  <dewar@adacore.com>
14142
14143         * sem_ch3.adb, sem_res.adb: Minor reformatting.
14144
14145 2011-08-02  Yannick Moy  <moy@adacore.com>
14146
14147         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14148         to issue an error in formal mode on attribute not supported in this mode
14149         (Analyze_Attribute): issue errors on standard attributes not supported
14150         in formal mode.
14151         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14152         comment, and issue error in formal mode on modulus which is not a power
14153         of 2.
14154         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14155         range.
14156         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14157         subtype mark.
14158         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14159         operator on modular type (except 'not').
14160
14161 2011-08-02  Robert Dewar  <dewar@adacore.com>
14162
14163         * gnat_rm.texi: Minor reformatting.
14164
14165 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14166
14167         * s-osinte-linux.ads: Minor comment update and reformatting.
14168         * i-cexten.ads: Make this unit pure, as for its parent.
14169         Will allow its usage in more contexts if needed.
14170
14171 2011-08-02  Robert Dewar  <dewar@adacore.com>
14172
14173         * s-utf_32.ads: Minor comment fix.
14174
14175 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14176
14177         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14178         operation of a tagged synchronized type, handle the case where the
14179         controlling argument is overloaded.
14180
14181 2011-08-02  Yannick Moy  <moy@adacore.com>
14182
14183         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14184         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14185         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14186         SPARK mode and formal verification mode on processing SPARK restriction
14187         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14188         requiring consistency checking.
14189
14190 2011-08-02  Robert Dewar  <dewar@adacore.com>
14191
14192         * sem_res.adb: Minor reformatting.
14193
14194 2011-08-02  Robert Dewar  <dewar@adacore.com>
14195
14196         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14197         a-cforse.ads: Remove unneeded with of Ada.Containers
14198         Remove commented out pragma Inline's
14199         Move specifications of new subprograms to the actual specs
14200
14201 2011-08-02  Yannick Moy  <moy@adacore.com>
14202
14203         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14204         a-cforse.ads: Update comments.
14205
14206 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14207
14208         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14209
14210 2011-08-02  Robert Dewar  <dewar@adacore.com>
14211
14212         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14213         a-cforse.ads, a-cofove.ads: Minor reformatting.
14214
14215 2011-08-02  Claire Dross  <dross@adacore.com>
14216
14217         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14218         a-cofove.ads: Add comments.
14219
14220 2011-08-02  Yannick Moy  <moy@adacore.com>
14221
14222         * gnat_rm.texi: Document formal containers.
14223
14224 2011-08-02  Emmanuel Briot  <briot@adacore.com>
14225
14226         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14227         are empty sections.
14228
14229 2011-08-02  Robert Dewar  <dewar@adacore.com>
14230
14231         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14232         reformatting.
14233
14234 2011-08-02  Robert Dewar  <dewar@adacore.com>
14235
14236         * aspects.adb: New aspects Default_Value and Default_Component_Value
14237         New format of Aspect_Names table checks for omitted entries
14238         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14239         handling of boolean aspects for derived types.
14240         New aspects Default_Value and Default_Component_Value
14241         New format of Aspect_Names table checks for omitted entries
14242         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14243         (Has_Default_Value): New flag
14244         (Has_Default_Component_Value): New flag
14245         (Has_Default_Value): New flag
14246         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14247         table.
14248         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14249         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14250         Default_Value and Default_Component_Value
14251         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14252         New aspects Default_Value and Default_Component_Value
14253         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14254         * sprint.adb: Print N_Aspect_Specification node when called from gdb
14255
14256 2011-08-02  Vincent Celier  <celier@adacore.com>
14257
14258         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14259         inherit library kind.
14260
14261 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14262
14263         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14264         Minor reformatting.
14265
14266 2011-08-02  Robert Dewar  <dewar@adacore.com>
14267
14268         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14269
14270 2011-08-02  Yannick Moy  <moy@adacore.com>
14271
14272         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14273
14274 2011-08-02  Robert Dewar  <dewar@adacore.com>
14275
14276         * impunit.adb: Add comment.
14277
14278 2011-08-02  Yannick Moy  <moy@adacore.com>
14279
14280         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14281         qualification of aggregates in formal mode
14282         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14283         another aggregate
14284         (Resolve_Aggregate): complete the test that an aggregate is adequately
14285         qualified in formal mode
14286
14287 2011-08-02  Pascal Obry  <obry@adacore.com>
14288
14289         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14290         * mlib-prj.adb: Supress warning when compiling binder generated file.
14291         (Build_Library): Supress all warnings when compiling the binder
14292         generated file.
14293
14294 2011-08-02  Yannick Moy  <moy@adacore.com>
14295
14296         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14297         from here...
14298         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14299         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14300         Add with/use clauses to make Check_Formal_Restriction visible
14301
14302 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14303
14304         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14305         in-parameters when type of the generic formal is private in the generic
14306         spec and non-private in the body.
14307
14308 2011-08-02  Claire Dross  <dross@adacore.com>
14309
14310         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14311         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14312         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14313         * impunit.adb, Makefile.rtl: Take new files into account.
14314
14315 2011-08-02  Robert Dewar  <dewar@adacore.com>
14316
14317         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14318         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14319
14320 2011-08-02  Yannick Moy  <moy@adacore.com>
14321
14322         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14323         formal mode
14324         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14325         matching static array bounds, taking into account the special case of
14326         string literals
14327         * sem_ch3.adb: Typo in comment.
14328
14329 2011-08-02  Yannick Moy  <moy@adacore.com>
14330
14331         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14332         which issues an error in formal mode if its argument node is originally
14333         from source
14334         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14335         has a discriminant specification so that it does not include the case
14336         of derived types
14337         (Derived_Type_Declaration): move here the test that a derived type has a
14338         discriminant specification
14339         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14340         first element of a component association before accessing its choices
14341         (presence of component association is not enough)
14342         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14343         declaration is a library item before accessing the next element in a
14344         list, as library items are not member of lists
14345         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14346         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14347         Check_Formal_Restriction whenever possible.
14348
14349 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14350
14351         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14352         reference when needed.
14353
14354 2011-08-02  Bob Duff  <duff@adacore.com>
14355
14356         * gnat_ugn.texi: Fix typo.
14357
14358 2011-08-02  Vincent Celier  <celier@adacore.com>
14359
14360         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14361         archive file name. Do not use the full path name of archives for Open
14362         VMS.
14363
14364 2011-08-02  Robert Dewar  <dewar@adacore.com>
14365
14366         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14367         Analyze_Aspect_Specifications
14368         * sem_ch13.adb
14369         (Analyze_Aspect_Specifications): New handling for boolean aspects
14370         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14371         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14372         sequence for Analyze_Aspect_Specifications
14373         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14374         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14375
14376 2011-08-02  Robert Dewar  <dewar@adacore.com>
14377
14378         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14379         aspects, since these no longer exist.
14380
14381 2011-08-02  Robert Dewar  <dewar@adacore.com>
14382
14383         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14384         semicolon, do not try to see if there are aspects following it.
14385         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14386         aspect spec.
14387
14388 2011-08-02  Robert Dewar  <dewar@adacore.com>
14389
14390         * sem_ch8.adb, aspects.ads: Minor reformatting.
14391
14392 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14393
14394         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14395         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14396         extracted from...
14397         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
14398
14399 2011-08-02  Yannick Moy  <moy@adacore.com>
14400
14401         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14402         mode on subprogram declaration outside of package specification, unless
14403         it is followed by a pragma Import
14404         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14405         Access_Type_Declaration): issue error in formal mode on access type
14406         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14407         incomplete type
14408         (Analyze_Object_Declaration): issue error in formal mode on object
14409         declaration which does not respect SPARK restrictions
14410         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14411         declaration which does not respect SPARK restrictions
14412         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14413         error in formal mode on digits or delta constraint
14414         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14415         decimal fixed point type
14416         (Derived_Type_Declaration): issue error in formal mode on derived type
14417         other than type extensions of tagged record types
14418         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14419         with check on access definition
14420         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14421         mode on protected definition.
14422         (Analyze_Task_Definition): issue error in formal mode on task definition
14423
14424 2011-08-02  Robert Dewar  <dewar@adacore.com>
14425
14426         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14427
14428 2011-08-02  Javier Miranda  <miranda@adacore.com>
14429
14430         * sem_ch6.adb (Can_Override_Operator): New function.
14431         (Verify_Overriding_Indicator): Add missing code to check overriding
14432         indicator in operators. Fixes regression.
14433         (Check_Overriding_Indicator): Minor reformating after replacing the
14434         code that evaluates if the subprogram can override an operator by
14435         invocations to the above new function.
14436         * einfo.adb
14437         (Write_Field26_Name): Add missing code to ensure that, following
14438         the documentation in einfo.ads, this field is not shown as attribute
14439         "Static_Initialization" on non-dispatching functions.
14440
14441 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14442
14443         * sem_res.adb (Resolve_Call): A call to
14444         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14445         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14446         i.e., when the second parameter is of type Time_Span.
14447
14448 2011-08-02  Vincent Celier  <celier@adacore.com>
14449
14450         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14451         with an archive instead of -L<library dir> -l<library name>.
14452
14453 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14454
14455         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14456         mark the base types In_Use in addition to making the operations
14457         use_visible.
14458
14459 2011-08-02  Ed Falis  <falis@adacore.com>
14460
14461         * init.c: add and setup __gnat_signal_mask for the exception signals
14462         * s-inmaop-vxworks.adb: new file.
14463         * s-intman-vxworks.adb: remove unnecessary initializations and
14464         simplify remaining
14465         * s-intman-vxworks.ads: remove unnecessary variable
14466         * s-taprop-vxworks.adb: simplify signal initialization
14467
14468 2011-08-02  Robert Dewar  <dewar@adacore.com>
14469
14470         * sem_ch8.adb: Minor code reorganization, comment updates.
14471
14472 2011-08-02  Robert Dewar  <dewar@adacore.com>
14473
14474         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14475         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14476         here from Sem_Res.
14477         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14478         (Matching_Static_Array_Bounds): Moved here from Sem_Res
14479
14480 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14481
14482         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14483         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14484         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14485         use_type_clauses, to handle more efficiently use_type and use_all_type
14486         constructs.
14487         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14488         Ada2012 Use_All_Type clause.
14489         (Use_Class_Wide_Operations): new procedure.
14490
14491 2011-08-02  Robert Dewar  <dewar@adacore.com>
14492
14493         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14494         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14495         expression to expression function.
14496
14497 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14498
14499         * sem_ch4.adb: transform simple Ada2012 membership into equality only
14500         if types are compatible.
14501
14502 2011-08-02  Yannick Moy  <moy@adacore.com>
14503
14504         * sem_res.adb (Matching_Static_Array_Bounds): new function which
14505         returns True if its argument array types have same dimension and same
14506         static bounds at each index.
14507         (Resolve_Actuals): issue an error in formal mode on actuals passed as
14508         OUT or IN OUT paramaters which are not view conversions in SPARK.
14509         (Resolve_Arithmetic_Op): issue an error in formal mode on
14510         multiplication or division with operands of fixed point types which are
14511         not qualified or explicitly converted.
14512         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14513         Boolean or array type (except String) operands.
14514         (Resolve_Equality_Op): issue an error in formal mode on equality
14515         operators for array types other than String with non-matching static
14516         bounds.
14517         (Resolve_Logical_Op): issue an error in formal mode on logical operators
14518         for array types with non-matching static bounds. Factorize the code in
14519         Matching_Static_Array_Bounds.
14520         (Resolve_Qualified_Expression): issue an error in formal mode on
14521         qualified expressions for array types with non-matching static bounds.
14522         (Resolve_Type_Conversion): issue an error in formal mode on type
14523         conversion for array types with non-matching static bounds
14524
14525 2011-08-02  Robert Dewar  <dewar@adacore.com>
14526
14527         * par-ch10.adb: Minor code reorganization (use Nkind_In).
14528
14529 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14530
14531         * par-ch9.adb: save location of entry for proper error message.
14532
14533 2011-08-02  Javier Miranda  <miranda@adacore.com>
14534
14535         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14536         (Use_Full_View) which permits this routine to climb through the
14537         ancestors using the full-view of private parents.
14538         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14539         Use_Full_View to true in calls to Is_Ancestor.
14540         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14541         true in call to Is_Ancestor.
14542         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14543         Use_Full_View to true in call to Is_Ancestor.
14544         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14545         call to Is_Ancestor.
14546         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14547         Use_Full_View to true in calls to Is_Ancestor.
14548         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14549         Make_Select_Specific_Data_Table, Register_Primitive,
14550         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14551         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14552         to true in call to Is_Ancestor.
14553         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14554         Use_Full_View to true in calls to Is_Ancestor.
14555         * exp_cg.adb
14556         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14557         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14558
14559 2011-08-02  Robert Dewar  <dewar@adacore.com>
14560
14561         * gnat_rm.texi: Minor reformatting.
14562         * sem_prag.adb: Minor reformatting.
14563
14564 2011-08-02  Tristan Gingold  <gingold@adacore.com>
14565
14566         * vms_data.ads: Add VMS qualifier for -gnateP.
14567
14568 2011-08-02  Robert Dewar  <dewar@adacore.com>
14569
14570         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14571         * par-ch7.adb (P_Package): Proper placement of aspects for package
14572         decl/instantiation.
14573         * par-endh.adb (Check_End): Ad Is_Sloc parameter
14574         (End_Statements): Add Is_Sloc parameterr
14575         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14576         (Check_End): Ad Is_Sloc parameter
14577         (End_Statements): Add Is_Sloc parameterr
14578
14579 2011-08-02  Vincent Celier  <celier@adacore.com>
14580
14581         * ug_words: Add VMS qualifier equivalent to -gnateP:
14582         /SYMBOL_PREPROCESSING.
14583
14584 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14585
14586         * gnat-style.texi: For hexadecimal numeric literals the typical
14587         grouping of digits is 4 to represent 2 bytes.
14588         A procedure spec which is split into several lines is indented two
14589         characters.
14590
14591 2011-08-02  Yannick Moy  <moy@adacore.com>
14592
14593         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14594         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14595         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14596         properly qualified
14597         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14598         choice in array aggregate
14599         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14600         mark as ancestor
14601         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14602         positional and named aggregate for record, or others in record
14603         aggregate, or multiple choice in record aggregate
14604         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14605         array operands to logical operations AND, OR and XOR do not have the
14606         same static lower and higher bounds
14607         * sem_ch5.adb, sinfo.ads: Correct typos in comments
14608
14609 2011-08-01  Robert Dewar  <dewar@adacore.com>
14610
14611         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14612         Replaces Last_Source_Node_In_Sequence.
14613         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14614         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14615         parens and blank in string (this was inconsistently implemented).
14616         * errout.ads
14617         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14618         blank in string (this was inconsistently implemented).
14619         * gnat1drv.adb
14620         (Set_Global_Switches): Set formal mode switches appropriately
14621         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14622         * par-prag.adb
14623         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14624         call Set_Error_Msg_Lang to set "spark" as language name.
14625         * par.adb: Remove unnecessary call to set formal language for errout
14626         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14627         appropriately and call Set_Error_Msg_Lang to set "spark" as language
14628         name.
14629         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14630         calls to it, moved after resolution so that types are known
14631         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14632         result of concatenation is not of type String
14633         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14634         concatenation is not properly restricted
14635         * gnat_rm.texi: Add doc on pragma Spark_95.
14636         * gcc-interface/Makefile.in: Remove obsolete target pairs for
14637         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14638         * gcc-interface/Make-lang.in: Update dependencies.
14639
14640 2011-08-01  Javier Miranda  <miranda@adacore.com>
14641
14642         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14643         condition that detects if the overridden operation must replace an
14644         existing entity.
14645
14646 2011-08-01  Javier Miranda  <miranda@adacore.com>
14647
14648         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14649         code declarations inserted by Insert_Actions in each alternative of the
14650         N_Case_Expression node.
14651
14652 2011-08-01  Robert Dewar  <dewar@adacore.com>
14653
14654         * sem_ch6.adb: Minor code reorganization.
14655         * sem_util.adb: Minor reformatting.
14656
14657 2011-08-01  Pascal Obry  <obry@adacore.com>
14658
14659         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14660         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14661
14662 2011-08-01  Yannick Moy  <moy@adacore.com>
14663
14664         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14665         literal or operator symbol which is prefixed
14666         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14667         mode on access attributes.
14668         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14669         that concatenation operands are properly restricted in formal mode
14670         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14671         Analyze_Concatenation_Operand. Issue an error in formal mode if the
14672         result of the concatenation has a type different from String.
14673         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14674         Analyze_Quantified_Expression, Analyze_Slice,
14675         Analyze_Null): issue an error in formal mode on unsupported constructs
14676         * sem_ch5.adb
14677         (Analyze_Block_Statement): only issue error on source block statement
14678         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14679         function which returns the last node in a list of nodes for which
14680         Comes_From_Source returns True, if any
14681         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14682         Last_Source_Node_In_Sequence
14683         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14684         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14685         mode on unsupported constructs
14686         * sem_ch9.adb Do not return after issuing error in formal mode, as the
14687         rest of the actions may be needed later on since the error is marked as
14688         not serious.
14689         * sinfo.ads: Typos in comments.
14690
14691 2011-08-01  Pascal Obry  <obry@adacore.com>
14692
14693         * projects.texi: Minor editing.
14694
14695 2011-08-01  Yannick Moy  <moy@adacore.com>
14696
14697         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14698         insertion character ~~
14699         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14700         (Set_Error_Msg_Lang): new procedure which fixes the language for use
14701         with insertion character ~~
14702         (Set_Msg_Text): treat insertion character ~~
14703         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14704         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14705         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14706         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14707         errors related to the formal language restriction not serious
14708         (insertion character |).
14709         * par.adb (Par): set formal language for error messages if needed
14710         * sem_ch6.adb (Check_Missing_Return): take into account possible
14711         generated statements at the end of the function
14712         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14713         enumeration value to define a new pragma SPARK_95
14714         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14715         SPARK_Version): new type and variables to store the SPARK version
14716         (none by default).
14717         (SPARK_Mode): return True when SPARK_Version is set
14718         * par-prag.adb: Correct indentation
14719         (Prag): take Pragma_SPARK_95 into account
14720         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14721         into account.
14722
14723 2011-08-01  Robert Dewar  <dewar@adacore.com>
14724
14725         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14726         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14727         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14728
14729 2011-08-01  Pascal Obry  <obry@adacore.com>
14730
14731         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14732         Target_Name to Get_Path call.
14733         (Parse_Single_Project): Likewise.
14734         (Post_Parse_Context_Clause): Likewise.
14735         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14736         Call Initialise_Project_Path with the proper Target_Name.
14737         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14738         search path.
14739         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14740         with the proper Target_Name.
14741         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14742         Part.Parse routine.
14743         (Parse_Project_And_Apply_Config): Likewise.
14744         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14745         This is fine as this part of the code is supporting only native
14746         compilation.
14747         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14748         is fine as this part of the code is supporting only native compilation.
14749
14750 2011-08-01  Yannick Moy  <moy@adacore.com>
14751
14752         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14753         of homonym, unless the homonym is one of the cases allowed in SPARK
14754         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14755         package declaration occurring after a body.
14756
14757 2011-08-01  Robert Dewar  <dewar@adacore.com>
14758
14759         * checks.adb, exp_ch4.adb: Minor reformatting.
14760
14761 2011-08-01  Javier Miranda  <miranda@adacore.com>
14762
14763         * einfo.ads (Access_Disp_Table): Fix documentation.
14764         (Dispatch_Table_Wrappers): Fix documentation.
14765
14766 2011-08-01  Pascal Obry  <obry@adacore.com>
14767
14768         * prj-env.adb, prj-env.ads: Minor reformatting.
14769
14770 2011-08-01  Yannick Moy  <moy@adacore.com>
14771
14772         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14773         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14774         procedures out of these packages.
14775         * errout.ads, errout.adb
14776         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14777         procedures in of this package
14778         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14779         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14780         on misplaced later vs initial declarations, like in Ada 83
14781         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14782         formal mode on attribute of private type whose full type declaration
14783         is not visible
14784         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14785         package declaration inside a package specification
14786         (Analyze_Full_Type_Declaration): issue error in formal mode on
14787         controlled type or discriminant type
14788         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14789         user-defined operator means that it should come from the source
14790         (New_Overloaded_Entity): issue error in formal mode on overloaded
14791         entity.
14792         * sem_ch6.ads, sem_ch13.ads: typos in comments.
14793
14794 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14795
14796         * atree.adb: Minor reformatting.
14797         * checks.adb: Minor reformatting.
14798
14799 2011-08-01  Vincent Celier  <celier@adacore.com>
14800
14801         * s-parame-vms-ia64.ads: Fix typo in comment
14802         Minor reformatting
14803         * s-parame-vms-restrict.ads: Removed, unused.
14804
14805 2011-08-01  Javier Miranda  <miranda@adacore.com>
14806
14807         * exp_ch3.adb
14808         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14809         * sem_ch3.adb
14810         (Constrain_Index): Remove side effects in the evaluation of the bounds.
14811         * sem_ch3.ads, sem_ch3.adb
14812         (Is_Constant_Bound): New extended version of the subprogram that was
14813         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14814         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14815         * sem_aux.ads (Constant_Value): Fix typo in comment.
14816         * checks.adb (Generate_Index_Checks): New implementation which, for
14817         array objects with constant bounds, generates the runtime check
14818         referencing the bounds of the array type. For other cases this routine
14819         provides its previous behavior obtaining such values from the array
14820         object.
14821         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14822         parent type.
14823         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14824         we cannot have semantic interpretations of the new node.
14825
14826 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14827
14828         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14829         expressions.
14830
14831 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
14832
14833         * sem_ch8.adb: Minor code editing.
14834         * s-vxwext.adb: Remove trailing space.
14835         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14836         consistency with other files.
14837
14838 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14839
14840         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14841
14842 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14843
14844         * par-ch10.adb: reject parameterized expressions as compilation unit.
14845         * sem_ch4.adb: handle properly conditional expression with overloaded
14846         then_clause and no else_clause.
14847
14848 2011-08-01  Tristan Gingold  <gingold@adacore.com>
14849
14850         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14851         like done by System.Aux_DEC.
14852         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14853
14854 2011-08-01  Yannick Moy  <moy@adacore.com>
14855
14856         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14857         missing label at end of declaration (subprogram or package)
14858         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14859         of positional and named parameter association
14860         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14861         Error_Msg_SP which adds a prefix to the error message giving the name
14862         of the formal language analyzed
14863         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14864         access result type in subprogram, unconstrained array as result type,.
14865         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14866         procedure
14867         * sem_ch8.adb: Code clean up.
14868
14869 2011-08-01  Javier Miranda  <miranda@adacore.com>
14870
14871         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14872         * einfo.ads (Access_Disp_Table): Fix documentation.
14873         (Dispatch_Table_Wrappers): Fix documentation.
14874         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14875         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14876         to enforce the documentation of this attribute.
14877         (Set_Is_Interface): Cleanup the assertion.
14878         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14879         the Underlying_Type entity before reading attribute Access_Disp_Table.
14880         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14881         Locate the Underlying_Type before reading attribute Access_Disp_Table.
14882         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14883         the Underlying_Type entity before reading attribute Access_Disp_Table.
14884         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14885         Locate the Underlying_Type entity before reading attribute
14886         Access_Disp_Table.
14887
14888 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14889
14890         * s-poosiz.ads: Additional overriding indicators.
14891
14892 2011-08-01  Yannick Moy  <moy@adacore.com>
14893
14894         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14895         formal mode.
14896         (Analyze_Iteration_Scheme): issue error in formal mode when loop
14897         parameter specification does not include a subtype mark.
14898         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14899         formal mode on abstract subprogram.
14900         (Analyze_Subprogram_Specification): issue error in formal mode on
14901         user-defined operator.
14902         (Process_Formals): issue error in formal mode on access parameter and
14903         default expression.
14904         * sem_ch9.adb (Analyze_Abort_Statement,
14905         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14906         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14907         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14908         Analyze_Requeue, Analyze_Selective_Accept,
14909         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14910         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14911         issue error in formal mode on user-defined raise statement.
14912
14913 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14914
14915         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14916         declaration being hidden when overriding an implicit inherited
14917         subprogram.
14918         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14919         (-gnats), do not complain about a source file that contains only a
14920         pragma No_Body.
14921
14922 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14923
14924         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14925         variable if already set.
14926
14927 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
14928
14929         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14930         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14931         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14932         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14933         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14934         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14935         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14936         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14937         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14938         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14939         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14940         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14941         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14942         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14943         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14944         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14945         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14946         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14947         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14948         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14949         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14950         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14951         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14952         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14953         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14954         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14955         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14956         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14957         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14958         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14959         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14960         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14961         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14962         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14963         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14964         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14965         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14966         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14967         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14968         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14969         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14970         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14971         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14972         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14973         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14974         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14975         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14976         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14977         s-osinte-mingw.ads: Update to GPLv3 run-time license.
14978         Use GNAT instead of GNARL.
14979
14980 2011-08-01  Bob Duff  <duff@adacore.com>
14981
14982         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14983         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14984         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14985         reformatting.
14986
14987 2011-08-01  Yannick Moy  <moy@adacore.com>
14988
14989         * debug.adb (d.D) reverve flag for the SPARK mode
14990         (d.E) reverve flag for SPARK generation mode
14991         (d.F) reverve flag for Why generation mode
14992         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
14993         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
14994         functions which return True when the corresponding modes are set
14995         (Formal_Language): return "spark" or "alfa" when in formal verification
14996         mode.
14997         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14998         Error_Msg to prefix the error message with a tag giving the formal
14999         language
15000         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
15001         message with a tag giving the formal language
15002         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
15003         block statement
15004         (Analyze_Case_Statement): issue error in formal mode on case statement
15005         with a single "others" case alternative
15006         (Analyze_Exit_Statement): issue errors in formal mode on exit
15007         statements which do not respect SPARK restrictions
15008         (Analyze_Goto_Statement): issue error in formal mode on goto statement
15009         (Check_Unreachable_Code): always issue an error (not a warning) in
15010         formal mode on unreachable code (concerns both code after an infinite
15011         loop and after an unconditional jump, both not allowed in SPARK)
15012         * sem_ch6.adb (Analyze_Return_Statement): add call to
15013         Set_Return_Present for a procedure containing a return statement
15014         (already done for functions in Analyze_Function_Return)
15015         (Analyze_Function_Return): issue error in formal mode on extended
15016         return or if return is not last statement in function
15017         (Check_Missing_Return): issue error in formal mode if function does
15018         not end with return or if procedure contains a return
15019         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
15020         function to detect if there is an inner scope of its parameter S which
15021         is a loop.
15022
15023 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15024
15025         * sem_ch6.ads: Minor reformatting.
15026
15027 2011-08-01  Javier Miranda  <miranda@adacore.com>
15028
15029         * sem_util.adb (Abstract_Interface_List): Complete condition when
15030         processing private type declarations to avoid reading unavailable
15031         attribute.
15032         (Is_Synchronized_Tagged_Type): Complete condition when processing
15033         private extension declaration nodes to avoid reading unavailable
15034         attribute.
15035
15036 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15037
15038         * sem_ch3.adb: Minor reformatting.
15039
15040 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15041
15042         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
15043         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
15044         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
15045         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
15046         for VMS, instead parametrize the common implementation with
15047         System.Parameters declarations.
15048
15049 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
15050
15051         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
15052
15053 2011-08-01  Tristan Gingold  <gingold@adacore.com>
15054
15055         * seh_init.c: Fix SEH handler installation on win64.
15056
15057 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15058
15059         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
15060         double analysis of an anonymous access to subprogram, because it can
15061         lead to improper sharing of profiles and a back-end crash.
15062
15063 2011-08-01  Robert Dewar  <dewar@adacore.com>
15064
15065         * make.adb, sem_ch4.adb: Minor reformatting.
15066         * gcc-interface/Make-lang.in: Update dependencies.
15067         * sem_util.adb, exp_ch5.adb: Minor reformatting.
15068
15069 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15070
15071         * gnat_rm.texi: Fix definition of Long_Integer.
15072
15073 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15074
15075         * exp_aggr.adb: check limit size of static aggregate unconditionally,
15076         to prevent storage exhaustion.
15077         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15078         finalized is a function body, insert the cleanup code before the final
15079         return statement, to prevent spurious warnings.
15080         * s-pooglo.ads: add overriding indicator.
15081
15082 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15083
15084         * sem_ch4.adb (Operator_Check): improve error message when both a
15085         with_clause and a use_clause are needed to make operator usage legal.
15086         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15087         determine whether a compilation unit is visible within an other,
15088         either through a with_clause in the current unit, or a with_clause in
15089         its library unit or one one of its parents.
15090
15091 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15092
15093         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15094         over an arbitrary expression of an array or container type.
15095         * lib-xref.adb: clarify comment.
15096
15097 2011-08-01  Bob Duff  <duff@adacore.com>
15098
15099         * einfo.ads: Minor reformatting.
15100         * debug.adb: Minor comment improvement.
15101
15102 2011-08-01  Javier Miranda  <miranda@adacore.com>
15103
15104         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15105         consider hidden subprograms as valid candidates.
15106
15107 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15108
15109         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15110
15111 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
15112
15113         * gnat_ugn.texi: Fix typo.
15114
15115 2011-08-01  Robert Dewar  <dewar@adacore.com>
15116
15117         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15118         lib-xref.adb: Minor reformatting
15119
15120 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
15121
15122         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15123         when to generate a call to Move_Final_List.
15124         (Has_Controlled_Parts): Remove this function.
15125
15126 2011-08-01  Geert Bosch  <bosch@adacore.com>
15127
15128         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15129         "," in choice list.
15130
15131 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15132
15133         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15134         explicit raise of a predefined exception as Comes_From_Source if the
15135         original N_Raise_Statement comes from source.
15136
15137 2011-08-01  Robert Dewar  <dewar@adacore.com>
15138
15139         * sinfo.ads: Add comment.
15140         * sem_ch6.adb: Minor reformatting.
15141
15142 2011-08-01  Robert Dewar  <dewar@adacore.com>
15143
15144         * freeze.adb (Freeze_Entity): Refine check for bad component size
15145         clause to avoid rejecting confirming clause when atomic/aliased present.
15146
15147 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15148
15149         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15150         better determine whether an entity reference is a write.
15151         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15152         subcomponent.
15153         * lib-xref.adb (Output_References): Do no suppress a read reference at
15154         the same location as an immediately preceeding modify-reference, to
15155         handle properly in-out actuals.
15156
15157 2011-08-01  Tristan Gingold  <gingold@adacore.com>
15158
15159         * env.c (__gnat_setenv) [VMS]: Refine previous change.
15160
15161 2011-08-01  Quentin Ochem  <ochem@adacore.com>
15162
15163         * i-cstrin.adb (New_String): Changed implementation, now uses only the
15164         heap to compute the result.
15165
15166 2011-08-01  Robert Dewar  <dewar@adacore.com>
15167
15168         * atree.ads: Minor reformatting.
15169
15170 2011-08-01  Emmanuel Briot  <briot@adacore.com>
15171
15172         * g-expect.adb (Get_Command_Output): Fix memory leak.
15173
15174 2011-08-01  Geert Bosch  <bosch@adacore.com>
15175
15176         * cstand.adb (P_Float_Type): New procedure to print the definition of
15177         predefined fpt types.
15178         (P_Mixed_Name): New procedure to print a name using mixed case
15179         (Print_Standard): Use P_Float_Type for printing floating point types
15180         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15181         precision IEEE float.
15182
15183 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15184
15185         * sem_ch3.adb: Minor reformatting.
15186
15187 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15188
15189         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15190         the completion of a generic function, insert the new body rather than
15191         rewriting the original.
15192
15193 2011-08-01  Yannick Moy  <moy@adacore.com>
15194
15195         * sinfo.ads, errout.ads: Typos in comments.
15196
15197 2011-08-01  Robert Dewar  <dewar@adacore.com>
15198
15199         * par-endh.adb: Minor reformatting.
15200
15201 2011-08-01  Robert Dewar  <dewar@adacore.com>
15202
15203         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15204         (Pre_Post_Aspects): New subtype.
15205         * par-ch12.adb (P_Generic): New syntax for aspects in packages
15206         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15207         * par-ch7.adb (P_Package): Remove Decl parameter
15208         (P_Package): Handle new syntax for aspects (before IS)
15209         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15210         new aspect syntax
15211         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15212         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15213         (P_Package): Remove Decl parameter
15214         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15215         aspects
15216         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15217         specs
15218         * sem_util.ads, sem_util.adb (Static_Boolean): New function
15219         * sinfo.ads: Document new syntax for aspects in packages etc.
15220         * sprint.adb: Handle new syntax of aspects before IS in package
15221
15222 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15223
15224         * atree.ads: Minor reformatting.
15225         * sem_prag.adb: Minor reformatting.
15226
15227 2011-08-01  Robert Dewar  <dewar@adacore.com>
15228
15229         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15230         case expr alternative.
15231
15232 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15233
15234         * sem_ch12.adb: Fix typo.
15235
15236 2011-08-01  Geert Bosch  <bosch@adacore.com>
15237
15238         * sem_prag.adb (Check_No_Link_Name): New procedure.
15239         (Process_Import_Or_Interface): Use Check_No_Link_Name.
15240         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15241         instead of Standard_Long_Long_Float_Size global. Preparation for
15242         eventual removal of per type constants.
15243         * exp_util.ads (Get_Stream_Size): New function returning the stream
15244         size value of subtype E.
15245         * exp_util.adb (Get_Stream_Size): Implement new function.
15246         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15247         function.
15248         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15249         * einfo.adb:
15250         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15251
15252 2011-08-01  Geert Bosch  <bosch@adacore.com>
15253
15254         * cstand.adb: Fix comments.
15255         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15256         count of arguments.
15257
15258 2011-08-01  Robert Dewar  <dewar@adacore.com>
15259
15260         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15261
15262 2011-08-01  Geert Bosch  <bosch@adacore.com>
15263
15264         * atree.ads: Fix comment.
15265
15266 2011-08-01  Robert Dewar  <dewar@adacore.com>
15267
15268         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15269         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15270         * par.adb: Add with for Namet.Sp.
15271         * par-tchk.adb: Minor reformatting.
15272
15273 2011-08-01  Vincent Celier  <celier@adacore.com>
15274
15275         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15276         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15277         of the init procedure of a SAL.
15278         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15279         New procedure.
15280
15281 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15282
15283         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15284         reformatting.
15285
15286 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15287
15288         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15289
15290 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15291
15292         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15293         conformant with its spec (return True only for types that have
15294         an overriding Initialize primitive operation that prevents them from
15295         having preelaborable initialization).
15296         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15297         initialization for controlled types in Ada 2005 or later mode.
15298
15299 2011-08-01  Robert Dewar  <dewar@adacore.com>
15300
15301         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15302         Postcondition.
15303         (Same_Aspect): New function.
15304         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15305         Type_Invariant, Precondition, Postcondition.
15306         * snames.ads-tmpl: Add Name_Type_Invariant.
15307
15308 2011-08-01  Robert Dewar  <dewar@adacore.com>
15309
15310         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15311         here.
15312         (Freeze_All_Ent): Fix error in handling inherited aspects.
15313         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15314         already analyzed, but don't skip entire processing of a declaration,
15315         that's wrong in some cases of declarations being rewritten.
15316         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15317         Don't delay for integer, string literals
15318         Treat predicates in usual manner for delay, remove special case code,
15319         not needed.
15320         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15321         (Build_Predicate_Function): Update saved expression in aspect
15322         (Build_Invariant_Procedure): Update saved expression in aspect
15323         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15324         of replacement of discriminant references if the reference is simple.
15325
15326 2011-08-01  Robert Dewar  <dewar@adacore.com>
15327
15328         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15329         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15330         Static_Predicate and Dynamic_Predicate.
15331         (Build_Predicate_Function): Add processing for Static_Predicate
15332         and Dynamic_Predicate.
15333         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15334         (From_Static_Predicate): New flag
15335         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15336
15337 2011-08-01  Robert Dewar  <dewar@adacore.com>
15338
15339         * usage.adb: Documentation cleanup for Ada version modes in usage.
15340         * expander.adb: Minor reformatting.
15341
15342 2011-08-01  Robert Dewar  <dewar@adacore.com>
15343
15344         * atree.ads: Minor comment fix.
15345         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15346         a-witeio.ads, sem_prag.adb: Minor reformatting.
15347
15348 2011-08-01  Doug Rupp  <rupp@adacore.com>
15349
15350         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15351         pointers. Use descrip.h header file for convenience. Add some
15352         comments.
15353
15354 2011-08-01  Robert Dewar  <dewar@adacore.com>
15355
15356         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15357         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15358         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15359         New procedure.
15360         (Check_Aspect_At_End_Of_Declarations): New procedure
15361         (Analye_Aspect_Specification): Minor changes for above procedures
15362         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15363         specification node as well.
15364
15365 2011-08-01  Pascal Obry  <obry@adacore.com>
15366
15367         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15368         Windows files. Use GetFilesAttributes() in this case to check for file
15369         existence instead of returning with an error code.
15370
15371 2011-08-01  Vincent Celier  <celier@adacore.com>
15372
15373         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15374         High is above Source length.
15375
15376 2011-08-01  Robert Dewar  <dewar@adacore.com>
15377
15378         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15379
15380 2011-08-01  Robert Dewar  <dewar@adacore.com>
15381
15382         * aspects.ads (Boolean_Aspects): New subtype.
15383         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15384         for derived types in cases where the parent type and derived type have
15385         aspects.
15386         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15387         with aspects when parent type also has aspects.
15388         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15389         boolean expression at this point).
15390         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15391         accordance with final decision on the Ada 2012 feature.
15392         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15393
15394 2011-08-01  Matthew Heaney  <heaney@adacore.com>
15395
15396         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15397
15398 2011-08-01  Pascal Obry  <obry@adacore.com>
15399
15400         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15401         Fix Replace_Slice when High is above current string size.
15402         (Replace_Slice): Fix DL computation when High is above current
15403         string length.
15404
15405 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
15406
15407         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15408
15409 2011-08-01  Matthew Heaney  <heaney@adacore.com>
15410
15411         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15412         of node.
15413
15414 2011-08-01  Pascal Obry  <obry@adacore.com>
15415
15416         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15417         reformatting.
15418
15419 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15420
15421         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15422         access to protected subprograms in generic bodies.
15423         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15424         protected type, indicate that the convention of the subprogram is
15425         Convention_Protected, because it may be used in subsequent declarations
15426         within the protected declaration.
15427
15428 2011-08-01  Vincent Celier  <celier@adacore.com>
15429
15430         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15431         and "final" procedures when the name of the library is "ada", to avoid
15432         duplicate symbols "adainit" and "adafinal" in executables.
15433
15434 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15435
15436         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15437         quantified expression that appears within a postcondition and uses the
15438         Ada2012 'Result attribute.
15439
15440 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15441
15442         * init.c (__gnat_error_handler): Cast reason to int.
15443         (__gnat_install_handler): Explain sa_sigaction use.
15444
15445 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15446
15447         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15448         subprogram has copy-in copy-out parameters, try to promote the mode of
15449         the return type if it is passed in registers.
15450
15451 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15452
15453         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15454         left operand as addressable.
15455
15456 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15457
15458         * gcc-interface/gigi.h (build_function_stub): Remove.
15459         (build_return_expr): Likewise.
15460         (convert_vms_descriptor): Declare.
15461         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15462         (build_function_stub): Move to...
15463         * gcc-interface/utils2.c (build_return_expr): Move to...
15464         * gcc-interface/trans.c (build_function_stub): ...here.
15465         (build_return_expr): ...here.
15466         (Subprogram_Body_to_gnu): Add local variable for language_function.
15467         Disconnect the parameter attributes cache, if any, once done with it.
15468         Call end_subprog_body only after setting the end_locus.
15469         Build the stub associated with the function, if any, at the very end.
15470         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15471         variables and streamline control flow.
15472
15473 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
15474
15475         PR ada/49819
15476         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15477         g-trasym-dwarf.adb.
15478
15479 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15480
15481         PR bootstrap/49794
15482         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15483         Assign to act.sa_sigaction.
15484         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15485         current->return_address to char * before arithmetic.
15486
15487 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15488
15489         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15490         Correct argument types.
15491         Extract code from reason.
15492         (__gnat_install_handler): Assign to act.sa_sigaction.
15493
15494 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
15495
15496         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15497         (GNAT1_OBJS): ...here.
15498
15499 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
15500
15501         PR ada/48711
15502         * g-socthi-mingw.adb (Fill): Fix formatting.
15503
15504         * gcc-interface/gigi.h: Move around comment.
15505
15506 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
15507
15508         PR ada/46350
15509         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15510
15511 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
15512
15513         PR ada/48711
15514         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15515
15516 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
15517
15518         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15519         range comparison if Pmode is SImode.
15520
15521 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
15522             Eric Botcazou  <ebotcazou@adacore.com>
15523
15524         * adadecode.c: Wrap up in extern "C" block.
15525         * adadecode.h: Likewise.
15526         * adaint.c: Likewise.  Remove 'const' keyword.
15527         * adaint.h: Likewise.
15528         * argv.c: Likewise.
15529         * atree.h: Likewise.
15530         * cio.c: Likewise.
15531         * cstreams.c: Likewise.
15532         * env.c: Likewise.
15533         * exit.c: Likewise.
15534         * fe.h: Likewise.
15535         * final.c: Likewise.
15536         * init.c: Likewise.
15537         * initialize.c: Likewise.
15538         * link.c: Likewise.
15539         * namet.h: Likewise.
15540         * nlists.h: Likewise.
15541         * raise.c: Likewise.
15542         * raise.h: Likewise.
15543         * repinfo.h: Likewise.
15544         * seh_init.c: Likewise.
15545         * targext.c: Likewise.
15546         * tracebak.c: Likewise.
15547         * uintp.h: Likewise.
15548         * urealp.h: Likewise.
15549         * xeinfo.adb: Wrap up generated C code in extern "C" block.
15550         * xsinfo.adb: Likewise.
15551         * xsnamest.adb: Likewise.
15552         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15553         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15554         * gcc-interface/misc.c: Likewise.
15555         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15556         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
15557         ada/targext.o here...
15558         (GNAT_ADA_OBJS): ...and not here.
15559         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15560         (GNATBIND_OBJS): Reorder.
15561
15562 2011-07-07  Richard Henderson  <rth@redhat.com>
15563
15564         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15565         dwarf2out_frame_init.
15566
15567 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
15568
15569         * gcc-interface/misc.c (gnat_init): Tweak previous change.
15570
15571 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15572
15573         PR target/39150
15574         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15575
15576 2011-07-06  Richard Guenther  <rguenther@suse.de>
15577
15578         * gcc-interface/misc.c (gnat_init): Merge calls to
15579         build_common_tree_nodes and build_common_tree_nodes_2.
15580         Re-initialize boolean_false_node.
15581
15582 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
15583             Olivier Hainque  <hainque@adacore.com>
15584             Nicolas Setton  <setton@adacore.com>
15585
15586         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15587         the type according to the ARTIFICIAL_P parameter.
15588         (create_type_decl): Likewise.
15589         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15590
15591 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
15592
15593         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15594         (gnatbind): Likewise.
15595
15596 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15597
15598         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15599
15600 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15601
15602         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15603         local variable throughout.  Remove useless call to Base_Type.
15604         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15605         Take it also into account for the volatileness of the field.  Set the
15606         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
15607
15608 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15609
15610         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15611         on a dereference built for a by-ref object if it has an address clause.
15612
15613 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15614
15615         * einfo.ads (Address_Taken): Document use for the second argument of
15616         Asm_Input and Asm_Output attributes.
15617         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15618         argument is an entity name, then set Address_Taken on it.
15619         <Attribute_Asm_Output>: Likewise.
15620         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15621         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15622         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15623         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15624
15625 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
15626
15627         PR middle-end/46500
15628         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15629
15630 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
15631
15632         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15633         (ada/utils.o): Update dependencies.
15634         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15635         ../../../libcpp/libcpp.a.
15636         * gcc-interface/utils.c: Include common/common-target.h.
15637         (process_attributes): Use targetm_common.have_named_sections.
15638
15639 2011-06-07  Richard Guenther  <rguenther@suse.de>
15640
15641         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15642         set_sizetype.
15643
15644 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15645
15646         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15647         TREE_THIS_NOTRAP flag.
15648
15649 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15650
15651         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15652         Fix thinko.
15653
15654 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15655
15656         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15657         constants whose full view has discriminants specially.
15658
15659 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15660
15661         * gcc-interface/utils.c: Include diagnostic.h.
15662         (gnat_write_global_declarations): Output debug information for all
15663         global type declarations before finalizing the compilation unit.
15664         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15665
15666 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
15667
15668         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15669
15670 2011-05-25  Kai Tietz  <ktietz@redhat.com>
15671
15672         * adaint.c (__gnat_to_canonical_file_list_next): Use array
15673         initialization instead of const/none-const pointer assignment.
15674
15675 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
15676
15677         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15678         $(EXTRA_GNAT1_OBJS).
15679         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15680         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15681         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15682         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15683         libcommon-target.a instead of prefix.o.
15684
15685 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
15686
15687         PR ada/49097
15688         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15689
15690 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
15691
15692         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15693         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15694         instead of version.o.
15695
15696 2011-05-18  Kai Tietz  <ktietz@redhat.com>
15697
15698         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15699         boolean_false_node instead of integer_zero_node.
15700         (convert_with_check): Likewise.
15701         * gcc-interface/decl.c (choices_to_gnu): Likewise.
15702
15703 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
15704
15705         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15706         type of the parameter is an unconstrained array, convert the actual to
15707         the type of the formal in the In Out and Out cases as well.
15708
15709 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
15710
15711         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15712         call build_function_type_array or build_varargs_function_type_array
15713         instead.
15714         (create_subprog_type): Don't call build_function_type; call
15715         build_function_type_vec instead.
15716
15717 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
15718
15719         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15720         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15721         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15722
15723 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
15724
15725         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15726
15727         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15728         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15729
15730 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
15731
15732         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15733
15734 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
15735
15736         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15737         instead of accessing TYPE_ARG_TYPES directly.
15738         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15739
15740 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
15741
15742         PR ada/48844
15743         * gcc-interface/gigi.h (get_variant_part): Declare.
15744         * gcc-interface/decl.c (get_variant_part): Make global.
15745         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15746         types have the same constant size, are record types and T1 has a
15747         variant part while T2 doesn't.
15748
15749 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
15750
15751         * gcc-interface/utils.c (begin_subprog_body): Do not call
15752         get_pending_sizes.
15753         (end_subprog_body): Likewise.
15754
15755 2011-05-04  Richard Guenther  <rguenther@suse.de>
15756
15757         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15758         int_const_binop.
15759         (pos_to_constructor): Likewise.
15760
15761 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
15762             Eric Botcazou  <ebotcazou@adacore.com>
15763
15764         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15765         of build_function_type.  Adjust calls to...
15766         (build_raise_check): ...this.  Do not take a void_tree parameter.
15767         Call build_function_type_list instead of build_function_type.
15768         Fix head comment and swap couple of conditional blocks.
15769
15770 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
15771
15772         * gnatvsn.ads (Library_Version): Bump to 4.7.
15773         (Current_Year): Bump to 2011.
15774
15775 2011-04-29  Michael Matz  <matz@suse.de>
15776
15777         * gcc-interface/misc.c (gnat_handle_option): Set
15778         warn_maybe_uninitialized.
15779
15780 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
15781
15782         * gnat_ugn.texi (Complexity Metrics Control): Update link to
15783         the Watson/McCabe paper.
15784
15785 2011-04-23  Jim Meyering  <meyering@redhat.com>
15786
15787         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15788
15789 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
15790
15791         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15792         onto the new type.
15793
15794 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
15795
15796         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15797         parameter.
15798         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
15799         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15800         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15801         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15802         <all>: Do not set flags on the reused DECL node coming from an alias.
15803         Set DECL_IGNORED_P on the DECL node built for subprograms if they
15804         don't need debug info here...
15805         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15806         (gigi): Adjust calls to create_subprog_decl.
15807         (build_raise_check): Likewise.
15808         (establish_gnat_vms_condition_handler): Likewise.
15809         (Compilation_Unit_to_gnu): Likewise.
15810         (gnat_to_gnu): Likewise.
15811
15812 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
15813
15814         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15815         (NO_REORDER_ADAFLAGS): New variable.
15816         (EXTRA_GNATTOOLS): Always define.
15817         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15818         Clean up and adjust list of files compiled with special options.
15819         * gcc-interface/Make-lang.in: Likewise.
15820         (ada/decl.o): Cosmetical change.
15821         (ada/misc.o): Remove dependency on $(PLUGIN_H).
15822
15823 2011-04-20  Jim Meyering  <meyering@redhat.com>
15824
15825         * initialize.c (__gnat_initialize): Remove useless if-before-free.
15826
15827 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
15828
15829         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15830         $(CFLAGS) on the link line.
15831
15832 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
15833
15834         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15835         padded type built for the return type if it is unconstrained.
15836
15837 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
15838
15839         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15840
15841 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
15842
15843         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15844         before calling TREE_CHAIN.
15845         * gcc-interface/misc.c (gnat_init_ts): New function.
15846         (LANG_HOOKS_INIT_TS): Define.
15847
15848 2011-04-12  Martin Jambor  <mjambor@suse.cz>
15849
15850         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15851         instead of cgraph_node.
15852
15853 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
15854
15855         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15856         alignment on fields of the RETURN type built for the Copy-In Copy-Out
15857         mechanism.
15858
15859 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
15860
15861         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15862         of aggregate types that contain a placeholder.
15863
15864 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
15865
15866         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15867         TYPE_ARG_TYPES.
15868         (handle_type_generic_attribute): Likewise.
15869
15870 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
15871
15872         PR ada/47163
15873         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15874
15875 2011-04-04  Kai Tietz  <ktietz@redhat.com>
15876
15877         PR ada/47163
15878         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15879         to flag value.
15880
15881 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15882
15883         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15884         type case, do not strip a padding type around the array type.
15885
15886 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15887
15888         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15889         types.
15890
15891 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15892
15893         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15894         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
15895         code for -feliminate-unused-debug-types.
15896         (gnat_post_options): Likewise.
15897
15898 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15899
15900         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15901         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15902         distinct copy.
15903
15904 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15905
15906         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15907         DECL_ARTIFICIAL flag on enumeration types.
15908
15909 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15910
15911         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15912         fat pointer types artificial unconditionally.
15913         <E_Array_Subtype>: Attach the base array type as a parallel type if it
15914         isn't artificial.
15915
15916 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15917
15918         * gcc-interface/gigi.h (get_dummy_type): Declare.
15919         (build_dummy_unc_pointer_types): Likewise.
15920         (finish_fat_pointer_type): Likewise.
15921         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15922         fat pointer type has been built, complete it in place.
15923         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15924         and thin pointers.  Remove useless variable.
15925         (finish_fat_pointer_type): Make global and move to...
15926         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15927         (get_dummy_type): New function.
15928         (build_dummy_unc_pointer_types): Likewise.
15929         (gnat_pushdecl): Propage the name to the anonymous variants only.
15930         (update_pointer_to): Only adjust the pointer types in the unconstrained
15931         array case.
15932
15933 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15934
15935         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15936         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15937         if this is a Taft amendment type and the full declaration is available.
15938         * gcc-interface/trans.c (process_type): Likewise.
15939         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15940         (process_freeze_entity): Likewise.
15941         * gcc-interface/utils.c (dummy_global): New static variable.
15942         (gnat_write_global_declarations): If there are types declared as used
15943         at the global level, insert them in the global hash table.
15944
15945 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15946
15947         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15948         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15949         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15950         copy.
15951         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
15952         flag of the type accordingly.
15953         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15954
15955 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15956
15957         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15958         finalizing types when updating the pointers to the designated type.
15959         <all>: Finalize the deferred types even if we didn't defer processing
15960         of incomplete types in this invocation.
15961
15962 2011-04-01  Olivier Hainque  <hainque@adacore.com>
15963             Nicolas Setton  <setton@adacore.com>
15964             Eric Botcazou  <ebotcazou@adacore.com>
15965
15966         * gcc-interface/misc.c (gnat_descriptive_type): New function.
15967         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15968
15969 2011-03-28  Kai Tietz  <ktietz@redhat.com>
15970
15971         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
15972         Windows targets.
15973         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15974         * system-mingw.ads (System): Change ZCX_By_Default default to True.
15975
15976         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
15977
15978 2011-03-28  Tristan Gingold  <gingold@adacore.com>
15979
15980         PR ada/44431
15981         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15982         Use ada output of gnatbind.
15983         (ada/b_gnatb.adb): Ditto.
15984         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15985         (ada.mostlyclean, ada.stage1)
15986         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15987         (ada.stagefeedback): Adjust.
15988         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
15989         Use ada output of gnatbind.
15990         (b_gnatm.adb): Ditto.
15991         (b_gnatl.o, b_gnatm.o): New rules.
15992
15993 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
15994
15995         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15996         for the padded type built to support a specified size or alignment.
15997
15998 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
15999
16000         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
16001         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16002         unconditionally to the end of the unit when the designated type is
16003         limited_with'ed.
16004         <all>: Rename local variable.  Attempt to un-defer types only and do it
16005         for limited_with'ed types as well.
16006         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
16007         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
16008         consistently and remove redundant call to finalize_from_with_types.
16009
16010 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
16011
16012         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
16013         subprograms without a previous spec declared in the same unit.
16014         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
16015         subprograms at the end of the unit instead of at the beginning.
16016         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
16017         isn't public for the special handling of non-inline functions nested
16018         inside inline external functions.
16019
16020 2011-03-25  Jeff Law  <law@redhat.com>
16021
16022         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
16023
16024 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
16025
16026         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
16027         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
16028         to compute Set_Size_Depends_On_Discriminant.
16029         (Layout_Type): Call it on array types in back-end layout mode.
16030         * sem_util.adb (Requires_Transient_Scope): Return true for array
16031         types only if the size depends on the value of discriminants.
16032         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
16033         type if the RHS is a call to a function that returns an unconstrained
16034         type with default discriminant.
16035
16036 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
16037
16038         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
16039         non-conversion to the nominal result type at the end.
16040
16041 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16042
16043         * gcc-interface/trans.c (create_temporary): New function taken from...
16044         (create_init_temporary): ...here.  Call it.
16045         (call_to_gnu): Create the temporary for the return value early, if any.
16046         Create it for a function with copy-in/copy-out parameters if there is
16047         no target; in other cases of copy-in/copy-out, use another temporary.
16048         Push the new binding level lazily.  Add and rename local variables.
16049
16050 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16051
16052         * gcc-interface/decl.c (validate_size): Improve comments and tweak
16053         error message.
16054         (set_rm_size): Likewise.
16055
16056 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16057
16058         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16059         for the padded type built in order to support a specified alignment.
16060         Fix incorrect formatting.
16061
16062 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16063
16064         PR bootstrap/48216
16065         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16066
16067 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16068
16069         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16070         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16071         to the end of the list.  Adjust recursive call.  Rename local variable.
16072         If REORDER is true, reorder components of the record type.
16073         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16074         components_to_record and adjust the parameter list.
16075
16076 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16077
16078         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16079         disabled, use the variable for bounds of loop iteration scheme.
16080
16081 2011-03-21  Kai Tietz  <ktietz@redhat.com>
16082
16083         PR target/12171
16084         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16085
16086 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
16087
16088         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16089         out whether the expression is read-only.  Short-circuit placeholder
16090         case and rename a couple of local variables.
16091
16092 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
16093
16094         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16095         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16096         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16097         (convert): Deal with conversions from a smaller form type specially.
16098
16099 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
16100
16101         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16102         its argument, except for the special -I- switch.
16103
16104 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
16105
16106         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16107         "Ada Issues".
16108
16109 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
16110
16111         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16112
16113 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
16114
16115         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16116         GNAT_FORMAL.
16117         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16118         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
16119         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
16120         Do not generate the check directly, instead instantiate the template
16121         check present in the descriptor.
16122         (make_descriptor_field): Move around.
16123         (build_vms_descriptor32): Build a template check in the POINTER field.
16124         (build_vms_descriptor): Remove useless suffixes.
16125         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16126
16127 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
16128
16129         PR bootstrap/47467
16130         * targext.c: Include target files if IN_RTS is defined.
16131
16132 2011-01-26  Richard Guenther  <rguenther@suse.de>
16133
16134         PR bootstrap/47467
16135         * targext.c: Include config.h.
16136         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16137         dependency.
16138
16139 2011-01-04  Pascal Obry  <obry@adacore.com>
16140             Eric Botcazou  <ebotcazou@adacore.com>
16141
16142         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16143
16144 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16145
16146         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16147         end-of-case on the end label and its associated gotos, if any.
16148
16149 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16150
16151         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16152         expressions of the parameter cache within the statement group of
16153         the CICO mechanism.
16154
16155 2011-01-04  Olivier Hainque  <hainque@adacore.com>
16156             Eric Botcazou  <ebotcazou@adacore.com>
16157
16158         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16159         (set_end_locus_from_node): New function.
16160         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16161         make and the function end_locus.
16162         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16163         for the elaboration subprogram.
16164         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16165         set the end_locus of the expression as well.
16166
16167 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16168
16169         PR ada/47131
16170         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16171         variables that are referenced in exception handlers volatile.
16172
16173
16174 \f
16175 Copyright (C) 2011 Free Software Foundation, Inc.
16176
16177 Copying and distribution of this file, with or without modification,
16178 are permitted in any medium without royalty provided the copyright
16179 notice and this notice are preserved.