OSDN Git Service

392c0b19f8c7f943c16e2d672deb6477c4edc65d
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
2
3         * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
4         Sem_Util.
5         (Expand_Alfa): Alphabetize cases on first choice. Add
6         processing for object renaming declarations, identifiers and
7         expanded names.
8         (Expand_Alfa_N_In): Remove useless return.
9         (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
10         (Expand_Potential_Renaming): New routine.
11         * exp_ch8.adb (Evaluate_Name): Moved to the top level.
12         (Expand_N_Object_Declaration): Alphabetize local variables. Move
13         Evaluate_Name out to the top level.
14         * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
15         * exp_util.adb (Remove_Side_Effects): Add processing for
16         functions with side effects in Alfa mode.
17
18 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
19
20         * gnat_rm.texi: Add entries for
21         restrictions No_Relative_Delay, No_Requeue_Statements and
22         No_Stream_Optimizations.
23
24 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
25
26         * sem_ch4.adb: Set type of entity in prefixed call, for
27         completeness in a generic context.
28
29 2011-11-04  Yannick Moy  <moy@adacore.com>
30
31         * sem_prag.adb: Minor refactoring (renaming of a parameter).
32
33 2011-11-04  Robert Dewar  <dewar@adacore.com>
34
35         * atree.ads: Minor reformatting.
36
37 2011-11-04  Robert Dewar  <dewar@adacore.com>
38
39         * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
40         and -gnatd.e here
41         * exp_ch2.adb (Expand_Entity_Reference): Use
42         Activate_Atomic_Synchronization
43         * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
44         Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
45         Activate_Atomic_Synchronization (Expand_N_Selected_Component):
46         Use Activate_Atomic_Synchronization
47         * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
48         procedure.
49         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
50         N_Selected_Component node
51
52 2011-11-04  Robert Dewar  <dewar@adacore.com>
53
54         * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
55
56 2011-11-04  Yannick Moy  <moy@adacore.com>
57
58         * atree.adb, atree.ads (Set_Original_Node): New set procedure.
59         * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
60         In ASIS mode, no splitting of aspects between conjuncts.
61         (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
62         expressions refer to the original aspect expressions through
63         the Original_Node link. This is used in semantic analysis for
64         ASIS mode, so that the original expression also gets analyzed.
65         * sem_prag.adb (Preanalyze_TC_Args,
66         Check_Precondition_Postcondition,
67         Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
68         generated from a source aspect, also analyze the original aspect
69         expression.
70         (Check_Expr_Is_Static_Expression): New procedure
71         similar to existing procedure Check_Arg_Is_Static_Expression,
72         except called on expression inside pragma.
73
74 2011-11-04  Tristan Gingold  <gingold@adacore.com>
75
76         * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
77         Find_Project.Try_Path_Name.
78         (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
79
80 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
81
82         * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
83
84 2011-11-04  Pascal Obry  <obry@adacore.com>
85
86         * projects.texi: Add short description for qualifiers aggregate
87         and aggregate library.
88
89 2011-11-04  Matthew Heaney  <heaney@adacore.com>
90
91         * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
92         * a-cgaaso.adb: Replaced implementation with instantiation
93         of Generic_Sort.
94         * a-cogeso.ad[sb] This is the new Ada 2012 unit
95         Ada.Containers.Generic_Sort
96
97 2011-11-04  Robert Dewar  <dewar@adacore.com>
98
99         * exp_ch2.adb (Expand_Entity_Reference): Do not set
100         Atomic_Sync_Required for the case of a prefix of an attribute.
101         * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
102         atomic synchronization
103         (Expand_N_Indexed_Component): Ditto.
104         (Expand_B_Selected_Component): Ditto.
105         * sem_prag.adb (Process_Suppress_Unsuppress):
106         Disable/Enable_Atomic_Synchronization can now occur for array
107         types with pragma Atomic_Components.
108         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
109         N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
110
111 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
112
113         * gnat_ugn.texi: Editorial corrections for gnattest section.
114
115 2011-11-04  Robert Dewar  <dewar@adacore.com>
116
117         * sem_prag.adb: Minor reformatting.
118         * gnat_rm.texi: Update documentation for pragma Warnings (Off,
119         "***") usage.
120         * exp_ch2.adb (Expand_Entity_Reference): Only set
121         Atomic_Sync_Required on entities that are variables. Doesn't
122         make any sense on anything else.
123
124 2011-11-04  Robert Dewar  <dewar@adacore.com>
125
126         * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
127         atomic sync to type case.
128         * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
129         apply to types.
130
131 2011-11-04  Robert Dewar  <dewar@adacore.com>
132
133         * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
134         for call vs assign.
135         * gcc-interface/Make-lang.in: Update dependencies.
136
137 2011-11-04  Robert Dewar  <dewar@adacore.com>
138
139         * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
140         compile time.
141
142 2011-11-04  Matthew Heaney  <heaney@adacore.com>
143
144         * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
145         * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
146         a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
147         * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
148         a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
149         a-sulcin.ad[sb]: New files.
150
151 2011-11-04  Geert Bosch  <bosch@adacore.com>
152
153         * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
154         s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
155         i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
156         s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
157         * gcc-interface/Makefile.in: Remove libgnala and related objects.
158
159 2011-11-04  Matthew Heaney  <heaney@adacore.com>
160
161         * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
162         a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
163         a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
164         a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
165         added to package.
166
167 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
168
169         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
170         that the type of the parameters isn't dummy in type_annotate_only mode.
171
172 2011-11-04  Robert Dewar  <dewar@adacore.com>
173
174         * sem_ch12.adb: Minor reformatting
175
176 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
177
178         * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
179         initialize elaboration entities to zero when specs are processed.
180
181 2011-10-28  Iain Sandoe  <iains@gcc.gnu.org>
182             Eric Botcazou  <ebotcazou@adacore.com>
183
184         PR target/50678
185         * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
186         bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
187
188 2011-10-28  Eric Botcazou  <ebotcazou@adacore.com>
189
190         PR ada/50842
191         * gcc-interface/Makefile.in (SYMDEPS): Delete.
192         (LIBICONV): New variable.
193         (LIBICONV_DEP): Likewise.
194         (LIBS): Add $(LIBICONV).
195         (LIBDEPS): Add $(LIBICONV_DEP).
196         (EXTRA_GNATTOOLS_OBJS): Merge into...
197         (TOOLS_LIBS): ...this.  Add $(LIBICONV).
198
199 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
200
201         * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
202         variable.  Always create the elaboration variable, if any, as constant.
203
204 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
205
206         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
207         make a packable type for fields of union types as well.
208         <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
209         (gnat_to_gnu_component_type): Try to make a packable type for fields
210         of union types as well.
211         (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
212         (maybe_pad_type): Try to make a packable type for fields of union types
213         as well.
214         (gnat_to_gnu_field): Likewise.
215         (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
216         (set_rm_size): Likewise.
217         (rm_size): Likewise.
218         * gcc-interface/misc.c (gnat_type_max_size): Likewise.
219         * gcc-interface/trans.c (add_decl_expr): Likewise.
220         * gcc-interface/utils.c (finish_record_type): Likewise.
221         * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
222
223 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
224
225         * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
226         declared as atomic.  Move around conditionally executed code.
227
228 2011-10-24  Robert Dewar  <dewar@adacore.com>
229
230         * sem.adb (Initialize): Fix bug that blew up if called a second time.
231
232 2011-10-24  Robert Dewar  <dewar@adacore.com>
233
234         * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
235         tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
236
237 2011-10-24  Robert Dewar  <dewar@adacore.com>
238
239         * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
240         name in error msg.
241
242 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
243
244         * gnat_rm.texi: Add an entry for restriction No_Finalization.
245
246 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
247
248         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
249         current instance is within the one that contains the generic,
250         the freeze node for the current one must appear in the current
251         declarative part. Ditto if the current instance is within another
252         package instance. In both of these cases the freeze node of the
253         previous instance is not relevant.
254
255 2011-10-24  Gary Dismukes  <dismukes@adacore.com>
256
257         * switch-m.adb (Normalize_Compiler_Switches): Add recognition
258         of AAMP-specific switches -univ and -aamp_target.
259
260 2011-10-24  Robert Dewar  <dewar@adacore.com>
261
262         * a-tienau.adb (Put): Deal properly with limited line length.
263
264 2011-10-24  Robert Dewar  <dewar@adacore.com>
265
266         * sem_warn.adb, sem_ch12.adb: Minor reformatting.
267
268 2011-10-24  Tristan Gingold  <gingold@adacore.com>
269
270         * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
271         on AIX.
272
273 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
274
275         * sem_ch12.adb (Earlier): make available globally. If both
276         nodes have the same sloc, the freeze node that does not come
277         from source is the later one.
278         (True_Parent): Make available globally.
279         (Previous_Instance): Subsidiary of
280         Insert_Freeze_Node_For_Instance, to check whether the generic
281         parent of the current instance is declared within a previous
282         instance in the same unit or declarative  part, in which case the
283         freeze nodes of both instances must appear in order to prevent
284         elaboration problems in gigi.
285         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
286         freeze point, and the freeze node of a preceding instantiation
287         must be inserted before it.
288
289 2011-10-24  Robert Dewar  <dewar@adacore.com>
290
291         * checks.ads, checks.adb: Add handling of Synchronization_Check
292         * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
293         atomic sync).
294         * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
295         flag Minor code reorganization.
296         * opt.ads (Warn_On_Atomic_Synchronization): New switch.
297         * par-prag.adb: Add dummy entries for pragma
298         Disable/Enable_Atomic_Synchronization.
299         * sem_prag.adb (Process_Suppress_Unsuppress): Handle
300         case of Atomic_Synchronization specially (not suppressed
301         by All_Checks, cannot be set from Source).
302         (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
303         * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
304         * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
305         entry for pragma Disable/Enable_Atomic_Synchronization
306         * switch-c.adb: The -gnatp switch does not disable
307         Atomic_Synchronization Add -gnatep switch to disable
308         Atomic_Synchronization.
309         * types.ads: Add entry for Synchronization_Check
310         * usage.adb: Add line for -gnated switch
311         * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
312
313 2011-10-24  Geert Bosch  <bosch@adacore.com>
314
315         * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
316         at Integer'First.
317
318 2011-10-24  Robert Dewar  <dewar@adacore.com>
319
320         * sem_ch12.adb, s-gearop.adb: Minor reformatting.
321
322 2011-10-24  Robert Dewar  <dewar@adacore.com>
323
324         * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
325         * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
326
327 2011-10-24  Emmanuel Briot  <briot@adacore.com>
328
329         * prj-proc.adb (Process_Expression_Variable_Decl): No special
330         handling for Project_Path unless it is an attribute.
331
332 2011-10-24  Javier Miranda  <miranda@adacore.com>
333
334         * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
335         (Install_Hidden_Primitives): New subprogram.
336         (Restore_Hidden_Primitives): New subprogram.
337         (Analyze_Formal_Package_Declaration,
338         Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
339         Invoke Check_Hidden_Primitives after every call to
340         Analyze_Associations, and invoke Restore_Hidden_Primitives to
341         restore their visibility after processing the instantiation.
342         (Instantiate_Package_Body): Install visible primitives before
343         analyzing the instantiation and uninstall them to restore their
344         visibility when the instantiation has been analyzed.
345         * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
346         (Remove_Suffix): New subprogram
347         * sem_ch3.adb (Derive_Subprogram): When handling
348         a derived subprogram for the instantiation of a formal derived
349         tagged type, inherit the dispatching attributes from the actual
350         subprogram (not from the parent type).
351
352 2011-10-24  Vasiliy Fofanov  <fofanov@adacore.com>
353
354         * gnat_ugn.texi: Document explicit use of XDECGNAT library.
355
356 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
357
358         * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
359         update its uses.
360         (Build_Discriminant_Assignments): Add local variable D_Loc and update
361         its uses.
362         (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
363         Var_Loc and update their uses.
364         (Build_Record_Init_Proc): Code reformatting.
365         (Increment_Counter): Add formal parameter Loc.
366         (Make_Counter): Add formal parameter Loc.
367
368 2011-10-24  Eric Botcazou  <ebotcazou@adacore.com>
369
370         * sem_disp.adb (Covers_Some_Interface): Fix typo.
371
372 2011-10-24  Matthew Heaney  <heaney@adacore.com>
373
374         * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
375         of predicate.
376
377 2011-10-24  Yannick Moy  <moy@adacore.com>
378
379         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
380         Translate arguments in positional notation into pragma argument
381         association arguments for the generated pragma.
382
383 2011-10-24  Arnaud Charlet  <charlet@adacore.com>
384
385         * exp_ch5.adb: Fix minor typo.
386
387 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
388
389         * sem_ch3.adb (Is_Visible_Component): Refine predicate for
390         the case of a component reference in an instance body, when the
391         enclosing type is private.
392
393 2011-10-24  Sergey Rybin  <rybin@adacore.com frybin>
394
395         * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
396         driver for getting the project support into gnatelim section.
397
398 2011-10-24  Robert Dewar  <dewar@adacore.com>
399
400         * gnat_rm.texi: Minor correction to documentation on address clause.
401
402 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
403
404         * s-finmas.adb (Attach): Synchronize and call the unprotected version.
405         (Attach_Unprotected): New routine.
406         (Delete_Finalize_Address): Removed.
407         (Delete_Finalize_Address_Unprotected): New routine.
408         (Detach): Synchronize and call the unprotected version.
409         (Detach_Unprotected): Remove locking.
410         (Finalize): Add various comment on synchronization. Lock the critical
411         region and call the unprotected versions of routines.
412         (Finalize_Address): Removed.
413         (Finalize_Address_Unprotected): New routine.
414         (Set_Finalize_Address): Synchronize and call
415         the unprotected version.
416         (Set_Finalize_Address_Unprotected): New routine.
417         (Set_Heterogeneous_Finalize_Address): Removed.
418         (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
419         (Set_Is_Heterogeneous): Add comment on synchronization and
420         locking.
421         * s-finmas.ads: Flag Finalization_Started is no longer atomic
422         because synchronization uses task locking / unlocking.
423         (Attach): Add comment on usage.
424         (Attach_Unprotected): New routine.
425         (Delete_Finalize_Address): Renamed to
426         Delete_Finalize_Address_Unprotected.
427         (Detach): Add comment on usage.
428         (Detach_Unprotected): New routine.
429         (Finalize_Address): Renamed to Finalize_Address_Unprotected.
430         (Set_Finalize_Address): Add comment on usage.
431         (Set_Finalize_Address_Unprotected): New routine.
432         (Set_Heterogeneous_Finalize_Address): Renamed to
433         Set_Heterogeneous_Finalize_Address_Unprotected.
434         * s-stposu.adb (Allocate_Any_Controlled): Add local variable
435         Allocation_Locked. Add various comments on synchronization. Lock
436         the critical region and call the unprotected version of
437         routines.
438         (Deallocate_Any_Controlled): Add various comments on
439         synchronization. Lock the critical region and call the unprotected
440         version of routines.
441
442 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
443
444         * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
445         are universal and must carry the corresponding type.
446         * sem_eval.adb (Check_Non_Static_Context): If the type of the
447         expression is universal real, as may be the case for a fixed point
448         expression with constant operands in the context of a conversion,
449         there is nothing to check.
450         * s-finmas.adb: Minor reformatting
451
452 2011-10-23  Eric Botcazou  <ebotcazou@adacore.com>
453
454         * gcc-interface/decl.c (create_concat_name): Add explicit cast.
455
456 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
457
458         * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
459         TRACE): Reintroduce.
460         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
461         ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
462
463 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
464
465         * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
466         (unchecked_conversion_nop): Use it.
467         (gnat_to_gnu): Likewise.
468
469 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
470
471         * back_end.adb (Call_Back_End): Pass the maximum logical line number
472         instead of the maximum physical line number to gigi.
473         * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
474
475 2011-10-16  Tom Tromey  <tromey@redhat.com>
476             Dodji Seketeli  <dodji@redhat.com>
477
478         * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
479         public ordinary map interface.
480
481 2011-10-16  Tristan Gingold  <gingold@adacore.com>
482
483         * link.c (_AIX): Add support for GNU ld.
484
485 2011-10-16  Fedor Rybin  <frybin@adacore.com>
486
487         * gnat_ugn.texi: Fixing gnattest example names in the doc.
488         Adding explanation to additional tests usage.
489
490 2011-10-16  Robert Dewar  <dewar@adacore.com>
491
492         * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
493
494 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
495
496         * a-convec.adb: Fix minor inconsistencies.
497
498 2011-10-16  Matthew Heaney  <heaney@adacore.com>
499
500         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
501         Implementation): Specify pragma Implementation_Defined.
502
503 2011-10-15  Nicolas Roche  <roche@adacore.com>
504
505         * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
506         either rtp-smp or ravenscar-cert-rtp runtimes.
507
508 2011-10-15  Bob Duff  <duff@adacore.com>
509
510         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
511         Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
512         is available.
513         (Expand_N_Extended_Return_Statement): Do not create a renaming of the
514         build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
515         available.
516         (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
517         pool only if RE_Root_Storage_Pool_Ptr is available.
518         (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
519         pool actual unless RE_Root_Storage_Pool_Ptr is available.
520         * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
521         formal only if RE_Root_Storage_Pool_Ptr is available.
522
523 2011-10-15  Matthew Heaney  <heaney@adacore.com>
524
525         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
526         type): Specify Priority aspect for protected type.
527
528 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
529
530         * exp_disp.adb (Check_Premature_Freezing): If an untagged type
531         is a generic actual, it is a subtype of a type that was frozen
532         by the instantiation, and even if not marked frozen it does not
533         affect the construction of the dispatch table.
534
535 2011-10-14  Robert Dewar  <dewar@adacore.com>
536
537         * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
538         reformatting.
539         * s-rident.ads: Add missing Compiler_Unit pragma.
540
541 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
542
543         * sem_res.adb: Minor reformatting.
544
545 2011-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
546
547         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
548         Code and comment reformatting. Use BIP_Task_Master
549         when creating a _master.
550         (BIP_Formal_Suffix): Code reformatting. Correct the case for
551         BIP_Task_Master.
552         (Make_Build_In_Place_Call_In_Object_Declaration): Use
553         BIP_Task_Master when creating a reference to the enclosing
554         function's _master formal.
555         (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
556         to the _master.
557         * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
558         (Needs_BIP_Finalization_Master): Alphabetized.
559         * sem_ch6.adb (Create_Extra_Formals): Update the usage of
560         BIP_Task_Master.
561
562 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
563
564         * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
565         reject an aliased keyword on the object declaration of an extended
566         return statement. In older versions of the language indicate
567         that this is illegal in the standard.
568
569 2011-10-14  Pascal Obry  <obry@adacore.com>
570
571         * sem_util.adb, sem_ch4.adb: Minor reformatting.
572
573 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
574
575         * sem_ch13.adb: Recognize properly procedure calls that are
576         transformed into code statements.
577
578 2011-10-14  Vincent Celier  <celier@adacore.com>
579
580         * projects.texi: Minor fix in project example.
581
582 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
583
584         * sem_util.adb: Return objects are aliased if their type is
585         immutably limited as per AI05-0053.
586
587 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
588
589         * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
590         expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
591         Short_Circuit_And_Or expansion code (moved to sem_res).
592         * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
593         "and" and "or" operators as short-circuit "and then" and "or
594         else", when pragma Short_Circuit_And_Or is active.
595
596 2011-10-13  Robert Dewar  <dewar@adacore.com>
597
598         * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
599         sem_ch6.adb, exp_ch3.adb: Minor reformatting.
600
601 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
602
603         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
604
605 2011-10-13  Jerome Guitton  <guitton@adacore.com>
606
607         * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
608
609 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
610
611         * a-convec.ads (Cursor): Minor reformatting.
612         * a-convec.adb (Next): Fix minor inconsistencies.
613         (Previous): Likewise.
614
615 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
616
617         * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
618         New predicate to determine whether some operations on an array
619         type are available when the full view of its component may differ
620         from the view of the point of the array declaration.
621         * sem_ch4.adb (Find_Equality_Types): Use
622         Available_Full_View_Of_Component.
623         * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
624
625 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
626
627         * sem_ch9.adb: Analyze aspects while discriminants of protected
628         type are visible.
629
630 2011-10-13  Geert Bosch  <bosch@adacore.com>
631
632         * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
633         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
634         longer depend on an external library.
635         * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
636         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
637         Update dependencies.
638         * gcc-interface/Make-lang.in: Update dependencies. 
639
640 2011-10-13  Cyrille Comar  <comar@adacore.com>
641
642         * gnat_ugn.texi: Minor editing.
643
644 2011-10-13  Vincent Celier  <celier@adacore.com>
645
646         * projects.texi: Add documentation on packages and attributes
647         that are inherited from a project being extended into the
648         extended project.
649
650 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
651
652         * exp_ch3.adb (Build_Master): Rewritten.
653         (Expand_N_Full_Type_Declaration): Reformat the declarative
654         region. Update the call to Build_Master_Renaming.
655         (Expand_Previous_Access_Type): Rewritten.
656         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
657         Add local constant Result_Subt and update related usage.
658         (Expand_N_Extended_Return_Statement): Add local constant
659         Result_Subt and update related usage.
660         * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
661         new context detection mechanism.
662         (Build_Class_Wide_Master):
663         Use Insert_Action to add the renaming into the tree.
664         (Build_Master_Entity): Rewritten to use the new context detection
665         mechanism.
666         (Build_Master_Renaming): Add formal parameter Ins_Nod
667         and related usage. Use Insert_Action to add the renaming into the
668         tree.
669         (Find_Enclosing_Context): New subsidiary routine. Rather
670         than relying on enclosing scopes, this routine looks at the
671         tree structure to figure out the proper context for a _master
672         or a _chain. This approach eliminates the issues with transient
673         scopes which have not been converted into blocks.
674         * exp_ch9.ads (Build_Master_Entity): Change parameter profile
675         to better reflect the new usage. Update the related comment.
676         (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
677         the comment on usage.
678         * sem_ch3.adb (Access_Definition): Update the calls to
679         Build_Master_Entity and Build_Master_Renaming.
680         * sem_ch6.adb (Create_Extra_Formals): Add local variable
681         Full_Subt. Code reformatting.
682         * sem_util.adb (Is_Iterator): Alphabetized.
683         (Is_LHS): Alphabetized.
684         (Is_Limited_Class_Wide_Type): New routine.
685         * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
686
687 2011-10-13  Geert Bosch  <bosch@adacore.com>
688
689         * a-ngrear.adb (Solve): Make generic and move to
690         System.Generic_Array_Operations.
691         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
692         New generic solvers to  compute a vector resp. matrix Y such
693         that A * Y = X, approximately.
694         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
695         Implement using Forward_Eliminate and Back_Substitute
696         * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
697         on BLAS and LAPACK.
698         * a-ngcoar.ads ("abs"): Fix return type to be real.
699
700 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
701
702         PR ada/50589
703         * s-linux-alpha.ads: Do not "with" Interfaces.C.
704         * s-linux-sparc.ads: Likewise.
705
706 2011-10-13  Geert Bosch  <bosch@adacore.com>
707
708         * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
709         returning a Real.
710         * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
711         and use formal.
712         * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
713         new profile.
714
715 2011-10-13  Geert Bosch  <bosch@adacore.com>
716
717         * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
718         move to System.Generic_Array_Operations.
719
720 2011-10-13  Geert Bosch  <bosch@adacore.com>
721
722         * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
723         * s-gearop.ads (L2_Norm): Change profile to be suitable for
724         Complex_Vector
725         * s-gearop.adb (L2_Norm): Reimplement using direct definition,
726         not inner product
727
728 2011-10-13  Robert Dewar  <dewar@adacore.com>
729
730         * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
731         prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
732         sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
733         par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
734         par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
735         exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
736
737 2011-10-13  Geert Bosch  <bosch@adacore.com>
738
739         * s-gearop.adb: Minor comment additions.
740
741 2011-10-13  Fedor Rybin  <frybin@adacore.com>
742
743         * gnat_ugn.texi: Add gnattest section.
744
745 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
746
747         * freeze.adb: Do not create body of renaming if declaration has
748         errors.
749
750 2011-10-13  Olivier Hainque  <hainque@adacore.com>
751
752         * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
753         further, to the ppc+kernel case only.
754
755 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
756
757         * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
758         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
759         Do not create a pool formal on .NET/JVM.
760         (Expand_N_Extended_Return_Statement): Alphabetize local
761         variables. Do not create a renaming of the build-in-place pool
762         parameter on .NET/JVM.  (Make_Build_In_Place_Call_In_Allocator):
763         Add the user-defined pool only on non-VM targets.
764         (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
765         local variables.  Do not add a pool actual on .NET/JVM.
766         * sem_ch6.adb: Add with and use clause for Targparm.
767         (Create_Extra_Formals): Add build-in-place pool formal only on
768         non-VM targets.
769         * rtsfind.ads: Alphabetize entries.
770
771 2011-10-13  Sergey Rybin  <rybin@adacore.com>
772
773         * gnat_ugn.texi: Minor correction.
774
775 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
776
777         * sem_ch8.adb: Minor error message improvement.
778
779 2011-10-13  Robert Dewar  <dewar@adacore.com>
780
781         * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
782
783 2011-10-13  Gary Dismukes  <dismukes@adacore.com>
784
785         * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
786         of a for loop for an enumeration type with an enumeration rep
787         clause, which involves moving the original loop parameter into
788         a nested block, the loop parameter's entity must be removed from
789         the entity list of the loop scope.
790
791 2011-10-13  Bob Duff  <duff@adacore.com>
792
793         * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
794         that gets passed in the same cases where BIP_Alloc_Form is passed
795         (caller-unknown-size results). BIP_Storage_Pool is used when
796         BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
797         to the user-defined storage pool is passed at the call site,
798         and this pool is used in callee to allocate the result.
799         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
800         version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
801         the additional BIP_Storage_Pool actual.
802         (Expand_N_Extended_Return_Statement): Allocate the function
803         result using the user-defined storage pool, if BIP_Alloc_Form =
804         User_Storage_Pool.
805         * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
806         * exp_ch4.adb: Don't overwrite storage pool set by
807         Expand_N_Extended_Return_Statement.
808         * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
809         for use in build-in-place function calls within allocators
810         where the access type has a user-defined storage pool.
811
812 2011-10-13  Sergey Rybin  <rybin@adacore.com>
813
814         * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
815         literal casing.
816
817 2011-10-13  Nicolas Roche  <roche@adacore.com>
818
819         * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
820         with 'rtp'.
821
822 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
823
824         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
825         account that an unchecked union type can be limited.
826
827 2011-10-13  Olivier Hainque  <hainque@adacore.com>
828
829         * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
830         the use of the signal trampoline for PPC in the sjlj case as well.
831         Add legitimate casts, preventing compile time warnings on the
832         (sighandler *) profile.
833
834 2011-10-13  Yannick Moy  <moy@adacore.com>
835
836         * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
837         in Alfa mode.
838
839 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
840
841         * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
842         expressions are legal limited return values if each one of their
843         dependent expressions are legal.
844
845 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
846
847         * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
848         if the prefix of the call is a qualified expression, rewrite as
849         a code statement.
850         * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
851         code statement is legal if it is a rewriting of a procedure call.
852
853 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
854
855         * exp_aggr.adb (Flatten): If a component association has a box,
856         assume that aggregate is not static.
857         (Safe_Aggregate): If a component association in a non-limited
858         aggregate has a box, assume that it cannot be expanded in place.
859
860 2011-10-13  Vincent Celier  <celier@adacore.com>
861
862         * prj-conf.adb (Get_Or_Create_Configuration_File): Call
863         Process_Project_Tree_Phase_1 with Packages_To_Check.
864         (Process_Project_And_Apply_Config): Ditto
865         * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
866         Remove default for argument Packages_To_Check.
867         * prj-proc.adb (Recursive_Process): New argument
868         Packages_To_Check.
869         (Process): Ditto.
870         (Process_Project_Tree_Phase_1): Ditto.
871         (Recursive_Project.Process_Aggregated_Projects): Call
872         Prj.Part.Parse and Process_Project_Tree_Phase_1 with
873         Packages_To_Check.
874         * prj-proc.ads (Process): New argument Packages_To_Check
875         (Process_Project_Tree_Phase_1): Ditto
876
877 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
878
879         * gcc-interface/Makefile.in: Fix typo.
880
881 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
882
883         * sem_ch12.adb (Analyze_Formal_{Floating_Type,
884         Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
885         Use sloc of defining identifier of farmal type declaration,
886         as sloc of generated internal entity, to prevent misplaced
887         references in ali.
888
889 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
890
891         * sem_intr.adb (Check_Intrinsic_Operator): Check that type
892         is fully defined before checking that it is a numeric type.
893
894 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
895
896         * sem_aggr.adb (Resolve_Record_Aggregate): If a component
897         association for component X has a box, then X is covered in the
898         aggregate even if there is not default value for X in the type
899         declaration, and X has to be default-initialized.
900
901 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
902
903         * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
904         literals as referenced only if reference is in current source unit.
905
906 2011-10-13  Matthew Heaney  <heaney@adacore.com>
907
908         * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
909
910 2011-10-13  Olivier Hainque  <hainque@adacore.com>
911
912         * sigtramp.h: New file.  Prototype and spec of the signal
913         trampoline to be called by an established handler to provide
914         dwarf call frame info before the real signal processing code.
915         * sigtramp-ppcvxw.c: New file.  Implementation of the signal
916         trampoline for ppc-vxworks.
917         * init.c (vxworks section): Use it for ppc.
918
919 2011-10-13  Thomas Quinot  <quinot@adacore.com>
920
921         * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
922         (Check_Future_Identifier): New subprogram,
923         factors duplicated code from Par.Ch2.P_Identifier and
924         Par.Ch3.P_Defining_Identifier.
925
926 2011-10-13  Thomas Quinot  <quinot@adacore.com>
927
928         * s-taprop-posix.adb (Initialize): Always raise Storage_Error
929         if we fail to initialize CV attributes or CV.
930
931 2011-10-13  Thomas Quinot  <quinot@adacore.com>
932
933         * s-tasren.adb (Timed_Selective_Wait, case
934         Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
935         we know abortion is already deferred.
936
937 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
938
939         * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
940         (Build_Master_Renaming (function)): Removed.
941         (Build_Master_Renaming (procedure)): Moved to exp_ch9.
942         (Expand_Full_Type_Declaration): Alphabetize
943         variables. Reformatting of code and comments. Rewrite the
944         section on processing of anonymous access-to-task types in
945         record components.
946         * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
947         (Build_Master_Renaming): Moved to exp_ch9.
948         * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
949         (Build_Master_Entity): Add formal parameter
950         Use_Current. Reformatting of code and comments.
951         (Build_Master_Renaming): Moved from exp_ch3.
952         * exp_ch9.ads (Build_Class_Wide_Master): Moved from
953         exp_ch3. Update comment on usage.
954         (Build_Master_Entity):
955         Add formal parameter Use_Current. Update comment on usage.
956         (Build_Master_Renaming): Moved from exp_ch3.
957         * sem_ch3.adb (Access_Definition): Remove redundant code to
958         create a _master and a renaming.
959
960 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
961
962         * lib-xref.adb: Do no emit reference to overridden operation,
963         if it is internally generated.
964
965 2011-10-13  Vincent Celier  <celier@adacore.com>
966
967         * bindgen.adb: Remove any processing related to g-trasym
968         * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
969         * mlib-prj.adb: Remove any processing related to g-trasym.
970
971 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
972
973         * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
974         * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
975         (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
976         (ADA_FLAGS_TO_PASS): Likewise.
977         (COMMON_FLAGS_TO_PASS): New.
978         (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
979         native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
980         (gnatlib): Use COMMON_FLAGS_TO_PASS.
981         (ada.install-common): Likewise.
982         (install-gnatlib): Likewise.
983         (install-gnatlib-obj): Likewise.
984         (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
985         (gnat-cross): Delete.
986         (gnatboot): Likewise.
987         (gnatboot2): Likewise.
988         (gnatboot3): Likewise.
989         (gnatstage1): Likewise.
990         (gnatstage2): Likewise.
991         * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
992         (MOST_ADAFLAGS): Likewise.
993         (LOOSE_CFLAGS): Likewise.
994         (gnat-cross): Likewise.
995         (GNATLIBFLAGS): Add -W -Wall.
996         (GNATLIBCFLAGS_FOR_C): Likewise.
997         * gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
998         * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
999
1000 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
1001
1002         * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
1003         (push_range_check_info): Likewise.
1004         (gnat_to_gnu) <N_Code_Statement>: Likewise.
1005         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
1006         (gnat_invariant_expr): Likewise.
1007         * gcc-interface/utils.c (compute_related_constant): Likewise.
1008         (max_size): Fix handling of SAVE_EXPR.
1009         (remove_conversions): Fix formatting.
1010
1011 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
1012
1013         * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
1014         (DECL_INDUCTION_VAR): New macro.
1015         (SET_DECL_INDUCTION_VAR): Likewise.
1016         * gcc-interface/gigi.h (convert_to_index_type): Declare.
1017         (gnat_invariant_expr): Likewise.
1018         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
1019         parameter, set DECL_LOOP_PARM_P on it.
1020         * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
1021         is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
1022         * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
1023         (struct range_check_info_d): New type.
1024         (struct loop_info_d): Likewise.
1025         (gnu_loop_stack): New stack.
1026         (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
1027         built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
1028         is set, do not test DECL_RENAMED_OBJECT.
1029         (push_range_check_info): New function.
1030         (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
1031         the label.  Reference the label and the iteration variable from it.
1032         Build the special induction variable in the unsigned version of the
1033         size type, if it is larger than the base type.  And attach it to the
1034         iteration variable if the latter isn't by-ref.  In the iteration scheme
1035         case, initialize the invariant conditions in front of the loop if
1036         deemed profitable.  Use gnu_loop_stack.
1037         (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
1038         <N_Raise_Constraint_Error>: Always process the reason.  In the range
1039         check and related cases, and if loop unswitching is enabled, compute
1040         invariant conditions and push this information onto the stack.
1041         Do not translate again the condition if it has been already translated.
1042         * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
1043         DECL_LOOP_PARM_P isn't set.
1044         (convert_to_index_type): New function.
1045         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
1046         to convert the index from the base index type to sizetype.
1047         (gnat_invariant_expr): New function.
1048
1049 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1050
1051         * gcc-interface/utils.c (def_builtin_1): Delete old interface with
1052         two parallel arrays to hold standard builtin declarations, and
1053         replace it with a function based interface that can support
1054         creating builtins on the fly in the future.
1055         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
1056         (gnat_to_gnu): Ditto.
1057
1058 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
1059
1060         PR lto/50492
1061         * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
1062         * gcc-interface/utils.c (global_context): New variable.
1063         (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
1064         that are either public external or at top level.  Use "No" macro.
1065         (end_subprog_body): Call decl_function_context.
1066         (rest_of_subprog_body_compilation): Likewise.
1067
1068 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
1069
1070         * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
1071         (rest_of_subprog_body_compilation): Likewise.
1072         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
1073         test for useless conversions by means of gnat_useless_type_conversion.
1074         * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
1075         (language_function): Add named_ret_val and other_ret_val.
1076         (f_named_ret_val): New macro.
1077         (f_other_ret_val): Likewise.
1078         (gigi): Call rest_of_subprog_body_compilation.
1079         (struct nrv_data): New structure.
1080         (is_nrv_p): New predicate.
1081         (prune_nrv_r): New helper function.
1082         (prune_nrv_in_block): New function.
1083         (finalize_nrv_r): New helper function.
1084         (finalize_nrv): New function.
1085         (return_value_ok_for_nrv_p): New predicate.
1086         (build_return_expr): If optimization is enabled, record candidates for
1087         the Named Return Value optimization.
1088         (build_function_stub): Call rest_of_subprog_body_compilation.
1089         (Subprogram_Body_to_gnu): If optimization is enabled and there are
1090         candidates, finalize the Named Return Value optimization.
1091         Call rest_of_subprog_body_compilation.
1092         (call_to_gnu): At the end, if a return value is needed, simplify the
1093         result before wrapping it up in a COMPOUND_EXPR.
1094         * gcc-interface/utils.c (end_subprog_body): Split into...
1095         (rest_of_subprog_body_compilation): ...this.  New function.
1096         (gnat_useless_type_conversion): Likewise.
1097
1098 2011-10-06  Thomas Quinot  <quinot@adacore.com>
1099
1100         * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
1101         exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
1102         g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
1103         par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
1104         sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1105         sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
1106         s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
1107         * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
1108
1109 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
1110
1111         * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
1112         references.
1113
1114 2011-10-06  Matthew Heaney  <heaney@adacore.com>
1115
1116         * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
1117         (Dequeue_Only_High_Priority): Protected procedure now implemented.
1118
1119 2011-10-06  Vincent Celier  <celier@adacore.com>
1120
1121         * g-trasym.adb: Replace old implementation with the default
1122         implementation that returns list of addresses as "0x...".
1123         * g-trasym.ads: Update the list of platforms with the full
1124         capability.  Indicate that there is a default implementation
1125         for other platforms.
1126         * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
1127         * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
1128         is now a default implementation for all platforms without the full
1129         capability.
1130
1131 2011-10-06  Robert Dewar  <dewar@adacore.com>
1132
1133         * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
1134         a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
1135         a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
1136         reorganization (use conditional expressions).
1137
1138 2011-10-06  Robert Dewar  <dewar@adacore.com>
1139
1140         * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
1141         floating divide by zero.
1142
1143 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
1144
1145         * sem_ch6.adb: Limited interfaces that are not immutably limited
1146         are OK in return statements.
1147
1148 2011-09-30  Iain Sandoe  <iains@gcc.gnu.org>
1149
1150         * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
1151         change to powerpc section.
1152
1153 2011-09-29  Iain Sandoe  <iains@gcc.gnu.org>
1154
1155         * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
1156         across the port.
1157
1158 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1159
1160         * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
1161         a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
1162         a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
1163         indefinite sets.
1164         * a-coorma.ads: Minor reformmating.
1165         * einfo.ads: Improve the comment describing the
1166         Directly_Designated_Type function.
1167         * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
1168         ordered maps.
1169         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1170         dependencies.
1171
1172 2011-09-27  Robert Dewar  <dewar@adacore.com>
1173
1174         * a-comutr.ads: Minor reformatting.
1175
1176 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1177
1178         * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
1179         iterators to multiway trees.
1180
1181 2011-09-27  Yannick Moy  <moy@adacore.com>
1182
1183         * debug.adb (d.D): New option for strict Alfa mode.
1184         * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1185         permissions as strictly as possible.
1186         * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1187         Alfa mode, now, interpret ranges of base types like GNAT does; in
1188         strict mode, simply change the range of the implicit base Itype.
1189         * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1190
1191 2011-09-27  Robert Dewar  <dewar@adacore.com>
1192
1193         * exp_ch9.adb: Minor comment fixes.
1194
1195 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1196
1197         * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1198         trees.
1199
1200 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
1201
1202         * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1203         instead of Directly_Designated_Type in the indirect array case.
1204
1205 2011-09-27  Robert Dewar  <dewar@adacore.com>
1206
1207         * exp_util.adb, exp_aggr.adb: Minor reformatting.
1208
1209 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1210
1211         * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1212         on subtype declarations.
1213         * exp_aggr.adb: Minor comment update.
1214
1215 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
1216
1217         * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1218         test in the N_Explicit_Dereference case.  Fold double logical
1219         negation in the special loop case and conditionalize it on
1220         Variable_Ref being true.
1221
1222 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1223
1224         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1225         single protected object and the selector is a discriminant or an
1226         entry family, this is a non-overloaded candidate interpretation,
1227         and possible primitive operations of the type must not be
1228         examined.
1229
1230 2011-09-27  Arnaud Charlet  <charlet@adacore.com>
1231
1232         * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1233
1234 2011-09-27  Pascal Obry  <obry@adacore.com>
1235
1236         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1237         s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1238         Add dummy definitions for pthread_rwlock_t
1239         and pthread_rwlockattr_t on all POSIX platforms.
1240         * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1241         reference.
1242         (Finalize_Lock): Likewise.
1243         (Write_Lock): Likewise.
1244         (Unlock): Likewise.
1245
1246 2011-09-27  Tristan Gingold  <gingold@adacore.com>
1247
1248         * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1249         windows 64.
1250
1251 2011-09-27  Pascal Obry  <obry@adacore.com>
1252
1253         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1254         s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1255         s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1256         s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1257         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1258         s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1259         s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1260         s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1261         s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1262         s-taprop-posix.adb: Revert previous changes.
1263         (Lock): Now a record containing the two possible lock
1264         (mutex and read/write) defined in OS_Interface.
1265         * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1266         'R' locking policy.
1267         (Initialize_Protection): Likewise.
1268         (Lock): Likewise.
1269         (Lock_Read_Only): Likewise.
1270         (Unlock): Likewise.
1271
1272 2011-09-27  Pascal Obry  <obry@adacore.com>
1273
1274         * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1275         OS_Interface.pthread_rwlock_t.
1276
1277 2011-09-27  Robert Dewar  <dewar@adacore.com>
1278
1279         * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1280         a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1281         sem_ch5.adb, sem_util.adb: Minor reformatting.
1282
1283 2011-09-27  Pascal Obry  <obry@adacore.com>
1284
1285         * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1286         (Finalize_Lock)[RW_Lock]: Likewise.
1287         (Write_Lock)[RW_Lock]: Likewise.
1288         (Unlock)[RW_Lock]: Likewise.
1289         (Read_Lock): Define L as RW_Lock (instead of Lock).
1290         * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1291         routine for r/w lock.
1292         (Finalize_Lock)[RW_Lock]: Likewise.
1293         (Write_Lock)[RW_Lock]: Likewise.
1294         (Unlock)[RW_Lock]: Likewise.
1295         (Read_Lock): Define L as RW_Lock (instead of Lock).
1296
1297         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1298         s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1299         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1300         (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1301         routine for standard lock.
1302         (Finalize_Lock)[RW_Lock]: Likewise.
1303         (Write_Lock)[RW_Lock]: Likewise.
1304         (Unlock)[RW_Lock]: Likewise.
1305         (Read_Lock): Define L as RW_Lock (instead of Lock).
1306         * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1307         in the record definition.
1308         * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1309         lock for 'R' locking policy.
1310         (Initialize_Protection): Likewise.
1311         (Lock): Likewise.
1312         (Lock_Read_Only): Likewise.
1313         (Unlock): Likewise.
1314         * s-taspri-posix.ads (RW_Lock): New type defined as
1315         OS_Interface.pthread_rwlock_t.
1316
1317         * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1318         s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1319         s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1320         s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1321
1322 2011-09-27  Pascal Obry  <obry@adacore.com>
1323
1324         * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1325
1326 2011-09-27  Pascal Obry  <obry@adacore.com>
1327
1328         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1329         s-osinte-hpux.ads, s-osinte-irix.ads,
1330         s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1331         pthread_mutex_t.
1332         (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1333         * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1334         pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1335         pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1336         pthread_rwlock_destroy, pthread_rwlock_rdlock,
1337         pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1338
1339 2011-09-27  Pascal Obry  <obry@adacore.com>
1340
1341         * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1342         (RE_Id): Add RE_Lock_Read_Only.
1343         (RE_Unit_Table): Likewise.
1344         * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1345         to lift restriction on first character. Handle now the
1346         Name_Concurrent_Readers_Locking where policy character is set to
1347         'R'.
1348         * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1349         constant.
1350         * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1351         read only lock for function in protected object.
1352         * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1353         this routine is now used.
1354
1355 2011-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1356
1357         * s-atocou-x86.adb (Decrement): Use %;.
1358         (Increment): Likewise.
1359
1360 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1361
1362         * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1363         dereference of the pointer to the storage area.  Remove useless type
1364         conversions and factor out common code.
1365
1366 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1367
1368         * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1369         variable and use it throughout.
1370         <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1371         <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1372         first step.  Also convert to the unpadded type as a last step.
1373
1374 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1375
1376         * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1377         DECL_CHAIN in comment.
1378         * gcc-interface/trans.c (gigi): Likewise.
1379         (Attribute_to_gnu): Likewise.
1380         (build_function_stub): Likewise.
1381         (gnat_to_gnu): Likewise.
1382         * gcc-interface/utils.c (create_subprog_decl): Likewise.
1383         (convert_vms_descriptor64): Likewise.
1384         (convert_vms_descriptor32): Likewise.
1385
1386 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1387
1388         * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1389         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1390         issues.  Use COMPLETE_TYPE_P in assertion.  Also set TREE_READONLY if
1391         the type of the record is TYPE_READONLY.
1392
1393 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1394             Robert Dewar  <dewar@adacore.com>
1395
1396         * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1397         OUT formal parameter which is of an null-exclusion access subtype.
1398
1399 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1400
1401         * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1402         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1403         (gnat_to_gnu_param): Likewise.
1404         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1405         maybe_unconstrained_array instead of doing the work manually.
1406         (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1407         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1408         is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1409         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1410         (gnat_stabilize_reference): Likewise.
1411
1412 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1413
1414         * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1415         (SET_TYPE_NULL_BOUNDS): Likewise.
1416         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1417         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1418         * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1419         pointer types.
1420         * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1421         check that the initializer is a valid constant expression for use in
1422         initializing a static variable.  Add missing guard.
1423         (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1424         (convert_to_fat_pointer): In the null fat pointer case, build a valid
1425         pointer for the bounds.
1426         * gcc-interface/utils2.c (compare_fat_pointers): New function.
1427         (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1428
1429 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1430
1431         * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1432         * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1433         the by-ref case.  Do not set TREE_READONLY on a renamed object.  Set
1434         TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1435         (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1436         to the indirect case.
1437         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1438         the TREE_THIS_NOTRAP flag.
1439
1440 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1441
1442         * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1443         iteration scheme, always generate the do-while form if optimization
1444         is enabled.  Use more straightforward test at the end.
1445
1446 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1447
1448         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1449         XNEW instead of xmalloc.  Do not build useless pointer type.
1450         <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1451         * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1452         * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1453
1454 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1455
1456         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1457         the alignment if this doesn't prevent BLKmode access to the object.
1458
1459 2011-09-24  Iain Sandoe  <iains@gcc.gnu.org>
1460
1461         * gcc-interface/Makefile.in (darwin): Do not issue the
1462         '-flat_namespace' linker flag during Ada build.
1463         * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1464         default shared library options.
1465
1466 2011-09-19  Alexandre Oliva  <aoliva@redhat.com>
1467
1468         * gcc-interface/decl.c (annotate_value): Look up expression for
1469         insertion in the cache at the end.
1470
1471 2011-09-19  Arnaud Charlet  <charlet@adacore.com>
1472
1473         * gcc-interface/Make-lang.in: Update dependencies.
1474
1475 2011-09-19  Steve Baird  <baird@adacore.com>
1476
1477         * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1478         configuration pragma names so that Is_Configuration_Pragma_Name
1479         will return True for Name_Annotate.  Make corresponding change in
1480         Pragma_Id enumeration type.  This is needed to allow an Annotate
1481         pragma to occur in a configuration pragma file (typically,
1482         a gnat.adc file).
1483         * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1484         * gnat_rm.texi: Note that pragma Annotate may be used as a
1485         configuration pragma.
1486
1487 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
1488
1489         * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1490         a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1491
1492 2011-09-19  Yannick Moy  <moy@adacore.com>
1493
1494         * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1495         for expansion of set membership.
1496         (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1497         * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1498         visible for use in Alfa expansion.
1499         * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1500         variable in Alfa mode.
1501
1502 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1503
1504         * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1505
1506 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1507
1508         * exp_ch9.adb: Minor reformatting.
1509
1510 2011-09-19  Hristian Kirtchev  <kirtchev@adacore.com>
1511
1512         * freeze.adb (Build_Renamed_Body): Generic subprograms
1513         instantiations cannot be poperly inlined by the compiler, do
1514         not set the Body_To_Inline attribute in such cases.
1515         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1516         inlining-related flags from the generic subprogram declaration.
1517
1518 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1519
1520         * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1521         (Build_Stub_Type): Remove, instead copy components from
1522         System.Partition_Interface.RACW_Stub_Type.
1523         (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1524         (Copy_Component_List): New subprogram.
1525
1526 2011-09-19  Yannick Moy  <moy@adacore.com>
1527
1528         * lib-xref.adb (Generate_Reference): Ignore references to
1529         constants in Standard.
1530
1531 2011-09-19  Robert Dewar  <dewar@adacore.com>
1532
1533         * err_vars.ads, errout.ads: Minor reformatting.
1534
1535 2011-09-19  Robert Dewar  <dewar@adacore.com>
1536
1537         * aspects.ads (Impl_Defined_Aspects): New array
1538         * lib-writ.adb (No_Dependences): New name for No_Dependence
1539         * restrict.adb (No_Dependences): New name for No_Dependence
1540         (Check_Restriction_No_Specification_Of_Aspect): New
1541         procedure.
1542         (Set_Restriction_No_Specification_Of_Aspect): New procedure
1543         (Restricted_Profile_Result): New variable
1544         (No_Specification_Of_Aspects): New variable
1545         (No_Specification_Of_Aspect_Warning): New variable
1546         * restrict.ads (No_Dependences): New name for No_Dependence
1547         (Check_Restriction_No_Specification_Of_Aspect): New procedure
1548         (Set_Restriction_No_Specification_Of_Aspect): New procedure
1549         * s-rident.ads: Add restriction
1550         No_Implementation_Aspect_Specifications, this is also added to
1551         the No_Implementation_Extensions profile.
1552         * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1553         No_Implementation_Defined_Aspects
1554         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1555         * sem_prag.adb (Analyze_Aspect_Specifications): Check
1556         No_Implementation_Aspects
1557         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1558         * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1559
1560 2011-09-19  Yannick Moy  <moy@adacore.com>
1561
1562         * lib-xref.adb (Generate_Reference): Take into account multiple
1563         renamings for Alfa refs.
1564
1565 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1566
1567         * g-socthi-mingw.adb: Minor reformatting.
1568
1569 2011-09-19  Yannick Moy  <moy@adacore.com>
1570
1571         * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1572         expansion to False in mode Alfa
1573
1574 2011-09-19  Pascal Obry  <obry@adacore.com>
1575
1576         * mingw32.h: Remove obsolete code needed for old versions
1577         of MingW.
1578
1579 2011-09-19  Robert Dewar  <dewar@adacore.com>
1580
1581         * errout.ads: Minor reformatting.
1582
1583 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
1584
1585         * sem_ch6.adb (Analyze_Expression_Function): When the expression
1586         function is transformed into a declaration and a body, insert
1587         body at the end of the declarative part, to prevent premature
1588         freeze actions, and preserve original specification in the
1589         subprogram declaration.
1590
1591 2011-09-19  Vincent Celier  <celier@adacore.com>
1592
1593         * projects.texi: Minor editing.
1594
1595 2011-09-19  Robert Dewar  <dewar@adacore.com>
1596
1597         * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1598         exp_aggr.adb: Minor reformatting.
1599
1600 2011-09-19  Yannick Moy  <moy@adacore.com>
1601
1602         * lib-xref.adb (Generate_Reference): Change entity referenced
1603         to underlying object if any, or else reference to the HEAP.
1604
1605 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
1606
1607         * gcc-interface/Make-lang.in: Update dependencies.
1608
1609 2011-09-15  Robert Dewar  <dewar@adacore.com>
1610
1611         * tree_io.ads: Minor reformatting.
1612         * a-intnam.ads: Fix bad header.
1613
1614 2011-09-15  Thomas Quinot  <quinot@adacore.com>
1615
1616         * a-exexpr-gcc.adb: Minor reformatting.
1617
1618 2011-09-15  Yannick Moy  <moy@adacore.com>
1619
1620         * sem_ch6.adb: Propagate information that an expression function comes
1621         from source (otherwise references to this entity are not stored).
1622
1623 2011-09-15  Robert Dewar  <dewar@adacore.com>
1624
1625         * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1626         a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1627         a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1628
1629 2011-09-15  Ed Schonberg  <schonberg@adacore.com>
1630
1631         * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1632         if the expression function is not a completion, create a
1633         new specification for the generated declaration, and keep the
1634         original specification in the generated body. Shorter code also
1635         ensures that proper warnings are generated for unused formals
1636         in all cases.
1637
1638 2011-09-15  Sergey Rybin  <rybin@adacore.com>
1639
1640         * tree_io.ads: Update ASIS_Version_Number because of the changes
1641         in the tree structures for expression functions.
1642
1643 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
1644
1645         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1646         s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1647         s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1648         (CLOCK_REALTIME): Fix wrong value on some OSes.
1649         * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1650
1651 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1652
1653         * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1654         to unconstrained array case, deal with each branch of a COND_EXPR.
1655         * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1656         a COND_EXPR in the initializer, if present.
1657
1658 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1659
1660         * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1661         of an addressable type.
1662         * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1663         Deal with those cases for which creating a temporary is mandatory.
1664
1665 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1666
1667         * gcc-interface/trans.c (call_to_gnu): Use local variable.  Make sure
1668         this is a real formal parameter before testing whether it is by ref.
1669
1670 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1671
1672         * gcc-interface/gigi.h (build_call_0_expr): Delete.
1673         (build_call_1_expr): Likewise.
1674         (build_call_2_expr): Likewise.
1675         (build_call_n_expr): New prototype.
1676         * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1677         * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1678         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1679         (Exception_Handler_to_gnu_zcx): Likewise.
1680         (gnat_to_gnu): Likewise.
1681         (build_binary_op_trapv): Likewise.
1682         * gcc-interface/utils2.c (build_call_0_expr): Delete.
1683         (build_call_1_expr): Likewise.
1684         (build_call_2_expr): Likewise.
1685         (build_call_n_expr): New function.
1686         (build_call_raise): Use build_call_n_expr.
1687         (build_call_raise_range): Likewise.
1688         (build_call_raise_column): Likewise.
1689         (build_call_alloc_dealloc_proc): Likewise.
1690         (maybe_wrap_malloc): Likewise.
1691         (maybe_wrap_free): Likewise.
1692
1693 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1694
1695         * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1696         MODIFY_EXPR.
1697         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1698         the result type is null if ENABLE_CHECKING.  Set operation_type at the
1699         end unconditionally if not set in the previous cases.
1700         Use build2 and void_type_node for MODIFY_EXPR.
1701         (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1702
1703 2011-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1704
1705         * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1706         precision when converting to or from an integral type whose precision
1707         is not equal to its size.
1708
1709 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
1710
1711         * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
1712
1713 2011-09-07  Iain Sandoe  <iains@gcc.gnu.org>
1714
1715         * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1716         implementation.
1717         * system-darwin-ppc64.ads: New file.
1718
1719 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1720
1721         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1722         reference to "-lm".
1723
1724 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1725
1726         * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1727         size switches to the link phase for shared libs.
1728
1729 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
1730
1731         * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
1732         LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1733
1734 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1735
1736         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1737         (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1738         gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1739         New targets.
1740         (TOOLS_FLAGS_TO_PASS): New.
1741         (../stamp-tools): Reintroduce, to avoid merge conflicts.
1742
1743 2011-09-06  Robert Dewar  <dewar@adacore.com>
1744
1745         * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1746         name for Is_RM_Defined_Unit. Also several fixes to this unit.
1747
1748 2011-09-06  Robert Dewar  <dewar@adacore.com>
1749
1750         * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1751         * s-rident.ads: New restriction No_Implementation_Units
1752         (this restriction is also part of the profile
1753         No_Implementation_Extensions)
1754         * sem_ch10.adb (Analyze_With_Clause): Add check for
1755         No_Implementation_Units restriction.
1756
1757 2011-09-06  Jerome Guitton  <guitton@adacore.com>
1758
1759         * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1760         on vThreads.
1761
1762 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1763
1764         * s-solita.adb: Minor reformatting.
1765
1766 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1767
1768         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1769         is a rewriting of an expression function does not freeze previous
1770         entities.
1771
1772 2011-09-06  Robert Dewar  <dewar@adacore.com>
1773
1774         * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1775
1776 2011-09-06  Tristan Gingold  <gingold@adacore.com>
1777
1778         * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1779         powerpc-wrs-vxworksae.
1780
1781 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1782
1783         * s-os_lib.ads (Spawn): Minor documentation clarification,
1784         Success is True for a zero exit status.
1785
1786 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1787
1788         * sem_ch5.adb: Add message for common iterator error.
1789
1790 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1791
1792         * exp_ch3.adb (Build_Initialization_Call): If the target is a
1793         selected component discriminated by a current instance, replace
1794         the constraint with a reference to the target object, regardless
1795         of whether the context is an init_proc.
1796
1797 2011-09-06  Robert Dewar  <dewar@adacore.com>
1798
1799         * exp_attr.adb: Descriptor_Size is never static.
1800
1801 2011-09-06  Robert Dewar  <dewar@adacore.com>
1802
1803         * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1804
1805 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1806
1807         * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1808         non-static.
1809
1810 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1811
1812         * sem_res.adb (Resolve): An expression that is the body of an
1813         expression function does not freeze.
1814
1815 2011-09-06  Matthew Heaney  <heaney@adacore.com>
1816
1817         * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1818         a-cuprqu.adb: Changed copyright notice to indicate current
1819         year only.
1820
1821 2011-09-06  Vincent Celier  <celier@adacore.com>
1822
1823         * prj.adb: Minor spelling error fix in comment
1824         * sem_res.adb: Minor reformatting
1825
1826 2011-09-06  Pascal Obry  <obry@adacore.com>
1827
1828         * sysdep.c (winflush_nt): Removed as not needed anymore.
1829         (winflush_95): Likewise.
1830         (winflush_init): Likewise.
1831         (winflush_function): Likewise.
1832         (getc_immediate_common): Remove call to winflush_function.
1833
1834 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1835
1836         * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1837         processing for Descriptor_Size.
1838         * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1839         to account for its broader usage.
1840         * sem_attr.adb (Analyze_Attribute): Change the error detection
1841         circuitry for Descriptor_Size as the attribute is now applicable
1842         to all types.
1843
1844 2011-09-06  Robert Dewar  <dewar@adacore.com>
1845
1846         * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1847
1848 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1849
1850         * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1851         in a parameter association must not set the Referenced flag on
1852         the formal.
1853         * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1854
1855 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1856
1857         * gnat_rm.texi: Add a section on attribute Descriptor_Size
1858
1859 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1860
1861         * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1862         gnatlink-re): Speed up by using -j0.
1863
1864 2011-09-06  Yannick Moy  <moy@adacore.com>
1865
1866         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1867         Set_Corresponding_Aspect when creating pragma from aspect.
1868         (Add_Predicates): Use new field Corresponding_Aspect.
1869         * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1870         name when present, for the purpose of issuing error messages;
1871         remove local procedure Error_Pragma_Arg_Alternate_Name.
1872         * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1873         N_Pragma node.
1874         (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1875         N_Pragma node.
1876
1877 2011-09-06  Robert Dewar  <dewar@adacore.com>
1878
1879         * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1880
1881 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
1882
1883         * exp_ch6.adb (Build_Heap_Allocator): Add new
1884         local variable Desig_Typ. Code and comment reformatting. Add
1885         machinery to ensure that the allocation uses a fat pointer when
1886         the type of the return object is a constrained array and the
1887         function return type is an unconstrained array.
1888
1889 2011-09-06  Vincent Celier  <celier@adacore.com>
1890
1891         * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1892         parameters in subprograms.
1893
1894 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
1895
1896         * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1897
1898 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1899
1900         * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1901         (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1902         subprogram.
1903         (System.Tasking.Primitive_Operations.Specific.Set): If argument
1904         is null, destroy task specific data, to make API consistent with
1905         other platforms, and thus compatible with the shared version
1906         of s-tpoaal.adb.
1907         (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1908         Document the above assumption.
1909
1910 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1911
1912         * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1913         variable for type of return value when return type is
1914         unconstrained and context is an assignment.
1915
1916 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
1917
1918         * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1919         class-wide operation if expansion is not enabled.
1920
1921 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
1922
1923         * checks.adb (Apply_Scalar_Range_Check): Deal with access
1924         type prefix.
1925
1926 2011-09-06  Yannick Moy  <moy@adacore.com>
1927
1928         * sem_ch13.adb (Analyze_Aspect_Specifications, case
1929         Aspect_Invariant): Do not issue error at this point on illegal
1930         pragma placement, as this is checked later on when analyzing
1931         the corresponding pragma.
1932         * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1933         similar to Error_Pragma_Arg, except the source name of the
1934         aspect/pragma to use in warnings may be equal to parameter
1935         Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1936         message to distinguish source name of pragma/aspect, and whether
1937         the illegality resides in the type being public, or being private
1938         without a public declaration
1939
1940 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1941
1942         * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1943         size check (fd_set is implemented differently on that platform).
1944
1945 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1946
1947         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1948         s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1949         s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1950         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1951         (ATCB_Allocation): New subpackage of
1952         System.Tasking.Primitive_Operations, shared across all targets
1953         with full tasking runtime.
1954         (ATCB_Allocation.New_ATCB): Moved there (from target specific
1955         s-taprop bodies).
1956         (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1957         taking care of establishing a local temporary ATCB if the one
1958         being deallocated is Self, to avoid a reference to the freed
1959         ATCB in Abort_Undefer.
1960
1961 2011-09-06  Thomas Quinot  <quinot@adacore.com>
1962
1963         * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1964         terminated, mark it for deallocation upon termination.
1965         (Terminate_Task): Call Free_Task again if the task is marked
1966         for automatic deallocation upon termination.
1967
1968 2011-09-06  Robert Dewar  <dewar@adacore.com>
1969
1970         * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1971         a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1972         a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1973         a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1974         a-intnam-solaris.ads, a-intnam-tru64.ads,
1975         a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1976         cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1977         * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1978         * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1979         * s-rident.ads: Add new restriction No_Implementation_Identifiers
1980         Add new profile No_Implementation_Extensions
1981         * sem_prag.adb: Implement pragma Implementation_Defined Implement
1982         profile No_Implementation_Extensions
1983         * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1984         Check violation of restriction No_Implementation_Identifiers
1985         * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1986         Add entry for Name_No_Implementation_Extensions
1987
1988 2011-09-06  Robert Dewar  <dewar@adacore.com>
1989
1990         * impunit.ads: Minor reformatting.
1991
1992 2011-09-06  Robert Dewar  <dewar@adacore.com>
1993
1994         * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1995
1996 2011-09-06  Pascal Obry  <obry@adacore.com>
1997
1998         * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1999         types.
2000
2001 2011-09-06  Robert Dewar  <dewar@adacore.com>
2002
2003         * g-socket.adb: Minor reformatting
2004
2005 2011-09-06  Javier Miranda  <miranda@adacore.com>
2006
2007         * ali.adb (Scan_ALI): Add missing support to load references of
2008         entities imported from other languages.
2009         * ali.ads (Xref_Record): Adding new fields to store the language and
2010         name of an imported entity.
2011         * lib-xref.adb (Output_Import_Export_Info): Fix typo
2012         in comment.
2013
2014 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2015
2016         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
2017         is allowed on a full type declaration if it is the completion of
2018         a private declarations.
2019         * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
2020         aspect is allowed on a full type declaration in the private part
2021         of a package.
2022
2023 2011-09-06  Robert Dewar  <dewar@adacore.com>
2024
2025         * sem_ch8.ads: Minor reformatting
2026
2027 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2028
2029         * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
2030         Guard against socket values that are not in [0;FD_SETSIZE[
2031
2032 2011-09-06  Robert Dewar  <dewar@adacore.com>
2033
2034         * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
2035         reformatting.
2036
2037 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2038
2039         * s-linux-alpha.ads: Minor reformatting
2040         * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
2041         Use sizeof instead of corresponding C defines in s-oscons template.
2042
2043 2011-09-06  Vadim Godunko  <godunko@adacore.com>
2044
2045         * a-convec.ads, a-iteint.ads: Minor reformatting.
2046
2047 2011-09-06  Vincent Celier  <celier@adacore.com>
2048
2049         * projects.texi: Add menus and @node lines.
2050
2051 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2052
2053         * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
2054         where the return type is an unconstrained array and the context
2055         is an assignment. Optimize the case when the target of the
2056         assignment is a selected component.
2057
2058 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2059
2060         * s-solita.adb: Update comments.
2061
2062 2011-09-06  Pascal Obry  <obry@adacore.com>
2063
2064         * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
2065         s-linux-sparc.ads: Remove hard coded and now wrong definitions.
2066         * s-oscons-tmplt.c: Add support for generating pthread related
2067         types size on GNU/Linux as done for Darwin.
2068         * s-osinte-linux.ads: Use s-oscons to define the pthread types.
2069
2070 2011-09-06  Robert Dewar  <dewar@adacore.com>
2071
2072         * exp_ch6.adb: Fix minor typo.
2073
2074 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2075
2076         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2077         (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
2078         (Double_Size_Of): Alphabetized. Update the comment on usage.
2079         (Make_Finalize_Address_Stmts): Update comments and reformat code.
2080         (Nearest_Multiple_Rounded_Up): New routine.
2081         (Size_Of): Update comment on usage. The generated expression now
2082         accounts for alignment gaps by rounding the size of the type to the
2083         nearest multiple rounded up of the type's alignment.
2084
2085 2011-09-06  Robert Dewar  <dewar@adacore.com>
2086
2087         * exp_ch7.adb, g-comlin.adb: Minor reformatting.
2088
2089 2011-09-06  Steve Baird  <baird@adacore.com>
2090
2091         * exp_ch4.adb (Expand_Allocator_Expression): Look through
2092         derived subprograms in checking for presence of an
2093         Extra_Accessibility_Of_Result formal parameter.
2094         * exp_ch6.adb (Expand_Call): Look through derived subprograms in
2095         checking for presence of an Extra_Accessibility_Of_Result formal
2096         parameter.
2097         (Expand_Call.Add_Actual_Parameter): Fix a bug in the
2098         case where the Parameter_Associatiations attribute is already set,
2099         but set to an empty list.
2100         (Needs_Result_Accessibility_Level):
2101         Unconditionally return False. This is a temporary
2102         change, disabling the Extra_Accessibility_Of_Result
2103         mechanism.
2104         (Expand_Simple_Function_Return): Check for
2105         Extra_Accessibility_Of_Result parameter's presence instead of
2106         testing Ada_Version when generating a runtime accessibility
2107         check which makes use of the parameter.
2108
2109 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2110
2111         * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
2112         expression in a given case alternative must be attached to the
2113         statement list of the ccrresponding case statement alternative
2114         They cannot be propagated ahead of the case statement, because
2115         the validity of the expression that generated the action may
2116         hold only for that alternative.
2117
2118 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2119
2120         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2121         (Alignment_Of): Remove the code for strict alignment targets.
2122         (Double_Alignment_Of): Removed.
2123         (Double_Size_Of): New routine.
2124         (Make_Finalize_Address_Stmts): Change the
2125         calculation of the dope's size.  Update relevant comments.
2126         (Size_Of): New routine.
2127
2128 2011-09-06  Steve Baird  <baird@adacore.com>
2129
2130         * einfo.ads (Extra_Accessibility): Update associated comment to use
2131         the term "present" correctly ("present" just means that it is not
2132         an error to query the value of the attribute - it does not imply
2133         that the value must be non-null).
2134         (Extra_Constrained): Ditto.
2135         (Is_Visible_Formal): Ditto.
2136         (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
2137         (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
2138         * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
2139         * exp_ch6.adb (Expand_Call): The callee may require an
2140         Extra_Accessibility_Of_Result actual parameter even if Ada_Version
2141         < Ada_2012. This can occur if the callee is exported from a Gnat
2142         runtimes unit. Also improve a comment.
2143
2144 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2145
2146         * exp_ch7.adb: Add with and use clauses for Get_Targ.
2147         (Alignment_Of): Rename formal parameter Some_Typ
2148         to Typ, update related comment. Use the allocator alignment on
2149         strict alignment targets such as SPARC.
2150         (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
2151         related comment.
2152
2153 2011-09-06  Gary Dismukes  <dismukes@adacore.com>
2154
2155         * sem_ch9.adb (Check_Interfaces): Test
2156         Is_Limited_Type rather than Is_Limited_Record when checking that
2157         the partial view of a synchronized full view must be limited.
2158
2159 2011-09-06  Emmanuel Briot  <briot@adacore.com>
2160
2161         * g-comlin.adb (Free): Fix memory leak.
2162
2163 2011-09-06  Robert Dewar  <dewar@adacore.com>
2164
2165         * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
2166
2167 2011-09-06  Steve Baird  <baird@adacore.com>
2168
2169         * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
2170         (Ada2012) cases described in AI05-0234 where the accessibility
2171         level of a function result is "determined by the point of
2172         call", an implicit parameter representing that accessibility
2173         level is passed in. Extra_Accessibilty_Of_Result yields this
2174         additional formal parameter. Extra_Accessibility_Of_Result
2175         is analogous to the existing Extra_Accessibility
2176         function used in the implementation of access parameters.
2177         (Set_Extra_Accessibility_Of_Result): New procedure; sets
2178         Extra_Accessibility_Of_Result attribute.
2179         * einfo.adb (Extra_Accessibility_Of_Result): New function.
2180         (Set_Extra_Accessibility_Of_Result): New procedure.
2181         (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2182         * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2183         an accessibility level literal to Natural; introduce a nested
2184         function, Make_Level_Literal, to do this.
2185         * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2186         determines whether a given function (or access-to-function
2187         type) needs to have an implicitly-declared accessibility-level
2188         parameter added to its profile.
2189         (Add_Extra_Actual_To_Call): Export an existing procedure which was
2190         previously declared in the body of Exp_Ch6.
2191         * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2192         it to exp_ch6.ads.
2193         (Has_Unconstrained_Access_Discriminants): New Function; a
2194         predicate on subtype entities which returns True if the given
2195         subtype is unconstrained and has one or more access discriminants.
2196         (Expand_Call): When expanding a call to a function which takes an
2197         Extra_Accessibility_Of_Result parameter, pass in the appropriate
2198         actual parameter value. In the case of a function call which is
2199         used to initialize an allocator, this may not be possible because
2200         the Etype of the allocator may not have been set yet. In this
2201         case, we defer passing in the parameter and handle it later in
2202         Expand_Allocator_Expression.
2203         (Expand_Simple_Function_Return): When returning from a function which
2204         returns an unconstrained subtype having at least one access
2205         discriminant, generate the accessibility check needed to ensure that
2206         the function result will not outlive any objects designated by its
2207         discriminants.
2208         (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2209         description.
2210         * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2211         is used to initialize an allocator, we may need to pass in "the
2212         accessibility level determined by the point of call" (AI05-0234)
2213         to the function. Expand_Call, where such actual parameters are
2214         usually generated, is too early in this case because the Etype of
2215         the allocator (which is used in determining the level to be passed
2216         in) may not have been set yet when Expand_Call executes. Instead,
2217         we generate code to pass in the appropriate actual parameter
2218         in Expand_Allocator_Expression.
2219         * sem_ch6.adb (Create_Extra_Formals): Create
2220         the new Extra_Accessibility_Of_Result formal if
2221         Needs_Result_Accessibility_Level returns True. This includes the
2222         introduction of a nested procedure, Check_Against_Result_Level.
2223
2224 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2225
2226         * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2227         declaration.
2228
2229 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2230
2231         * s-finmas.adb (Set_Finalize_Address): Explain the reason
2232         for the synchronization. Move the test for null from
2233         s-stposu.Allocate_Any_Controlled to this routine since the check
2234         needs to be protected too.
2235         (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2236         synchronization code.
2237         * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2238         explaining the context in which this routine is used.
2239         * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2240         to s-finmas.Set_Finalize_Address.
2241
2242 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2243
2244         * einfo.ads: Document that itypes have no parent field.
2245
2246 2011-09-05  Robert Dewar  <dewar@adacore.com>
2247
2248         * rtsfind.adb (Check_CRT): Check for overloaded entity
2249         * rtsfind.ads: Document that entities to be found by rtsfind
2250         cannot be overloaded
2251         * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2252         (Lock_Entries_With_Status): New name for Lock_Entries with two
2253         arguments (changed to meet rtsfind no overloading rule).
2254
2255 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2256
2257         * s-finmas.adb (Set_Finalize_Address (Address,
2258         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2259         (Set_Finalize_Address (in out Finalization_Master,
2260         Finalize_Address_Ptr): Add synchronization code.
2261         * s-finmas.ads (Set_Finalize_Address (Address,
2262         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2263         * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2264         Set_Finalize_Address for the heterogeneous case.
2265
2266 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2267
2268         * sem_ch3.adb: Undo previous change, not suitable after all.
2269
2270 2011-09-05  Robert Dewar  <dewar@adacore.com>
2271
2272         * einfo.ads: Minor comment clarification.
2273
2274 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2275
2276         * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2277         no longer needs to search through the entities of the return
2278         statement scope to find the _chain.
2279         * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2280         (Analyze_Block_Statement): Add local variable
2281         Is_BIP_Return_Statement. Add machinery to install all entities
2282         produced by the expansion of the return object declaration.
2283         (Install_Return_Entities): New routine.
2284         * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2285
2286 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2287
2288         * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2289         of subunit is incomplete.
2290         (Analyze_Proper_Body): If parent spec is not available, do not
2291         attempt analysis.
2292
2293 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2294
2295         * sem_disp.adb (Find_Controlling_Arg): Add checks for
2296         interface type conversions, that are expanded into dereferences.
2297
2298 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2299
2300         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2301         Examine the parameter and return profile of a subprogram and swap
2302         any incomplete types coming from a limited context with their
2303         corresponding non-limited views.
2304         (Exchange_Limited_Views): New routine.
2305
2306 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2307
2308         * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2309         of internal entity to the subtype declaration, so that when
2310         entities are subsequently exchanged in a package body, the tree
2311         remains properly formatted for ASIS.
2312
2313 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2314
2315         * g-comlin.adb (Set_Usage): Additional optional argument to set help
2316         message.
2317         (Display_Help): display the user given help message, if available.
2318
2319 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2320
2321         * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2322         is legal if the original node is an identifier that is a
2323         parameterless function call.
2324
2325 2011-09-05  Pascal Obry  <obry@adacore.com>
2326
2327         * prj-nmsc.adb: Minor reformatting.
2328         Add support for standalone aggregate library.
2329         (Check_Stand_Alone_Library): Handle standalone aggregate library.
2330         * projects.texi: Fix documentation for aggregate library projects.
2331
2332 2011-09-05  Robert Dewar  <dewar@adacore.com>
2333
2334         * sem_ch6.adb: Minor reformatting.
2335
2336 2011-09-05  Matthew Gingell  <gingell@adacore.com>
2337
2338         * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2339         stack guard page on PPC Linux. This patch ensures the 64K guard page at
2340         the bottom of the stack is not overwritten.
2341
2342 2011-09-05  Thomas Quinot  <quinot@adacore.com>
2343
2344         * exp_intr.adb, s-tasini.adb: Minor reformatting.
2345
2346 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2347
2348         * sem_ch3.adb (Access_Definition): If an access type declaration
2349         appears in a child unit, the scope of whatever anonymous type
2350         may be generated is the child unit itself.
2351
2352 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2353
2354         * sem_ch6.adb (Analyze_Expression_Function): Do not set
2355         Comes_From_Source on rewritten body.
2356         (Analyze_Subprogram_Body_Helper): Check that the original node for
2357         the body comes from source, when determining whether expansion
2358         of a protected operation is needed.
2359
2360 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2361
2362         * exp_aggr.adb (Replace_Type): If the target of the assignment is
2363         a selected component and the right-hand side is a self-referential
2364         access, the proper prefix of the rewritten attribute is a copy
2365         of the left-hand side, not of its prefix.
2366
2367 2011-09-05  Robert Dewar  <dewar@adacore.com>
2368
2369         * sem_ch5.adb: Minor reformatting.
2370         * sem_ch3.adb: Minor code clean up.
2371
2372 2011-09-05  Jose Ruiz  <ruiz@adacore.com>
2373
2374         * exp_ch9.adb (Make_Initialize_Protection): The fact that
2375         restriction No_Dynamic_Attachment is in effect or not should
2376         not influence the default priority associated to a protected
2377         object. With this change, when the restriction is in effect (as
2378         is the case for the Ravenscar profile) the default priority of
2379         a protected object with an interrupt handler is in the range of
2380         interrupt priorities (Default_Interrupt_Priority) as required
2381         by D.3(10).
2382
2383 2011-09-05  Arnaud Charlet  <charlet@adacore.com>
2384
2385         * a-iteint.ads: Fix header.
2386
2387 2011-09-05  Vincent Celier  <celier@adacore.com>
2388
2389         * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2390         with a directory separator to avoid output such as:
2391           "/path/to/objauto.cgpr" has been deleted.
2392
2393 2011-09-05  Robert Dewar  <dewar@adacore.com>
2394
2395         * sem_ch3.adb: Minor reformatting.
2396
2397 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2398
2399         * sem_ch5.adb: Better error message.
2400
2401 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2402
2403         * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2404         (Expand_Array_Aggregate): Detect a special case of an aggregate
2405         which contains tasks in the context of an unexpanded return
2406         statement of a build-in-place function.
2407         * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2408         (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2409         which contains tasks and expand it now that the original simple
2410         return statement has been rewritten.
2411         * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2412         reformatting. Do not create a chain for an extended return
2413         statement if one is already available.
2414         (Has_Activation_Chain): New routine.
2415
2416 2011-09-05  Marc Sango  <sango@adacore.com>
2417
2418         * sem_ch3.adb (Analyze_Object_Declaration): Remove
2419         the wrong test and add the correct test to detect the violation
2420         of illegal use of unconstrained string type in SPARK mode.
2421
2422 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2423
2424         * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2425         message on an iterator over an array.
2426
2427 2011-09-05  Robert Dewar  <dewar@adacore.com>
2428
2429         * lib-xref-alfa.adb: Minor reformatting.
2430
2431 2011-09-05  Robert Dewar  <dewar@adacore.com>
2432
2433         * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2434         exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2435
2436 2011-09-05  Gary Dismukes  <dismukes@adacore.com>
2437
2438         * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2439
2440 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2441
2442         * lib-xref-alfa.adb: Update comments.
2443
2444 2011-09-05  Thomas Quinot  <quinot@adacore.com>
2445
2446         * sem_res.adb: Minor reformatting
2447
2448 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2449
2450         * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2451         present, create them now.  Needed in case the return type was
2452         a limited view in the function declaration.
2453         (Make_Build_In_Place_Call_In_Allocator): If return type contains
2454         tasks, build the activation chain for it.  Pass a reference to
2455         the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2456         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2457         with build_in_place calls.
2458         * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2459         incomplete, inatialize its Corresponding_Record_Type component.
2460         * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2461         of limited views.
2462
2463 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2464
2465         * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2466         information.
2467
2468 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2469
2470         * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2471         appears within a package specification and the token after "IS"
2472         is not a parenthesis, assume that this is an unparenthesized
2473         expression function, even if the token appears in a line by
2474         itself.
2475         * par.adb: Clarify use of Labl field of scope stack in error
2476         recovery.
2477
2478 2011-09-05  Bob Duff  <duff@adacore.com>
2479
2480         * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2481         conversions instead of normal type conversions in all cases where a
2482         type conversion would be illegal. In particular, use unchecked
2483         conversions when the operand types are private.
2484
2485 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2486
2487         * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2488         objects of task type or protected type.
2489
2490 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2491
2492         * sem_ch6.adb (Analyze_Expression_Function): If the expression
2493         function comes from source, indicate that so does its rewriting,
2494         so it is compatible with any subsequent expansion of the
2495         subprogram body (e.g. when it is a protected operation).
2496         * sem_ch4.adb: minor reformatting
2497
2498 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2499
2500         * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2501         Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2502         may lead to wrong ancestor package in the case of instantiated subunit
2503         bodies. If a subunit is instantiated, follow the chain of instantiations
2504         rather than the stub structure.
2505
2506 2011-09-02  Robert Dewar  <dewar@adacore.com>
2507
2508         * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2509         * gcc-interface/Make-lang.in: Update dependencies.
2510
2511 2011-09-02  Marc Sango  <sango@adacore.com>
2512
2513         * sem_ch3.adb (Analyze_Object_Declaration): Change
2514         comment and add additional check to differentiate constant of
2515         type string from others unconstrained type.
2516
2517 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2518
2519         * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2520         present in incomplete type declarations to refine the error
2521         message the full declaration is in the same unit.
2522         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2523         an incomplete type, set the Premature_Use for additional message.
2524         * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2525         and Premature_Use is set, place additional information at the
2526         point of premature use.
2527
2528 2011-09-02  Bob Duff  <duff@adacore.com>
2529
2530         * sem_ch6.adb: (Check_Post_State): Suppress warning
2531         "postcondition refers only to pre-state" when the expression has not
2532         yet been analyzed, because it causes false alarms. This can happen when
2533         the postcondition contains a quantified expression, because those are
2534         analyzed later. This is a temporary/partial fix.
2535         (Process_Post_Conditions): Minor: change wording of warning.
2536
2537 2011-09-02  Marc Sango  <sango@adacore.com>
2538
2539         * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2540         illegal use of unconstrained string type in SPARK mode.
2541         * sem_res.adb (Analyze_Operator_Symbol): Set the
2542         right place where the string operand of concatenation should be
2543         violate in SPARK mode.
2544
2545 2011-09-02  Robert Dewar  <dewar@adacore.com>
2546
2547         * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2548         exp_ch3.adb: Minor reformatting.
2549
2550 2011-09-02  Vincent Celier  <celier@adacore.com>
2551
2552         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2553         as the compiler driver so Is_Compilable returns True for sources.
2554         * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2555         for the body.
2556
2557 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2558
2559         * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2560         condition, a reference to a controlling formal must be interpreted
2561         as having the class-wide type (or an access to such) so that the
2562         inherited condition can be properly applied to any overriding
2563         operation (see ARM12 6.6.1 (7)).
2564
2565 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2566
2567         * init.c (__gnat_is_vms_v7): Fix case and add prototype
2568         for LIB$GETSYI.
2569
2570 2011-09-02  Javier Miranda  <miranda@adacore.com>
2571
2572         * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2573         initializing expression of a class-wide interface object declaration
2574         if its type is limited.
2575
2576 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2577
2578         * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2579         literals, take into account the type name; the type is *not*
2580         the scope for an enumeration literal.
2581
2582 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2583
2584         * sem_ch6.adb (Check_Overriding_Indicator): add special check
2585         to reject an overriding indicator on a user-defined Adjust
2586         subprogram for a limited controlled type.
2587
2588 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2589
2590         * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2591         for an actual that is a function call returning an unconstrained
2592         limited controlled type.
2593
2594 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2595
2596         * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2597
2598 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2599
2600         * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2601         from "HEAP" to __HEAP Change comment that refers to that variable
2602         * put_alfa.adb: Change comment that refers to that variable
2603
2604 2011-09-02  Robert Dewar  <dewar@adacore.com>
2605
2606         * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2607
2608 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2609
2610         * exp_util.adb (Extract_Renamed_Object): Renamed to
2611         Find_Renamed_Object. This routine has been reimplemented and now uses
2612         tree traversal to locate a renamed object.
2613         (Is_Aliased): Replace call to Extract_Renamed_Object with
2614         Find_Renamed_Object.
2615
2616 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2617
2618         * init.c: (__gnat_is_vms_v7): New function.
2619
2620 2011-09-02  Olivier Hainque  <hainque@adacore.com>
2621
2622         * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2623         that have a misaligned backchain, necessarily bogus.
2624
2625 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2626
2627         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2628         TSS routine Finalize_Address when compiling in Alfa mode.
2629         (Expand_Freeze_Record_Type): Do not create TSS routine
2630         Finalize_Address when compiling in Alfa mode.
2631         * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2632         call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2633         not built.
2634         (Expand_N_Allocator): Do not produce a call to
2635         Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2636         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2637         produce a call to primitive Set_Finalize_Address in Alfa mode because
2638         Finalize_Address is not built.
2639         * exp_ch7.adb (Build_Finalization_Master): Do not create
2640         finalization masters in Afa mode since they are not needed.
2641         (Build_Finalizer): Do not create scope and library-level
2642         finalizers in Alfa mode since they are not needed.
2643         * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2644         "new" and "free" when applied to controlled objects in Alfa mode since
2645         this is not needed.
2646
2647 2011-09-02  Vincent Celier  <celier@adacore.com>
2648
2649         * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2650         only library names with the syntax of Ada identifiers, to avoid errors
2651         when compiling the binder generated files.
2652         * projects.texi: Document restriction on SAL library names
2653
2654 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2655
2656         * a-chtgbo.adb: Minor comment fix.
2657
2658 2011-09-02  Robert Dewar  <dewar@adacore.com>
2659
2660         * lib-xref.adb: Minor reformatting
2661
2662 2011-09-02  Vincent Celier  <celier@adacore.com>
2663
2664         * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2665         gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2666         --version and --help in usage.
2667         * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2668
2669 2011-09-02  Bob Duff  <duff@adacore.com>
2670
2671         * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2672         compilers don't understand it.
2673
2674 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2675
2676         * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2677         underlying subtype rather than its base type on the call to
2678         Build_Record_Or_Elementary_Input_Function, so that any
2679         constraints on a discriminated subtype will be available for
2680         doing the check required by AI05-0192.
2681         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2682         If the prefix subtype of the 'Input attribute is a constrained
2683         discriminated subtype, then check each constrained discriminant value
2684         against the corresponding value read from the stream.
2685
2686 2011-09-02  Yannick Moy  <moy@adacore.com>
2687
2688         * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2689         warnings on suspicious contracts, and enable them with -gnatwa.
2690
2691 2011-09-02  Robert Dewar  <dewar@adacore.com>
2692
2693         * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2694         reformatting.
2695
2696 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2697
2698         * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2699         which ensure that restriction No_Dynamic_Attachment has not been
2700         violated.
2701         (Make_Initialize_Protection): Protected types with attach or
2702         interrupt handlers must not violate restriction No_Dynamic_Attachment.
2703         * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2704         which ensures that restriction No_Dynamic_Attachment has not been
2705         violated.
2706         * sem_attr.adb: (Eval_Attribute): Transform
2707         VAX_Float_Type'First and 'Last into references to
2708         the temporaries which store the corresponding bounds. The
2709         transformation is needed since the back end cannot evaluate
2710         'First and 'Last on VAX.
2711         (Is_VAX_Float): New routine.
2712
2713 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2714
2715         * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2716         generic unit is not intrinsic and has an explicit convention,
2717         the instance inherits it.
2718
2719 2011-09-02  Robert Dewar  <dewar@adacore.com>
2720
2721         * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2722         prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2723
2724 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2725
2726         * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2727         Guard against a prefix that is an N_Has_Entity but has no
2728         associated entity.
2729
2730 2011-09-02  Yannick Moy  <moy@adacore.com>
2731
2732         * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2733         references.
2734
2735 2011-09-02  Yannick Moy  <moy@adacore.com>
2736
2737         * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2738         * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2739         contracts.
2740         * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2741         procedure looking for suspicious postconditions.
2742         * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2743         * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2744         options -gnatw.t and -gnatw.T.
2745
2746 2011-09-02  Pascal Obry  <obry@adacore.com>
2747
2748         * prj.adb: Minor code refactoring. Move check for null project in
2749         Project_Changed.
2750         * projects.texi: Fix minor typos.
2751
2752 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2753
2754         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2755         of iteration is an expression, its value must be captured in a
2756         renaming declaration, so that modification of the elements is
2757         propagated to the original container.
2758
2759 2011-09-02  Pascal Obry  <obry@adacore.com>
2760
2761         * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2762         prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2763         prj-tree.adb: Minor reformatting and style fixes.
2764
2765 2011-09-02  Robert Dewar  <dewar@adacore.com>
2766
2767         * s-rident.ads: Add new restriction No_Implicit_Aliasing
2768         * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2769         No_Implicit_Aliasing
2770         (Analyze_Attribute, case Address): ditto
2771         (Analyze_Attribute, case Unrestricted_Access): ditto
2772         * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2773         No_Implicit_Aliasing restriction.
2774         * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2775
2776 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2777
2778         * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2779         is an unchecked conversion, apply test to its expression.
2780
2781 2011-09-02  Javier Miranda  <miranda@adacore.com>
2782
2783         * sem_ch3.adb (Check_Abstract_Overriding): When
2784         traversing the chain of aliased subprograms avoid reporting a
2785         redundant error on the current entity.
2786
2787 2011-09-02  Sergey Rybin  <rybin@adacore.com>
2788
2789         * gnat_ugn.texi: Minor clean up.
2790
2791 2011-09-02  Bob Duff  <duff@adacore.com>
2792
2793         * s-htable.adb (Set_If_Not_Present): Use renaming
2794         instead of ":=", because the type Key is limited in the generic (even
2795         if not in the instances).
2796
2797 2011-09-02  Robert Dewar  <dewar@adacore.com>
2798
2799         * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2800         g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2801         reformatting.
2802
2803 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2804
2805         * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2806         inherited component with the enclosing derived type. Code reformatting.
2807
2808 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2809
2810         * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2811         return done when overflow checks are enabled, since comparisons against
2812         Lor and Hir should not be done when OK1 is False.
2813
2814 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2815
2816         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2817         Add new formal Master_Exp. When present, add that expression to the
2818         call as an extra actual.
2819         (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2820         Fmaster_Actual and in the case of a BIP call initializing a return
2821         object of an enclosing BIP function set it to a
2822         new reference to the implicit finalization master
2823         formal of the enclosing function. Fmaster_Actual is
2824         then passed to the new formal Master_Exp on the call to
2825         Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2826         initializations of Enclosing_Func to its declaration.
2827
2828 2011-09-02  Thomas Quinot  <quinot@adacore.com>
2829
2830         * csets.ads: Minor reformatting
2831
2832 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2833
2834         * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2835         the full view of a private type coming from an instantiation.
2836         * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2837         loop to iterate over the declarations rather than use the
2838         First_Entity / Next_Entity scheme.
2839
2840 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2841
2842         * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2843         X'range (N) into X'First (N) ..  X'Last (N), do not share the
2844         dimension indicator N, if present. Even though it is a static
2845         constant, its source location may be modified when printing
2846         expanded code under -gnatDL, and node sharing will lead to chaos
2847         in Sprint on large files, by generating a sloc value that does
2848         not correspond to any source file.
2849
2850 2011-09-02  Bob Duff  <duff@adacore.com>
2851
2852         * einfo.adb: (Has_Xref_Entry): Do not call
2853         Implementation_Base_Type. Lib.Xref has been
2854         rewritten to avoid the need for it, and it was costly.
2855         * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2856         functions in support of efficient xref.
2857         * lib-xref-alfa.adb: Misc changes related to Key component of
2858         type Xref_Entry.
2859         * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2860         (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2861         no longer does. This is the one place where it is needed.
2862
2863 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2864
2865         * g-comlin.adb (Getopt): New optional argument Concatenate to have
2866         similar interface as the other Getopt function.
2867
2868 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2869
2870         * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2871         a call to Set_Finalize_Address if there is no allocator available.
2872         * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2873         a case of allocator expansion where the allocator is not expanded but
2874         needs a custom allocate routine. Code reformatting.
2875         (Is_Finalizable_Transient): Remove local variables Has_Rens and
2876         Ren_Obj. Code reformatting.
2877         (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2878         through the use of 'reference.
2879         * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2880         as part of build-in-place expansion. They are intentionally marked as
2881         coming from source, but their parents are not.
2882
2883 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2884
2885         * sem_ch10.adb (Analyze_With_Clause): If the library unit
2886         is the generated subprogram declaration for a child unit body
2887         that acts as spec, use the original body in the with_clause,
2888         to prevent binding errors.
2889
2890 2011-09-02  Vincent Celier  <celier@adacore.com>
2891
2892         * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2893         qualifier /MULTI_UNIT_INDEX=
2894
2895 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2896
2897         * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2898         instead of calling the callback function
2899
2900 2011-09-02  Robert Dewar  <dewar@adacore.com>
2901
2902         * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2903         prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2904
2905 2011-09-02  Vincent Celier  <celier@adacore.com>
2906
2907         * prj-nmsc.adb: (Find_Sources): When the list of sources is
2908         explicitly declared in an extending project, do not warn if a source
2909         for an inherited naming exception is not found.
2910
2911 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
2912
2913         * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2914         expansion is inactive.
2915
2916 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2917
2918         * sem_util.adb (Note_Possible_Modification): If the entity
2919         being modified is the renaming generated for an Ada2012 iterator
2920         element, the enclosing container or array is modified as well.
2921
2922 2011-09-02  Jose Ruiz  <ruiz@adacore.com>
2923
2924         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2925         Initialize): Define and initialize the
2926         mutex attributes and condition variable attributes locally.
2927
2928 2011-09-02  Vincent Celier  <celier@adacore.com>
2929
2930         * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2931         exception replaced in an extending project.
2932         (Check_Object): No error when the other source is locally removed.
2933
2934 2011-09-02  Yannick Moy  <moy@adacore.com>
2935
2936         * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2937         unresolved calls.
2938
2939 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
2940
2941         * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2942         run-time files.
2943         * gcc-interface/Make-lang.in: Update dependencies.
2944
2945 2011-09-01  Robert Dewar  <dewar@adacore.com>
2946
2947         * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2948
2949 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2950
2951         * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2952         * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2953         __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2954         specific for systems where their glibc version does not define the
2955         routines to handle dynamically allocated CPU sets.
2956
2957 2011-09-01  Vincent Celier  <celier@adacore.com>
2958
2959         * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2960         prj-env.adb: Implement inheritance of naming exceptions in extending
2961         projects.
2962
2963 2011-09-01  Romain Berrendonner  <berrendo@adacore.com>
2964
2965         * gnatls.adb: Display simple message instead of content of
2966         gnatlic.adl.
2967
2968 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
2969
2970         * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2971         access discriminant and anonymous access component scopes.
2972         (Inherit_Component): Reuse the itype of an access discriminant
2973         or anonymous access component by copying it in order to set the proper
2974         scope. This is done only when the parent and the derived type
2975         are in different scopes.
2976         (Set_Anonymous_Etype): New routine.
2977
2978 2011-09-01  Robert Dewar  <dewar@adacore.com>
2979
2980         * a-convec.adb: Minor reformatting throughout.
2981
2982 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
2983
2984         * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2985         __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2986         CPU_ALLOC_SIZE and CPU_FREE linux macros.
2987         (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2988         CPU_SET_S respectively because we are now using dynamically allocated
2989         CPU sets which are more portable across different glibc versions.
2990         * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2991         CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2992         masks dynamically according to the number of processors in the target
2993         platform.
2994         (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2995         respectively, so we need to pass the size of the masks as
2996         parameters.
2997         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2998         created cpu_set_t masks
2999         with the number of processors available in the target platform,
3000         instead of static bit arrays. It enhances portability because
3001         it uses the information from the target platform.
3002         * sem_ch8.adb: (Attribute_Renaming): When checking whether we
3003         are using a restricted run-time library, use the flag
3004         Configurable_Run_Time_Mode instead of Restricted_Profile.
3005
3006 2011-09-01  Vincent Celier  <celier@adacore.com>
3007
3008         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
3009         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
3010
3011 2011-09-01  Nicolas Roche  <roche@adacore.com>
3012
3013         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
3014         on VxWorks in kernel mode.
3015
3016 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3017
3018         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
3019         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
3020         directly the bit array.
3021         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
3022         the linux macros with the same name.
3023         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
3024         wrappers around the CPU_ZERO and CPU_SET linux macros.
3025
3026 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3027
3028         * exp_ch7.adb (Find_Insertion_List): Removed.
3029         (Process_Transient_Objects): Insert the declarations of the hook
3030         access type and the hook object before the associated transient object.
3031
3032 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3033
3034         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
3035         package System.Aux_Dec when using restricted run-time libraries which
3036         do not have this package.
3037
3038 2011-09-01  Tristan Gingold  <gingold@adacore.com>
3039
3040         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
3041
3042 2011-09-01  Bob Duff  <duff@adacore.com>
3043
3044         * sem_attr.adb (Analyze_Access_Attribute): Do not call
3045         Kill_Current_Values for P'Unrestricted_Access, where P is library level
3046
3047 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3048
3049         * exp_ch5.adb: Minor reformatting
3050         * gnat_ugn.texi: Fix minor typos.
3051         * gcc-interface/Make-lang.in: Update dependencies.
3052
3053 2011-09-01  Robert Dewar  <dewar@adacore.com>
3054
3055         * inline.adb, sem_aggr.adb: Minor reformatting.
3056
3057 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3058
3059         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
3060
3061 2011-09-01  Robert Dewar  <dewar@adacore.com>
3062
3063         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
3064
3065 2011-09-01  Bob Duff  <duff@adacore.com>
3066
3067         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
3068         body" the same as "in inlined body", because visibility shouldn't
3069         apply there.
3070
3071 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
3072
3073         * inline.adb (Add_Inlined_Body): Refine previous change.
3074
3075 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
3076
3077         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
3078         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3079         Test for case where call
3080         initializes an object of a return statement before testing for
3081         a constrained call, to ensure that all such cases get handled
3082         by simply passing on the caller's parameters. Also, in that
3083         case call Needs_BIP_Alloc_Form to determine whether to pass on
3084         the BIP_Alloc_Form parameter of the enclosing function rather
3085         than testing Is_Constrained. Add similar tests for the return
3086         of a BIP call to later processing to ensure consistent handling.
3087         (Needs_BIP_Alloc_Form): New utility function.
3088         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
3089         a BIP_Alloc_Form formal with call to new utility function
3090         Needs_BIP_Alloc_Form.
3091
3092 2011-09-01  Pascal Obry  <obry@adacore.com>
3093
3094         * prj-part.adb: Minor reformatting.
3095
3096 2011-09-01  Vincent Celier  <celier@adacore.com>
3097
3098         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
3099         half character in the unit name.
3100
3101 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3102
3103         * exp_ch4.adb: Minor code and comment reformatting.
3104
3105 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3106
3107         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
3108         for Is_Limited_Type and Is_Tagged_Type in condition checking
3109         for by-reference type.
3110         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
3111         subprograms may have a completion because of a previous
3112         Inline_Always clause, but the enclosing package must be marked
3113         inlined for the subprogram body to become visible to the backend.
3114
3115 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3116
3117         * sem_aux.adb, exp_ch4.adb: Minor reformatting
3118
3119 2011-09-01  Pascal Obry  <obry@adacore.com>
3120
3121         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
3122
3123 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3124
3125         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
3126         the formals of a subprogram stub that acts as a spec.
3127
3128 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3129
3130         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
3131         type, declare a renaming for it, not an object declaration.
3132
3133 2011-09-01  Yannick Moy  <moy@adacore.com>
3134
3135         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
3136         Ignore_Errors to ignore failures to read ALI files when True.
3137
3138 2011-09-01  Javier Miranda  <miranda@adacore.com>
3139
3140         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
3141         constructor calls associated with non-tagged record types.
3142
3143 2011-09-01  Robert Dewar  <dewar@adacore.com>
3144
3145         * g-socthi-vms.adb: Minor reformatting.
3146
3147 2011-09-01  Nicolas Roche  <roche@adacore.com>
3148
3149         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
3150         in order to avoid impact of imcompatible changes.
3151         * cstreams.c: Likewise
3152         * cio.c: Likewise
3153         * aux-io.c: Likewise
3154
3155 2011-09-01  Yannick Moy  <moy@adacore.com>
3156
3157         * lib-writ.adb (Write_With_Lines): Always output complete information
3158         on "with" line in Alfa mode, as this is required by formal verification
3159         back-end.
3160
3161 2011-09-01  Tristan Gingold  <gingold@adacore.com>
3162
3163         * g-socthi-vms.adb: Add comments.
3164
3165 2011-09-01  Pascal Obry  <obry@adacore.com>
3166
3167         * prj.ads: Minor reformatting.
3168
3169 2011-09-01  Vincent Celier  <celier@adacore.com>
3170
3171         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
3172         exceptions in the config pragmas file.
3173
3174 2011-09-01  Tristan Gingold  <gingold@adacore.com>
3175
3176         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
3177
3178 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3179
3180         * exp_ch7.adb (Find_Insertion_List): New routine.
3181         (Process_Transient_Objects): Add code to handle the abnormal
3182         finalization of a controlled transient associated with a subprogram
3183         call. Since transients are cleaned up right after the associated
3184         context, an exception raised during a subprogram call may bypass the
3185         finalization code.
3186
3187 2011-09-01  Robert Dewar  <dewar@adacore.com>
3188
3189         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3190         aliased.
3191
3192 2011-09-01  Robert Dewar  <dewar@adacore.com>
3193
3194         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3195
3196 2011-09-01  Robert Dewar  <dewar@adacore.com>
3197
3198         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3199
3200 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3201
3202         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3203         GNATRTL_NONTASKING_OBJS.
3204
3205 2011-09-01  Robert Dewar  <dewar@adacore.com>
3206
3207         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3208         possibility of this flag being set for formals in Ada 2012 mode.
3209         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3210         2012.
3211         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3212         mode.
3213         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3214         Ada 2012.
3215         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3216         Ada 2012.
3217
3218 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3219
3220         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3221         insertion node in a tree of nested Expression_With_Actions nodes.
3222         (Process_Transient_Object): In the case where a complex if statement
3223         has been converted into nested Expression_With_Actions nodes, the
3224         "hook" object and the associated access type must be inserted before
3225         the top most Expression_With_Actions.
3226
3227 2011-09-01  Robert Dewar  <dewar@adacore.com>
3228
3229         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3230         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3231
3232 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3233
3234         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3235
3236 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3237
3238         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3239         aspect.
3240         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3241         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3242         in a similar way as we do for the Priority or Dispatching_Domain aspect.
3243         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3244         Dispatching_Domains_Frozen): Move this local data to package
3245         System.Tasking because with the CPU aspect we need to have access
3246         to this data when creating the task in System.Tasking.Stages.Create_Task
3247         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3248         Move these variables from the body of
3249         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3250         we need to have access to this data when creating the task in
3251         System.Tasking.Stages.Create_Task.
3252         * s-taskin.adb (Initialize): Signal the allocation of the environment
3253         task to a CPU, if any, so that we know whether the CPU can be
3254         transferred to a different dispatching domain.
3255         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3256         is being allocated belongs to the dispatching domain where the task
3257         lives. Signal the allocation of the task to a CPU, if any, so that we
3258         know whether the CPU can be transferred to a different dispatching
3259         domain.
3260
3261 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3262
3263         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3264         attributes Same_Storage and Overlaps_Storage.
3265
3266 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3267
3268         * exp_strm.adb: Remove with and use clause for Opt.
3269         (Build_Array_Input_Function): Remove the version-dependent generation
3270         of the return statement. The Ada 2005 tree is now the default.
3271
3272 2011-09-01  Yannick Moy  <moy@adacore.com>
3273
3274         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3275         it is never empty when compiling in Alfa mode.
3276
3277 2011-09-01  Robert Dewar  <dewar@adacore.com>
3278
3279         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3280         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3281         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3282         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3283
3284 2011-09-01  Matthew Heaney  <heaney@adacore.com>
3285
3286         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3287         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3288         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3289         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3290         unbounded queue container.
3291         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3292         bounded queue container.
3293         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3294         unbounded priority queue container.
3295         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3296         bounded priority queue container.
3297
3298 2011-08-31  Pascal Obry  <obry@adacore.com>
3299
3300         * a-direct.adb: Do not try to create an UNC path on Windows.
3301         (Create_Path): Skip leading computer name in UNC path if any.
3302
3303 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3304
3305         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3306         version-dependent generation of the return statement. The Ada 2005 tree
3307         is now the default.
3308
3309 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3310
3311         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3312         types Stream_Element_Offset and Storage_Offset have a different native
3313         type depending on whether the platform is 32 or 64 bits. When
3314         exchanging them, always convert to 64 bits.
3315
3316 2011-08-31  Yannick Moy  <moy@adacore.com>
3317
3318         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3319         --force-alfa to gnat2why.
3320
3321 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3322
3323         * sem_ch12.adb (Save_References): If the node has aspects, save
3324         references within the corresponding expressions in a separate step,
3325         because the aspects are not directly in the tree for the declaration
3326         to which they belong.
3327
3328 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3329
3330         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3331         in CodePeer mode, since representation clauses are partially ignored.
3332         * gcc-interface/Make-lang.in: Update dependencies.
3333
3334 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3335
3336         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3337         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3338         to any dispatching domain.
3339
3340 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3341
3342         * exp_ch4.adb: Minor reformatting.
3343
3344 2011-08-31  Bob Duff  <duff@adacore.com>
3345
3346         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3347         on nodes for which it is not defined.
3348         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3349         parent type.
3350
3351 2011-08-31  Bob Duff  <duff@adacore.com>
3352
3353         * sem_ch3.adb (Process_Full_View): Disable legality check if
3354         In_Instance, to avoid spurious errors.
3355         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3356         if In_Instance, to avoid spurious errors.
3357
3358 2011-08-31  Pascal Obry  <obry@adacore.com>
3359
3360         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3361         directory speparators.
3362         (Compose): Use Dir_Seps to handle both forms.
3363         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3364         changes.
3365         (Extension): Use Dir_Seps to handle both forms.
3366
3367 2011-08-31  Pascal Obry  <obry@adacore.com>
3368
3369         * prj-conf.adb: Minor reformatting.
3370
3371 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3372
3373         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3374         dispatching domain aspect.
3375         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3376         aspect.
3377         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3378         Dispatching_Domain aspect in a similar way as we do for the Priority
3379         aspect.
3380         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3381         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3382         is present.
3383         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3384         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3385         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3386         Dispatching_Domain and add it to the task definition.
3387         (Sig_Flags): Add Pragma_Dispatching_Domain.
3388         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3389         support to find the types Dispatching_Domain and
3390         Dispatching_Domain_Access.
3391         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3392         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3393         query the availability of a pragma Dispatching_Domain.
3394         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3395         the expander to pass the Dispatching_Domain when creating a task.
3396         (Name_Dispatching_Domain): Add this new name for a pragma.
3397         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3398         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3399         task has been allocated at creation time.
3400         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3401         Ravenscar is always null.
3402         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3403         the task has been allocated at creation time.
3404         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3405         a specific dispatching domain.
3406         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3407         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3408         and CPU are specified for the task, and the CPU value is not contained
3409         within the range of processors for the domain.
3410
3411 2011-08-31  Vincent Celier  <celier@adacore.com>
3412
3413         * make.adb (Original_Gcc) : New constant String_Access.
3414         (Gnatmake): For VM targets, do not use VM version of the compiler if
3415         --GCC= has been specified.
3416
3417 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3418
3419         * sem_ch5.adb: Minor reformatting.
3420
3421 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3422
3423         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3424         not reanalyze it.
3425
3426 2011-08-31  Bob Duff  <duff@adacore.com>
3427
3428         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3429         the access type is private; we don't care about privacy in expansion.
3430
3431 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3432
3433         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3434         subcomponents tnat may be limited, because they originate in view
3435         conflicts. If the original aggregate is legal and the actuals are
3436         legal, the aggregate itself is legal.
3437
3438 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3439
3440         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3441         status.
3442
3443 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3444
3445         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3446         errors in B tests.
3447
3448 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3449
3450         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3451         Interrupt_Priority aspects, force the analysis of the aspect expression
3452         (when building the equivalent pragma). Otherwise, its analysis is done
3453         too late, after the task or protected object has been created.
3454         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3455         Analyze_Single_Task_Declaration): Remove the code to move the aspects
3456         to the object declaration because they are needed in the type
3457         declaration.
3458
3459 2011-08-31  Robert Dewar  <dewar@adacore.com>
3460
3461         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3462         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3463         reformatting.
3464
3465 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3466
3467         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3468         if the corresponding type is malformed due to restriction violations.
3469
3470 2011-08-31  Robert Dewar  <dewar@adacore.com>
3471
3472         * s-ransee.ads, s-ransee.adb: Minor reformatting.
3473
3474 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3475
3476         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3477         would cause the generation of Set_Finalize_Address if the target is a
3478         VM and the designated type is not derived from [Limited_]Controlled.
3479
3480 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3481
3482         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3483         subprogram.
3484         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3485         case of a compilation error.
3486
3487 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3488
3489         * init.c (__gnat_error_handler): Standardize the stack overflow or
3490         erroneous memory access message.
3491         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3492         or erroneous memory access message.
3493
3494 2011-08-31  Robert Dewar  <dewar@adacore.com>
3495
3496         * sem_ch4.adb: Minor reformatting.
3497         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3498
3499 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3500
3501         * scos.ads: Minor documentation clarification.
3502         * put_scos.adb: Do not generate SCO unit header line for a unit that
3503         has no SCO lines.
3504
3505 2011-08-31  Robert Dewar  <dewar@adacore.com>
3506
3507         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3508
3509 2011-08-31  Tristan Gingold  <gingold@adacore.com>
3510
3511         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3512         hold variables between these following subprograms.
3513         (Build_Exception_Handler, Build_Object_Declarations,
3514         Build_Raise_Statement): Use the above type as parameter.
3515         Make the above adjustments.
3516         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3517
3518 2011-08-31  Pascal Obry  <obry@adacore.com>
3519
3520         * projects.texi: Minor reformatting.
3521
3522 2011-08-31  Tristan Gingold  <gingold@adacore.com>
3523
3524         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3525         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3526
3527 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3528
3529         * exp_ch5.adb: Minor code cleanup.
3530         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3531         prevent cascaded errors.
3532         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3533         variable of an iterator specification in current scope.
3534         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3535         postconditions on the stack, as they contain no return statements.
3536
3537 2011-08-31  Yannick Moy  <moy@adacore.com>
3538
3539         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3540         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3541         call Qualify_Entity_Names.
3542         (Expand_Alfa): call Qualify_Entity_Names in more cases
3543         * lib-xref-alfa.adb: Take into account system package.
3544         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3545         CodePeer mode in which we are interested in finding bugs even if
3546         compiler cannot compile source.
3547         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3548         deferred constant.
3549
3550 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3551
3552         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3553         denoted by the subtype mark to ensure getting the concurrent type in
3554         the case where the subtype mark denotes a private subtype of a
3555         concurrent type (needed when using -gnatc).
3556         (Process_Subtype): For the processing specific to type kinds, case on
3557         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3558         subtype denotes a private subtype whose base type is nonprivate (needed
3559         for subtypes of private fulfilled by task types when compiling with
3560         -gnatc).
3561
3562 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3563
3564         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3565         late primitives that override interface operations when the full
3566         expander is not active, to avoid blowups in Register_Primitive when
3567         types don't have associated secondary dispatch tables.
3568
3569 2011-08-31  Yannick Moy  <moy@adacore.com>
3570
3571         * alfa_test.adb: Code clean up.
3572
3573 2011-08-31  Marc Sango  <sango@adacore.com>
3574
3575         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3576         by Comes_From_Source (Original_Node (N)) in order to treat also the
3577         nodes which have been rewritten.
3578         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3579         explicit dereference and slice violation in spark mode on the nodes 
3580         coming only from the source code.
3581
3582 2011-08-31  Robert Dewar  <dewar@adacore.com>
3583
3584         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3585         lib-xref-alfa.adb: Minor reformatting.
3586
3587 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3588
3589         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3590
3591 2011-08-31  Javier Miranda  <miranda@adacore.com>
3592
3593         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3594         only for class-wide subprograms conflicting with entities of concurrent
3595         tagged types.
3596
3597 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3598
3599         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3600         node to null value.
3601
3602 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3603
3604         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3605         general description of the routine.
3606
3607 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3608
3609         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3610         doubly-linked lists.
3611
3612 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3613
3614         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3615         check is needed for a left-hand side that is a dereference, and the
3616         base type is private without discriminants (whereas the full type does
3617         have discriminants), an extra retrieval of the underlying type may be
3618         needed in the case where the subtype is a record subtype whose base
3619         type is private. Update comments.
3620
3621 2011-08-31  Javier Miranda  <miranda@adacore.com>
3622
3623         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3624         found check if there is a class-wide subprogram covering the primitive.
3625         
3626 2011-08-31  Yannick Moy  <moy@adacore.com>
3627
3628         * sem_res.adb: Further cases where full expansion test is needed,
3629         rather than expansion test.
3630
3631 2011-08-31  Pascal Obry  <obry@adacore.com>
3632
3633         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3634
3635 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3636
3637         * exp_ch5.adb: Handle iterators over derived container types.
3638
3639 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3640
3641         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3642         (Has_Anonymous_Master): New routine.
3643         (Set_Has_Anonymous_Master): New routine.
3644         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3645         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3646         (Current_Anonymous_Master): New routine.
3647         (Current_Unit_First_Declaration): Removed.
3648         (Current_Unit_Scope): Removed.
3649         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3650         their objects on a per-unit heterogeneous finalization master.
3651
3652 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3653
3654         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3655         array.
3656
3657 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3658
3659         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3660         when not needed.
3661
3662 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3663
3664         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3665         where the actual is an unexpanded call to 'Input.
3666
3667 2011-08-31  Yannick Moy  <moy@adacore.com>
3668
3669         * sem_ch4.adb: Code clean up.
3670
3671 2011-08-31  Yannick Moy  <moy@adacore.com>
3672
3673         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3674
3675 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3676
3677         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3678         and TSS primitive Finalize_Address if finalization is suppressed.
3679         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3680         primitive Finalize_Address if finalization is suppressed.
3681
3682 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3683
3684         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3685         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3686         sure that the underlying task has already been created before trying
3687         to change its affinity.
3688         (Set_CPU): Use the term processor instead of CPU, as we do in
3689         Assign_Task.
3690
3691 2011-08-31  Vincent Celier  <celier@adacore.com>
3692
3693         * prj-attr.adb: New Compiler attribute Source_File_Switches.
3694         * prj-nmsc.adb (Process_Compiler): Process attribute
3695         Source_File_Switches.
3696         * prj.ads (Language_Config): New name list component
3697         Name_Source_File_Switches.
3698         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3699
3700 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3701
3702         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3703         discriminated component of an actual, expand at once to prevent
3704         ouf-of-order references with generated subtypes.
3705
3706 2011-08-31  Yannick Moy  <moy@adacore.com>
3707
3708         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3709         reference to operator in Alfa xrefs.
3710
3711 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3712
3713         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3714         where the parent instance was frozen before the current instance due to
3715         the presence of a source body. Update calls to Insert_After_Last_Decl.
3716         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3717         Update the comment which illustrates the purpose of the routine.
3718         Package instances are now frozen by source bodies which appear after
3719         the instance. This ensures that entities coming from within the
3720         instance are available for use in the said bodies.
3721         (Install_Body): Add code to handle the case where the parent instance
3722         was frozen before the current instance due to the presence of a source
3723         body. Update calls to Insert_After_Last_Decl.
3724
3725 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3726
3727         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3728         access types.
3729         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3730
3731 2011-08-31  Yannick Moy  <moy@adacore.com>
3732
3733         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3734         full-expander test.
3735         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3736         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3737         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3738         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3739         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3740         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3741         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3742         ALFA in Alfa (we dropped acronym).
3743         * einfo.adb (Primitive_Operations): Correctly return list of primitive
3744         operations in a case where it returned previously No_Elist.
3745
3746 2011-08-31  Robert Dewar  <dewar@adacore.com>
3747
3748         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3749         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3750         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3751         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3752         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3753         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3754         reformatting.
3755
3756 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3757
3758         * sem_ch12 (Check_Private_View): Revert previous change.
3759         * sem_res.adb (Conversion_Check): Do not emit the error message if the
3760         conversion is in a generic instance.
3761
3762 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3763
3764         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3765         * a-chtgbo.adb (Free): Allow 0 as index value.
3766
3767 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3768
3769         * a-cborma.adb (Insert): Add comment to explain why no element
3770         assignment.
3771
3772 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3773
3774         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3775         spec discriminant is already a concurrent type, in which case just use
3776         it, otherwise fetch the Corresponding_Concurrent_Type as before.
3777
3778 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3779
3780         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3781         system-linux-mips.ads, system-linux-mipsel.ads,
3782         system-linux-mips64el.ads, system-linux-ppc64.ads,
3783         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3784
3785 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3786
3787         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3788         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3789         (build_unary_op): Likewise.
3790
3791 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3792
3793         * raise-gcc.c: Do not include coretypes.h and tm.h.
3794         (setup_to_install): Remove test for compiler macro.
3795         * targext.c: Document use for the library.
3796         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3797
3798 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
3799
3800         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3801         the expression to the nominal type if the latter is a record type with
3802         a variant part and the type of the former is a record type without one.
3803
3804 2011-08-30  Yannick Moy  <moy@adacore.com>
3805
3806         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3807         expansion in Alfa mode.
3808         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3809         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3810         Alfa mode.
3811         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3812         * sem_res.adb: Ditto.
3813         * gcc-interface/Make-lang.in: Update dependencies.
3814
3815 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3816
3817         * g-socket.ads: Minor documentation adjustment.
3818
3819 2011-08-30  Robert Dewar  <dewar@adacore.com>
3820
3821         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3822
3823 2011-08-30  Yannick Moy  <moy@adacore.com>
3824
3825         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3826         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3827         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3828         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3829         Revert change which introduced files for "light"
3830         expansion, to be replaced by a single file for Alfa expansion.
3831
3832 2011-08-30  Robert Dewar  <dewar@adacore.com>
3833
3834         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3835         Minor code reorg/reformatting.
3836
3837 2011-08-30  Yannick Moy  <moy@adacore.com>
3838
3839         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3840         common shorthand for (Expander_Active and not ALFA_Mode) that can be
3841         used for testing full expansion, that is active expansion not in the
3842         reduced mode for Alfa
3843         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3844         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3845         of the verbose (Expander_Active and not ALFA_Mode)
3846
3847 2011-08-30  Tristan Gingold  <gingold@adacore.com>
3848
3849         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3850         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
3851         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3852         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
3853
3854 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
3855
3856         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3857         access conversions to check that the conversion is a rewritten node,
3858         rather than just having Comes_From_Source set to False, which wasn't
3859         sufficient.
3860
3861 2011-08-30  Robert Dewar  <dewar@adacore.com>
3862
3863         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3864         g-socket.ads: Minor reformatting.
3865
3866 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3867
3868         * sem_util.adb: Minor reformatting.
3869
3870 2011-08-30  Tristan Gingold  <gingold@adacore.com>
3871
3872         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3873         to be compliant with the ABI.
3874
3875 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
3876
3877         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3878         of a designated type when the related access type is an actual in an
3879         instance. This ensures that the full view of designated type is
3880         available when inside the body of the instance.
3881
3882 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3883
3884         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3885         in a position to be modified, a slice is treated like an indexed
3886         component.
3887
3888 2011-08-30  Thomas Quinot  <quinot@adacore.com>
3889
3890         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3891         field tv_sec in struct timeval.
3892
3893 2011-08-30  Yannick Moy  <moy@adacore.com>
3894
3895         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3896         blocks of code doing full expansion, previously only guarded by
3897         Expander_Active, by anding the test that ALFA_Mode is not set
3898
3899 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3900
3901         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3902         add the function to the list of private dependents, for subsequent
3903         legality check on Taft amendment types.
3904         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3905         Private_Dependents, as for other incomplete types.
3906         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3907         Taft-amendment type is used as the return type of a function.
3908
3909 2011-08-30  Javier Miranda  <miranda@adacore.com>
3910
3911         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3912         which emits an error by a call to a new routine which report the error.
3913         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3914         entity does not cover an existing interface.
3915         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3916         code.
3917         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3918         protected procedures or entries whose mode is not conformant.
3919         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3920         an error by a call to a new routine which report the error.
3921
3922 2011-08-30  Robert Dewar  <dewar@adacore.com>
3923
3924         * gnat_rm.texi: Minor change.
3925         * exp_attr_light.adb: Minor reformatting.
3926
3927 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
3928
3929         * sem_ch3.adb: Patch inheritance of aspects in
3930         Complete_Private_Subtype, to avoid infinite loop.
3931
3932 2011-08-30  Javier Miranda  <miranda@adacore.com>
3933
3934         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3935         been reported and a subprogram covering an interface primitive is not
3936         found then skip generating the internal entity. Done to avoid crashing
3937         the frontend.
3938         (Check_Abstract_Overriding): Change text of error of wrong formal of
3939         protected subprogram or entry. Done for consistency to emit exactly the
3940         same error reported by Check_Synchronized_Overriding. In addition, the
3941         error is restricted to protected types (bug found working on AI05-0090)
3942
3943 2011-08-30  Yannick Moy  <moy@adacore.com>
3944
3945         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3946         expansion in Alfa mode.
3947         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3948         * exp_light.adb, exp_light.ads: New package defining light expansion.
3949         * expander.adb (Expand): Call light expansion in Alfa mode
3950         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3951         constructs.
3952         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3953         constructs.
3954         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3955         * gnat1drv.adb (Adjust_Global_Switches): Comment
3956
3957 2011-08-30  Yannick Moy  <moy@adacore.com>
3958
3959         * lib-xref-alfa.adb: Minor refactoring.
3960
3961 2011-08-30  Yannick Moy  <moy@adacore.com>
3962
3963         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3964         mode.
3965         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3966         expansion in Alfa mode.
3967         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3968         mode.
3969
3970 2011-08-30  Robert Dewar  <dewar@adacore.com>
3971
3972         * debug_a.adb: Update comment.
3973
3974 2011-08-30  Robert Dewar  <dewar@adacore.com>
3975
3976         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3977         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3978         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3979         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3980
3981 2011-08-30  Robert Dewar  <dewar@adacore.com>
3982
3983         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3984         volatile.
3985
3986 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
3987
3988         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3989         Build_Finalization_Master by supplying an insertion node and enclosing
3990         scope. In its old version, the call did not generate a finalization
3991         master.
3992         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3993         recognize anonymous access-to-controlled components. Rewrite the
3994         machinery which creates finalization masters to service anonymous
3995         access-to-controlled components of a record type. In its current state,
3996         only one heterogeneous master is necessary to handle multiple anonymous
3997         components.
3998         (Freeze_Type): Comment reformatting.
3999         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
4000         RE_Unit_Table.
4001         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
4002         associates TSS primitive Finalize_Address with either the master itself
4003         or with the internal hash table depending on the mode of operation of
4004         the master.
4005
4006 2011-08-30  Javier Miranda  <miranda@adacore.com>
4007
4008         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
4009         interface type then do not generate code to compare this component.
4010         Required since they have no components and their equality operator is
4011         abstract.
4012
4013 2011-08-30  Steve Baird  <baird@adacore.com>
4014
4015         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
4016         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
4017         returns the (static) accessibility level of the object. Otherwise, the
4018         same as Type_Access_Level.
4019         (Dynamic_Accessibility_Level): New function; given an expression which
4020         could occur as the rhs of an assignment to a saooaaat (i.e., an
4021         expression of an access-to-object type), return the new value for the
4022         saooaaat's associated Extra_Accessibility object.
4023         (Effective_Extra_Accessibility): New function; same as
4024         Einfo.Extra_Accessibility except that object renames are looked through.
4025         * sem_util.adb 
4026         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
4027         (Dynamic_Accessibility_Level): New function; see sem_util.ads
4028         description.
4029         (Effective_Extra_Accessibility): New function; see sem_util.ads
4030         description.
4031         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
4032         (Extra_Accessibility): Update comments.
4033         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
4034         except RM_Size field (which is only for types) is unaffected.
4035         * einfo.adb
4036         (Extra_Accessibility): Expand domain to allow objects, not just formals.
4037         (Set_Extra_Accessibility): Expand domain to allow objects, not just
4038         formals.
4039         (Init_Size): Add assertion that we are not trashing the
4040         Extra_Accessibility attribute of an object.
4041         (Init_Size_Align): Add assertion that we are not trashing the
4042         Extra_Accessibility attribute of an object.
4043         (Init_Object_Size_Align): New procedure; see einfo.ads description.
4044         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
4045         differently for the type of a (non-library-level) saooaaat depending
4046         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
4047         is queried in this set of changes - everything else (in particular,
4048         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
4049         driven off of the setting of the Is_Local_Anonymous_Access attribute.
4050         The special treatment of library-level saooaaats is an optimization,
4051         not required for correctnesss. This is based on the observation that the
4052         Ada2012 rules (static and dynamic) for saooaaats turn out to be
4053         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
4054         * exp_ch3.adb
4055         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
4056         false for the type of a saooaaat, declare and initialize its
4057         accessibility level object and set the Extra_Accessibility attribute
4058         of the saooaaat to refer to this object.
4059         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
4060         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
4061         calls to Effective_Extra_Accessibility in order to support
4062         renames of saooaaats.
4063         (Expand_N_Type_Conversion): Add new local function,
4064         Has_Extra_Accessibility, and call it when determining whether an
4065         accessibility check is needed.
4066         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
4067         evaluate to True (without raising an exception).
4068         * exp_ch5.adb
4069         (Expand_N_Assignment_Statement): When assigning to an Ada2012
4070         saooaaat, update its associated Extra_Accessibility object (if
4071         it has one). This includes an accessibility check.
4072         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
4073         a saooaaat, update its Extra_Accessibility object too (if it
4074         has one).
4075         (Expand_Call): Replace a couple of calls to Type_Access_Level
4076         with calls to Dynamic_Access_Level to handle cases where
4077         passing a literal (any literal) is incorrect.
4078         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
4079         checks associated with "Saooaat := Some_Object'Access;"; this must
4080         be rejected if Some_Object is declared in a more nested scope
4081         than Saooaat.
4082         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
4083         assignment to a saooaaat even if Is_Local_Anonymous_Access
4084         returns False for its type (indicating a 2012-style saooaaat).
4085         * sem_ch8.adb
4086         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
4087         (which is only appropriate for objects, not types) with a call
4088         of Init_Object_Size_Align in order to avoid trashing the
4089         Extra_Accessibility attribute of a rename (the two attributes
4090         share storage).
4091         * sem_res.adb
4092         (Valid_Conversion) Replace six calls to Type_Access_Level with
4093         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
4094         Ada2012 non-library-level saooaaat, the former returns library level
4095         while the latter returns the (static) accessibility level of the
4096         saooaaat. A type conversion to the anonymous type of a saooaaat
4097         can only occur as part of an assignment to the saooaaat, so we
4098         know that such a conversion must be in a lhs context, so Deepest
4099         yields the result that we need. If such a conversion could occur,
4100         say, as the operand of an equality operator, then this might not
4101         be right. Also add a test so that static accessibilty checks are
4102         performed for converting to a saooaaat's type even if
4103         Is_Local_Anonymous_Access yields False for the type.
4104
4105 2011-08-30  Javier Miranda  <miranda@adacore.com>
4106
4107         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
4108         controls generation of a warning associated with late declaration of
4109         dispatching functions. Required to avoid generating spurious
4110         warnings.
4111
4112 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
4113
4114         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
4115         return object has an anonymous access type and the function's type is
4116         a named access type.
4117         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
4118         conversions on implicit conversions, since such conversions can occur
4119         for anonymous access cases due to expansion. Issue error for attempt
4120         to rename an anonymous expression as an object of a named access type.
4121         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
4122         to indicate whether this function should report errors on invalid
4123         conversions.
4124         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
4125         the expression is of an anonymous access type and the expected type is
4126         a named general access type, rewrite the expression as a type
4127         conversion, unless this is an expression of a membership test.
4128         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
4129         calling of Error_Msg_N on new formal Report_Errs.
4130         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
4131         calling of Error_Msg_NE on new formal Report_Errs.
4132         (Valid_Conversion): Move declaration of this function to the package
4133         spec, to allow calls from membership test processing. For Ada 2012,
4134         enforce legality restrictions on implicit conversions of anonymous
4135         access values to general access types, disallowing such conversions in
4136         cases where the expression has a dynamic accessibility level (access
4137         parameters, stand-alone anonymous access objects, or a component of a
4138         dereference of one of the first two cases).
4139         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
4140         in the context of a named general access expected type.
4141         * exp_ch4.adb Add with and use of Exp_Ch2.
4142         (Expand_N_In): Add processing for membership tests applied to
4143         expressions of an anonymous access type. First, Valid_Conversion is
4144         called to check whether the test is statically False, and then the
4145         conversion is expanded to test that the expression's accessibility
4146         level is no deeper than that of the tested type. In the case of
4147         anonymous access-to-tagged types, a tagged membership test is applied
4148         as well.
4149         (Tagged_Membership): Extend to handle access type cases, applying the
4150         test to the designated types.
4151         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
4152         accessibility level, and the actual is a 'Access applied to a current
4153         instance, pass the accessibility level of the type of the current
4154         instance rather than applying Object_Access_Level to the prefix. Add a
4155         ??? comment, since this level isn't quite right either (will eventually
4156         need to pass an implicit level parameter to init procs).
4157
4158 2011-08-30  Bob Duff  <duff@adacore.com>
4159
4160         * s-taskin.ads: Minor comment fix.
4161
4162 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
4163
4164         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
4165         component and the selector is a dispatching operation, check if it is
4166         a prefixed call before rewriting as a parameterless function call.
4167
4168 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
4169
4170         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
4171         tsystem.h into $(RTSDIR) instead of rts.
4172
4173 2011-08-29  Robert Dewar  <dewar@adacore.com>
4174
4175         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4176         reformatting.
4177         * gcc-interface/Make-lang.in: Update dependencies.
4178
4179 2011-08-29  Yannick Moy  <moy@adacore.com>
4180
4181         * alfa.ads (Name_Of_Heap_Variable): New constant name.
4182         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4183         table to hold dereferences.
4184         (Add_ALFA_Xrefs): Take into account dereferences as special
4185         reads/writes to the variable "HEAP".
4186         (Enclosing_Subprogram_Or_Package): Move subprogram here.
4187         (Generate_Dereference): New procedure to store a read/write dereferencew
4188         in the table Drefs.
4189         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4190         the special "HEAP" var.
4191         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4192         in ALFA mode.
4193         * sem_util.adb (Note_Possible_Modification): Store write dereference
4194         in ALFA mode.
4195
4196 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4197
4198         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4199         ensures that the level of the subpool access type is not deeper than
4200         that of the pool object.
4201         * sem_util.adb (Object_Access_Level): Expand to handle defining
4202         identifiers.
4203         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4204         subpool handle name of a rewritten allocator.
4205
4206 2011-08-29  Robert Dewar  <dewar@adacore.com>
4207
4208         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4209
4210 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4211
4212         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4213         values, we generate multiple triples of parameters in the TypeCode.
4214         Bump Choice_Index for each such triple so that a subsequent default
4215         choice is associated with the correct index in the typecode.
4216
4217 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4218
4219         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4220         container.
4221         (First, Last): Handle properly an iterator over a null container.
4222
4223 2011-08-29  Bob Duff  <duff@adacore.com>
4224
4225         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4226         processing if we run across a node with no Scope. This can happen if
4227         we're with-ing an library-level instance, and that instance got errors
4228         that caused "instantiation abandoned".
4229         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4230         an exception instead of using Assert, so it won't go into an infinite
4231         loop, even when assertions are turned off.
4232
4233 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4234
4235         * a-coorse.adb: Proper handling of empty ordered sets.
4236
4237 2011-08-29  Johannes Kanig  <kanig@adacore.com>
4238
4239         * debug.adb: Add comments.
4240
4241 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4242
4243         * a-except.adb, a-except-2005.adb: Minor comment rewording and
4244         reformatting.
4245
4246 2011-08-29  Yannick Moy  <moy@adacore.com>
4247
4248         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4249         declaration for Itypes in Alfa mode.
4250
4251 2011-08-29  Robert Dewar  <dewar@adacore.com>
4252
4253         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4254         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4255         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4256         reformatting.
4257
4258 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4259
4260         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4261         package spec.
4262         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4263         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4264         while raising PE.
4265
4266 2011-08-29  Robert Dewar  <dewar@adacore.com>
4267
4268         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4269
4270 2011-08-29  Javier Miranda  <miranda@adacore.com>
4271
4272         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4273         renamings of formal subprograms when the actual for a formal type is
4274         class-wide.
4275
4276 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4277
4278         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4279         to Target.
4280
4281 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4282
4283         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4284         components of record type.
4285         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4286         to Target.
4287
4288 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4289
4290         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4291         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4292         container packages.
4293
4294 2011-08-29  Robert Dewar  <dewar@adacore.com>
4295
4296         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4297         reformatting.
4298
4299 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4300
4301         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4302         components of record type.
4303
4304 2011-08-29  Bob Duff  <duff@adacore.com>
4305
4306         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4307         by the termination handler.
4308
4309 2011-08-29  Yannick Moy  <moy@adacore.com>
4310
4311         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4312         created in Alfa mode, instead of inserting artificial declarations of
4313         non-Itypes in the tree.
4314         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4315         know if an Itype has a corresponding declaration, as defined in
4316         itypes.ads.
4317
4318 2011-08-29  Yannick Moy  <moy@adacore.com>
4319
4320         * gnat1drv.adb: Minor rewrite.
4321
4322 2011-08-29  Bob Duff  <duff@adacore.com>
4323
4324         * s-tasuti.adb (Make_Passive): Work around race condition in
4325         Make_Independent, which can cause Wait_Count to be zero. So instead of
4326         asserting that Wait_Count > 0, and then decrementing it, decrement it
4327         only if Wait_Count > 0.
4328         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4329         should be nonnegative, so declare them Natural instead of Integer.
4330
4331 2011-08-29  Robert Dewar  <dewar@adacore.com>
4332
4333         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4334         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4335         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4336         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4337         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4338
4339 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4340
4341         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4342
4343 2011-08-29  Vadim Godunko  <godunko@adacore.com>
4344
4345         * s-parint.ads: Minor comment clarification.
4346
4347 2011-08-29  Vincent Celier  <celier@adacore.com>
4348
4349         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4350         may be used as identifiers.
4351
4352 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4353
4354         * a-coinho.ads: Minor reformating.
4355
4356 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4357
4358         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4359         container of a derived type.
4360
4361 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4362
4363         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4364         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4365
4366 2011-08-29  Pascal Obry  <obry@adacore.com>
4367
4368         * exp_disp.adb: Minor comment fix.
4369         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4370         to avoid warnings when compiling with -Wall.
4371         (Make_Disp_Conditional_Select_Body): Likewise.
4372         (Make_Disp_Timed_Select_Body): Likewise.
4373
4374 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4375
4376         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4377         an entity name, generate reference for it.
4378
4379 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4380
4381         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4382         iterator form.
4383         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4384         the class-wide type.
4385         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4386
4387 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4388
4389         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4390         subtype for an object whose type is an unconstrained union.
4391
4392 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4393
4394         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4395         is allowed in a component definition, by AI95-406.
4396
4397 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4398
4399         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4400
4401 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4402
4403         * a-except-2005.adb: Alphabetize all routines.
4404         (Triggered_By_Abort): New routine.
4405         * a-except-2005.ads (Triggered_By_Abort): New routine.
4406         * a-except.adb Alphabetize all routines.
4407         (Triggered_By_Abort): New routine.
4408         * a-except.ads (Triggered_By_Abort): New routine.
4409         * exp_ch7.adb: Update all comments involving the detection of aborts in
4410         finalization code.
4411         (Build_Object_Declarations): Do not generate code to detect the
4412         presence of an abort at the start of finalization code, use a runtime
4413         routine istead.
4414         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4415         RE_Unit_Table.
4416         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4417         allocate a task on a subpool.
4418         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4419         The flag disables all actions related to the maintenance of
4420         Finalize_Address_Table when subpools are not in use.
4421         (Allocate_Any_Controlled): Signal the machinery that subpools are in
4422         use.
4423         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4424         performs costly task locking when subpools are not in use.
4425
4426 2011-08-29  Yannick Moy  <moy@adacore.com>
4427
4428         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4429         types and dispatching calls in Alfa mode.
4430         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4431         correspondance between body and spec scopes, to reuse utility functions
4432         (Traverse_Declarations_Or_Statements): Protect access to body for stub
4433         by testing the presence of the library unit for the body
4434         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4435         mode the expansion of accept statements is skipped
4436         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4437         the unique entity corresponding to the one returned by
4438         Unique_Defining_Entity applied to the enclosing declaration of the
4439         argument.
4440
4441 2011-08-29  Bob Duff  <duff@adacore.com>
4442
4443         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4444         gdb when x is not a node (it can be a node list, name_id, etc). pp is
4445         an alias for pn. ppp is an alias for pt.
4446
4447 2011-08-29  Javier Miranda  <miranda@adacore.com>
4448
4449         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4450         aggregate to take a consistent decision on the need to convert into
4451         assignments aggregates that initialize constant objects.
4452
4453 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4454
4455         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4456         Build_Allocate_Deallocate_Proc in order to handle allocation of
4457         non-controlled objects on subpools.
4458         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4459         to be end-user visible.
4460         * s-finmas.adb: Add with and use clause for System.HTable.
4461         Add an instantiation of Simple_HTable which provides a mapping between
4462         the address of a controlled object and the corresponding
4463         Finalize_Address used to clean up the object. The table is used when a
4464         master is operating in heterogeneous mode.
4465         (Attach): Explain why the input node is not verified on being already
4466         attached.
4467         (Delete_Finalize_Address): New routine.
4468         (Detach): Add pragma Assert which ensures that a node is already
4469         attached.
4470         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4471         since nodes are no longer removed on traversal. Explain why node
4472         detachment is undesirable in this case.
4473         (Get_Finalize_Address): New routine.
4474         (Hash): New routine.
4475         (Is_Empty_List): Removed.
4476         (pm): Renamed to Print_Master. Add output for discriminant
4477         Is_Homogeneous.
4478         Comment reformatting.
4479         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4480         * s-finmas.ads: Various comments additions / improvements.
4481         Type Finalization_Master has a discriminant which determines the mode of
4482         operation.
4483         (Delete_Finalize_Address): New routine.
4484         (Get_Finalize_Address): New routine.
4485         (pm): Renamed to Print_Master.
4486         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4487         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4488         use clause for System.IO.
4489         (Allocate_Any_Controlled): Add machinery to set TSS primitive
4490         Finalize_Address depending on the mode of allocation and the mode of
4491         the master.
4492         (Deallocate_Any_Controlled): Remove the relation pair object -
4493         Finalize_Address regardless of the master mode. Add comment explaining
4494         the reason.
4495         (Detach): Ensure that fields Prev and Next are null after detachment.
4496         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4497         scheme to check whether the list of subpools is empty. There is no
4498         longer need to store the next subpool or advance the current pointer.
4499         (Is_Empty_List): New routine.
4500         (Print_Pool): New routine.
4501         (Print_Subpool): New routine.
4502         * s-stposu.ads: Various comments additions / improvements.
4503         Field Master of type Root_Subpool is now a heterogeneous collection.
4504         (Print_Pool): New routine.
4505         (Print_Subpool): New routine.
4506
4507 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4508
4509         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4510         forms, using aspects of container types.
4511         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4512         Has_Implicit_Dereference flags, that may be set on the partial view.
4513         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4514         container type with an indexing aspect.
4515         (Analyze_Quantified_Expression): Analyze construct with expansion
4516         disabled, because it will be rewritten as a loop during expansion.
4517         (Try_Container_Indexing): The prefix itself may be a container type
4518         with an indexing aspect, as with a vector of vectors.
4519         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4520         the original doamin of iteration, for name capture.
4521         (Analyze_Iterator_Specification): If the domain is an expression that
4522         needs finalization, create a separate declaration for it.
4523         For an iterator with "of" retrieve default iterator info from aspect of
4524         container type. For "in" iterator, retrieve type of Iterate function.
4525         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4526         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4527         analysis, to prevent spurious errors about late attributes.
4528         * sprint.adb: Handle quantified expression with either loop or iterator
4529         specification.
4530         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4531         iterator.
4532
4533 2011-08-29  Vincent Celier  <celier@adacore.com>
4534
4535         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4536         Binder or Linker of the main project file.
4537
4538 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4539
4540         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4541         unit.
4542
4543 2011-08-29  Yannick Moy  <moy@adacore.com>
4544
4545         * exp_ch9.adb: Partial revert of previous change for Alfa mode
4546
4547 2011-08-29  Yannick Moy  <moy@adacore.com>
4548
4549         * exp_ch11.adb: Minor expansion of comment.
4550
4551 2011-08-29  Yannick Moy  <moy@adacore.com>
4552
4553         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4554
4555 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4556
4557         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4558         interpretation, set the type before resolving the operands, because
4559         legality checks on an exponention operand need to know the type of the
4560         context.
4561
4562 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4563
4564         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4565         cleanups on a master if the instance is within a generic unit.
4566         Complement to the corresponding fix to inline.adb for K520-030.
4567
4568 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4569
4570         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4571         occurrence.
4572         * exp_intr.adb: Minor comment fix.
4573
4574 2011-08-29  Bob Duff  <duff@adacore.com>
4575
4576         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4577         Delay_Required was used as an uninitialized variable.
4578
4579 2011-08-29  Robert Dewar  <dewar@adacore.com>
4580
4581         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4582         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4583         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4584
4585 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4586
4587         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4588         Remove unused variables.
4589
4590 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4591
4592         * sem_res.adb: Remove Build_Explicit_Dereference.
4593         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4594         from sem_res.adb, used in analysis of additional constructs.
4595         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4596         expansion of iterators.
4597         (Is_Object_Reference): Recognize variables rewritten as explicit
4598         dereferences in Ada2012.
4599         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4600         Reversible_Iterator names, for expansion of Ada2012 iterators.
4601         * aspects.ads, aspects.adb (Find_Aspect): Utility.
4602         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4603         linked list container.
4604         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4605         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4606
4607 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4608
4609         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4610         containers.
4611
4612 2011-08-29  Vincent Celier  <celier@adacore.com>
4613
4614         * make.adb (Gnatmake): Get the maximum number of simultaneous
4615         compilation processes after the Builder switches has been scanned, as
4616         there may include -jnn.
4617
4618 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4619
4620         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4621
4622 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4623
4624         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4625         GNAT_DRIVER_COMMAND_LINE to 255.
4626
4627 2011-08-29  Pascal Obry  <obry@adacore.com>
4628
4629         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4630         reformatting and style fix (class attribute casing).
4631
4632 2011-08-29  Yannick Moy  <moy@adacore.com>
4633
4634         * exp_ch11.adb: Yet another case where expansion should be common
4635         between CodePeer and Alfa.
4636
4637 2011-08-29  Yannick Moy  <moy@adacore.com>
4638
4639         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4640
4641 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4642
4643         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4644         incomplete type and its completion match.
4645
4646 2011-08-29  Yannick Moy  <moy@adacore.com>
4647
4648         * exp_ch13.adb: Adjust previous change.
4649
4650 2011-08-29  Robert Dewar  <dewar@adacore.com>
4651
4652         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4653         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4654         Minor reformatting.
4655
4656 2011-08-29  Emmanuel Briot  <briot@adacore.com>
4657
4658         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4659         initialize aggregated projects.
4660
4661 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4662
4663         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4664         depth of candidates to resolve a potentially spurious ambiguity between
4665         two visible subprograms.
4666
4667 2011-08-29  Yannick Moy  <moy@adacore.com>
4668
4669         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4670         Requires/Ensures.
4671         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4672         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4673         Requires/Ensures.
4674
4675 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
4676
4677         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4678         Add comment.
4679
4680 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4681
4682         * sem_res.adb: Minor reformatting.
4683
4684 2011-08-29  Johannes Kanig  <kanig@adacore.com>
4685
4686         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4687         mode.
4688         * gnat1drv.adb (Adjust_Global_Switches): Set
4689         Use_Expressions_With_Actions to False in ALFA mode.
4690         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4691         ALFA mode.
4692
4693 2011-08-29  Yannick Moy  <moy@adacore.com>
4694
4695         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4696         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4697         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4698         tagged types and dispatching calls in Alfa mode.
4699
4700 2011-08-29  Javier Miranda  <miranda@adacore.com>
4701
4702         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4703         we do not report an error on an Empty node.
4704
4705 2011-08-29  Geert Bosch  <bosch@adacore.com>
4706
4707         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4708         a-nlrear.o and a-nurear.o.
4709
4710 2011-08-29  Robert Dewar  <dewar@adacore.com>
4711
4712         * freeze.adb: Minor code reorganization.
4713         Minor reformatting.
4714         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4715         sem_ch6.adb: Minor reformatting
4716
4717 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4718
4719         * s-except.ads, s-except.adb: Provide dummy body.
4720
4721 2011-08-29  Yannick Moy  <moy@adacore.com>
4722
4723         * sem_warn.adb (Within_Postcondition): Take into account the case of
4724         an Ensures component in a Test_Case.
4725
4726 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4727
4728         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4729         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4730         System_Exceptions_Debug
4731         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4732         * a-except.adb: With and use System.Exceptions_Debug instead of
4733         System.Exceptions.
4734         * a-except-2005.adb: Likewise.
4735         * s-assert.adb: Likewise.
4736         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4737         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
4738         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4739         s-excdeb. Update dependencies.
4740         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4741         as these no longer need external libraries.
4742
4743 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4744
4745         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4746         exponentiation operator on universal values in a context that requires
4747         a fixed-point type.
4748
4749 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4750
4751         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
4752         before calling notify_handled_exception.
4753         * a-exextr.adb: Fix comment.
4754
4755 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4756
4757         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4758         Finalize_Address of the access type's finalization master.
4759         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4760         access type's finalization master. Add a guard to prevent
4761         Associated_Storage_Pool from being set on .NET/JVM.
4762         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4763         attribute Finalize_Address of the access type's finalization master.
4764         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4765         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4766         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4767         RE_Unit_Table.
4768         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4769         use clause for System.IO
4770         (Detach): Relax the assertion, to be reinstated later.
4771         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4772         Relax the assertion on Finalize_Address, to be reinstated later.
4773         (Is_Empty_List): New routine.
4774         (pm): New debug routine.
4775         (Set_Finalize_Address): New routine.
4776         * s-finmas.ads (pm): New debug routine.
4777         (Set_Finalize_Address): New routine.
4778         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4779
4780 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4781
4782         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4783         Remove convention C.
4784
4785 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4786
4787         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4788         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4789         (Finalize_TCB): Remove its finalization.
4790         (Initialize): Remove assignment of GET_Exc_Stack_Addr
4791         * s-soflin.adb (NT_Exc_Stack): Remove
4792         (Get_Exc_Stack_Addr_NT): Likewise.
4793         (Get_Exc_Stack_Addr_Soft): Likewise.
4794         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4795         (Get_Exc_Stack_Addr): Likewise.
4796         (Get_Exc_Stack_Addr_Soft): Likewise
4797         * s-taspri-vms.ads (Exc_Stack_T): Remove.
4798         (Exc_Stack_Ptr_T): Likewise.
4799         (Private_Data): Remove Exc_Stack_Ptr component.
4800
4801 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4802
4803         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4804
4805 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4806
4807         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4808
4809 2011-08-29  Geert Bosch  <bosch@adacore.com>
4810
4811         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4812         L2_Norm, Swap_Column): New generic subprograms
4813         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4814         L2_Norm, Swap_Column): Implement new subprograms in order to
4815         eliminate dependency on BLAS and LAPACK libraries in
4816         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4817         version. Forward_Eliminate/Back_Substitute can be used to put a
4818         matrix in row echelon or reduced row echelon form using partial
4819         pivoting.
4820         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4821         Swap_Column): Instantiate from System.Generic_Array_Operations.
4822         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4823         (Sqrt): Local function for simple computation of square root without
4824         adding dependencies on Generic_Elementary_Functions.
4825         (Swap): New subprogram to exchange floating point numbers.
4826         (Inverse): Reimplement using Jordan-Gauss elimination.
4827         (Jacobi): New procedure implementing Jacobi's method for computation
4828         of eigensystems, based on Rutishauser's implementation.
4829         (L2_Norm): Implement directly using the inner product.
4830         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4831         decreasing eigenvalue as required by the Ada RM.
4832         (Swap_Column): New helper procedure for Sort_Eigensystem.
4833         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4834         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4835         Sort_Eigensystems.
4836
4837 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4838
4839         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4840         statements line.
4841
4842 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4843
4844         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4845         than the current node.
4846         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4847         Finalization_Master. The list headers have two fields instead of three.
4848         This should fix alignment issue but subpool allocations are now
4849         unusable. Alphabetize subprograms.
4850         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4851         the size of the header when converting the beginning of the object to
4852         a FM_Node. Set the master's Finalize_Address attribute if not already
4853         set.
4854         (Deallocate_Any_Controlled): Use the offset rather than the size of the
4855         header when converting the beginning of the object to a FM_Node.
4856
4857 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
4858
4859         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4860         reraise when compiling for CodePeer.
4861
4862 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
4863
4864         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4865         now needed by a-convec.adb. Fix warning.
4866
4867 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4868
4869         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4870         processing of TSS routine Finalize_Address when compiling in
4871         CodePeer_Mode.
4872
4873 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4874
4875         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4876         sem_warn.adb: Minor reformatting.
4877
4878 2011-08-29  Emmanuel Briot  <briot@adacore.com>
4879
4880         * prj-conf.adb (Get_Config_Switches): Also collect the list of
4881         languages from aggregated projects.
4882
4883 2011-08-29  Yannick Moy  <moy@adacore.com>
4884
4885         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4886         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4887         Traverse_Package_Declaration, Traverse_Subprogram_Body,
4888         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4889         for stubs are traversed too when parameter is set
4890         (Traverse_All_Compilation_Units): Traverse without going inside stubs
4891         (Traverse_Declarations_Or_Statements): Do the special traversing for
4892         stubs when required.
4893         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4894         return subprogram or package body from stub.
4895         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4896         stubs without prior subprogram decl.
4897
4898 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
4899
4900         * gnat_ugn.texi: Fix typo.
4901
4902 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4903
4904         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4905         which accounts for size vs alignment issues and calculates the size of
4906         the list header.
4907         (Deallocate_Any_Controlled): Ditto.
4908         (Nearest_Multiple_Rounded_Up): New routine.
4909
4910 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4911
4912         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4913         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4914         (Set_Exception_Msg): Ditto.
4915         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
4916         Private_Data.
4917         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4918         Use Save_Occurrence instead of Save_Occurrence_No_Private.
4919         (Raise_With_Msg): Remove Cleanup_Flag.
4920         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4921         Clean_Flag and Private_Data components.
4922
4923 2011-08-29  Yannick Moy  <moy@adacore.com>
4924
4925         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4926         in CodePeer mode.
4927         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4928         of an explicitly declared type, so that the base types of the original
4929         type and this generated type are the same, and a "type" (not a subtype
4930         like previously).
4931         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4932         small" in Alfa mode, like in CodePeer mode.
4933         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4934         clauses in Alfa mode.
4935
4936 2011-08-29  Javier Miranda  <miranda@adacore.com>
4937
4938         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4939         function to the package spec.
4940         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4941         internally generated bodies of null procedures locate the internally
4942         generated spec enforcing mode conformance.
4943         (Is_Interface_Conformant): Ensure that the controlling formal of the
4944         primitives match.
4945
4946 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4947
4948         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4949         reject the pragma if it appears to apply to a formal subprogram.
4950
4951 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4952
4953         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4954         inner expression, to prevent double evaluation.
4955
4956 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4957
4958         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4959         they were unused.
4960         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4961         * a-except-2005.adb (Propagate_Exception): Adjust spec.
4962         (Raise_Current_Excep): Adjust call.
4963         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4964
4965 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4966
4967         * exp_disp.adb: Minor reformatting.
4968
4969 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4970
4971         * a-exexpr.adb (Setup_Exception): Removed.
4972         * a-exexpr-gcc.adb (Setup_Exception): Removed.
4973         * a-except.adb (Exception_Propagation): Removed.
4974         * a-except-2005.adb (Setup_Exception): Removed.
4975         (Reraise): Remove call to Setup_Exception.
4976         (Reraise_Occurrence): Ditto.
4977         (Reraise_Occurrence_Always): Ditto.
4978         (Reraise_Occurrence_No_Defer): Ditto.
4979         (Transfer_Occurrence): Ditto.
4980         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4981         (Set_Exception_Msg): Ditto.
4982
4983 2011-08-29  Robert Dewar  <dewar@adacore.com>
4984
4985         * a-convec.adb, exp_disp.adb: Minor reformatting.
4986
4987 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4988
4989         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4990
4991 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
4992
4993         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4994         Exception_Handlers to No_List instead of Empty_List in the case where
4995         there are no handlers.
4996
4997 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4998
4999         * gcc-interface/gigi.h (enum standard_datatypes): Add
5000         ADT_reraise_zcx_decl
5001         (reraise_zcx_decl): New macro.
5002         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
5003         (gigi): Set reraise_zcx_decl.
5004         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
5005         (gnat_to_gnu): Handle N_Raise_Statement.
5006
5007 2011-08-29  Robert Dewar  <dewar@adacore.com>
5008
5009         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
5010         a-undesu.adb: Minor reformatting.
5011
5012 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5013
5014         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
5015         table, accept an unfrozen untagged component if it is an actual for a
5016         formal incomplete type.
5017         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
5018         provide new iterator forms over vectors.
5019         Introduce type Iterator in package body to implement operations of
5020         Reversible_Iterator interface.
5021         * a-iteint.ads: Make package pure so it is usable with new container
5022         packages, that are categorized Remote_Types.
5023
5024 2011-08-29  Robert Dewar  <dewar@adacore.com>
5025
5026         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
5027
5028 2011-08-29  Bob Duff  <duff@adacore.com>
5029
5030         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
5031         of <>, because this is the routine that checks for dimensionality
5032         errors (for example, for a two-dimensional array, (others => <>) should
5033         be (others => (others => <>)).
5034
5035 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5036
5037         * impunit.adb: Add new run-time units.
5038         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
5039         s-stposu.ads, s-stposu.adb: Code clean up.
5040         Handle protected class-wide or task class-wide types
5041         Handle C/C++/CIL/Java types.
5042         * s-spsufi.adb, s-spsufi.ads: New files.
5043
5044 2011-08-29  Yannick Moy  <moy@adacore.com>
5045
5046         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
5047         library-level subprogram.
5048         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
5049         placement.
5050         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
5051         component.
5052         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
5053         component.
5054         * gnat_rm.texi: Update doc for Test_Case pragma.
5055
5056 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5057
5058         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
5059         convention C.
5060         (GCC_Exception_Access): New type.
5061         (Unwind_DeleteException): New imported procedure
5062         (Foreign_Exception): Import it.
5063         (GNAT_GCC_Exception): Simply have the occurrence inside.
5064         (To_GCC_Exception): New function.
5065         (To_GNAT_GCC_Exception): New function.
5066         (GNAT_GCC_Exception_Cleanup): New procedure..
5067         (Propagate_GCC_Exception): New procedure.
5068         (Reraise_GCC_Exception): New procedure.
5069         (Setup_Current_Excep): New procedure.
5070         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
5071         (Unwind_RaiseException): Ditto.
5072         (Unwind_ForcedUnwind): Ditto.
5073         (Remove): Removed.
5074         (Begin_Handler): Change type of parameter.
5075         (End_Handler): Ditto. Now delete the exception if still present.
5076         (Setup_Key): Removed.
5077         (Is_Setup_And_Not_Propagated): Removed.
5078         (Set_Setup_And_Not_Propagated): Ditto.
5079         (Clear_Setup_And_Not_Propagated): Ditto.
5080         (Save_Occurrence_And_Private): Ditto.
5081         (EID_For): Add 'not null' constraint on parameter.
5082         (Setup_Exception): Does nothing.
5083         (Propagate_Exception): Simplified.
5084         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
5085         re-raise is not expanded anymore.
5086         * s-except.ads (Foreign_Exception): New exception - placeholder for
5087         non Ada exceptions.
5088         * raise-gcc.c (__gnat_setup_current_excep): Declare
5089         (CXX_EXCEPTION_CLASS): Define (not yet used)
5090         (GNAT_EXCEPTION_CLASS): Define.
5091         (is_handled_by): Handle foreign exceptions.
5092         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
5093
5094 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5095
5096         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
5097
5098 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5099
5100         * a-synbar-posix.adb: Minor reformatting.
5101
5102 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5103
5104         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
5105         a-exetim-default.ads (Interrupt_Clocks_Supported,
5106         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5107         definitions to be compliant with AI-0171. The target systems do not
5108         support separate account for the execution time of interrupt handlers.
5109
5110 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5111
5112         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
5113         in the barrier to put first the easiest to evaluate (and the one which
5114         will be True more often). More efficient.
5115
5116 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
5117
5118         * s-atocou-x86.adb: Fix constraint in machine code insertion.
5119
5120 2011-08-29  Bob Duff  <duff@adacore.com>
5121
5122         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
5123         attributes that are now aspects, as specified by AI05-0229-1.
5124         * sem_ch13.adb (Analyze_Aspect_Specifications,
5125         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
5126         pragmas or attribute references, as appropriate.
5127
5128 2011-08-29  Robert Dewar  <dewar@adacore.com>
5129
5130         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
5131         a-synbar-posix.ads: Minor reformatting.
5132
5133 2011-08-29  Yannick Moy  <moy@adacore.com>
5134
5135         * snames.ads-tmpl: Add name Force.
5136
5137 2011-08-29  Pascal Obry  <obry@adacore.com>
5138
5139         * prj-nmsc.adb: Minor reformatting.
5140
5141 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5142
5143         * a-exetim.ads (Interrupt_Clocks_Supported,
5144         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5145         definitions to be compliant with AI-0171.
5146
5147 2011-08-29  Robert Dewar  <dewar@adacore.com>
5148
5149         * a-ngelfu.adb: Add comments.
5150
5151 2011-08-29  Geert Bosch  <bosch@adacore.com>
5152
5153         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
5154         the closest machine number to Pi / 2.0.
5155
5156 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5157
5158         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
5159         package Ada.Synchronous_Barriers.
5160         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
5161         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
5162         default implementation using protected objects and another one
5163         a-synbar-posix using POSIX barriers as the underlying support.
5164         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
5165         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
5166         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
5167         Clean up dependencies.
5168         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
5169
5170 2011-08-29  Robert Dewar  <dewar@adacore.com>
5171
5172         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
5173         exp_dist.adb: Minor code reorganization.
5174         Minor reformatting.
5175
5176 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5177
5178         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
5179         primitive operation must support external streaming if it is not a
5180         controlling access result.
5181
5182 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5183
5184         * sinfo.ads, sem_ch7.adb: Minor reformatting.
5185
5186 2011-08-29  Bob Duff  <duff@adacore.com>
5187
5188         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5189         restriction on allocators, as required by AI05-0013-1.
5190         * restrict.ads: Minor comment fix.
5191
5192 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5193
5194         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5195         (To_Jmpbuf_Address): Ditto
5196         (builtin_longjmp): Ditto
5197
5198 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5199
5200         * sem_res.adb: Minor reformatting.
5201
5202 2011-08-29  Vincent Celier  <celier@adacore.com>
5203
5204         * make.adb (Gnatmake): Move special processing for VM targets after the
5205         call to Get_Target_Parameters.
5206
5207 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5208
5209         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5210
5211 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5212
5213         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5214         where an anonymous access discriminant of a limited designated type
5215         appears in a non-immutably limited discriminated type and issue an
5216         error message. Add local variable Desig_T and replace all occurrences
5217         of Designated_Type.
5218
5219 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5220
5221         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5222         implementation is compliant to RM D.15(15/2) after the modification
5223         imposed by AI05-0094-1 (binding interpretation).
5224
5225 2011-08-29  Robert Dewar  <dewar@adacore.com>
5226
5227         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5228         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5229
5230 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5231
5232         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5233         the scope name, do not report a missing label as a style violation (it
5234         will be diagnosed as an illegality).
5235         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5236         variant records: Get_Enum_Lit_From_Pos already returns a usage
5237         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5238         on Expr in Integer_Literal case so that it can be used by
5239         Build_To_Any_Call.
5240
5241 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5242
5243         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5244         Adjust comment.
5245         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5246         (Build_Abort_Block_Handler): New function to build an Abort_Signal
5247         exception handler.
5248         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5249         Build_Abort_Block_Handler to build the exception handler. Do not
5250         undefer aborts for the Abort_Signal exception handler if back-end
5251         exception mechanism.
5252         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5253         back_end exceptions for all others and abort_signal.
5254         * s-except.ads (ZCX_By_Default): New constant.
5255         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5256         (Raise_Exception_Always): Ditto.
5257         (Raise_From_Signal_Handler): Ditto.
5258         (Raise_With_Location_And_Msg): Ditto.
5259         (Raise_With_Msg): Ditto.
5260         (Reraise): Ditto.
5261         (Reraise_Occurence): Ditto.
5262         (Reraise_Occurrence_Always): Ditto.
5263         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5264         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5265
5266 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5267
5268         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5269
5270 2011-08-29  Robert Dewar  <dewar@adacore.com>
5271
5272         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5273         Minor code reorganization.
5274
5275 2011-08-29  Bob Duff  <duff@adacore.com>
5276
5277         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5278         2012, not just Ada 2005.
5279
5280 2011-08-29  Vincent Celier  <celier@adacore.com>
5281
5282         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5283         with a project file or with gprbuid, if -gnatep= is specified, the
5284         builder may need to be invoked with -x.
5285
5286 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5287
5288         * a-exexpr-gcc.adb: Minor comment fix.
5289
5290 2011-08-29  Robert Dewar  <dewar@adacore.com>
5291
5292         * sem_ch8.adb: Minor reformatting.
5293
5294 2011-08-29  Bob Duff  <duff@adacore.com>
5295
5296         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5297         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5298         treating "some" as unreserved in earlier Ada versions. This is now
5299         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5300         rather than Name_Some, since Tok_Some is now recognized as reserved.
5301         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5302         reserved word.
5303         * scans.ads: Minor comment fixes.
5304         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5305         for other language versions.
5306         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5307         treating "some" as unreserved in earlier Ada versions. This is now
5308         handled in Snames.Is_Keyword_Name.
5309         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5310         Ada 2012.
5311         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5312         unreserved in earlier Ada versions. This is now handled in
5313         Snames.Is_Keyword_Name.
5314         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5315         words as for other language versions.
5316         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5317         Ada 2012, not just Ada 2005.
5318
5319 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5320
5321         * sem_ch13.adb: Additional semantic checks for aspects involved in
5322         iterators.
5323
5324 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5325
5326         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5327         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5328         Container parameter.
5329         (Ancestor_Find): ditto.
5330
5331 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5332
5333         * par-endh.adb: Minor reformatting.
5334
5335 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5336
5337         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5338         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5339         (Adjust_N_CLeanups_For): Remove.
5340         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5341         stack is reached.
5342         (Propgate_Exception): Adjust.
5343         * raise-gcc.c: Add a few static/const.
5344         (Adjust_N_Cleanups_For): Remove declaration.
5345         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5346
5347 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5348
5349         * sem_ch8.adb: Use type of function return when rewriting as object
5350         declaration.
5351
5352 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
5353
5354         * sem_type.adb: Minor reformatting.
5355
5356 2011-08-29  Robert Dewar  <dewar@adacore.com>
5357
5358         * makeutl.adb: Minor reformatting.
5359
5360 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5361
5362         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5363         function call of a limited type, the expansion of the renaming is
5364         complicated by the presence of various temporaries and subtypes that
5365         capture constraints of the renamed object.
5366         Rewrite node as an object declaration, whose expansion is simpler.
5367         Given that the object is limited there is no copy involved and no
5368         performance hit.
5369
5370 2011-08-29  Robert Dewar  <dewar@adacore.com>
5371
5372         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5373         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5374
5375 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5376
5377         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5378         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5379         system-linux-hppa.ads, system-linux-s390.ads,
5380         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5381         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5382         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5383         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5384         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5385         system-solaris-sparc.ads, system-lynxos-x86.ads,
5386         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5387         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5388         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5389         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5390         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5391         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5392         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5393         * opt.ads: Adjust comment.
5394         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5395         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5396         * system.ads: Move GCC_ZCX_Support to obsolete entries.
5397
5398 2011-08-29  Emmanuel Briot  <briot@adacore.com>
5399
5400         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5401         file name is specified on the gnatmake or gprbuild command line, and
5402         before we search for that file in the project.
5403
5404 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5405
5406         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5407         used to determine whether a possible interpretation for an overloadable
5408         entity is declared within the current instantiation and should be
5409         included in the candidate set.
5410
5411 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
5412
5413         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5414
5415 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5416
5417         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5418         access subtype is access_to_subprogram, when applying checks for
5419         RM 3.10.2 (27).
5420
5421 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5422
5423         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5424         for sibling when common parent.
5425
5426 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5427
5428         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5429         "pragma_".
5430
5431 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5432
5433         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5434         for the return type when in ASIS mode.
5435
5436 2011-08-29  Vincent Celier  <celier@adacore.com>
5437
5438         * make.adb (Gnatmake): Get the default search dirs, then the target
5439         parameters after getting the Builder switches, as the Builder switches
5440         may include --RTS= and that could change the default search dirs.
5441
5442 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5443
5444         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5445         Make_Final_Call. Move the processing for class-wide types before the
5446         processing for derivations from [Limited_]Controlled.
5447         (Make_Final_Call): Move the processing for class-wide types before the
5448         processing for derivations from [Limited_]Controlled.
5449         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5450         Add code to account for alignments larger than the list header. Add a
5451         comment illustrating the structure of the allocated object + padding +
5452         header.
5453         (Deallocate_Any_Controlled): Add code to account for alignments larger
5454         than the list header.
5455
5456 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5457
5458         * sinfo.ads, sinfo.adb: New node kind
5459         N_Formal_Incomplete_Type_Definition, related flags.
5460         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5461         Parse formal incomplete types.
5462         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5463         sem_ch12.
5464         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5465         Formal incomplete types do not need completion.
5466         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5467         Validate_Incomplete_Type_Instance): New procedures to handle formal
5468         incomplete types.
5469         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5470         that corresponds to a formal incomplete type.
5471         * sprint.adb: Handle formal incomplete type declarations.
5472         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5473         an insertion point.
5474
5475 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5476
5477         * a-fihema.ads, a-fihema.adb: Unit removed.
5478         * a-undesu.ads, a-undesu.adb: New unit implementing
5479         Ada.Unchecked_Deallocate_Subpool.
5480         * einfo.adb: Remove Associated_Collection from the node usage.
5481         Add Finalization_Master to the node usage.
5482         (Associated_Collection): Removed.
5483         (Finalization_Master): New routine.
5484         (Set_Associated_Collection): Removed.
5485         (Set_Finalization_Master): New routine.
5486         (Write_Field23_Name): Remove Associated_Collection from the output. Add
5487         Finalization_Master to the output.
5488         * einfo.ads: Remove attribute Associated_Collection and its uses in
5489         entities.
5490         Add new attribute Finalization_Master along with its uses in entitites.
5491         (Associated_Collection): Removed along with its pragma import.
5492         (Finalization_Master): New routine along with a pragma import.
5493         (Set_Associated_Collection): Removed along with its pragma import.
5494         (Set_Finalization_Master): New routine along with a pragma import.
5495         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5496         Build_Finalization_Collection with Build_Finalization_Master.
5497         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5498         before the bodies of the predefined routines. Add comment explaining
5499         this. Replace call to Build_Finalization_Collection with
5500         Build_Finalization_Master.
5501         (Freeze_Type): Replace call to Build_Finalization_Collection with
5502         Build_Finalization_Master.
5503         (Make_Finalize_Address_Body): Comment reformatting.
5504         (Make_Predefined_Primitive_Specs): Code reformatting.
5505         (Stream_Operation_OK): Update comment mentioning finalization
5506         collections. Replace RE_Finalization_Collection with
5507         RE_Finalization_Master.
5508         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5509         Associated_Collection with Finalization_Master. Replace call to
5510         Build_Finalization_Collection with Build_Finalization_Master.
5511         (Expand_Allocator_Expression): Replace call to Associated_Collection
5512         with Finalization_Master. Replace call to Set_Associated_Collection with
5513         Set_Finalization_Master. Remove the generation of
5514         Set_Finalize_Address_Ptr.
5515         (Expand_N_Allocator): Replace call to Associated_Collection with
5516         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5517         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5518         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5519         comment on usage. Replace call to Needs_BIP_Collection with
5520         Needs_BIP_Finalization_Master Remplace BIP_Collection with
5521         BIP_Finalization_Master. Update all comments which mention finalization
5522         collections. Replace Associated_Collection with
5523         Finalization_Master. Replace Build_Finalization_Collection with
5524         Build_Finalization_Master.
5525         (BIP_Formal_Suffix): Update BIP_Collection's case.
5526         (Build_Heap_Allocator): Update the related comment. Rename local
5527         variable Collect to Fin_Mas_Id and update its occurrences. Update
5528         comments which mention finalization collections. Replace
5529         Set_Associated_Collection with Set_Finalization_Master.
5530         (Expand_Call): Update the code which detects a special piece of library
5531         code for .NET/JVM.
5532         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5533         Add_Collection_Actual_To_Build_In_Place_Call with
5534         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5535         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5536         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5537         Add_Collection_Actual_To_Build_In_Place_Call with
5538         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5539         (Make_Build_In_Place_Call_In_Assignment): Replace call to
5540         Add_Collection_Actual_To_Build_In_Place_Call with
5541         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5542         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5543         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5544         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5545         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5546         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5547         Replace call to Set_Associated_Collection with Set_Finalization_Master.
5548         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5549         Replace the call to Associated_Collection with Finalization_Master.
5550         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5551         Update the way finalization master names are generated. Update the
5552         retrieval of the correct access type which will carry the pool and
5553         master attributes.
5554         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5555         (Make_Finalize_Address_Body): Abstract types do not need
5556         Finalize_Address. Code reformatting.
5557         (Make_Finalize_Address_Stmts): Update comment on usage.
5558         (Make_Set_Finalize_Address_Ptr_Call): Removed.
5559         (Process_Declarations): Update comments.
5560         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5561         Build_Finalization_Master. Update associated comment.
5562         (Make_Set_Finalize_Address_Ptr_Call): Removed.
5563         * exp_ch13.adb: Update comments which mention finalization collections.
5564         (Expand_N_Free_Statement): Replace the call to Associated_Collection
5565         with Finalization_Master.
5566         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5567         create calls to routines Allocate_Any_Controlled and
5568         Deallocate_Any_Controlled.
5569         (Find_Finalize_Address): New routine.
5570         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5571         comparison.
5572         (Requires_Cleanup_Actions): Update the comment on freeze node
5573         inspection.
5574         * exp_util.ads: Remove comment on generated code for
5575         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5576         is better to simply look in the body.
5577         * freeze.adb (Freeze_All): Update the comment of finalization
5578         collections. Replace the call to Associated_Collection with
5579         Finalization_Master. Replace the call to Build_Finalization_Collection
5580         with Build_Finalization_Master.
5581         * impunit.adb: Add a-undesu and s-stposu to the list of units.
5582         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5583         a-fihema.
5584         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5585         Ada.Finalization. Add processing for children of System.Storage_Pools.
5586         * rtsfind.ads: Remove the naming of second level children of
5587         Ada.Finalization.
5588         Remove Ada_Finalization_Heap_Management from the list of units.
5589         Remove subtype Ada_Finalization_Child.
5590         Remove the following subprogram entities:
5591         
5592            RE_Allocate
5593            RE_Deallocate
5594            RE_Finalization_Collection
5595            RE_Finalization_Collection_Ptr
5596            RE_Set_Finalize_Address_Ptr
5597         
5598         Add the naming of second level children of System.Storage_Pools.
5599         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5600         the list of units.
5601         Add subtype System_Storage_Pools_Child.
5602         Add the following subprogram entities to System.Finalization_Masters:
5603         
5604            RE_Finalization_Master
5605            RE_Finalization_Master_Ptr
5606         
5607         Add the following subprogram entities to System.Storage_Pools.Subpools:
5608         
5609            RE_Allocate_Any_Controlled
5610            RE_Deallocate_Any_Controlled
5611            RE_Root_Storage_Pool_With_Subpools
5612            RE_Root_Subpool
5613            RE_Subpool_Handle
5614         
5615         Move the following subprogram entities from
5616         Ada.Finalization.Heap_Management to System.Finalization_Masters:
5617         
5618            RE_Add_Offset_To_Address
5619            RE_Attach
5620            RE_Base_Pool
5621            RE_Detach
5622         
5623         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5624         Set_Associated_Collection with Set_Finalization_Master.
5625         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5626         BIP_Finalization_Master is created.
5627         * s-finmas.adb: New unit System.Finalization_Masters.
5628         * s-finmas.ads: New unit System.Finalization_Masters.
5629         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5630         * s-stposu.ads, s-stposu.adb: New unit implementing
5631         System.Storage_Pools.Subpools.
5632
5633 2011-08-29  Bob Duff  <duff@adacore.com>
5634
5635         * tbuild.adb: Add assertion.
5636
5637 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5638
5639         * s-pooglo.adb: Minor reformatting.
5640
5641 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5642
5643         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5644         an indexed component of a packed array whose element type is a record
5645         with a representation clause different from that of the right-hand
5646         side, generate a temporary to minimuze the number of bit-field
5647         operations generated.
5648
5649 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5650
5651         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5652         declarations, and thus are likely insertion points for actions.
5653
5654 2011-08-29  Bob Duff  <duff@adacore.com>
5655
5656         * einfo.ads: Minor comment fix.
5657
5658 2011-08-29  Robert Dewar  <dewar@adacore.com>
5659
5660         * frontend.adb, gnat1drv.adb: Minor reformatting.
5661
5662 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5663
5664         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5665         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
5666         space in front of the header.
5667
5668 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5669
5670         * frontend.adb (Frontend): Exit after creating Standard package when
5671         -gnatd.H is present.
5672         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5673         present.
5674
5675 2011-08-29  Robert Dewar  <dewar@adacore.com>
5676
5677         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5678         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5679         snames.ads-tmpl: Minor reformatting.
5680
5681 2011-08-29  Philippe Gil  <gil@adacore.com>
5682
5683         * prj.adb (Reset_Units_In_Table): New procedure.
5684         Reset units to avoid access to freed memory.
5685
5686 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5687
5688         * get_scos.adb: When reading a P statement SCO without a pragma name
5689         (from an older ALI file), ensure that the Pragma_Name component is set
5690         to Unknown_Pragma (not left uninitialized).
5691
5692 2011-08-29  Vincent Celier  <celier@adacore.com>
5693
5694         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5695         modified to compute correctly the object path of a SAL project that is
5696         extending another library project.
5697         (Write_Path_File): New procedure.
5698         * makeutl.ads (Directories): New table moved from Buildgpr
5699         (Get_Directories): New procedure moved from Buildgpr
5700         (Write_Path_File): New procedure
5701         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5702         paths before binding SALs, instead of Set_Ada_Paths.
5703         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5704         Prj.
5705         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5706         (Current_Source_Path_File_Of): New function
5707         (Set_Current_Object_Path_File_Of): New procedure
5708         (Current_Source_Object_File_Of): New function
5709         (Set_Current_Object_Path_File_Of): New procedure
5710         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5711         (Current_Source_Path_File_Of): New function
5712         (Set_Current_Object_Path_File_Of): New procedure
5713         (Current_Source_Object_File_Of): New function
5714         (Set_Current_Object_Path_File_Of): New procedure
5715
5716 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5717
5718         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5719         packed entity, use a bit-field assignment only if there is no change of
5720         representation.
5721
5722 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5723
5724         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5725         Is_RTU instead of using Chars comparisons.
5726
5727 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5728
5729         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5730         temporary object if the actual is constrained, and the discriminants
5731         read from the stream don't match.
5732
5733 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5734
5735         * sem_attr.adb, exp_attr.adb: Add handling of
5736         Attribute_System_Allocator_Alignment
5737         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5738         Attribute_System_Allocator_Alignment.
5739         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5740         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5741         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5742         get_target_system_allocator_alignment.
5743
5744 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5745
5746         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5747         dependencies.
5748
5749 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5750
5751         * exp_ch3.adb (In_Runtime): Fix typo.
5752
5753 2011-08-29  Bob Duff  <duff@adacore.com>
5754
5755         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5756
5757 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5758
5759         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5760         and a separate tag assignment is generated, ensure that the tag
5761         assignment is analyzed.
5762
5763 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5764
5765         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5766         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5767         of statement lists that may contain local declarations.
5768         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5769         duplicate the triggering statements needed for the expansion of this
5770         construct, when the trigger is a dispatching call to a synchronized
5771         primitive.
5772
5773 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5774
5775         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5776         * bindgen.adb: Add comments.
5777         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5778         in CodePeer mode.
5779
5780 2011-08-29  Robert Dewar  <dewar@adacore.com>
5781
5782         * exp_attr.adb: Minor reformatting.
5783         Minor code reorganization and commenting.
5784         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5785         reformatting.
5786
5787 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5788
5789         * get_scos.adb: Ignore chaining indicators not currently supported
5790         by Ada.
5791
5792 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5793
5794         * system.ads: Minor editing.
5795
5796 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5797
5798         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5799         CodePeer mode.
5800         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5801         Attribute_Elab_Subp_Body.
5802         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5803         * sem_util.adb: Update comments.
5804
5805 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5806
5807         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5808         pragma name for each SCO statement corresponding to a pragma.
5809
5810 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5811
5812         * opt.ads: Minor editing.
5813
5814 2011-08-29  Yannick Moy  <moy@adacore.com>
5815
5816         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5817         that only made sense for CodePeer mode.
5818
5819 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5820
5821         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5822         which is no longer used.
5823         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5824         handling of the 64-bit division check.
5825         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5826         division available.
5827         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5828         longer used.
5829
5830 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5831
5832         * get_scos.adb: Minor reformatting.
5833
5834 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5835
5836         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5837         statement list is wrapped in a block, the block is explicitly analyzed
5838         in order to properly redecorate the entities and create a servicing
5839         finalizer.
5840
5841 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5842
5843         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5844         (Set_Zero_Cost_Handling): Remove.
5845
5846 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5847
5848         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5849
5850 2011-08-29  Geert Bosch  <bosch@adacore.com>
5851
5852         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5853         instruction, as the latter may produce -0.0, which is not a valid VAX
5854         F float number.
5855         (Neg_G): Likewise for VAX F float.
5856
5857 2011-08-29  Robert Dewar  <dewar@adacore.com>
5858
5859         * exp_util.adb: Minor reformatting.
5860
5861 2011-08-29  Yannick Moy  <moy@adacore.com>
5862
5863         * sem_ch3.adb: Minor comment update.
5864
5865 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5866
5867         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5868         the operand type.
5869
5870 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5871
5872         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5873         current statement sequence on a generic instantiation or a subprogram
5874         declaration.
5875
5876 2011-08-29  Robert Dewar  <dewar@adacore.com>
5877
5878         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5879         Minor reformatting.
5880
5881 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5882
5883         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5884         Correct the check which involves the freeze node of a controlled or
5885         access-to-controlled type.
5886
5887 2011-08-29  Geert Bosch  <bosch@adacore.com>
5888
5889         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5890         statements.
5891         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5892         Asm statements.
5893
5894 2011-08-29  Yannick Moy  <moy@adacore.com>
5895
5896         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5897         for every index type and component type that is not a subtype_mark.
5898         (Process_Subtype): Set Etype of subtype.
5899
5900 2011-08-29  Robert Dewar  <dewar@adacore.com>
5901
5902         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5903         reorganization.  Minor reformatting.
5904
5905 2011-08-29  Steve Baird  <baird@adacore.com>
5906
5907         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5908         for CodePeer and ALFA modes.
5909
5910 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5911
5912         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5913         that comes from an enclosing scope if it is not the renaming of an
5914         actual, to handle properly a spurious ambiguity in an instance.
5915
5916 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
5917
5918         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5919         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
5920         use it instead of the Esize of the first parameter.
5921         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5922         above change.
5923         <Size>: Likewise.  Call it for composite types on the RM size.
5924
5925 2011-08-29  Yannick Moy  <moy@adacore.com>
5926
5927         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5928         * sem_util.adb (Unique_Name): Correct behaviour for names of
5929         compilation units.
5930
5931 2011-08-29  Yannick Moy  <moy@adacore.com>
5932
5933         * sem_prag.adb (Check_Precondition_Postcondition): In formal
5934         verification mode, analyze pragma expression for correctness, for
5935         pre/post on library-level subprogram, as it is not expanded later.
5936
5937 2011-08-29  Yannick Moy  <moy@adacore.com>
5938
5939         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5940         in formal verification.
5941
5942 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5943
5944         * sem_util.adb: Minor reformatting.
5945         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5946         there's no pragma.
5947         * par_sco.ads, par_sco.adb: Update comments.
5948
5949 2011-08-29  Yannick Moy  <moy@adacore.com>
5950
5951         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5952         associated getter/setter.
5953         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5954
5955 2011-08-29  Vincent Celier  <celier@adacore.com>
5956
5957         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5958         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5959         with declarations for Language_Kind and Dependency_Kind for Ada.
5960         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5961         (Process_Compiler): Take into account the new attributes Dependency_Kind
5962         and Language_Kind.
5963         (Check_Configuration): Check if language kind is unit based, not if the
5964         language name is Ada.
5965         (Process_Exceptions_Unit_Based): Ditto
5966         (Add_Language): Remove default additions of language and dependency kind
5967         * prj.ads: Minor comment change
5968         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5969
5970 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5971
5972         * debug.adb: Update comments.
5973
5974 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
5975
5976         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5977         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5978         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5979         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5980         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5981
5982 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5983
5984         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5985         (GNATLIBCFLAGS_FOR_C): Replace
5986         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5987         (gnatlib-shared-default, gnatlib-shared-dual-win32)
5988         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5989         (gnatlib-sjlj, gnatlib-zcx): Likewise.
5990
5991 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
5992
5993         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5994
5995         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5996
5997         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5998
5999 2011-08-05  Nicolas Roche  <roche@adacore.com>
6000
6001         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
6002         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
6003         canadian cross.
6004         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
6005
6006 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6007
6008         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
6009         subprogram bodies declared out-of-order.
6010
6011 2011-08-05  Yannick Moy  <moy@adacore.com>
6012
6013         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
6014         entities directly in package Standard, otherwise skip the standard
6015         prefix.
6016
6017 2011-08-05  Robert Dewar  <dewar@adacore.com>
6018
6019         * a-cbmutr.adb: Minor reformatting
6020         (Allocate_Node): refactor node allocation algorithm
6021
6022 2011-08-05  Robert Dewar  <dewar@adacore.com>
6023
6024         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
6025         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
6026         mode.
6027         (Analyze_Pragma, case Check_Policy): Ditto.
6028         * sem_prag.ads (Check_Disabled): New function
6029         * snames.ads-tmpl: Add Name_Disable.
6030
6031 2011-08-05  Robert Dewar  <dewar@adacore.com>
6032
6033         * gnat_rm.texi: Document implementation-defined policy DISABLE for
6034         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
6035
6036 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6037
6038         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
6039         that appears in a generic formal part and applies to a formal
6040         subprogram.
6041
6042 2011-08-05  Robert Dewar  <dewar@adacore.com>
6043
6044         * a-cbmutr.ads: Minor reformatting.
6045
6046 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6047
6048         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
6049         to check count, check sign of value instead.
6050         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
6051         (Copy_Subtree): allocate copy of source element
6052         (Equal_Subtree): compare elements, not access objects
6053
6054 2011-08-05  Vincent Celier  <celier@adacore.com>
6055
6056         * gnat_ugn.texi: Fix VMS alternative.
6057
6058 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6059
6060         * sem_ch11.adb: Add comment.
6061
6062 2011-08-05  Robert Dewar  <dewar@adacore.com>
6063
6064         * exp_util.adb: Minor comment fix.
6065
6066 2011-08-05  Robert Dewar  <dewar@adacore.com>
6067
6068         * scng.adb (Error_Unterminated_String): Improve flag position when
6069         comma present.
6070
6071 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6072
6073         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
6074         tree containers).
6075         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
6076         multiway tree containers.
6077
6078 2011-08-05  Robert Dewar  <dewar@adacore.com>
6079
6080         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
6081         * stylesw.adb: Implement -gnatyC to control comment spacing
6082         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
6083         -gnatyc/C).
6084         * usage.adb: Add line for -gnatyC.
6085
6086 2011-08-05  Robert Dewar  <dewar@adacore.com>
6087
6088         * gnat_ugn.texi: Document -gnatyC.
6089         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
6090         synonym for COMMENTS2).
6091
6092 2011-08-05  Robert Dewar  <dewar@adacore.com>
6093
6094         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
6095         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
6096         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
6097         a-comutr.ads, lib-xref.adb: Minor reformatting.
6098
6099 2011-08-05  Robert Dewar  <dewar@adacore.com>
6100
6101         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
6102         warning if there is an exception handler present.
6103
6104 2011-08-05  Pascal Obry  <obry@adacore.com>
6105
6106         * a-iteint.ads: Fix copyright year.
6107
6108 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6109
6110         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
6111         statement SCO for a USE clause or a representation clause.
6112
6113 2011-08-05  Yannick Moy  <moy@adacore.com>
6114
6115         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
6116         between body and spec for stub.
6117         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
6118         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
6119         pragma precondition or postcondition, for which the enclosing
6120         subprogram or package in the AST is not the desired one, return empty.
6121
6122 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6123
6124         * g-expect.adb: Minor reformatting.
6125
6126 2011-08-05  Bob Duff  <duff@adacore.com>
6127
6128         * a-fihema.adb: Comment out OS_Lib.
6129
6130 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6131
6132         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
6133         (unbounded multiway tree containers) and a-iteint.ads.
6134         * a-comutr.ads, a-comutr.adb:
6135         This is the new Ada 2012 unit for unbounded multiway tree containers
6136         * a-cimutr.ads, a-cimutr.adb
6137         This is the new Ada 2012 unit for indefinite multiway tree containers
6138         * a-iteint.ads: New file.
6139
6140 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6141
6142         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
6143
6144 2011-08-05  Bob Duff  <duff@adacore.com>
6145
6146         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
6147         subpools.
6148         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
6149
6150 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6151
6152         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
6153         general indexing aspects of Ada2012. Called when analyzing indexed
6154         components when other interpretations fail.
6155         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
6156         in an expression context where overloading is meaningful. This excludes
6157         the occurrence in an aspect specification (efficiency only).
6158         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
6159         related to iterators can be set by an attribute specification, but
6160         cannot be queried.
6161         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
6162         Constant_Indexing and Variable_Indexing.
6163         (Check_Indexing_Functions): New procedure to perform legality checks.
6164         Additional semantic checks at end of declarations.
6165
6166 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6167
6168         * tree_io.ads: Update ASIS_Version_Number because of the change of the
6169         order of calling Tree_Write/Tree_Read routines made for aspects.
6170
6171 2011-08-05  Bob Duff  <duff@adacore.com>
6172
6173         * a-fihema.adb (Finalize): Fix race condition.
6174
6175 2011-08-05  Yannick Moy  <moy@adacore.com>
6176
6177         * sem_ch12.adb (Analyze_Package_Instantiation,
6178         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6179         mode.
6180
6181 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6182
6183         * sem_type.adb (Specific_Type): in an instance, the type-specific
6184         operand of an equality check that involves null may have a private
6185         type. Use full view to determine legality of construct.
6186
6187 2011-08-05  Vincent Celier  <celier@adacore.com>
6188
6189         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6190         delete or close the file when the call to gnatmake was successful.
6191
6192 2011-08-05  Yannick Moy  <moy@adacore.com>
6193
6194         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6195         Global_Discard_Names.
6196
6197 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6198
6199         * sinfo.ads: comments on use of entity field for aspect specifications.
6200
6201 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6202
6203         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6204         node is not itself an entity but a selected component, it is a
6205         rewritten parameterless call to an en enclosing synchronized operation,
6206         and this expansion will be performed again in the instance, so there is
6207         no global information to preserve.
6208
6209 2011-08-05  Javier Miranda  <miranda@adacore.com>
6210
6211         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6212         for renamings of predefined primitives.
6213         (In_Predef_Prims_DT): New subprogram.
6214
6215 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6216
6217         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6218         possible interpretation of name is a reference type, add an
6219         interpretation that is the designated type of the reference
6220         discriminant of that type.
6221         * sem_res.adb (resolve): If the interpretation imposed by context is an
6222         implicit dereference, rewrite the node as the deference of the
6223         reference discriminant.
6224         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6225         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6226         parent type or base type.
6227         * sem_ch4.adb (Process_Indexed_Component,
6228         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6229         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6230         Check for implicit dereference.
6231         (List_Operand_Interps): Indicate when an implicit dereference is
6232         ambiguous.
6233         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6234
6235 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6236
6237         * scos.ads: Update documentation of SCO table. Pragma statements can now
6238         be marked as disabled (using 'p' instead of 'P' as the statement kind).
6239         * par_sco.ads, par_sco.adb: Implement the above change.
6240         (Process_Decisions_Defer): Generate a P decision for the first parameter
6241         of a dyadic pragma Debug.
6242         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6243         necessary.
6244         * put_scos.adb: Code simplification based on above change.
6245
6246 2011-08-05  Robert Dewar  <dewar@adacore.com>
6247
6248         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6249         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6250         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6251         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6252
6253 2011-08-05  Bob Duff  <duff@adacore.com>
6254
6255         * a-stunau.ads, g-spipat.adb: Update comments.
6256
6257 2011-08-05  Bob Duff  <duff@adacore.com>
6258
6259         * a-fihema.ads: Minor comment fix.
6260         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6261         correct.
6262         (Attach, Detach): Remove some unnecessary code.
6263         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6264
6265 2011-08-05  Bob Duff  <duff@adacore.com>
6266
6267         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6268         allocation for Objects component. This simplifies the code somewhat. It
6269         is also a little more efficient in the not-so-unusual case where there
6270         are no controlled objects allocated.
6271         Make Finalization_Started flag atomic.
6272         (Finalize): Avoid unnecessary detachment of items from the list.
6273         (pcol): Minor cleanup.
6274
6275 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6276
6277         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6278         package whose name is the same as that of the generic unit, or its
6279         ultimate prefix.
6280
6281 2011-08-05  Bob Duff  <duff@adacore.com>
6282
6283         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6284         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6285         Minor comment fixes.
6286
6287 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
6288
6289         * make.adb (Linking_Phase): No longer need to set source search path
6290         before calling gnatlink in CodePeer mode.
6291         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6292         gcc in CodePeer mode, since the binder generated file no longer has a
6293         'with Main'.
6294         * switch.ads, switch.adb (Is_Language_Switch): Removed.
6295         * switch-c.adb: Update comment.
6296
6297 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6298
6299         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6300
6301 2011-08-05  Nicolas Roche  <roche@adacore.com>
6302
6303         * gnat_ugn.texi: Fix minor syntax error issue.
6304
6305 2011-08-05  Vincent Celier  <celier@adacore.com>
6306
6307         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6308         delete or close the file when the call to gnatmake returns a non
6309         successful return code.
6310
6311 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6312
6313         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6314         check, indicate that the copy of the original node does not come from
6315         source, to prevent an infinite recursion of the expansion.
6316
6317 2011-08-05  Johannes Kanig  <kanig@adacore.com>
6318
6319         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6320         VC generation for subprogram bodies.
6321
6322 2011-08-05  Yannick Moy  <moy@adacore.com>
6323
6324         * einfo.ads: Typo.
6325         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6326         the base type with the smallest allowed base type.
6327
6328 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6329
6330         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6331         aspects.
6332
6333 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6334
6335         * sem_ch12.ads: minor comment updates.
6336
6337 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6338
6339         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6340         instantiation and a formal package the compiler generates a package
6341         renaming declaration so that the generic name within the declaration
6342         is interpreted as a renaming of the instance. At the end of a formal
6343         package declaration, this renaming must become invisible.
6344
6345 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6346
6347         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6348         comparison and rely on concrete entities instead.
6349
6350 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6351
6352         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6353         and discriminants, to indicate that the type has an access discriminant
6354         that supports implicit dereference.
6355         * snames.ads-tmpl: Add names of aspects and attributes related to
6356         Ada2012 iterators: constant_indexing, default_iterator,
6357         iterator_element, implicit_dereference, variable_indexing.
6358         * aspects.ads, aspects.adb: entries for iterator-related aspects.
6359         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6360         iterator-related aspects.
6361         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6362
6363 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6364
6365         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6366         metrics in gnatmetric to cover new kinds of coupling mentrics.
6367
6368 2011-08-05  Steve Baird  <baird@adacore.com>
6369
6370         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6371         of calling the user-defined main subprogram.
6372         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
6373         is set) Call_Main_Subprogram ahead of, as opposed to
6374         inside of, Main.
6375         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6376         generation of a "with" of the user-defined main subprogram.
6377         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6378         (which is now called from Gen_Main instead).
6379
6380 2011-08-05  Emmanuel Briot  <briot@adacore.com>
6381
6382         * projects.texi: Added reference to the Makefile package.
6383
6384 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6385
6386         * exp_ch7.adb: Minor comment rewording.
6387
6388 2011-08-05  Ed Falis  <falis@adacore.com>
6389
6390         * env.c: Fix comment.
6391
6392 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6393
6394         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6395         character comparison and rely on concrete entities instead.
6396
6397 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6398
6399         * sem_ch3.adb: (Check_Private_Overriding): better error message,
6400         suggested by AI95-0068.
6401
6402 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6403
6404         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6405         the two potential initialization calls. This accounts for any
6406         access-before-elaboration checks which may precede the initialization
6407         calls.
6408         (Next_Suitable_Statement): New routine. Returns the next real statement
6409         after the input node while skipping generated checks.
6410         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6411         with comment on usage.
6412         Do not generate Elaborate_All when the trigger is a finalization call
6413         coming from a type init proc.
6414         (Check_Elab_Call): Propagate the initialization procedure context to
6415         subsequent calls to Check_A_Call.
6416         (Check_Internal_Call_Continue): Propagate the initialization procedure
6417         context to subsequent calls to Check_Elab_Call.
6418         (Is_Finalization_Procedure): New routine. Returns True if the input
6419         entity denotes a [Deep_]Finalize routine.
6420         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6421         along with comment on usage.
6422
6423 2011-08-05  Vadim Godunko  <godunko@adacore.com>
6424
6425         * s-atocou.ads: Add list of supported platforms.
6426
6427 2011-08-05  Yannick Moy  <moy@adacore.com>
6428
6429         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6430
6431         * opt.ads (Disable_ALI_File): new Boolean flag
6432         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6433
6434 2011-08-05  Ed Falis  <falis@adacore.com>
6435
6436         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6437         environ is properly defined.
6438
6439 2011-08-05  Vincent Celier  <celier@adacore.com>
6440
6441         * make.adb (Compilation_Phase): Exit immediately when all objects have
6442         been found up to date, to avoid multiple exit messages.
6443         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6444         same project for languages with no compiler.
6445         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6446         -eI.
6447 2011-08-05  Robert Dewar  <dewar@adacore.com>
6448
6449         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6450         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6451         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6452         s-atocou-builtin.adb: Minor reformatting.
6453
6454 2011-08-05  Yannick Moy  <moy@adacore.com>
6455
6456         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6457         if the node to wrap is a pragma check, this node and enclosed
6458         expression are not expanded, so do not apply any transformations here.
6459         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6460         introducing transient scopes.
6461
6462 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
6463
6464         * adaint.c (__gnat_set_writable, __gnat_set_readable,
6465         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6466         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6467         routine is available, so we use the default implementation of these
6468         functions.
6469         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6470         support for copying attributes on VxWorks 6.
6471
6472 2011-08-05  Yannick Moy  <moy@adacore.com>
6473
6474         * debug.adb: Remove use of -gnatd.D.
6475         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6476         * opt.ads: Simplify variables for ALFA mode, to keep one only
6477         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6478         to ALFA mode.
6479
6480 2011-08-05  Vincent Celier  <celier@adacore.com>
6481
6482         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6483         Builder'Default_Switches.
6484
6485 2011-08-05  Vincent Celier  <celier@adacore.com>
6486
6487         * makeusg.adb: Add lines for --create-map-file switches.
6488
6489 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6490
6491         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6492         profile is incomplete and the full view is available, replace it with
6493         the full view.
6494         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6495         incomplete, freezing the subprogram is delayed until the full view is
6496         frozen.
6497         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6498         fixed-point multiplication operator and the predefined operator is
6499         resolved in favor of the user-defined one.
6500
6501 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6502
6503         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6504         CONST_CAST.
6505
6506 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6507
6508         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6509         whether a type lacks user-defined Read or Write operations, or has a
6510         component that lacks them.
6511         * sem_attr.adb (Check_Stream_Attribute): if restriction
6512         No_Default_Stream_Attributes is active, verify that all subcomponent
6513         types of the target have user-defined stream operations, and report
6514         error otherwise.
6515         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6516         * exp_strm.adb: Build_Elementary_Input_Call,
6517         Build_Elementary_Write_Call): remove checks for restriction
6518         No_Default_Stream_Attributes, now checked in semantics.
6519
6520 2011-08-04  Vincent Celier  <celier@adacore.com>
6521
6522         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6523         switches on the command line, look for all valid --RTS switches in the
6524         Builder switches and for each language use the first runtime name found
6525         to invoke gprconfig.
6526         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6527         command line and there is no auto-configuration.
6528         (Runtime_Name_Set_For): New function.
6529
6530 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6531
6532         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6533         elaborate initialization expression for variable Abort when processing
6534         a package body or a declaration.
6535         (Create_Finalizer): Propagate the package context when creating the
6536         exception-related variables.
6537         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6538         For_Package along with usage comment.
6539
6540 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6541
6542         * gcc-interface/Makefile.in: Clean up targets.
6543         Enable new package for atomic counters and copy-on-write implementation
6544         of unbounded strings on x86 platforms.
6545         * gcc-interface/Make-lang.in: Update dependencies.
6546
6547 2011-08-04  Robert Dewar  <dewar@adacore.com>
6548
6549         * exp_ch7.adb: Minor reformatting.
6550
6551 2011-08-04  Robert Dewar  <dewar@adacore.com>
6552
6553         * exp_strm.adb: Minor reformatting.
6554
6555 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6556
6557         * s-atocou.adb: Replace by dummy version and use on targets where atomic
6558         operations are not supported.
6559         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6560         * s-atocou-x86.adb: New file.
6561         * Makefile.rtl: Add s-atocou.o file
6562
6563 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6564
6565         * make.adb (Compile): Move setting of CodePeer_Mode to ...
6566         (Compilation_Phase): ... here.
6567         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6568
6569 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6570
6571         * Make-generated.in: Fix minor typo in comment.
6572
6573 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6574
6575         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6576         the project path.
6577
6578 2011-08-04  Robert Dewar  <dewar@adacore.com>
6579
6580         * a-coinho.adb: Minor reformatting.
6581
6582 2011-08-04  Robert Dewar  <dewar@adacore.com>
6583
6584         * a-coinho.ads: Minor reformatting.
6585
6586 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6587
6588         * s-atocou.ads, s-atocou.adb: New files.
6589         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6590         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6591         direct use of GCC's atomic builtins and replace them by use of new
6592         atomic counter package.
6593
6594 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6595
6596         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6597
6598 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6599
6600         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6601         with a call to Get_External_Tag.
6602         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6603         subprogram usage. Remove the guard against package declarations and
6604         bodies since Build_Cleanup_Statements is no longer invoked in that
6605         context.
6606         (Build_Components): Initialize Tagged_Type_Stmts when the context
6607         contains at least one library-level tagged type.
6608         (Build_Finalizer): New local variables Has_Tagged_Types and
6609         Tagged_Type_Stmts along with associated comments on usage. Update the
6610         logic to include tagged type processing.
6611         (Create_Finalizer): Insert all library-level tagged type unregistration
6612         code before the jump block circuitry.
6613         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6614         (Expand_N_Package_Declaration): Remove the call to
6615         Build_Cleanup_Statements.
6616         (Process_Tagged_Type_Declaration): New routine. Generate a call to
6617         unregister the external tag of a tagged type.
6618         (Processing_Actions): Reimplemented to handle tagged types.
6619         (Process_Declarations): Detect the declaration of a library-level
6620         tagged type and carry out the appropriate actions.
6621         (Unregister_Tagged_Types): Removed. The machinery has been directly
6622         merged with Build_Finalizer.
6623
6624 2011-08-04  Robert Dewar  <dewar@adacore.com>
6625
6626         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6627         gnatls.adb, exp_ch3.adb: Minor reformatting.
6628
6629 2011-08-04  Marc Sango  <sango@adacore.com>
6630
6631         * sem_attr.adb (Analyze_Attribute): Replace the message
6632         "invisible attribute of}" of the spark restriction violation in
6633         attribute reference by the simple message "invisible attribute of type".
6634         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6635         two insertion characters: '&' and '}'.
6636
6637 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6638
6639         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6640         * a-coinho.ads, a-coinho.adb: New file.
6641         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6642
6643 2011-08-04  Nicolas Roche  <roche@adacore.com>
6644
6645         * alfa_test.adb: Not all ali files are containing alfa information even
6646         if compiled with -gnatd.F. So suppress warning about missing ALFA
6647         information.
6648
6649 2011-08-04  Yannick Moy  <moy@adacore.com>
6650
6651         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6652         scope.
6653         * put_alfa.adb: Check that scope name is not empty.
6654
6655 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6656
6657         * exp_ch3.adb (Stream_Operation_Ok): new predicate
6658         Needs_Elementary_Stream_Operation, to determine whether user-defined
6659         Read and Write attributes are available for the elementary components
6660         of the given type. If only the predefined attributes are available,
6661         then when restriction No_Default_Stream_Attributes is active the
6662         predefined stream attributes for the composite type cannot be created.
6663
6664 2011-08-04  Robert Dewar  <dewar@adacore.com>
6665
6666         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6667         Put routines in alpha order
6668
6669 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
6670
6671         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6672         * gcc-interface/Make-lang.in: Update dependencies.
6673
6674 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6675
6676         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6677         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6678         gnat1why).
6679
6680 2011-08-04  Robert Dewar  <dewar@adacore.com>
6681
6682         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6683         lib-xref-alfa.adb: Minor reformatting.
6684
6685 2011-08-04  Marc Sango  <sango@adacore.com>
6686
6687         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6688         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6689         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6690         mode.
6691
6692 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6693
6694         * bindgen.adb (Gen_Adainit_C): Remove.
6695         (Gen_Adafinal_C): Ditto.
6696         (Gen_Elab_Externals_C): Ditto.
6697         (Gen_Elab_Calls_C): Ditto.
6698         (Gen_Elab_Order_C): Ditto.
6699         (Gen_Elab_Defs_C): Ditto.
6700         (Gen_Finalize_Library_C): Ditto.
6701         (Gen_Finalize_Library_Defs_C): Ditto.
6702         (Gen_Main_C): Ditto.
6703         (Gen_Output_File_C): Ditto.
6704         (Gen_Restrictions_C): Ditto.
6705         (Gen_Versions_C): Ditto.
6706         (Write_Info_Ada_C): Ditto.
6707         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6708         (Gen_Output_File): Do not force Ada_Bind_File anymore.
6709         Always call Gen_Output_File_Ada.
6710         * gnatlink.adb (Begin_Info): Now a constant.
6711         (End_Info): Ditto.
6712         (Ada_Bind_File): Remove
6713         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
6714         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6715         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6716         * opt.ads (Ada_Bind_File): Remove.
6717
6718 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6719
6720         * projects.texi: Document target-specific directory in default project
6721         path for gnatmake.
6722
6723 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6724
6725         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6726         path in all cases .
6727
6728 2011-08-04  Yannick Moy  <moy@adacore.com>
6729
6730         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6731         opt.ads, lib-xref.ads: Code clean up.
6732
6733 2011-08-04  Yannick Moy  <moy@adacore.com>
6734
6735         * gnat_rm.texi: Update description of Test_Case
6736         * gnat_ugn.texi: Typo.
6737
6738 2011-08-04  Ed Falis  <falis@adacore.com>
6739
6740         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6741
6742 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6743
6744         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6745         it is of type Root_Controlled. This action eliminates fields Prev and
6746         Next from type equality.
6747
6748 2011-08-04  Yannick Moy  <moy@adacore.com>
6749
6750         * lib-xref-alfa.adb: Correct typo.
6751
6752 2011-08-04  Matthew Heaney  <heaney@adacore.com>
6753
6754         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6755         component.
6756
6757 2011-08-04  Yannick Moy  <moy@adacore.com>
6758
6759         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6760         (Analyze_Pragma): allow static string expression for name of Test_Case,
6761         instead of simply string literals.
6762         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6763         expressions.
6764
6765 2011-08-04  Vincent Celier  <celier@adacore.com>
6766
6767         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6768         case suffixes to find truncated main sources.
6769
6770 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6771
6772         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6773         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6774         (Compute_Current_Task): Ditto.
6775
6776 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6777
6778         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6779
6780 2011-08-04  Yannick Moy  <moy@adacore.com>
6781
6782         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6783         library-level constant.
6784         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6785         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6786         used as selector of parameter association, in ALFA mode.
6787
6788 2011-08-04  Robert Dewar  <dewar@adacore.com>
6789
6790         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6791         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6792         reformatting.
6793
6794 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6795
6796         * make.adb (Linking_Phase): Set source search path before calling
6797         gnatlink in CodePeer mode.
6798
6799 2011-08-04  Javier Miranda  <miranda@adacore.com>
6800
6801         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6802         Remove code which takes care of building TSDs.
6803         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6804         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6805         the accessibility check in VM targets.
6806         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6807         (Building_Static_DT): Now returns false for VM targets.
6808         (Build_VM_TSDs): Removed.
6809         (Expand_Interface_Conversion): Generate missing runtime check for
6810         conversions to interface types whose target type is unknown at compile
6811         time.
6812         (Make_VM_TSD): Add missing code to disable the generation of calls to
6813         Check_TSD if the tagged type is not defined at library level, or not
6814         has a representation clause specifying its external tag, or -gnatdQ is
6815         active.
6816         * exp_disp.ads (Build_VM_TSDs): Removed.
6817         (Make_VM_TSDs): Spec relocated from exp_disp.adb
6818         * sem_disp.adb (Check_Dispatching_Operation): No code required to
6819         register primitives in the dispatch tables in VM targets.
6820         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6821         initialization of class-wide interface objects in VM targets.
6822         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6823         of Make_DT).
6824
6825 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
6826
6827         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6828         when dotnet-ld cannot be found.
6829
6830 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6831
6832         * bindgen.adb: Simplify significantly generation of binder body file in
6833         CodePeer mode.
6834         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6835         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6836         not expanded).
6837
6838 2011-08-04  Yannick Moy  <moy@adacore.com>
6839
6840         * sem_prag.adb, sem.ads: Code cleanup.
6841
6842 2011-08-04  Tristan Gingold  <gingold@adacore.com>
6843
6844         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6845         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6846         results if possible.
6847         * s-stusta.adb (Print): Adjust after changes in s-stausa.
6848         * gnat_ugn.texi: Update dynamic stack usage section.
6849
6850 2011-08-04  Steve Baird  <baird@adacore.com>
6851
6852         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6853         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6854         contains only a call to the user-defined main subprogram.
6855         (Gen_Main_Ada) - If CodePeer_Mode is set, then
6856         call the "wrapper" subprogram instead of directly
6857         calling the user-defined main subprogram.
6858
6859 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6860
6861         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6862         alternatives of a case statement for controlled objects. Rename local
6863         variable A to Dead_Alt.
6864         (Expand_N_If_Statement): Check the then and else statements of an if
6865         statement for controlled objects. Check the then statements of all
6866         elsif parts of an if statement for controlled objects.
6867         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6868         objects.
6869         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6870         detects a loop associated with the expansion of an array object.
6871         Augment the processing of the loop statements to account for a possible
6872         wrap done by Process_Statements_For_Controlled_Objects.
6873         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6874         statements and abortable part of an asynchronous select for controlled
6875         objects.
6876         (Expand_N_Conditional_Entry_Call): Check the else statements of a
6877         conditional entry call for controlled objects.
6878         (Expand_N_Selective_Accept): Check the alternatives of a selective
6879         accept for controlled objects.
6880         (Expand_N_Timed_Entry_Call): Check the entry call and delay
6881         alternatives of a timed entry call for controlled objects.
6882         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6883         exception handler for controlled objects.
6884         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6885         Add formal parameter Nested_Constructs along with its associated
6886         comment.
6887         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6888         Requires_Cleanup_Actions.
6889         (Process_Statements_For_Controlled_Objects): New routine.
6890         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6891         routine. Inspect a node which contains a non-handled sequence of
6892         statements for controlled objects. If such an object is found, the
6893         statements are wrapped in a block.
6894
6895 2011-08-04  Bob Duff  <duff@adacore.com>
6896
6897         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6898         need to compare with Class_Wide_Type (T2), in order to get at the
6899         original class-wide type node.
6900         * sem_type.ads (Covers): Improve the comment.
6901         * einfo.ads (Class_Wide_Type): Improve the comment.
6902         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6903         the type of the Deref.
6904
6905 2011-08-04  Yannick Moy  <moy@adacore.com>
6906
6907         * gnat_rm.texi: Document that Test_Case pragma can only appear on
6908         separate declarations.
6909         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6910         check identifier of pragma argument.
6911         (Chain_TC): check that no other test case associated to the same entity
6912         share the same name.
6913         (Check_Test_Case): disallow test case inside subprogram body
6914         (Analyze_Pragma): correct call to check identifier and not argument
6915         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6916         function gets name from test case pragma.
6917
6918 2011-08-04  Yannick Moy  <moy@adacore.com>
6919
6920         * gnat_rm.texi: Document new pragma and aspect.
6921         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6922         (No_Duplicates_Allowed): new constant array defining whether duplicates
6923         aspects of each kind can appear on the same declaration.
6924         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6925         field, which points to a node holding the previous Spec_PPC_List.
6926         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6927         through the indirection with Contract.
6928         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6929         * par-prag.adb (Prag): do nothing on Test_Case pragma
6930         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6931         be called directly.
6932         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6933         component Ensures of Test_Case.
6934         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6935         (Analyze_Generic_Subprogram_Declaration,
6936         Analyze_Subprogram_Instantiation,
6937         Analyze_Abstract_Subprogram_Declaration,
6938         Analyze_Subprogram_Body_Helper,
6939         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6940         insert contract in subprogram node at point of definition
6941         * sem_ch13.adb
6942         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6943         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6944         corresponding pragma
6945         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6946         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6947         similar to the analysis of pre/post
6948         (Derive_Subprogram): insert contract in subprogram node at point of
6949         derivation.
6950         * sem_prag.adb, sem_prag.ads
6951         (Check_Arg_Is_String_Literal, Check_Identifier):
6952         new checking procedures to be called in treatment of pragmas
6953         (Check_Test_Case): new procedure to check that a Test_Case aspect or
6954         pragma is well-formed. This does not check currently that 'Result is
6955         used only in the Ensures component of a Test_Case.
6956         (Analyze_Pragma): add case for Test_Case
6957         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6958         components of a Test_Case.
6959         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6960         expressions in the 3rd (and 4th if present) arguments of a Test_Case
6961         pragma, treated as spec expressions.
6962         (Sig_Flags): add value -1 for Test_Case.
6963         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6964         Get_Requires_From_Test_Case_Pragma): getters for both expression
6965         components of a Test_Case.
6966         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6967         indirection between an entry or [generic] subprogram entity and its
6968         pre/post + test-cases.
6969         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6970         get/set for fields of an N_Contract node.
6971         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6972         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6973         names and pragma for Test_Case.
6974         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6975
6976 2011-08-04  Vincent Celier  <celier@adacore.com>
6977
6978         * gnat_ugn.texi: Improve documentation of gnatmake switch
6979         --source-info-file=.
6980
6981 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6982
6983         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6984         type). Initialize Atyp to the appropriate type which is later checked
6985         for completion. Rewrite the assertion associated with private type
6986         completion.
6987
6988 2011-08-04  Ed Falis  <falis@adacore.com>
6989
6990         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6991         initialize the number of CPUs.
6992
6993 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6994
6995         * sem_type.adb (Disambiguate): New subsidiary routine
6996         In_Same_Declaration_List, to implement AI05-0020: a user-defined
6997         equality on an anonymous access type whose designated type is private
6998         does not lead to an ambiguity with the universal access equality
6999         operator in the body or child units of the defining package. The same
7000         is true for a multiplication operator on a private type completed with
7001         a fixed-point-type.
7002
7003 2011-08-04  Javier Miranda  <miranda@adacore.com>
7004
7005         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
7006         (Normalize_Scalars_Config): Removed.
7007         * opt.adb
7008         (Register_Opt_Config_Switches): Remove registering config values of
7009         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
7010         (Restore_Opt_Config_Switches): Remove code which restores the values of
7011         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7012         Init_Or_Norm_Scalars.
7013         (Save_Opt_Config_Switches): Remove code which saves values of
7014         Init_Or_Norm_Scalars and Normalize_Scalars.
7015         (Set_Opt_Config_Switches): Remove code which restores config values of
7016         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7017         Init_Or_Norm_Scalars.
7018
7019 2011-08-04  Yannick Moy  <moy@adacore.com>
7020
7021         * frontend.adb (Frontend): remove previous patch to avoid full
7022         qualification in ALFA mode.
7023         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
7024         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
7025         unique name for an entity, which could be used to identify the entity
7026         across compilation units.
7027
7028 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7029
7030         * prj-env.adb
7031         (Initialize_Default_Project_Path): Add target specific directory
7032         ($prefix/$target/lib/gnat) in front of project path in all cases
7033         (making gnatmake's behaviour consistent with gprbuild).
7034         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
7035         Pass target name from Sdefault to project subsystem.
7036         * gnatls.adb: Show new target specific default project directory.
7037
7038 2011-08-04  Johannes Kanig  <kanig@adacore.com>
7039
7040         * cstand.adb: Add Information to Identifier in Standard
7041         (Identifer_For): Set Entity to the corresponding entity
7042
7043 2011-08-04  Sergey Rybin  <rybin@adacore.com>
7044
7045         * gnat_ugn.texi: Update doc on gnatcheck.
7046
7047 2011-08-04  Yannick Moy  <moy@adacore.com>
7048
7049         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
7050         xrefs in a scope.
7051
7052 2011-08-04  Yannick Moy  <moy@adacore.com>
7053
7054         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
7055         performing expansion.
7056         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
7057         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
7058         it is not called in ALFA mode.
7059
7060 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7061
7062         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
7063         after all, so removed.
7064
7065 2011-08-04  Sergey Rybin  <rybin@adacore.com>
7066
7067         * vms_data.ads: Add missing VMS qualifiers.
7068
7069 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7070
7071         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
7072         the list of files on the command line after processing it through
7073         Complete_Mains.
7074
7075 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7076
7077         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
7078         processing for .NET/JVM. These targets can now benefit from
7079         Raise_From_Controlled_Operation and they share the same processing with
7080         standard targets.
7081         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
7082         These targets need transient scopes in order to properly finalize short
7083         lived controlled objects.
7084         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
7085          NET/JVM. These targets can now benefit from
7086         Raise_From_Controlled_Operation and they share the same processing with
7087         standard targets.
7088
7089 2011-08-04  Geert Bosch  <bosch@adacore.com>
7090
7091         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
7092
7093 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7094
7095         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
7096         Expand_Record_Aggregate, to determine whether aggregate must be
7097         expanded into assignments. This is the case if the ancestor part is
7098         private, regarless of the setting of the flag Has_Private_Ancestor.
7099
7100 2011-08-04  Ed Falis  <falis@adacore.com>
7101
7102         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
7103
7104 2011-08-04  Bob Duff  <duff@adacore.com>
7105
7106         * sinfo.ads: Fix comment.
7107
7108 2011-08-04  Steve Baird  <baird@adacore.com>
7109
7110         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
7111         choose a package name in much the same way as is
7112         done for JGNAT when VM_Target /= No_VM, except that
7113         a slightly more distinctive prefix string is used.
7114
7115 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7116
7117         * makeutl.adb (Complete_Mains): no longer accept unit names on the
7118         gnatmake command line.
7119         This behavior was never documented (and was supported only because of
7120         an early bug in the code). This case might lead to ambiguous cases
7121         (between unit names and truncated base names without suffixes).
7122
7123 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7124
7125         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
7126         Remove the external tag of a tagged type from the internal hash table.
7127         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
7128         expanded usage of the routine. Strenghten the check for Is_Master. Add
7129         processing for tagged types.
7130         (Build_Finalizer): Create all the necessary lists used in finalizer
7131         creation when the processed context is a package that may contain
7132         tagged types.
7133         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
7134         Requires_Cleanup_Actions.
7135         (Expand_N_Package_Body): Package bodies may need clean up code
7136         depending on whether they contain tagged types.
7137         (Expand_N_Package_Declaration): Package declarations may need clean up
7138         code depending on whether they contain tagged types.
7139         (Unregister_Tagged_Types): New routine. Search through a list of
7140         declarations or statements, looking for non-abstract Ada tagged types.
7141         For each such type, generate code to unregister the external tag.
7142         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
7143         Requires_Cleanup_Actions.
7144         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
7145         through a list of declarations or statements looking for non-abstract
7146         Ada tagged types or controlled objects.
7147         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
7148         Requires_Cleanup_Actions.
7149         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
7150         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
7151         RE_Unit_Table.
7152
7153 2011-08-04  Vincent Celier  <celier@adacore.com>
7154
7155         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
7156         has Ada sources, not project Project, because if the root project
7157         Project has no sources of its own, all projects will be deemed without
7158         sources.
7159
7160 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7161
7162         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
7163         of the No_Param_Proc acc-to-subp type used for initialization of
7164         __gnat_finalize_library_objects so that it's declared at library level
7165         rather than nested inside of the adainit routine.
7166
7167 2011-08-04  Javier Miranda  <miranda@adacore.com>
7168
7169         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
7170         if the tagged type has a representation clause which specifies its
7171         external tag.
7172
7173 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7174
7175         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
7176         Remove previous procedure with that name.
7177         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
7178         when appropriate.
7179         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7180         subtype mark, the ancestor cannot have unknown discriminants.
7181         (Resolve_Record_Aggregate): if the type has invisible components
7182         because of a private ancestor, the aggregate is illegal.
7183
7184 2011-08-04  Vincent Celier  <celier@adacore.com>
7185
7186         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7187         account switches -gnat2005, -gnat12 and -gnat2012.
7188
7189 2011-08-04  Bob Duff  <duff@adacore.com>
7190
7191         * s-tasdeb.ads: Minor comment fix.
7192
7193 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7194
7195         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7196         CodePeer mode.
7197         * switch.ads, switch.adb (Is_Language_Switch): New function.
7198
7199 2011-08-04  Vincent Celier  <celier@adacore.com>
7200
7201         * switch-c.adb: Minor comment addition.
7202
7203 2011-08-04  Vincent Celier  <celier@adacore.com>
7204
7205         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7206         ending with '=' is followed by a space (missing file name).
7207
7208 2011-08-04  Pascal Obry  <obry@adacore.com>
7209
7210         * g-regist.ads: Fix size of HKEY on x86_64-windows.
7211
7212 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7213
7214         * sem_ch12.adb (Analyze_Associations): New routine
7215         Check_Overloaded_Formal_Subprogram to reject a formal package when
7216         there is a named association or a box initialisation for an overloaded
7217         formal subprogram of the corresponding generic.
7218
7219 2011-08-04  Yannick Moy  <moy@adacore.com>
7220
7221         * alfa.ads (ALFA_Xref_Record): add component for type of entity
7222         * get_alfa.adb, put_alfa.adb: Read and write new component of
7223         cross-reference.
7224         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7225
7226 2011-08-04  Pascal Obry  <obry@adacore.com>
7227
7228         * urealp.adb: Minor reformatting.
7229
7230 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7231
7232         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7233         Handle the case when Cleanup_Protected_Object returns Empty.
7234
7235 2011-08-04  Yannick Moy  <moy@adacore.com>
7236
7237         * frontend.adb (Frontend): only qualify names in non-ALFA mode
7238
7239 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7240
7241         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7242         call, ignore functions.
7243
7244 2011-08-04  Geert Bosch  <bosch@adacore.com>
7245
7246         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7247         point.
7248
7249 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7250
7251         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7252         as an index for Builder'Switches. This conforms to the documentation.
7253         * make.adb (Insert_Project_Sources): avoid duplicate code
7254
7255 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7256
7257         * makeutl.adb (Complete_Mains): if the user has passed a relative file
7258         name on the command line (for instance "../dummy"), never assume it can
7259         be a unit name.
7260
7261 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7262
7263         * bindgen.adb: Remove code the reference or create the
7264         Break_Start/__gnat_break_start procedure.
7265         * s-stalib.adb (Break_Start): Removed.
7266
7267 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7268
7269         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7270         shared with gprbuild.
7271
7272 2011-08-04  Yannick Moy  <moy@adacore.com>
7273
7274         * par-ch4.adb (P_Primary): preferentially issue an error message about
7275         a missing parenthesis arount a conditional or case expression in Ada
7276         2012 mode, if we detect that the alignment is not correct for a
7277         statement.
7278
7279 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7280
7281         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7282         tag-to-class-wide conversion as needing finalization actions.
7283         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7284         a tag-to-class-wide conversion as needing finalization actions.
7285         (Is_Finalizable_Transient): The result of a tag-to-class-wide
7286         conversion does not need finalization actions.
7287         (Is_Tag_To_CW_Conversion): New routine.
7288         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7289         whether an object is the result of a tag-to-class-wide conversion.
7290
7291 2011-08-04  Yannick Moy  <moy@adacore.com>
7292
7293         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7294         the left-hand-side and right-hand-side of a conjunct are inserted when
7295         translating a pre- or postcondition
7296         * sem_ch6.adb: Correct typo in comment
7297
7298 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7299
7300         * gnat_rm.texi: Ravenscar does not prohibit dependence on
7301         Unchecked_Conversion and Unchecked_Deallocation.
7302
7303 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7304
7305         * make.adb: Minor reformatting.
7306
7307 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7308
7309         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7310         sources in the project and its imported projects, but not in the whole
7311         tree.
7312
7313 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7314
7315         * make.adb: Remove debug trace.
7316
7317 2011-08-04  Vincent Celier  <celier@adacore.com>
7318
7319         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7320         path in canonical form, to be able to compare path names on platforms
7321         such as Windows or Darwin.
7322
7323 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7324
7325         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7326         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7327         * scos.ads: Update documentation accordingly.
7328         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7329         pragmas.
7330
7331 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7332
7333         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7334         attribute only if prefix type is scalar.
7335
7336 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7337
7338         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7339         in gnatmake for specifying mains on the command line that do not belong
7340         to the main project. These mains must currently all belong to the same
7341         project, though.
7342         (Ultimate_Extension_Of): removed, since duplicated
7343         Ultimate_Extending_Project.
7344
7345 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7346
7347         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7348         instead.
7349         (CodePeer_Mode_String): New.
7350         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7351         CodePeer mode.
7352         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7353         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7354         mode, since no useful elaboration subprogram is needed by CodePeer.
7355         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7356         In this mode, compile binder file with -gnatC and do stop after this
7357         step.
7358
7359 2011-08-04  Vincent Celier  <celier@adacore.com>
7360
7361         * exp_ch7.adb: Minor comment fix.
7362
7363 2011-08-04  Robert Dewar  <dewar@adacore.com>
7364
7365         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7366         exp_ch4.adb, makeutl.adb: Minor reformatting.
7367
7368 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7369
7370         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7371         Create several new subprograms to move code out of Make. This makes the
7372         code more readable, removes code duplication, and is a preparation work
7373         for adding support for aggregate projects.
7374
7375 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7376
7377         * s-po32gl.ads, s-po32gl.adb: New files.
7378         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7379         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7380         (Build_Finalization_Collection): Use it.
7381         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7382         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7383         literals.
7384         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7385         * gcc-interface/Make-lang.in: Update dependencies.
7386
7387 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7388
7389         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7390         the command line.
7391
7392 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7393
7394         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7395         command line is not a file name, also check whether it could be a unit
7396         name.
7397
7398 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7399
7400         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7401         the header of the finalization routine.
7402         If the unit has no finalizer but is a body whose spec has one, then
7403         generate the decrement of the elaboration entity only.
7404         If the unit has a finalizer and is a spec, then do not generate the
7405         decrement of the elaboration entity.
7406         (Gen_Finalize_Library_C): Likewise.
7407
7408 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7409
7410         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7411         (Bounds_Size_Expression): Removed.
7412         (Double_Alignment_Of): New subsidiary routine.
7413         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7414         for a hole in the dope vector of unconstrained arrays due to different
7415         index and element alignments.
7416
7417 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7418
7419         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7420         raise program_error because body has not been seen yet.
7421
7422 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7423
7424         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7425         an unresolved name.
7426
7427 2011-08-04  Vincent Celier  <celier@adacore.com>
7428
7429         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7430
7431 2011-08-04  Yannick Moy  <moy@adacore.com>
7432
7433         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7434         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7435
7436 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7437
7438         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7439         instantiation in RCI.
7440
7441 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7442
7443         * make.adb: Share more code with gprbuild
7444
7445 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7446
7447         * projects.texi: Added documentation for the IDE'Gnat project file
7448         attribute.
7449
7450 2011-08-04  Nicolas Roche  <roche@adacore.com>
7451
7452         * gnat_rm.texi: Minor editing.
7453
7454 2011-08-04  Javier Miranda  <miranda@adacore.com>
7455
7456         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7457         and the library case for VM targets.
7458         (Gen_Adainit_Ada): Likewise.
7459
7460 2011-08-04  Robert Dewar  <dewar@adacore.com>
7461
7462         * g-altive.ads: Minor comment updates.
7463         * prj-nmsc.adb: Minor reformatting.
7464
7465 2011-08-04  Javier Miranda  <miranda@adacore.com>
7466
7467         * opt.ads
7468         (Normalize_Scalars_Config): Value of the configuration switch set by
7469         pragma Normalize_Scalars when it appears in the gnat.adc file.
7470         (Normalize_Scalars): New field for record Config_Switches_Type. Used
7471         to save and restore settings of this pragma.
7472         * opt.adb
7473         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7474         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7475
7476 2011-08-04  Vincent Celier  <celier@adacore.com>
7477
7478         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7479
7480 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7481
7482         * makeutl.adb: Minor reformatting.
7483
7484 2011-08-04  Olivier Hainque  <hainque@adacore.com>
7485
7486         * g-altive.ads: Update comments to reflect that only the soft
7487         binding is available today.
7488
7489 2011-08-04  Robert Dewar  <dewar@adacore.com>
7490
7491         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7492         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7493         * gcc-interface/Make-lang.in: Update dependencies.
7494
7495 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7496
7497         * prj-env.adb: Remove local debug traces.
7498
7499 2011-08-04  Yannick Moy  <moy@adacore.com>
7500
7501         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7502         was used instead of Hi_OK, which could cause a read of an uninitialized
7503         value later on. Detected while working on the new warning.
7504         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7505         to local variable.
7506         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7507         in more cases, in order to detect more unreferenced values.
7508         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7509         object for expression, if any.
7510
7511 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7512
7513         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7514         the operand types instead of the Esize.
7515
7516 2011-08-04  Steve Baird  <baird@adacore.com>
7517
7518         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7519         enable CodePeer_Mode.
7520         * bindusg.adb (Display): Add help message describing -P binder switch.
7521         * gnat_ugn.texi: Document -P binder switch.
7522         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7523         user-defined main program directly.
7524         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7525         user-defined main program in the context clause of the package body.
7526
7527 2011-08-04  Yannick Moy  <moy@adacore.com>
7528
7529         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7530         duplicate of Defining_Entity
7531         (Get_Unique_Entity_For_Decl): rename function into
7532         Unique_Defining_Entity
7533         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7534         (Formal_Proof_On): remove synthesized flag
7535         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7536         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7537         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7538         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7539         Annotate (Formal_Proof)
7540
7541 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7542
7543         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7544         source files with non-standard naming schemes, in imported projects
7545
7546 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7547
7548         * makeutl.adb (Complete_Mains): when a multi-unit source file is
7549         specified on the gprbuild command line, we need to compile all units
7550         within that file, not just the first one we find
7551         Fix error message for mains that are not found.
7552
7553 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7554
7555         * sem_ch6.adb: Update comment.
7556         * sem_ch12.adb: Minor reformatting.
7557
7558 2011-08-04  Bob Duff  <duff@adacore.com>
7559
7560         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7561         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7562         race condition whose symptom is to fail to lock Parent. That, in turn,
7563         causes Parent.Awake_Count to be accessed without locking Parent, which
7564         causes another race condition whose symptom is that Parent.Awake_Count
7565         can be off by 1 (either too high or too low). The solution is to lock
7566         Parent unconditionally, and then lock Acceptor, before reading
7567         Acceptor.Terminate_Alternative.
7568
7569 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7570
7571         * debug.adb: Update comment.
7572
7573 2011-08-04  Robert Dewar  <dewar@adacore.com>
7574
7575         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7576         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7577         exp_ch6.adb: Minor reformatting.
7578
7579 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7580
7581         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7582         checks for -gnateE.
7583
7584 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7585
7586         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7587
7588 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7589
7590         * sinfo.ads: Minor reformatting.
7591
7592 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7593
7594         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7595         even if there is no location.
7596
7597 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7598
7599         * sem_res.adb, sem_ch4.adb: move check for restriction
7600         No_Task_Hierarchy to resolve_allocator.
7601
7602 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7603
7604         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7605         This flag of N_Pragma nodes is not used, remove it as well as all of
7606         the associated circuitry.
7607
7608 2011-08-04  Javier Miranda  <miranda@adacore.com>
7609
7610         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7611         runtime check on duplicated externa tags
7612         * debug.adb Document switch -gnatdQ.
7613
7614 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7615
7616         * a-fihema.ads: Minor typo fix.
7617
7618 2011-08-04  Yannick Moy  <moy@adacore.com>
7619
7620         * sem_ch10.adb: Minor comment update.
7621
7622 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7623
7624         * einfo.adb: Update the node field usage to reflect the renaming of
7625         Return_Flag to Return_ Flag_Or_Transient_Decl.
7626         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7627         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7628         (Write_Field15_Name): Change Return_Flag to
7629         Return_Flag_Or_Transient_Decl.
7630         * einfo.ads: Rename node field Return_Flag to
7631         Return_Flag_Or_Transient_Decl. Update the associated comment and all
7632         occurrences in entities.
7633         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7634         associated Inline pragma.
7635         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7636         associated Inline pragma.
7637         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7638         routine.
7639         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7640         Return_Flag and Set_Return_Flag.
7641         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7642         objects generated for controlled transients declared inside an
7643         Exception_With_Actions. Update the calls to Return_Flag.
7644         (Process_Object_Declaration): Add code to add a null guard for hook
7645         objects generated for controlled transients declared inside an
7646         Exception_With_Actions. Update related comment.
7647         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7648         objects generated for controlled transients declared inside an
7649         Exception_With_Actions. Update the calls to Return_Flag.
7650         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7651
7652 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7653
7654         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7655         positional aggregate.
7656
7657 2011-08-04  Vincent Celier  <celier@adacore.com>
7658
7659         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7660         SLOC only for pragmas.
7661
7662 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7663
7664         * projects.texi: Minor typo fix.
7665
7666 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7667
7668         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7669         on case-sensitive file systems.
7670
7671 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7672
7673         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7674         nested in a disabled pragma.
7675         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7676         enclosing pragma, if any, for X decisions.
7677
7678 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7679
7680         * sem_prag.adb: Minor reformatting.
7681
7682 2011-08-04  Vincent Celier  <celier@adacore.com>
7683
7684         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7685         allowed in no run time mode.
7686
7687 2011-08-04  Vincent Celier  <celier@adacore.com>
7688
7689         * make.adb (Check): When -gnatc is used, check for the source file
7690         inside the ALI file with a canonical case file name.
7691
7692 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7693
7694         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7695         overriding the separator.
7696
7697 2011-08-04  Robert Dewar  <dewar@adacore.com>
7698
7699         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7700         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7701
7702 2011-08-04  Robert Dewar  <dewar@adacore.com>
7703
7704         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7705
7706 2011-08-04  Yannick Moy  <moy@adacore.com>
7707
7708         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7709         'Result only appears in postcondition of function.
7710
7711 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7712
7713         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7714         external tag, include the value of the external tag in the exception
7715         message.
7716
7717 2011-08-04  Yannick Moy  <moy@adacore.com>
7718
7719         * sem_attr.adb (Result): modify error message for misplaced 'Result
7720
7721 2011-08-04  Sergey Rybin  <rybin@adacore.com>
7722
7723         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7724         clear that the second argument must be an identifier.
7725
7726 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7727
7728         * exp_ch9.adb (Build_Barrier_Function): When compiling with
7729         -fpreserve-control-flow, insert an IF statement on the barrier
7730         condition to ensure that a conditional branch instruction is generated.
7731
7732 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7733
7734         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7735         (Processing_Flags.Ignore_Missing_With): new flag.
7736
7737 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7738
7739         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7740         Source_List_File on case-insensitive systems where the file is actually
7741         on a case-sensitive file system (NFS,...).
7742
7743 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7744
7745         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7746         function return contains a controlled [extension] aggregate and the
7747         return statement is not part of a handled sequence of statements, wrap
7748         the return in a block. This ensures that all controlled temporaries
7749         generated during aggregate resolution will be picked up by the
7750         finalization machinery.
7751
7752 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7753
7754         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7755         components, freeze type before resolution, to ensure that default
7756         initializations are present for all components.
7757         * sem_res.adb (Resolve_Actuals): the designated object of an
7758         accces-to-constant type is a legal actual in a call to an
7759         initialization procedure.
7760
7761 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7762
7763         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7764         N_Unchecked_Type_Conversion to the possible containers of a renamed
7765         transient variable.
7766
7767 2011-08-04  Yannick Moy  <moy@adacore.com>
7768
7769         * par-ch13.adb (Aspect_Specifications_Present): recognize
7770         "with Identifier'Class =>" as an aspect, so that a meaningful warning
7771         is issued in Strict mode.
7772         * par.adb: Fix typos in comments.
7773
7774 2011-08-04  Yannick Moy  <moy@adacore.com>
7775
7776         * sem_attr.adb (Result): modify error message to take into account Post
7777         aspect when compiling Ada 2012 (or newer) code.
7778
7779 2011-08-04  Nicolas Roche  <roche@adacore.com>
7780
7781         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
7782         remove need for GCC exceptions.
7783
7784 2011-08-04  Vincent Celier  <celier@adacore.com>
7785
7786         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7787         project, not the source file name.
7788         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7789         excluded, continue looking. This excluded source will only be returned
7790         if there is no other source with the same base name that is not locally
7791         removed.
7792
7793 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7794
7795         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7796         private and one of the operands is a real literal, use a qualified
7797         expression rather than a conversion which is not meaningful to the
7798         back-end.
7799
7800 2011-08-04  Yannick Moy  <moy@adacore.com>
7801
7802         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7803         corresponding aspect X'Class are allowed, proceed with analysis of the
7804         aspect instead of skipping it.
7805
7806 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7807
7808         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7809         This will allow to have an Ada implementation for the subprogram.
7810
7811 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7812
7813         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7814         completion and aspects are present, apply them to the entity for the
7815         type which is currently the partial view, but which is the one that
7816         will be frozen.
7817         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7818         applies to a partial view, indicate that the full view has predicates
7819         and delayed aspects.
7820         (Replace_Type_Reference): Handle properly predicates that apply to the
7821         full view of a private completion.
7822
7823 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7824
7825         * layout.adb (Layout_Type): For composite types, do not set Esize.
7826         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7827         set Esize.
7828         (Size_Known): Look at the RM size of components instead of the Esize.
7829         (Freeze_Record_Type): Look at the RM size instead of the Esize to
7830         issue warning and activate Implicit_Packing.
7831         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
7832         if the Esize is not known.
7833         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7834         for elementary types only.
7835         (Analyze_Record_Representation_Clause): Look at the RM size instead
7836         of the Esize to issue errors.
7837         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7838         is not known.
7839         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
7840         obsolete block.
7841         Look at the RM size instead of the Esize for types if the latter is
7842         not known.
7843         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7844
7845 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7846
7847         * sem_type.adb: proper handling of equality not involving anonymous
7848         access types.
7849
7850 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7851
7852         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7853         Vis_Decls. When creating a library-level finalizer for a package spec,
7854         both the declaration and body of the finalizer are inserted either in
7855         the visible or private declarations of the package spec.
7856
7857 2011-08-04  Javier Miranda  <miranda@adacore.com>
7858
7859         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7860         use of the full-view of a type when invoking Is_Ancestor.
7861         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7862         the full-view of private parents is requested, then use also the
7863         full-view of the parent of the first derivation.
7864
7865 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7866
7867         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7868         instead of the locally imported procedure.
7869         * s-taprop-mingw.adb (Enter_Task): Ditto.
7870         * s-valrea.adb (Scan_Real): Ditto.
7871         * s-imgrea.adb (Set_Image_Real): Ditto.
7872         * s-flocon.ads: Make the package pure.
7873
7874 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7875
7876         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7877         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7878         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7879         New subprogram, moved here from...
7880         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7881         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7882         rewriting of the last argument into a procedure call statement here...
7883         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7884         instead.
7885
7886 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7887
7888         * par_sco.adb: Minor reformatting.
7889
7890 2011-08-04  Robert Dewar  <dewar@adacore.com>
7891
7892         * erroutc.adb: Minor reformatting.
7893
7894 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7895
7896         * par_sco.adb: Comment update.
7897
7898 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7899
7900         * s-flocon.ads: New file.
7901         * g-flocon.ads: Now a renaming of s-flocon.
7902         * Makefile.rtl: Add s-flocon.o
7903
7904 2011-08-04  Javier Miranda  <miranda@adacore.com>
7905
7906         * exp_strm.adb (Build_Array_Input_Function): if the array type is
7907         constrained, do not attempt to build a subtype of it.
7908
7909 2011-08-04  Yannick Moy  <moy@adacore.com>
7910
7911         * errout.ads Change comments: remove 'R'M as an example where quotes
7912         are needed; add ALFA as another case where quotes are not needed
7913         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7914         case where quotes are not needed.
7915         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7916         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7917         Remove all occurrences of 'A'L'F'A
7918
7919 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7920
7921         * sem_ch13.adb: check legality of invariant pragma.
7922
7923 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7924
7925         * bindgen.adb: Add comments.
7926
7927 2011-08-04  Yannick Moy  <moy@adacore.com>
7928
7929         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7930         synthesized flag.
7931         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7932         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7933
7934 2011-08-04  Robert Dewar  <dewar@adacore.com>
7935
7936         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7937         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7938         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7939
7940 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7941
7942         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7943
7944 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7945
7946         PR ada/47880
7947         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7948         allocated object.
7949
7950 2011-08-04  Robert Dewar  <dewar@adacore.com>
7951
7952         * einfo.ads, exp_ch4.adb: Minor reformatting.
7953
7954 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7955
7956         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7957
7958 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7959
7960         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7961         type in all cases to compute list of primitive operations, because full
7962         view may be an itype that is not attached to the list of declarations.
7963
7964 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7965
7966         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7967         library has already been finalized.
7968         (Gen_Adafinal_C): Likewise.
7969         (Gen_Adainit_Ada): Generate an early return if the library has
7970         already been elaborated.
7971         (Gen_Adainit_C): Likewise.
7972         (Gen_Output_File_Ada): Generate an elaboration flag.
7973         (Gen_Output_File_C): Likewise.
7974
7975 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7976
7977         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7978         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7979         built in the first place.
7980         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7981         for CodePeer because Finalize_Address was not built to begin with.
7982         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7983
7984 2011-08-04  Pascal Obry  <obry@adacore.com>
7985
7986         * adaint.c (__gnat_tmp_name): Use current process id to create temp
7987         filenames, this ensures unicity of filenames across processes.
7988
7989 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7990
7991         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7992         Raise_Controlled to Raise_From_Controlled_Operation. Update the
7993         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7994         Add False as the actual to From_Abort in the generated call to
7995         Raise_From_Controlled_Operation.
7996
7997 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7998
7999         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
8000         so that the ali file name can be retrieved from outside of this package.
8001         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
8002         doing nothing in the general case, but used to update the object file
8003         timestamp if directly generated by the backend.
8004         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
8005         to a later time than the ali file one.
8006
8007 2011-08-04  Yannick Moy  <moy@adacore.com>
8008
8009         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
8010         entities whose body contains an Annotate pragma which forces formal
8011         proof on this body.
8012         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8013         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
8014         Mark_Non_ALFA_Subprogram to pass in a message and node.
8015         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
8016         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
8017         surrounding subprogram.
8018         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
8019         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
8020         as not in ALFA is annotated with Formal_Proof being On, then an error
8021         is issued based on the additional parameters for message and node.
8022         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
8023         * gcc-interface/Make-lang.in: Update dependencies.
8024
8025 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8026
8027         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
8028         Finalize_Address when CodePeer is enabled.
8029
8030 2011-08-04  Pascal Obry  <obry@adacore.com>
8031
8032         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
8033         the latter returns a pointer to a static buffer which is deallocated
8034         at the end of the routine.
8035
8036 2011-08-04  Yannick Moy  <moy@adacore.com>
8037
8038         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
8039         after index creation; mark unconstrained base array type generated as
8040         being in/not in ALFA as well
8041         (Make_Index): mark subtype created as in/not in ALFA
8042         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
8043         over a loop as in/not in ALFA, depending on its type and form of loop
8044         iteration.
8045
8046 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8047
8048         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
8049         directly to False on .NET and JVM.
8050
8051 2011-08-04  Yannick Moy  <moy@adacore.com>
8052
8053         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
8054         constraint that subtype must come from source code to be in ALFA, so
8055         that anonymous subtypes can be in ALFA too.
8056
8057 2011-08-04  Yannick Moy  <moy@adacore.com>
8058
8059         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
8060         reference for ALFA mode.
8061         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
8062         procedure public so as to use it from formal verification back-end.
8063
8064 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
8065
8066         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
8067         invalid checks of the Parameter, making Remove_Switch not working
8068         correctly.
8069
8070 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8071
8072         * targparm.ads: Update header: no run-time exception is needed on this
8073         file.
8074
8075 2011-08-04  Vincent Celier  <celier@adacore.com>
8076
8077         * a-fihema.adb: Use System.IO instead of GNAT.IO
8078
8079 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8080
8081         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
8082         are forbidden in Compiler_Unit mode.
8083
8084 2011-08-04  Robert Dewar  <dewar@adacore.com>
8085
8086         * sem_util.adb: Minor reformatting.
8087
8088 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8089
8090         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
8091         library-level finalizers.
8092         (Gen_Finalize_Library_C): Update the import string for library-level
8093         finalizers.
8094         (Gen_Finalize_Library_Defs_C): Update the definition name of a
8095         library-level finalizer.
8096         * exp_ch7.adb: Remove with and use clauses for Stringt.
8097         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
8098         Spec_Decl. Add local variable Body_Id. The names of library-level
8099         finalizers are now manually fully qualified and are no longer external.
8100         A single name is now capable of servicing .NET, JVM and non-VM targets.
8101         Pragma Export is no longer required to provide visibility for the name.
8102         (Create_Finalizer_String): Removed.
8103         (New_Finalizer_Name): New routine which mimics New_..._Name.
8104
8105 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8106
8107         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
8108         elaboration counter to Standard_Short_Integer.
8109         * sem_util.adb (Build_Elaboration_Entity): Likewise.
8110         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
8111         (Gen_Elab_Externals_C): Likewise.
8112
8113 2011-08-04  Ed Falis  <falis@adacore.com>
8114
8115         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
8116         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
8117         system-vxworks-mips.ads, system-vxworks-x86.ads
8118         (Always_Compatible_Rep): set to False for all VxWorks targets.
8119
8120 2011-08-04  Robert Dewar  <dewar@adacore.com>
8121
8122         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
8123         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
8124         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
8125         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
8126         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
8127         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
8128         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
8129         Minor reformatting and code reorganization.
8130
8131 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8132
8133         * projects.texi: Added doc for aggregate projects.
8134
8135 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8136
8137         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
8138         Add support for overriding the Project_Path in aggregate projects.
8139
8140 2011-08-04  Robert Dewar  <dewar@adacore.com>
8141
8142         * a-cofove.ads: Minor reformatting.
8143
8144 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8145
8146         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
8147         on the generated code.
8148         (Build_Finalize_Statements): Update the comment on the generated code.
8149         (Build_Initialize_Statements): Update the comment on the generated code.
8150         (Build_Object_Declarations): Add local variable Result. The object
8151         declarations are now built in sequence.
8152         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
8153         RE_Unit_Table.
8154
8155 2011-08-04  Robert Dewar  <dewar@adacore.com>
8156
8157         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
8158
8159 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8160
8161         * einfo.ads (Elaboration_Entity): Document new definition and use.
8162         (Elaboration_Entity_Required): Adjust to above change.
8163         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
8164         * exp_ch12.adb: And with and use for Snames.
8165         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
8166         * exp_util.adb (Set_Elaboration_Flag): Likewise.
8167         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
8168         <Check_Unit_Name>: Deal with N_Expanded_Name.
8169         <Attribute_Elaborated>: Extend to all unit names.
8170         * sem_elab.adb: And with and use for Uintp.
8171         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
8172         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
8173         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
8174         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
8175         from Gen_Adainit_Ada.
8176         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
8177         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
8178         case, do not call System.Standard_Library.Adafinal; instead call
8179         finalize_library if needed.
8180         (Gen_Adafinal_C): Likewise.
8181         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8182         non-main program case.
8183         (Gen_Adainit_C): Generate a couple of external declarations here.
8184         In the main program case, set SSL.Finalize_Library_Objects.
8185         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8186         (Gen_Elab_Calls_C): Likewise.
8187         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
8188         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
8189         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8190         objects here.
8191         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8192         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
8193         Gen_Adafinal_Ada.
8194         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8195         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
8196         of external declarations.  Call Gen_Finalize_Library_C.
8197
8198 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8199
8200         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8201         Compute_Compilation_Phases): new subprogram.
8202         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8203         The number of mains as well as the various compilation phases that
8204         need to be run are now project tree specific, since various
8205         aggregated trees might have different requirements. In particular,
8206         they do not all require bind or link phases.
8207
8208 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8209
8210         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8211         (Project_Tree_Appdata): New type.
8212         It is now possible to associate application-specific data to a project
8213         tree. In particular, this is used in the gprbuild builder to avoid a
8214         number of global tables and htables, especially now that there can be
8215         several project trees loaded at once because of aggregate projects.
8216         (Debug_Name): new procedure.
8217         * projects.texi: Clarify syntax of "**" for Source_Dirs
8218
8219 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8220
8221         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8222         the "roots" for a main.
8223         (Fill_From_Project): add support for aggregate projects. Main units
8224         in aggregated projects are now automatically added in the list of
8225         files to build (although this fails later on in gprbuild, because
8226         these files are not using the root proejct tree, so this needs
8227         further cleanup)
8228         * gcc-interface/Make-lang.in: Update dependencies.
8229
8230 2011-08-03  Yannick Moy  <moy@adacore.com>
8231
8232         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8233         conditional expression in ALFA.
8234         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8235         expressions as not in ALFA.
8236
8237 2011-08-03  Robert Dewar  <dewar@adacore.com>
8238
8239         * a-cofove.adb: Minor reformatting.
8240
8241 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8242
8243         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8244         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8245         gprbuild sources.
8246         These packages are more logically placed in the Queue package, since
8247         they manipulate the queue. It is also likely that they can be adapted
8248         for gnatmake, thus sharing more code.
8249         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8250         that we could move the above.
8251
8252 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8253
8254         * errutil.adb (Finalize): clean up the list of error messages on exit.
8255         Calling this subprogram multiple times will no longer show duplicate
8256         error messages on stderr.
8257
8258 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8259
8260         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8261         Getopt_Switches when we have already define a command line
8262         configuration.
8263
8264 2011-08-03  Yannick Moy  <moy@adacore.com>
8265
8266         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8267         in ALFA. Instead, they are considered as assertions to prove.
8268         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8269         nodes as not in ALFA. Instead, include conditional expressions in ALFA
8270         if they have no ELSE part, or if they occur in pre- and postconditions,
8271         where the Condition cannot have side-effects in ALFA
8272         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8273         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8274         Instead, include type conversion between scalar types in ALFA.
8275         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8276         if-and-only-if its type is in ALFA.
8277
8278 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8279
8280         * scos.adb, get_scos.adb, put_scos.adb
8281         New code letter for decisions: G (entry guard)
8282         * par_sco.adb
8283         (Traverse_Subprogram_Body): Rename to...
8284         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8285         (Traverse_Protected_Body): New subprogram
8286         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8287         protected bodies and entry bodies.
8288
8289 2011-08-03  Yannick Moy  <moy@adacore.com>
8290
8291         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8292         entities with get/set subprograms, which is set on procedure entities
8293         generated by the compiler for a postcondition.
8294         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8295         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8296         entity for a declaration
8297         (Get_Unique_Entity_For_Decl): new function returning an entity which
8298         represents a declaration, so that matching spec and body have the same
8299         entity.
8300
8301 2011-08-03  Robert Dewar  <dewar@adacore.com>
8302
8303         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8304         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8305
8306 2011-08-03  Yannick Moy  <moy@adacore.com>
8307
8308         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8309         library-level because retriction No_Implicit_Dynamic_Code in the
8310         front-end prevents its definition as a local subprogram
8311         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8312         for reuse in other contexts
8313         (Traverse_Declarations_Or_Statements,
8314         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8315         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8316         procedures take a callback parameter to be called on all declarations
8317         * lib-xref.ads
8318         (Traverse_All_Compilation_Units): new generic function to traverse a
8319         compilation unit and call a callback parameter on all declarations
8320
8321 2011-08-03  Javier Miranda  <miranda@adacore.com>
8322
8323         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8324         in Java since they are always enclosed in a namespace that
8325         differentiates them, and overloaded entities are supported by the VM.
8326
8327 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8328
8329         * checks.adb (Determine_Range): If a computed bound of an operation is
8330         outside the range of the base type of the expression, and overflow
8331         checks are enabled, the result is unknown and cannot be used for any
8332         subsequent constant folding.
8333         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8334         unknown, so is the result of the comparison.
8335
8336 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8337
8338         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8339         From_Abort. When finalization was triggered by an abort, propagate
8340         Standard'Abort_Signal rather than Program_Error.
8341         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8342         From_Abort.
8343         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8344         From_Abort. When finalization was triggered by an abort, propagate
8345         Standard'Abort_Signal rather than Program_Error.
8346         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8347         From_Abort.
8348         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8349         Abort_Id. Update the calls to Build_Object_Declarations and
8350         Build_Raise_Statement to include Abort_Id.
8351         (Build_Adjust_Statements): New local variable Abort_Id. Update the
8352         calls to Build_Object_Declarations and Build_Raise_Statement to include
8353         Abort_Id.
8354         (Build_Finalize_Statements): New local variable Abort_Id. Update the
8355         calls to Build_Object_Declarations and Build_Raise_Statement to include
8356         Abort_Id.
8357         (Build_Components): Create an entity for Abort_Id when exceptions are
8358         allowed on the target.
8359         (Build_Finalizer): New local variable Abort_Id.
8360         (Build_Initialize_Statements): New local variable Abort_Id. Update the
8361         calls to Build_Object_Declarations and Build_Raise_Statement to include
8362         Abort_Id.
8363         (Build_Object_Declarations): Add new formal Abort_Id. Create the
8364         declaration of flag Abort_Id to preserve the original abort status
8365         before finalization code is executed.
8366         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8367         runtime routine Raise_From_Controlled_Operation.
8368         (Create_Finalizer): Update the call to Build_Raise_Statement to include
8369         Abort_Id. Update the call to Build_Object_Declarations to include
8370         Abort_Id. Update the layout of the finalizer body.
8371         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8372         (Process_Transient_Objects): New local variable Abort_Id. Remove the
8373         clunky code to create all flags and objects related to
8374         exception propagation and replace it with a call to
8375         Build_Object_Declarations. Update the call to Build_Raise_Statement to
8376         include Abort_Id.
8377         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8378         Add new formal Abort_Id and associated comment on its use.
8379         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8380         on its use.
8381         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8382         Remove the clunky code to create all flags and objects related to
8383         exception propagation and replace it with a call to
8384         Build_Object_Declarations. Update the call to Build_Raise_Statement.
8385
8386 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
8387
8388         * s-tassta.adb: Fix minor typos.
8389
8390 2011-08-03  Robert Dewar  <dewar@adacore.com>
8391
8392         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8393         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8394
8395 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8396
8397         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8398         to packages. This ensures that the finalizer body will not end up
8399         inside the freeze node.
8400         (Process_Declarations): Add code to detect whether a freeze node has a
8401         nested finalization collection.
8402
8403 2011-08-03  Pascal Obry  <obry@adacore.com>
8404
8405         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8406         (Current_Session): Return a not null access to Session_Type.
8407         (Default_Session): Likewise.
8408
8409 2011-08-03  Robert Dewar  <dewar@adacore.com>
8410
8411         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8412         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8413
8414 2011-08-03  Pascal Obry  <obry@adacore.com>
8415
8416         * g-awk.ads: Minor comment fix.
8417
8418 2011-08-03  Sergey Rybin  <rybin@adacore.com>
8419
8420         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8421         the tree structure related to discriminant constraints.
8422         Original_Discriminant cannot be used any more for computing the
8423         defining name for the reference to a discriminant.
8424
8425 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8426
8427         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8428         function is not visibly tagged, this is not a dispatching call and
8429         therfore is not Tag_Indeterminate, even if the function is marked as
8430         dispatching on result.
8431
8432 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8433
8434         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8435         (Expand_N_Free_Statement): Add a guard to protect against run-times
8436         which do not support controlled types.
8437         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8438         against run-times which do not support controlled types.
8439         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8440         against run-times which do not support controlled types.
8441         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8442         against run-times which do not support controlled types.
8443         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8444         protect against run-times which do not support controlled types.
8445
8446 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
8447
8448         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8449         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8450
8451 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8452
8453         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8454         modified in the source, to prevent spurious warnings when compiling
8455         with -gnatg.
8456
8457 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8458
8459         * a-except-2005.adb: Minor reformatting.
8460
8461 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8462
8463         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8464         is a renaming declaration in the private part of a package, do not emit
8465         a warning that the with_clause could be moved because the renaming may
8466         be used in the body or in a child unit.
8467
8468 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8469
8470         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8471         Propagate the Comes_From_Source attribute from the original return
8472         object to the renaming.
8473
8474 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
8475
8476         * exp_ch7.adb (Build_Raise_Statement): Do not call
8477         Raise_From_Controlled_Operation when this routine is not present in
8478         the run-time library.
8479         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8480         libraries (Ravenscar), tasks are non-terminating, and protected objects
8481         and tasks can only appear at library level, so we do not want
8482         finalization of protected objects nor tasks.
8483         * exp_intr.adb: Minor clarification in comment.
8484         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8485         Gen_Output_File_C): Remove references to finalization of library-level
8486         objects when using restricted run-time libraries.
8487
8488 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8489
8490         * sem_ch3.adb (Build_Discriminant_Constraints): Set
8491         Original_Discriminant only if the parent type is a generic formal.
8492
8493 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8494
8495         * exp_ch13.adb: Add with and use clause for Targparm;
8496         (Expand_N_Free_Statement): Prevent the generation of a custom
8497         Deallocate on .NET/JVM targets since this requires pools and address
8498         arithmetic.
8499         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8500         .NET/JVM targets, attach the newly allocated object to the access
8501         type's finalization collection. Do not generate a call to
8502         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8503         exist in the runtime.
8504         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8505         create a custom Allocate for object that do not require initialization.
8506         Attach a newly allocated object to the access type's finalization
8507         collection on .NET/JVM.
8508         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8509         assignment of controlled types on .NET/JVM. The two hidden pointers
8510         Prev and Next and stored and later restored after the assignment takes
8511         place.
8512         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8513         kludge for .NET/JVM to recognize a particular piece of code coming from
8514         Heap_Management and change the call to Finalize into Deep_Finalize.
8515         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8516         finalization collections on .NET/JVM only for types derived from
8517         Controlled. Separate the association of storage pools with a collection
8518         and only allow it on non-.NET/JVM targets.
8519         (Make_Attach_Call): New routine.
8520         (Make_Detach_Call): New routine.
8521         (Process_Object_Declarations): Suppress the generation of
8522         build-in-place return object clean up code on .NET/JVM since it uses
8523         pools.
8524         * exp_ch7.ads (Make_Attach_Call): New routine.
8525         (Make_Detach_Call): New routine.
8526         * exp_intr.adb Add with and use clause for Targparm.
8527         (Expand_Unc_Deallocation): Detach a controlled object from a collection
8528         on .NET/JVM targets.
8529         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8530         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8531         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8532         names used in finalization.
8533
8534 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8535
8536         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8537         (Attach, Detach): Lock the current task when chaining an object onto a
8538         collection.
8539
8540 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8541
8542         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8543         Rewritten to create the message strings when the exception is not
8544         raised by an abort during finalization.
8545         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8546         Raise_From_Controlled_Operation and update its associated comment.
8547         * a-fihema.ads, a-fihema.adb: New GNAT unit.
8548         Ada.Finalization.Heap_Management provides key functionality
8549         associated with controlled objects on the heap, their creation,
8550         finalization and reclamation. Type Finalization_Collection is
8551         effectively a wrapper which sits ontop of a storage pool and performs
8552         all necessary bookkeeping for all the objects it contains. Each
8553         access-to-controlled or access-to-class-wide type receives a collection
8554         as part of its expansion. The compiler generates buffer code and
8555         invokes Allocate / Deallocate to create and destroy allocated
8556         controlled objects.
8557         * a-finali.adb ("="): Removed.
8558         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8559         fields Prev and Next.
8560         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8561         A library unit with at least one controlled object on the library level
8562         has a special finalizer which is invoked by the binder. To signal this,
8563         ali files carry field PF.
8564         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8565         associated comment on field usage.
8566         * a-tags.adb (Get_RC_Offset): Removed.
8567         (Needs_Finalization): New routine.
8568         * a-tags.ads: Update the structure of the GNAT dispatch tables.
8569         Dispatch tables now carry field Needs_Finalization which provides
8570         runtime indication whether a type is controlled or has controlled
8571         components or both. Remove field RC_Offset.
8572         (Get_RC_Offset): Removed along with its associated pragma Export.
8573         Since tagged types with controlled components no longer carry hidden
8574         field _controller, the special mechanism to retrieve its location is no
8575         longer needed.
8576         (Needs_Finalization): New routine.
8577         * atree.ads, atree.adb (Elist24): New routine.
8578         (Set_Elist24): New routine.
8579         * atree.h: Add a define clause for Elist24.
8580         * bindgen.adb New library-level variable Lib_Final_Built.
8581         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8582         presence of a VM target, the routine generates calls to the proper
8583         library finalization routine.
8584         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8585         targets. Set the correct library finalization routine depending on
8586         whether the library has controlled objects or this is a VM compilation.
8587         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8588         to library-level finalizers of compiled units in reverse order of
8589         elaboration. It also produces exception management code and reraises a
8590         potential exception after all units have been finalized.
8591         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8592         library-level finalizers of compiled units in reverse order of
8593         elaboration.
8594         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8595         definitions of all library-level finalizers available to the compilation
8596         (Gen_Main_Ada): Directly call Adafinal which now contails all target
8597         dependent code.
8598         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8599         System.Standard_Library.Adafinal directly. If the library needs
8600         finalization actions, create the sequence of finalization calls.
8601         (Gen_Output_File_Ada): Alphabetize local variables and constants.
8602         Generate a with clause for System.Soft_Links when compiling for a VM.
8603         Remove the code which imports System.Standard_Library.Adafinal as
8604         Do_Finalize. Generate the library finalization routine.
8605         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8606         If the library needs finalization actions, create all the definitions
8607         of library- level finalizers.
8608         (Has_Finalizer): New routine. Determines whether at least one compiled
8609         unit has a library-level finalizer.
8610         Add type Qualification_Mode.
8611         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8612         * einfo.adb: New usage of field 15 as Return_Flag.
8613         Remove Finalization_Chain_Entity from the usages of field 19.
8614         Remove Associated_Final_Chain from the usages of field 23.
8615         New usage of field 23 as Associated_Collection.
8616         New usage of field 24 as Finalizer.
8617         New usage of flag 252 as Is_Processed_Transient.
8618         (Associated_Final_Chain): Removed.
8619         (Associated_Collection): New routine.
8620         (Finalization_Chain_Entity): Removed.
8621         (Finalizer): New routine.
8622         (Is_Finalizer): New routine.
8623         (Is_Processed_Transient): New routine.
8624         (Return_Flag): New routine.
8625         (Set_Associated_Final_Chain): Removed.
8626         (Set_Associated_Collection): New routine.
8627         (Set_Finalization_Chain_Entity): Removed.
8628         (Set_Finalizer): New routine.
8629         (Set_Is_Processed_Transient): New routine.
8630         (Set_Return_Flag): New routine.
8631         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8632         displayed flags.
8633         (Write_Field8_Name): Alphabetize the output.
8634         (Write_Field11_Name): Alphabetize the output.
8635         (Write_Field12_Name): Alphabetize the output.
8636         (Write_Field13_Name): Alphabetize the output.
8637         (Write_Field14_Name): Alphabetize the output.
8638         (Write_Field15_Name): Alphabetize the output.
8639         (Write_Field16_Name): Alphabetize the output.
8640         (Write_Field17_Name): Alphabetize the output.
8641         (Write_Field18_Name): Alphabetize the output.
8642         (Write_Field19_Name): Alphabetize the output. Remove the output of
8643         Finalization_Chain_Entity.
8644         (Write_Field20_Name): Alphabetize the output.
8645         (Write_Field21_Name): Alphabetize the output.
8646         (Write_Field22_Name): Alphabetize the output.
8647         (Write_Field23_Name): Alphabetize the output. Remove the output of
8648         Associated_Final_Chain. Add output for Associated_Collection.
8649         (Write_Field24_Name): Alphabetize the output.
8650         (Write_Field25_Name): Add output for Finalizer.
8651         (Write_Field26_Name): Alphabetize the output.
8652         (Write_Field27_Name): Alphabetize the output.
8653         (Write_Field28_Name): Alphabetize the output.
8654         * einfo.ads: Add new field description for Associated_Collection and
8655         its uses in nodes.
8656         Remove Associated_Final_Chain and its uses in nodes.
8657         Remove Finalization_Chain_Entity and its uses in nodes.
8658         Add new field description for Finalizer and its uses in nodes.
8659         Add new synthesized attribute Is_Finalizer.
8660         Add new flag description for Is_Processed_Transient and its uses in
8661         nodes.
8662         Add new field description for Return_Flag and its uses in nodes.
8663         (Associated_Final_Chain): Removed along with its pragma Inline.
8664         (Associated_Collection): New routine and pragma Inline.
8665         (Finalization_Chain_Entity): Removed along with its pragma Inline.
8666         (Finalizer): New routine and pragma Inline.
8667         (Is_Finalizer): New routine and pragma Inline.
8668         (Is_Processed_Transient): New routine and pragma Inline.
8669         (Return_Flag): New routine and pragma Inline.
8670         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8671         (Set_Associated_Collection): New routine and pragma Inline.
8672         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8673         (Set_Finalizer): New routine and pragma Inline.
8674         (Set_Is_Processed_Transient): New routine and pragma Inline.
8675         (Set_Return_Flag): New routine and pragma Inline.
8676         * exp_aggr.adb: Alphabetize subprograms.
8677         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8678         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8679         associated comments. Remove local variables External_Final_List and
8680         Attach.
8681         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8682         Ancestor. Remove the retrieval of finalization lists. Update the call to
8683         Make_Adjust_Call.
8684         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8685         lists. Update the call to Late_Expansion.
8686         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8687         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8688         (Gen_Assign): Remove the retrieval of the finalization list used to
8689         build the assignment. Update the calls to Make_Init_Call and
8690         Make_Adjust_Call.
8691         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8692         Remove the mechanism to determine attachment levels and finalization
8693         list retrieval. Remove the processing for coextensions.
8694         (Init_Controller): Removed. Controllers no longer exist.
8695         (Late_Expansion): Remove formals Flist and Obj along with their
8696         associated comments. Update the calls to Build_Record_Aggr_Code and
8697         Build_Array_Aggr_Code.
8698         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8699         (Expand_N_Freeze_Entity): Add special processing for finalizers which
8700         appear in entry bodies, protected subprograms and task bodies.
8701         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8702         * exp_ch3.adb (Add_Final_Chain): Removed.
8703         (Build_Array_Init_Proc): Alphabetize local variables.
8704         (Build_Assignment): Alphabetize local variables. Update the call to
8705         Maked_Adjust_Call.
8706         (Build_Class_Wide_Master): Rename local variables to better reflect
8707         their role.
8708         (Build_Discriminant_Assignments): Code reformatting.
8709         (Build_Init_Call_Thru): Code reformatting.
8710         (Build_Init_Procedure): Code reformatting. Generate a special version
8711         of Deep_Finalize which is capable of finalizing all initialized
8712         components and ignore the rest.
8713         (Build_Init_Statements): Rename local variables to better reflect their
8714         role.
8715         Reimplement the mechanism to include the creation and update of an index
8716         variable called a "counter". It is used as a bookmark for tracing
8717         initialized and non-initialized components.
8718         (Build_Initialization_Call): Remove local variable Controller_Typ.
8719         Alphabetize all local variables. Remove the initialization of the
8720         record controller and update the call to Make_Init_Call.
8721         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8722         New local variable Counter.
8723         (Constrain_Array): Alphabetize.
8724         (Expand_Freeze_Array_Type): Create a collection instead of a
8725         finalization list.
8726         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8727         Finalize_Address which is used in conjunction with allocated controlled
8728         objects.
8729         (Expand_N_Object_Declaration): Remove the creation of a finalization
8730         list for anonymous access types. Update the calls to Make_Init_Call and
8731         Make_Adjust_Call.
8732         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8733         retrieval of finalization lists. Remove the expansion of the record
8734         controller. Create TSS primitive Finalize_Address used in conjunction
8735         with controlled objects on the heap. Create finalization collections
8736         for access-to-controlled record components.
8737         (Expand_Record_Controller): Removed.
8738         (Freeze_Type): Remove the freezing of record controllers. Freezing of
8739         class-wide types now requires additional processing. Create
8740         finalization collections for access-to-controlled types.
8741         (Increment_Counter): New routine.
8742         (Make_Counter): New routine.
8743         (Make_Eq_If): Remove the mention of Name_uController.
8744         (Make_Predefined_Primitive_Specs): There is no longer need to skip
8745         types coming from System.Finalization_Root.
8746         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8747         (Predefined_Primitive_Bodies): There is no longer need to skip types
8748         coming from System.Finalization_Root.
8749         (Stream_Operation_OK): Do not generate stream routines for
8750         type Ada.Finalization.Heap_Management.Finalization_Collection.
8751         * exp_ch3.ads: Alphabetize subprograms.
8752         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8753         Add with and use clause for Lib.
8754         (Complete_Coextension_Finalization): Removed.
8755         (Complete_Controlled_Allocation): New routine. Create a finalization
8756         collection for anonymous access-to-controlled types. Create a custom
8757         Allocate which interfaces with the back end and the machinery in
8758         Heap_Management.
8759         (Expand_Allocator_Expression): Add necessary calls to
8760         Complete_Controlled_Allocation. Remove the retrieval of finalization
8761         lists. Update the calls to Make_Adjust_Call. Generate a call to
8762         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8763         the associated collection.
8764         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8765         Code clean up. Remove the retrieval of finalization lists and
8766         attachment levels.
8767         Update the call to Make_Init_Call. Generate a call to
8768         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8769         the associated collection.
8770         (Get_Allocator_Final_List): Removed. Finalization lists are not
8771         available.
8772         (Suitable_Element): Remove the mention of Name_uController.
8773         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8774         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8775         the left hand side, carry out the assignment and adjust the left hand
8776         side.
8777         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8778         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8779         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8780         BIP_Collection and BIPcollection.
8781         (Build_Heap_Allocator): New routine used to allocate the return object
8782         of a build-in-place function onto a collection.
8783         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8784         (Expand_Call): Do not replace direct calls to Deep routines with their
8785         aliases.
8786         (Expand_N_Extended_Return_Statement): Give all variables shorter names
8787         and update their occurrences. Add a special return flag to monitor the
8788         [ab]normal execution of the function. The flag is set right before the
8789         return statement.
8790         Rewrite the mechanism used to allocate a build-in-place return object
8791         on the heap or on a storage pool.
8792         (Is_Direct_Deep_Call): New routine.
8793         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8794         build-in-place function call instead of a final list. Build a call to
8795         Set_Finalize_Address_Ptr to decorate the associated collection.
8796         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8797         order to name the build-in-place function call's result for later
8798         finalization. Add a collection to a build-in-place function call
8799         instead of a final list.
8800         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8801         build-in-place function call instead of a final list. Remove the code
8802         which moves one final list and transforms it into the actual in a
8803         nested build-in-place call.
8804         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8805         build-in-place function call instead of a final list.
8806         (Move_Final_List): Removed.
8807         (Needs_BIP_Collection): New routine.
8808         (Needs_BIP_Final_List): Removed.
8809         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8810         enumeration type BIP_Formal_Kind.
8811         Update the related comment.
8812         (Needs_BIP_Collection): New routine.
8813         (Needs_BIP_Final_List): Removed.
8814         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8815         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8816         majority of subprograms in this unit. Add Name_Finalize_Address to
8817         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8818         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8819         statements for an array type.
8820         (Build_Adjust_Statements): Create the adjust statements for a record
8821         type.
8822         (Build_Cleanup_Statements): New routine. A procedure which given any
8823         construct containing asynchronous calls, references to _master, or is a
8824         task body, a task allocation or a protected body produces the necessary
8825         runtime calls to clean up these constructs.
8826         (Build_Exception_Handler): New routine.
8827         (Build_Final_List): Removed.
8828         (Build_Finalization_Collection): New routine. A core procedure which
8829         creates a collection to service heap allocated controlled objects
8830         associated with an access-to-controlled type.
8831         (Build_Finalize_Statements): Create the finalization statements for a
8832         record types.
8833         (Build_Finalizer): New routine. A core procedure which given any
8834         construct with declarations and/or statements detects all objects which
8835         need any type of clean up (controlled objects, protected objects) and
8836         generates all necessary code to clean up the said objects in the proper
8837         order.
8838         (Build_Finalizer_Call): New routine.
8839         (Build_Initialize_Statements): Create the initialization statements for
8840         an array type. The generated routine contains code to finalize partially
8841         initialized arrays.
8842         (Build_Object_Declarations): New routine.
8843         (Build_Raise_Statement): New routine.
8844         (Clean_Simple_Protected_Objects): Removed.
8845         (Controller_Component): Removed.
8846         (Enclosing_Function): New routine.
8847         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8848         either declarations or statements or both.
8849         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8850         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8851         package.
8852         (Find_Final_List): Removed.
8853         (Global_Flist_Ref): Removed.
8854         (In_Finalization_Root): Removed.
8855         (Insert_Actions_In_Scope_Around): Determine the range of the transient
8856         scope in terms of tree nodes. Process all transient variables within
8857         that range.
8858         (Make_Adjust_Call): Rewritten. There is no longer an attach call
8859         generated after the adjust.
8860         (Make_Attach_Call): Removed.
8861         (Make_Call): New routine.
8862         (Make_Clean): Removed.
8863         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8864         build routines.
8865         (Make_Deep_Proc): Rewritten to generate the new profile signature used
8866         in Deep routines.
8867         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8868         build routines.
8869         (Make_Final_Call): Modified to simply create a call to either
8870         Deep_Finalize or Finalize.
8871         (Make_Finalize_Address_Body): New routine.
8872         (Make_Finalize_Address_Stmts): New routine. A function which produces
8873         TSS primitive Finalize_Address used in conjunction with heap allocated
8874         controlled objects.
8875         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8876         (Make_Init_Call): Rewritten. There is no longer an attach call
8877         generated after initialization.
8878         (Make_Local_Deep_Finalize): New routine.
8879         (Make_Set_Finalize_Address_Ptr_Call): New routine.
8880         (Make_Transient_Block): Remove the finalization list retrieval and
8881         manipulation.
8882         (Needs_Finalization): Moved to Exp_Util.
8883         (Parent_Field_Type): New routine.
8884         (Preprocess_Components): New routine.
8885         (Process_Transient_Objects): New routine.
8886         (Wrap_HSS_In_Block): New routine.
8887         (Wrap_Transient_Declaration): Remove finalization list management and
8888         controller insertion.
8889         (Wrap_Transient_Expression): Code reformatting.
8890         (Wrap_Transient_Statement): Code reformatting.
8891         * exp_ch7.ads (Build_Final_List): Removed.
8892         (Build_Finalization_Collection): New routine.
8893         (Build_Raise_Statement): New routine.
8894         (Controller_Component): Removed.
8895         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8896         (Find_Final_List): Removed.
8897         (In_Finalization_Root): Removed.
8898         (Is_Simple_Protected_Type): Update related comment.
8899         (Make_Adjust_Call): New parameter profile and associated comments.
8900         (Make_Attach_Call): Removed.
8901         (Make_Final_Call): New parameter profile and associated comments.
8902         (Make_Finalize_Address_Body): New routine.
8903         (Make_Init_Call): New parameter profile and associated comments.
8904         (Make_Local_Deep_Finalize): New routine.
8905         (Make_Set_Finalize_Address_Ptr_Call): New routine.
8906         (Needs_Finalization): Moved to Exp_Util.
8907         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8908         (Expand_N_Protected_Body): Remove the handling of finalization lists.
8909         (Find_Protection_Type): Moved to Exp_Util.
8910         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8911         (Make_DT): Update sequence of dispatch table initialization. Remove the
8912         initialization of field RC_Offset. Add initialization of field Needs_
8913         Finalization.
8914         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8915         Reimplement how an object is first finalized, then deallocated.
8916         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8917         Code reformatting.
8918         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8919         Register TSS_Finalize_Address with type TSS_Names.
8920         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8921         procedure provides the interface between an allocation / deallocation
8922         and the support machinery in Ada.Finalization.Heap_Management.
8923         (Find_Init_Call): Code reformatting.
8924         (Find_Init_Call_In_List): Code reformatting.
8925         (Find_Protection_Type): Moved from Exp_Ch9.
8926         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8927         (Has_Controlled_Coextensions): Removed.
8928         (Has_Controlled_Objects): New routine.
8929         (In_Library_Level_Package_Body): New routine.
8930         (Insert_Action_After): New routine.
8931         (Is_Finalizable_Transient): New routine. This predicate determines
8932         whether an object declaration is one of the many variants of controlled
8933         transients.
8934         (Is_Null_Access_BIP_Func_Call): New routine.
8935         (Is_Non_BIP_Func_Call): New routine.
8936         (Is_Related_To_Func_Return): New routine.
8937         (Needs_Finalization): Moved from Exp_Ch7.
8938         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8939         (Find_Protection_Type): Moved from Exp_Ch9.
8940         (Has_Controlled_Coextensions): Removed.
8941         (Has_Controlled_Objects): New routine.
8942         (In_Library_Level_Package_Body): New routine.
8943         (Insert_Action_After): New routine.
8944         (Is_Finalizable_Transient): New routine.
8945         (Is_Null_Access_BIP_Func_Call): New routine.
8946         (Is_Non_BIP_Func_Call): New routine.
8947         (Is_Related_To_Func_Return): New routine.
8948         (Needs_Finalization): Moved from Exp_ch7.
8949         * expander.adb (Expand): Add a case for N_Free_Statement.
8950         * freeze.adb (Freeze_All): Replace the generation of a finalization
8951         list with a collection for access-to-controlled types.
8952         (Freeze_Entity): Code reformatting.
8953         (Freeze_Record_Type): Remove the freezing of a record controller
8954         component.
8955         (Freeze_Subprogram): Code reformatting.
8956         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8957         finalization list.
8958         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8959         has a library-level finalizer.
8960         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8961         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8962         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8963         files. Add a-fihema to the list of object files.
8964         * par-ch4.adb:
8965         Alphabetize the associations in type Is_Parameterless_Attribute.
8966         * rtsfind.ads: Ada.Finalization_List.Controller and
8967         System.Finalization_Implementation are no longer a GNAT unit.
8968         Update the range of type Ada_Finalization_Child. Remove the following
8969         recoverable entities:
8970
8971            RE_Attach_To_Final_List
8972            RE_Deep_Tag_Attach
8973            RE_Finalize_List
8974            RE_Finalize_One
8975            RE_Finalizable_Ptr_Ptr
8976            RE_Global_Final_List
8977            RE_Limited_Record_Controller
8978            RE_List_Controller
8979            RE_Move_Final_List
8980            RE_Record_Controller
8981            RE_Simple_List_Controller
8982
8983         Add the following recoverable entities:
8984
8985            RE_Add_Offset_To_Address
8986            RE_Allocate
8987            RE_Base_Pool
8988            RE_Deallocate
8989            RE_Exception_Identity
8990            RE_Finalization_Collection
8991            RE_Finalization_Collection_Ptr
8992            RE_Needs_Finalization
8993            RE_Save_Library_Occurrence
8994            RE_Set_Finalize_Address_Ptr
8995            RE_Set_Storage_Pool_Ptr
8996            RE_Storage_Count
8997         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8998         Name_uController.
8999         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
9000         (First_Stored_Discriminant): Remove the mention of Name_uController.
9001         * sem_aux.ads: Comment reformatting.
9002         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
9003         to redecorate an already existing class-wide type.
9004         (Decorate_Tagged_Type): New parameter profile and associated comment.
9005         Create a "shadow class-wide type" for a shadow entity.
9006         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
9007         of the final chain along with the associated comment.
9008         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
9009         Full_Desig and set it to the full view of the designated type.
9010         Initialize the finalization collection to empty.
9011         (Build_Derived_Record_Type): Alphabetize local variables. Code
9012         reformatting.
9013         (Collect_Fixed_Components): Remove the mention of Name_uController.
9014         (Create_Constrained_Components): Remove the mention of Name_uController.
9015         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
9016         class-wide type of a shadow entity.
9017         (Process_Full_View): Update the machinery which marks type
9018         Limited_Controlled's entity as limited.
9019         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
9020         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
9021         list, instead make a collection build-in-place formal.
9022         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
9023         a designated type in order to establish a match between the renaming
9024         and the renamed entity.
9025         (Find_Selected_Component): Add guard to prevent spurious exceptions
9026         from being raised on .NET/JVM.
9027         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
9028         to the list of primitive that need special processing. Update arrays
9029         C_Names and D_Names.
9030         (Replace_Types): Handle class-wide types.
9031         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
9032         different parameter profile, look at the first formal.
9033         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
9034         use clauses for Exp_Util.
9035         * sem_res.adb: Remove with and use clauses for Elists.
9036         (Propagate_Coextensions): Removed.
9037         (Resolve_Allocator): Do not propagate the list of coextensions from one
9038         allocator to another.
9039         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
9040         Deaccessed_T to Desig_Typ.
9041         (Enter_Name): Remove the mention of Name_uController.
9042         (Gather_Components): Remove the mention of Name_uController.
9043         (Incomplete_Or_Private_View): New routine.
9044         (Is_Coextension_Root): Removed.
9045         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
9046         * sem_util.ads (Incomplete_Or_Private_View): New routine.
9047         (Is_Coextension_Root): Removed.
9048         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
9049         Controlled types are now derived from a null tagged record. Remove
9050         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
9051         * sinfo.adb (Coextensions): Removed.
9052         (Set_Coextensions): Removed.
9053         * sinfo.ads: Remove Coextensions from the explanation of node fields
9054         and its uses in nodes.
9055         Update the field usage of N_Allocator.
9056         (Coextensions): Removed along with its pragma Inline.
9057         (Set_Coextensions): Removed along with its pragma Inline.
9058         * snames.ads-tmpl: Remove names
9059
9060           Name_uClean
9061           Name_uController
9062           Name_uFinal_List
9063           Name_uLocal_Final_List
9064           Name_Finalization_Root
9065           Name_Next
9066           Name_Prev
9067
9068         Add names
9069
9070           Name_uFinalizer
9071           Name_Finalize_Address
9072         * s-pooglo.adb (Allocate): Add overriding indicator.
9073         (Deallocate): Add overriding indicator.
9074         (Storage_Size): Add overriding indicator.
9075         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
9076         than Finalize_Global_List.
9077         (Null_Finalize_Global_List): Removed.
9078         (Save_Library_Occurrence): New routine.
9079         * s-soflin.ads: Remove variable Finalize_Global_List along with its
9080         initialization. Add variable Finalize_Library_Objects along with its
9081         pragma Export. Add variables Library_Exception and
9082         Library_Exception_Set along with their pragma Export.
9083         (Null_Finalize_Global_List): Removed.
9084         (Save_Library_Occurrence): New routine.
9085         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
9086         rather than Finalize_Global_List.
9087         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
9088         of the constructed node.
9089
9090 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9091
9092         * link.c: Include "auto-host.h" before system headers.
9093
9094 2011-08-03  Vincent Celier  <celier@adacore.com>
9095
9096         * make.adb (Gnatmake): Add to table Library_Projs only library projects
9097         that are not extended. Do not check if a library project that is
9098         extended should be regenerated. Do not add to table Library_Paths the
9099         libraries that are in extended projects. Link only with libraries that
9100         are in libray projects that are not extended.
9101         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
9102         for a library project that is extended.
9103
9104 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9105
9106         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
9107         conforming subprogram renamings that appear to be completions if they
9108         are not fully conformant.
9109         Such renamings are homographs but not completions.
9110         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
9111         names in a subprogram renaming that appears in an instance.
9112
9113 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9114
9115         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
9116         not immutably limited, build actual subtype from expression to provide
9117         proper bounds to caller.
9118
9119 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9120
9121         * sem_ch8.adb: Minor comment correction.
9122
9123 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9124
9125         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
9126         returning a limited array, use an extended return statement.
9127
9128 2011-08-03  Vincent Celier  <celier@adacore.com>
9129
9130         * make.adb (Initialize): If --subdirs= is used, but no project file is
9131         specified, attempt to create the specify subdir if it does not already
9132         exist and use it as the object directory as if -D had been specified.
9133
9134 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9135
9136         * s-tpopsp-vms.adb: New file.
9137         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
9138         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
9139
9140 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9141
9142         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
9143         package.
9144
9145 2011-08-03  Yannick Moy  <moy@adacore.com>
9146
9147         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
9148         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
9149         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
9150         detect that an array has static bounds.
9151
9152 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9153
9154         * exp_dist.adb: Minor reformatting.
9155
9156 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9157
9158         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
9159         (ATCB_Key): Removed, not always used.
9160
9161 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9162
9163         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
9164         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
9165         most remaining global variables.
9166
9167 2011-08-03  Robert Dewar  <dewar@adacore.com>
9168
9169         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
9170         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
9171         reformatting.
9172
9173 2011-08-03  Javier Miranda  <miranda@adacore.com>
9174
9175         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
9176         that must be passed by copy in VM targets.
9177
9178 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9179
9180         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9181         duplicates a similar htable now in the project tree.
9182
9183 2011-08-03  Claire Dross  <dross@adacore.com>
9184
9185         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9186         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9187         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9188         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9189         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9190         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9191         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9192         update.
9193
9194 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9195
9196         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9197         (ATCB_Key): Removed, not always used.
9198         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9199         s-taprop-posix.adb.
9200         * s-tpopsp-tls.adb: New file.
9201         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9202         x86/x64/ia64/powerpc/sparc Linux.
9203
9204 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9205
9206         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9207         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9208
9209 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9210
9211         * rtsfind.ads, exp_dist.adb, exp_dist.ads
9212         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9213         Fix type selection for mapping integer types to PolyORB types.
9214
9215 2011-08-03  Bob Duff  <duff@adacore.com>
9216
9217         * sem_ch7.adb: Minor comment clarification.
9218
9219 2011-08-03  Bob Duff  <duff@adacore.com>
9220
9221         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9222         an error analyzing a choice, skip further processing. Further
9223         processing could cause a crash or cascade errors.
9224
9225 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9226
9227         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9228         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9229         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9230         prj-env.ads (Shared_Project_Tree_Data): new type
9231         An aggregate project and its aggregated trees need to share the common
9232         data structures used for lists of strings, packages,... This makes the
9233         code simpler since otherwise we have to pass the root tree (also used
9234         for the configuration file data) in addition to the current project
9235         tree. This also avoids ambiguities as to which tree should be used.
9236         And finally this saves a bit of memory.
9237         (For_Every_Project_Imported): new parameter Tree.
9238         Since aggregated projects are using a different tree, we need to let
9239         the caller know which tree to use to manipulate the returned project.
9240
9241 2011-08-03  Robert Dewar  <dewar@adacore.com>
9242
9243         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9244         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9245         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9246         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9247
9248 2011-08-03  Javier Miranda  <miranda@adacore.com>
9249
9250         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9251         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9252
9253 2011-08-03  Bob Duff  <duff@adacore.com>
9254
9255         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9256         the Base_Type.
9257
9258 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
9259
9260         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9261         g-sehash.ads: Fix typo. Update header.
9262
9263 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9264
9265         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9266         expansion.
9267
9268 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9269
9270         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9271         prefixes of private types along with records, since the selector may be
9272         a discriminant.
9273         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9274         private types along with records, since the selector may be a
9275         discriminant.
9276
9277 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9278
9279         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9280
9281 2011-08-03  Javier Miranda  <miranda@adacore.com>
9282
9283         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9284         Tagged_Type_Expansion.
9285
9286 2011-08-03  Yannick Moy  <moy@adacore.com>
9287
9288         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9289         violation when the argument of concatenation is the name of a
9290         constant.
9291
9292 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9293
9294         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9295         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9296         (Process_Declarative_Items): new parameter Child_Env.
9297
9298 2011-08-03  Yannick Moy  <moy@adacore.com>
9299
9300         * alfa.ads: Update format of ALFA section in ALI file in order to
9301         add a mapping from bodies to specs when both are present.
9302         (ALFA_Scope_Record): Add components for spec file/scope.
9303         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9304         present.
9305         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9306         collected, fill in the spec information when relevant.
9307         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9308         present.
9309
9310 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9311
9312         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9313         code unit to decide whether to add internally generated subprograms.
9314
9315 2011-08-03  Javier Miranda  <miranda@adacore.com>
9316
9317         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9318         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9319         be handled by copy in VM targets.
9320
9321 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9322
9323         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9324         code with Makeutl.Get_Switches.
9325         * prj-tree.adb: Update comment.
9326
9327 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9328
9329         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9330         subprogram with a limited formal that does not support external
9331         streaming.
9332
9333 2011-08-03  Yannick Moy  <moy@adacore.com>
9334
9335         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9336         continuation line
9337         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9338         not from current unit in two phases, because it is not possible to
9339         change the table while iterating over its content.
9340         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9341
9342 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9343
9344         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9345         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9346
9347 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9348
9349         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9350         and the component type is composite, this is ambiguous for predefined
9351         concatenation, but if the node is not overloaded and the entity is a use
9352         -defined function its profile can be used to resolve that aggregate.
9353
9354 2011-08-03  Robert Dewar  <dewar@adacore.com>
9355
9356         * exp_ch4.adb: Minor code cleanup.
9357
9358 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9359
9360         * exp_dist.adb: Do not generate distribution stubs if serious errors
9361         have been diagnosed.
9362
9363 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9364
9365         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9366         the first formal of a primitive operation, go to the base type to
9367         handle properly an access to a derived type with constrained
9368         discriminants.
9369         * sem_type.adb (Disambiguate): an immediately visible operator hides a
9370         user-defined function that is only use-visible.
9371
9372 2011-08-03  Robert Dewar  <dewar@adacore.com>
9373
9374         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9375         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9376         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9377         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9378         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9379         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9380         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9381         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9382
9383 2011-08-03  Robert Dewar  <dewar@adacore.com>
9384
9385         * repinfo.adb (List_Mechanism): Add handling of
9386         Convention_Ada_Pass_By_XXX.
9387         * sem_mech.adb (Set_Mechanism): Ditto.
9388         * sem_prag.adb (Process_Convention): Add entries for
9389         Convention_Ada_Pass_By_XXX.
9390         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9391
9392 2011-08-03  Pascal Obry  <obry@adacore.com>
9393
9394         * makeutl.adb: Minor reformatting.
9395
9396 2011-08-03  Vincent Celier  <celier@adacore.com>
9397
9398         * fname-uf.adb
9399         (Get_File_Name) If the file cannot be found when there are no config
9400         pragmas file and May_Fail is True, return No_File instead of the file
9401         name, to be consistent.
9402
9403 2011-08-03  Pascal Obry  <obry@adacore.com>
9404
9405         * adaint.c (__gnat_is_executable_file_attr): Avoid access
9406         to null pointer.
9407
9408 2011-08-03  Javier Miranda  <miranda@adacore.com>
9409
9410         * sem_ch13.adb
9411         (Same_Representation): In VM targets the representation of arrays with
9412         aliased components differs from arrays with non-aliased components.
9413
9414 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9415
9416         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9417         not systematically lower case attribute indexes that contain no "."
9418         Fix definition of several Naming attributes, which take
9419         a unit name as index and therefore should be case insensitive.
9420         Minor refactoring (reduce length of variable names).
9421
9422 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9423
9424         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9425
9426 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9427
9428         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9429         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9430         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9431         prj-tree.ads (Prj.Tree.Environment): new type.
9432
9433 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9434
9435         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9436         prj-tree.adb, prj-tree.ads (Environment): new type.
9437
9438 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9439
9440         * prj-tree.ads: Remove unused variable.
9441
9442 2011-08-03  Yannick Moy  <moy@adacore.com>
9443
9444         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9445         issuing messages related to SPARK restriction violation.
9446
9447 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9448
9449         * sem_ch6.adb: guard against error nodes in return statements.
9450
9451 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9452
9453         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9454         a warning can only appear on a configuration file, so emit warning
9455         without further checks.
9456
9457 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9458
9459         * s-interr.ads: add overriding keyword.
9460
9461 2011-08-03  Geert Bosch  <bosch@adacore.com>
9462
9463         * exp_attr.adb: Fix minor typo.
9464
9465 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9466
9467         * par-ch4.adb: improve error recovery.
9468
9469 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9470
9471         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9472         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9473         to Errout_Handling.
9474
9475 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9476
9477         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9478         "external" as an attribute name in aggregate projects.
9479
9480 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9481
9482         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9483         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9484         from 0, so we need to adjust.
9485
9486 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9487
9488         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9489         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9490
9491 2011-08-03  Yannick Moy  <moy@adacore.com>
9492
9493         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9494         restriction on overloaded entity if the entity is not an operator.
9495
9496 2011-08-03  Yannick Moy  <moy@adacore.com>
9497
9498         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9499         restrict.ads: Rename remaining Check_Formal_Restriction* into
9500         Check_SPARK_Restriction*.
9501
9502 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9503
9504         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9505         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9506         qualifier.
9507         (Project_Empty): removed
9508         (Empty_Project): new parameter Qualifier
9509         This is used to have fields specific to aggregate projects, cleaner
9510         New field to store the list of aggregated projects.
9511         (Check_Aggregate_Project): removed
9512         (Process_Aggregated_Projects, Free): new subprograms.
9513
9514 2011-08-03  Olivier Hainque  <hainque@adacore.com>
9515
9516         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9517
9518 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9519
9520         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9521         explicit dereference of an unconstrained type, create a constrained
9522         subtype for it, as is done for function calls that return an
9523         unconstrained type.
9524
9525 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9526
9527         * g-pehage.adb (Finalize): Avoid possible double-free.
9528
9529 2011-08-03  Steve Baird  <baird@adacore.com>
9530
9531         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9532         Elab_Spec/Body attrs in CodePeer_Mode.
9533
9534 2011-08-03  Javier Miranda  <miranda@adacore.com>
9535
9536         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9537         low bound is not known at compile time but they have no others choice.
9538         Done because in this case the bounds can be obtained directly from the
9539         aggregate.
9540
9541 2011-08-03  Ed Falis  <falis@adacore.com>
9542
9543         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9544         on VxWorks SMP. Remove unusable constant ANY_CPU.
9545
9546 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9547
9548         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9549         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9550         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9551         Prj.Env.Initialize_Empty): new subprograms
9552         (Get_Env, Find_Project): remove parameter Target_Name.
9553
9554 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9555
9556         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9557         as a condition for the delayed call to Derived_Subprograms done for the
9558         case of the rewriting of a derived type that constrains the
9559         discriminants of its parent type.
9560         Avoids redundant subprogram derivations for private subtype derivations.
9561
9562 2011-08-03  Javier Miranda  <miranda@adacore.com>
9563
9564         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9565         Build_Record_Aggr_Code.
9566         (Build_Record_Aggr_Code): Add missing support to initialize hidden
9567         discriminants in extension aggregates.
9568
9569 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9570
9571         * prj-pp.adb (Print): also output project qualifiers, since in
9572         particular "aggregate" is mandatory in an aggregate project.
9573
9574 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9575
9576         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9577         (Debug_Output): new function.
9578
9579 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9580
9581         * gnat_ugn.texi: Document -Wstack-usage.
9582         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9583
9584 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9585
9586         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9587         have keyword LIMITED.
9588
9589 2011-08-03  Yannick Moy  <moy@adacore.com>
9590
9591         * alfa.adb, alfa.ads, alfa_test.adb: New files.
9592         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9593         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9594         section (does not happen in compiler, only if code directly calls
9595         Scan_ALI).
9596         * get_alfa.adb, get_alfa.ads: New files.
9597         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9598         needed.
9599         * lib-xref-alfa.adb: New file.
9600         * lib-xref.adb, lib-xref.ads
9601         (Xref_Entry): redefine information needed in cross-references for ALFA.
9602         Push ALFA treatments in separated local package.
9603         (Enclosing_Subpragram_Or_Package): treat specially subprogram
9604         identifiers. Return entity of package body instead of spec. Return
9605         Empty for a scope with no location.
9606         (Generate_Reference): adapt to new components for ALFA information.
9607         Remove the need for D references on definitions.
9608         (Is_Local_Reference): moved to ALFA local package
9609         (Output_References): extract subfunction as Extract_Source_Name
9610         (Output_Local_References): remove procedure, replaced by filtering of
9611         cross-references in package ALFA and printing in Put_ALFA.
9612         (Write_Entity_Name): remove procedure
9613         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9614         print exact name of entity as it appears in source file
9615         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9616         * put_alfa.adb, put_alfa.ads: New files.
9617         * xref_lib.adb (Search_Xref): protect read of cross-references against
9618         reading other sections of the ALI file, in gnatxref
9619         (Search): protect read of cross-references against reading other
9620         sections of the ALI file, in gnatfind.
9621         * gcc-interface/Make-lang.in: Update dependencies.
9622
9623 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9624
9625         * sem_ch3.adb: Minor reformatting.
9626
9627 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9628
9629         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9630         raising an exception.
9631
9632 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9633
9634         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9635         type, always use 1 as the lower bound or string, even if lower bound of
9636         context is not static, to handle properly null strings in a non-static
9637         context.
9638
9639 2011-08-03  Bob Duff  <duff@adacore.com>
9640
9641         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9642         always legal on the right-hand side of an assignment statement; there
9643         is always an applicable index constraint in this case. Therefore, the
9644         check for Pkind = N_Assignment_Statement is now unconditional -- it
9645         doesn't depend on whether Is_Constrained (Typ).
9646
9647 2011-08-03  Robert Dewar  <dewar@adacore.com>
9648
9649         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9650
9651 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9652
9653         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9654         for an itype created within a generic unit.
9655
9656 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9657
9658         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9659         suppresses all inlining.
9660
9661 2011-08-03  Robert Dewar  <dewar@adacore.com>
9662
9663         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9664         exp_aggr.adb: Minor reformatting.
9665
9666 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9667
9668         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9669         tagged assignment when discriminant checks are suppressed. This is
9670         useless and extremely costly in terms of static stack usage.
9671
9672 2011-08-03  Bob Duff  <duff@adacore.com>
9673
9674         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9675         of generics, because this leads to the wrong entity in the wrong scope,
9676         causing (e.g.) pragma Export_Procedure to get an error if the entity is
9677         an instance.
9678         (Process_Interface_Name): Follow Alias for instances of generics, to
9679         correct for the above change.
9680
9681 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9682
9683         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9684         is an integer literal it is always safe to replace the reference. In
9685         addition, if the reference appears in the generated code for an object
9686         declaration it is necessary to copy because otherwise the reference
9687         might be to the uninitilized value of the discriminant of the object
9688         itself.
9689
9690 2011-08-03  Pascal Obry  <obry@adacore.com>
9691
9692         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9693         ACL used, in this case we want to check for ending .exe, not .exe
9694         anywhere in the path.
9695
9696 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9697
9698         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9699         the tree structure (semantic decoration of references to record
9700         discriminants).
9701
9702 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9703
9704         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9705         choices of a named array aggregate, bail out when any choices are
9706         marked as Errors_Posted.
9707
9708 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9709
9710         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9711         in which entity is frozen, to handle properly loop variables in
9712         iterators.
9713
9714 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9715
9716         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9717         subtype is not static, compute the upper bound using attributes, to
9718         handle properly index types that are not integer types.
9719
9720 2011-08-03  Bob Duff  <duff@adacore.com>
9721
9722         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9723         Update copyright notice.
9724
9725 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9726
9727         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9728         Original_Discriminant if within an instance.
9729         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9730
9731 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9732
9733         * einfo.ads: Minor reformatting.
9734
9735 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9736
9737         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9738         composite type with an unfrozen subcomponent, in the profile of a
9739         primitive operation.
9740
9741 2011-08-03  Robert Dewar  <dewar@adacore.com>
9742
9743         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9744
9745 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9746
9747         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9748         unconstrained type with discriminants is initialized with an aggregate,
9749         use the constrained subtype of the aggregate as the type of the object,
9750         because it is immutable, and this allows the back-end to generate no
9751         code for the object declaration.
9752
9753 2011-08-03  Robert Dewar  <dewar@adacore.com>
9754
9755         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9756         comparison operand is variable, and turns out to be zero or negative.
9757
9758 2011-08-03  Javier Miranda  <miranda@adacore.com>
9759
9760         * exp_intr.adb
9761         (Expand_Dispatching_Constructor_Call): Disable expansion of
9762         code required for native targets. Done to avoid generating
9763         references to unavailable runtime entities in VM targets.
9764         * exp_ch3.adb
9765         (Expand_N_Object_Declaration): Add missing support to handle
9766         the explicit initialization of class-wide interface objects.
9767         Fix documentation.
9768
9769 2011-08-03  Matthew Heaney  <heaney@adacore.com>
9770
9771         * a-cobove.adb (Merge): Move source onto target, instead of using
9772         Assign.
9773
9774 2011-08-03  Matthew Heaney  <heaney@adacore.com>
9775
9776         * a-cbdlli.adb (Splice): Move source items from first to last.
9777
9778 2011-08-03  Yannick Moy  <moy@adacore.com>
9779
9780         * sem_util.ads: Add comment.
9781
9782 2011-08-03  Javier Miranda  <miranda@adacore.com>
9783
9784         * exp_aggr.adb
9785         (Expand_Record_Aggregate): In VM targets disable the expansion into
9786         assignments of aggregates whose type is not known at compile time.
9787
9788 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9789
9790         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9791         protected entries and task entries, to build the proper renaming
9792         declaration for entry formals, used in debugging.
9793         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9794         parameters in the same way.
9795
9796 2011-08-02  Robert Dewar  <dewar@adacore.com>
9797
9798         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9799         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9800         code reorganization.
9801
9802 2011-08-02  Robert Dewar  <dewar@adacore.com>
9803
9804         * debug.adb: Debug flag d.P to suppress length comparison optimization
9805         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9806         comparison of Length by comparing First/Last instead.
9807
9808 2011-08-02  Matthew Heaney  <heaney@adacore.com>
9809
9810         * a-cobove.ads: Code clean up.
9811
9812 2011-08-02  Vincent Celier  <celier@adacore.com>
9813
9814         * adaint.c (file_names_case_sensitive_cache): New static int.
9815         (__gnat_get_file_names_case_sensitive): Cache the return value in
9816         file_names_case_sensitive_cache at the first invocation, to avoid
9817         multiple calls to getenv.
9818
9819 2011-08-02  Bob Duff  <duff@adacore.com>
9820
9821         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9822
9823 2011-08-02  Yannick Moy  <moy@adacore.com>
9824
9825         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9826         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9827         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9828         indicate that we are in a precondition or postcondition. This is used in
9829         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9830         decide whether to flag the spec or body of the current subprogram as
9831         not in ALFA.
9832
9833 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
9834
9835         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9836         list.
9837         * a-extiin.ads: New file.
9838
9839 2011-08-02  Bob Duff  <duff@adacore.com>
9840
9841         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9842         now raises Name_Error instead of Use_Error in certain cases. The other
9843         parts of this AI were already implemented properly.
9844
9845 2011-08-02  Vincent Celier  <celier@adacore.com>
9846
9847         * link.c: Only import "auto-host.h" when building the gnattools.
9848
9849 2011-08-02  Yannick Moy  <moy@adacore.com>
9850
9851         * sem_util.adb: Inter-unit inlining does not work for a subprogram
9852         which calls a local subprogram, so extract subprogram
9853         from Mark_Non_ALFA_Subprogram_Body.
9854
9855 2011-08-02  Javier Miranda  <miranda@adacore.com>
9856
9857         * exp_ch9.adb
9858         (Extract_Dispatching_Call): If the type of the dispatching object is an
9859         access type then return an explicit dereference in the Object out-mode
9860         parameter.
9861
9862 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
9863
9864         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9865         compatibility checks for all indexes of an array subtype, not just the
9866         first. Reset Has_Dynamic_Range_Check on the subtype before each
9867         potential check to ensure that Insert_Range_Checks will not elide any
9868         of the dynamic checks.
9869
9870 2011-08-02  Yannick Moy  <moy@adacore.com>
9871
9872         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9873         SPARK restriction at parsing time.
9874         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9875         directive only if the SPARK restriction is set for this unit.
9876
9877 2011-08-02  Yannick Moy  <moy@adacore.com>
9878
9879         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9880         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9881         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9882         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9883         Mark_Non_ALFA_Subprogram_Body.
9884         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9885         inlined.
9886
9887 2011-08-02  Yannick Moy  <moy@adacore.com>
9888
9889         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9890         might be costly.
9891
9892 2011-08-02  Robert Dewar  <dewar@adacore.com>
9893
9894         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9895         exp_ch3.adb: Minor reformatting.
9896
9897 2011-08-02  Emmanuel Briot  <briot@adacore.com>
9898
9899         * adaint.c (__gnat_locate_exec_on_path): only returns executable
9900         files, not any regular file.
9901         (__gnat_locate_file_with_predicate): new subprogram.
9902
9903 2011-08-02  Yannick Moy  <moy@adacore.com>
9904
9905         * sinfo.adb, sinfo.ads: Restrict the use of flags
9906         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9907         nodes, plus N_Subtype_Declaration for the 2nd one.
9908
9909 2011-08-02  Sergey Rybin  <rybin@adacore.com>
9910
9911         * gnat_rm.texi: Ramification of pragma Eliminate documentation
9912          - fix bugs in the description of Source_Trace;
9913          - get rid of UNIT_NAME;
9914
9915 2011-08-02  Javier Miranda  <miranda@adacore.com>
9916
9917         * exp_ch9.adb
9918         (Build_Dispatching_Requeue): Adding support for VM targets
9919         since we cannot directly reference the Tag entity.
9920         * exp_sel.adb (Build_K): Adding support for VM targets.
9921         (Build_S_Assignment): Adding support for VM targets.
9922         * exp_disp.adb
9923         (Default_Prim_Op_Position): In VM targets do not restrict availability
9924         of predefined interface primitives to compiling in Ada 2005 mode.
9925         (Is_Predefined_Interface_Primitive): In VM targets this service is not
9926         restricted to compiling in Ada 2005 mode.
9927         (Make_VM_TSD): Generate code that declares and initializes the OSD
9928         record. Needed to support dispatching calls through synchronized
9929         interfaces.
9930         * exp_ch3.adb
9931         (Make_Predefined_Primitive_Specs): Enable generation of predefined
9932         primitives associated with synchronized interfaces.
9933         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9934         primitives associated with synchronized interfaces.
9935
9936 2011-08-02  Yannick Moy  <moy@adacore.com>
9937
9938         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9939         statements hidden in SPARK if preceded by the HIDE directive
9940         (Parse_Exception_Handlers): mark each exception handler in a sequence of
9941         exception handlers as hidden in SPARK if preceded by the HIDE directive
9942         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9943         if starting with the HIDE directive
9944         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9945         starting with the HIDE directive; mark the declarations in a private
9946         part as hidden in SPARK if the private part starts with the HIDE
9947         directive
9948         * restrict.adb, restrict.ads
9949         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9950         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9951         argument node belongs to a part which is hidden in SPARK
9952         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9953         parts in SPARK; protect the possibly costly call to
9954         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9955         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9956         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9957         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9958         Tok_SPARK_Hide.
9959         (Scan): recognize special comment starting with '#' and followed by
9960         SPARK keyword "hide" as a HIDE directive.
9961
9962 2011-08-02  Yannick Moy  <moy@adacore.com>
9963
9964         * types.ads, erroutc.ads: Minor reformatting.
9965
9966 2011-08-02  Vincent Celier  <celier@adacore.com>
9967
9968         * link.c: Add response file support for cross platforms.
9969
9970 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
9971
9972         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9973         in an association, set parent field of copy before partial analysis.
9974         * sem_res.adb (Resolve_Slice): create reference to itype only when
9975         expansion is enabled.
9976
9977 2011-08-02  Yannick Moy  <moy@adacore.com>
9978
9979         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9980         for new flag denoting which subprogram bodies are in ALFA
9981         * restrict.adb, sem_ch7.adb: Update comment
9982         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9983         sem_ch9.adb, sem_res.adb: Add calls to
9984         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9985         * sem_ch6.adb (Analyze_Function_Return): add calls to
9986         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9987         middle of the body, and extended return.
9988         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9989         False when missing return.
9990         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9991         to True for subprograms whose spec is in ALFA. Remove later on the flag
9992         on the entity used for a subprogram body when there exists a separate
9993         declaration.
9994         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9995         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9996         False, otherwise do nothing.
9997
9998 2011-08-02  Robert Dewar  <dewar@adacore.com>
9999
10000         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10001
10002 2011-08-02  Yannick Moy  <moy@adacore.com>
10003
10004         * sem_ch4.ads: minor formatting.
10005
10006 2011-08-02  Yannick Moy  <moy@adacore.com>
10007
10008         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10009         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10010         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10011         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10012         opt.ads: cleanup of SPARK mode
10013
10014 2011-08-02  Yannick Moy  <moy@adacore.com>
10015
10016         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10017         types.
10018         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10019         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10020         * sem_ch3.adb
10021         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10022         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10023         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10024         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10025         types.
10026         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10027         non-static range.
10028         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10029         functions whose return type is not in ALFA.
10030         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10031         specifications.
10032         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10033         parameter's type is not in ALFA.
10034         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10035         types are in ALFA.
10036
10037 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10038
10039         * sem_ch6 (Analyze_Expression_Function): treat the function as
10040         Inline_Always, and introduce a subprogram declaration for it when it is
10041         not a completion.
10042         * inline.adb (Add_Inlined_Body): recognize bodies that come from
10043         expression functions, so that the back-end can determine whether they
10044         can in fact be inlined.
10045         * sem_util.adb (Is_Expression_Function): predicate to determine whether
10046         a function body comes from an expression function.
10047
10048 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10049
10050         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10051         null exclusions to test Can_Never_Be_Null on the anonymous access types
10052         of the formals rather than testing the formals themselves. Exclude this
10053         check in cases where the Old_Formal is marked as a controlling formal,
10054         to avoid issuing spurious errors for bodies completing dispatching
10055         operations (due to the flag not getting set on controlling access
10056         formals in body specs).
10057         (Find_Corresponding_Spec): When checking full and subtype conformance of
10058         subprogram bodies in instances, pass Designated and E in that order, for
10059         consistency with the expected order of the formals (New_Id followed by
10060         Old_Id).
10061
10062 2011-08-02  Robert Dewar  <dewar@adacore.com>
10063
10064         * sem_ch8.adb: Minor reformatting.
10065
10066 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10067
10068         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10069         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10070         primitive operations of class-wide actuals.
10071
10072 2011-08-02  Javier Miranda  <miranda@adacore.com>
10073
10074         * exp_atag.ads, exp_atag.adb
10075         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10076         since its value is implicitly passed in argument Typ.
10077         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10078         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10079         Build_Common_Dispatching_Select_Statements.
10080
10081 2011-08-02  Robert Dewar  <dewar@adacore.com>
10082
10083         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10084         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10085         Minor reformatting.
10086
10087 2011-08-02  Robert Dewar  <dewar@adacore.com>
10088
10089         * sem_res.adb: Minor reformatting.
10090         * sem_prag.adb: Minor reformatting.
10091
10092 2011-08-02  Javier Miranda  <miranda@adacore.com>
10093
10094         * exp_atag.adb, exp_atags.ads
10095         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10096         by the tagged type Entity. Required to use this routine in the VM
10097         targets since we do not have available the Tag entity in the VM
10098         platforms.
10099         * exp_ch6.adb
10100         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10101         Ada.Tags has not been previously loaded.
10102         * exp_ch7.adb
10103         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10104         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10105         * sem_aux.adb
10106         (Enclosing_Dynamic_Scope): Add missing support to handle the full
10107         view of enclosing scopes. Required to handle enclosing scopes that
10108         are synchronized types whose full view is a task type.
10109         * exp_disp.adb
10110         (Build_VM_TSDs): Minor code improvement to avoid generating and
10111         analyzing lists with empty nodes.
10112         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10113         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10114         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10115         (Make_Disp_Timed_Select_Body): Add support for VM targets.
10116         (Make_Select_Specific_Data_Table): Add support for VM targets.
10117         (Make_VM_TSD): Generate code to initialize the SSD structure of
10118         the TSD.
10119
10120 2011-08-02  Yannick Moy  <moy@adacore.com>
10121
10122         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10123         cross-references section in ALI.
10124         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10125         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10126         Sub).
10127         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10128         subprogram or package entity of a node
10129         (Is_Local_Reference_Type): new function returns True for references
10130         selected in local cross-references.
10131         (Lt): function extracted from Lt in Output_References
10132         (Write_Entity_Name): function extracted from Output_References
10133         (Generate_Definition): generate reference with type 'D' for definition
10134         of objects (object declaration and parameter specification), with
10135         appropriate locations and units, for use in local cross-references.
10136         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10137         references of type 'I' for initialization in object definition.
10138         (Output_References): move part of function Lt and procedure
10139         Write_Entity_Name outside of the body. Ignore references of types 'D'
10140         and 'I' introduced for local cross-references.
10141         (Output_Local_References): new procedure to output the local
10142         cross-references sections.
10143         (Lref_Entity_Status): new array defining whether an entity is a local
10144         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10145         with 'I' type when initialization expression is present.
10146         * get_scos.adb, get_scos.ads: Correct comments and typos
10147
10148 2011-08-02  Javier Miranda  <miranda@adacore.com>
10149
10150         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10151         the JVM target.
10152         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10153         the JVM target.
10154         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10155         TSD support.
10156
10157 2011-08-02  Vincent Celier  <celier@adacore.com>
10158
10159         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10160         (No_Space_Img): New function
10161         (Find_Excluded_Sources): When reading from a file, record the file name
10162         and the line number for each excluded source.
10163         (Mark_Excluded_Sources): When reporting an error, if the excluded
10164         sources were read from a file, include file name and line number in
10165         the error message.
10166
10167 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10168
10169         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10170
10171 2011-08-02  Robert Dewar  <dewar@adacore.com>
10172
10173         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10174
10175 2011-08-02  Javier Miranda  <miranda@adacore.com>
10176
10177         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10178         generation of TSDs to the DOTNET compiler.
10179         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10180         generation of TSDs to the DOTNET compiler.
10181
10182 2011-08-02  Javier Miranda  <miranda@adacore.com>
10183
10184         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10185         record of all the tagged types declared inside library level package
10186         declarations, library level package bodies or library level subprograms.
10187         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10188         associated with a given tagged type.
10189         (Build_VM_TSDs): New subprogram.
10190         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10191         compilation units that are subprograms.
10192         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10193         compilation units that are package bodies.
10194         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10195         units that are a package declaration or a package instantiation.
10196         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10197         reorganization to improve the error generated by the frontend when the
10198         function Ada.Tags.Secondary_Tag is not available.
10199         * rtsfind.ads (RE_Register_TSD): New runtime entity.
10200         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10201
10202 2011-08-02  Javier Miranda  <miranda@adacore.com>
10203
10204         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10205
10206 2011-08-02  Robert Dewar  <dewar@adacore.com>
10207
10208         * s-imenne.ads: Minor reformatting.
10209
10210 2011-08-02  Robert Dewar  <dewar@adacore.com>
10211
10212         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10213         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10214         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10215
10216 2011-08-02  Robert Dewar  <dewar@adacore.com>
10217
10218         * einfo.ads (Materialize_Entity): Document this is only for renamings
10219         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10220         required debug information in the case where we transform the object
10221         declaration into a renaming declaration.
10222         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10223         object
10224         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10225         Materialize_Entity.
10226
10227 2011-08-02  Robert Dewar  <dewar@adacore.com>
10228
10229         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10230         Suppress_Init_Procs.
10231         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10232         Suppress_Initialization/Initialization_Suppressed.
10233         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10234         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10235         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10236         * sem_prag.adb: New processing for pragma Suppress_Initialization.
10237
10238 2011-08-02  Robert Dewar  <dewar@adacore.com>
10239
10240         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10241         Minor reformatting.
10242
10243 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10244
10245         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10246         only have inheritable classwide pre/postconditions.
10247
10248 2011-08-02  Javier Miranda  <miranda@adacore.com>
10249
10250         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10251         * rtsfind.ads (RE_Check_TSD): New runtime entity.
10252         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10253         checks if the external tag of a type is the same as the external tag
10254         of some other declaration.
10255
10256 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10257
10258         * s-taskin.ads: Minor reformatting.
10259
10260 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10261
10262         * g-comlin.adb (Display_Help): swap the order in which it prints the
10263         short help and the general usage.
10264
10265 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10266
10267         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10268         the aspect declarations and attach them to the generic copy for
10269         subsequent analysis.
10270         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10271         declarations of the generic tree to the new subprogram declarations.
10272         * sem_attr.adb (Check_Precondition_Postcondition): recognize
10273         conditions that apply to a subprogram instance.
10274
10275 2011-08-02  Robert Dewar  <dewar@adacore.com>
10276
10277         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10278
10279 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10280
10281         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10282         private type with a tagged full view is not derived in the immediate
10283         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10284
10285 2011-08-02  Robert Dewar  <dewar@adacore.com>
10286
10287         * exp_ch4.adb: Minor reformatting.
10288
10289 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10290
10291         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
10292         Ada2012 iterator, the loop will be rewritten during expansion into a
10293         while loop with a cursor and an element declaration. Do not analyze the
10294         body in this case, because if the container is for indefinite types the
10295         actual subtype of the elements will only be determined when the cursor
10296         declaration is analyzed.
10297
10298 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10299
10300         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10301         size/alignment related attributes in CodePeer_Mode.
10302
10303 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10304
10305         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10306         Prepend_Element, since this can result in the operation getting the
10307         wrong slot in the full type's dispatch table if the full type has
10308         inherited operations. The incomplete type's operation will get added
10309         to the proper position in the full type's primitives
10310         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10311         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10312         dispatching operations, since there are cases where nonprimitive
10313         subprograms can get added to the list of incomplete dependents (such
10314         as subprograms in nested packages).
10315         * sem_ch6.adb (Process_Formals): First, remove test for being in a
10316         private part when determining whether to add a primitive with a
10317         parameter of a tagged incomplete type to the Private_Dependents list.
10318         Such primitives can also occur in the visible part, and should not have
10319         been excluded from being private dependents.
10320         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10321         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10322         list of a Taft-amendment incomplete type is a primitive before issuing
10323         an error that the full type must appear in the same unit. There are
10324         cases where nonprimitives can be in the list (such as subprograms in
10325         nested packages).
10326         * sem_disp.adb (Derives_From): Use correct condition for checking that
10327         a formal's type is derived from the type of the corresponding formal in
10328         the parent subprogram (the condition was completely wrong). Add
10329         checking that was missing for controlling result types being derived
10330         from the result type of the parent operation.
10331
10332 2011-08-02  Yannick Moy  <moy@adacore.com>
10333
10334         * errout.adb (First_Node): minor renaming
10335         * restrict.adb (Check_Formal_Restriction): put restriction warning on
10336         first node.
10337
10338 2011-08-02  Yannick Moy  <moy@adacore.com>
10339
10340         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10341         before accessing operands.
10342         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10343         decide whether an initialization expression respects SPARK rules, as
10344         the plain node is the expanded one. This allows for more valid warnings
10345         to be issued.
10346         * gnat_rm.texi: Minor update.
10347
10348 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10349
10350         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10351         previous change.
10352
10353 2011-08-02  Robert Dewar  <dewar@adacore.com>
10354
10355         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10356
10357 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10358
10359         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10360         loop statements and the element renaming declaration with a block when
10361         the element type is controlled.
10362
10363 2011-08-02  Yannick Moy  <moy@adacore.com>
10364
10365         * sinfo.ads: Minor formatting.
10366
10367 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10368
10369         * sem_aggr.adb (Add_Association): if the association has a box and no
10370         expression, use the Sloc of the aggregate itself for the new
10371         association.
10372         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10373         the Original_Node.
10374
10375 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10376
10377         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10378         When a container is provided via a function call, generate a renaming
10379         of the function result. This avoids the creation of a transient scope
10380         and the premature finalization of the container.
10381         * exp_ch7.adb (Is_Container_Cursor): Removed.
10382         (Wrap_Transient_Declaration): Remove the supression of the finalization
10383         of the list controller when the declaration denotes a container cursor,
10384         it is not needed.
10385
10386 2011-08-02  Yannick Moy  <moy@adacore.com>
10387
10388         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10389         node is from source, instead of the original node being from source.
10390         * sem_aggr.adb
10391         (Resolve_Array_Aggregate): refine the check for a static expression, to
10392         recognize also static ranges
10393         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10394         Array_Type_Declaration): postpone the test for the type being a subtype
10395         mark after the type has been resolved, so that component-selection and
10396         expanded-name are discriminated.
10397         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10398         to distinguish the case of an iteration scheme, so that an error is
10399         issed on a non-static range in SPARK except in an iteration scheme.
10400         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10401         In_Iter_Schm = True.
10402         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10403         user-defined operators so that they are allowed in renaming
10404         * sem_ch8.adb
10405         (Find_Selected_Component): refine the check for prefixing of operators
10406         so that they are allowed in renaming. Move the checks for restrictions
10407         on selector name after analysis discriminated between
10408         component-selection and expanded-name.
10409         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10410         concatenation argument of string type if it is static.
10411         * sem_util.adb, sem_util.ads
10412         (Check_Later_Vs_Basic_Declarations): add a new function
10413         Is_Later_Declarative_Item to decice which declarations are allowed as
10414         later items, in the two different modes Ada 83 and SPARK. In the SPARK
10415         mode, add that renamings are considered as later items.
10416         (Enclosing_Package): new function to return the enclosing package
10417         (Enter_Name): correct the rule for homonyms in SPARK
10418         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10419         from source (result of expansion) to avoid issuing wrong warnings.
10420
10421 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10422
10423         * errout.adb: On anything but an expression First_Node returns its
10424         argument.
10425
10426 2011-08-02  Pascal Obry  <obry@adacore.com>
10427
10428         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10429
10430 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10431
10432         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10433         Set the associated loop as the related expression of internally
10434         generated cursors.
10435         * exp_ch7.adb (Is_Container_Cursor): New routine.
10436         (Wrap_Transient_Declaration): Supress the finalization of the list
10437         controller when the declaration denotes a container cursor.
10438
10439 2011-08-02  Yannick Moy  <moy@adacore.com>
10440
10441         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10442         command line now.
10443         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10444         expression is a simple expression. This check cannot be performed in
10445         the semantics, so just drop it.
10446         (P_Index_Or_Discriminant_Constraint): move check that the index or
10447         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10448         semantics. Other cases were previously checked in the semantics.
10449         * par-ch4.adb (P_Name): move checks that a selector name is not
10450         character literal or an operator symbol to Find_Selected_Component in
10451         the semantics
10452         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10453         declarations are not placed after later declarations in a separate
10454         procedure in Sem_Util (possibly not the best choice?), to be used both
10455         during parsing, for Ada 83 mode, and during semantic analysis, for
10456         SPARK mode.
10457         * par-endh.adb (Check_End): move check that end label is not missing
10458         to Process_End_Label in the semantics
10459         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10460         the special case for SPARK restriction
10461         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10462         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10463         parameter Force to issue the error message even on internal node (used
10464         for generated end label). Call Check_Restriction to check when an error
10465         must be issued. In SPARK mode, issue an error message even if the
10466         restriction is not set.
10467         (Check_Restriction): new procedure with an additional out parameter to
10468         inform the caller that a message has been issued
10469         * sem_aggr.adb: Minor modification of message
10470         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10471         instead of issuing an error message directly
10472         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10473         declarations are not placed after later declarations, by calling
10474         Check_Later_Vs_Basic_Declarations
10475         (Analyze_Subtype_Declaration): move here the check that an index or
10476         discriminant constraint must be a subtype mark. Change the check that
10477         a subtype of String must start at one so that it works on subtype marks.
10478         * sem_ch4.adb (Analyze_Call): move here the check that a named
10479         association cannot follow a positional one in a call
10480         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10481         instead of issuing an error message directly
10482         * sem_ch8.adb (Find_Selected_Component): move here the check that a
10483         selector name is not a character literal or an operator symbol. Move
10484         here the check that the prefix of an expanded name cannot be a
10485         subprogram or a loop statement.
10486         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10487         procedure called from parsing and semantics to check that basic
10488         declarations are not placed after later declarations
10489         (Process_End_Label): move here the check that end label is not missing
10490
10491 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10492
10493         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10494         representation clause in codepeer mode, since it confuses CodePeer and
10495         does not bring useful info.
10496
10497 2011-08-02  Ed Falis  <falis@adacore.com>
10498
10499         * init.c: initialize fp hw on MILS.
10500
10501 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10502
10503         * errout.adb (First_Node): for bodies, return the node itself (small
10504         optimization). For other nodes, do not check source_unit if the node
10505         comes from Standard.
10506
10507 2011-08-02  Robert Dewar  <dewar@adacore.com>
10508
10509         * exp_ch3.adb: Minor comment additions.
10510         * sem_ch13.adb: Minor reformatting.
10511
10512 2011-08-02  Pascal Obry  <obry@adacore.com>
10513
10514         * make.adb, makeutl.adb: Removes some superfluous directory separator.
10515
10516 2011-08-02  Robert Dewar  <dewar@adacore.com>
10517
10518         * sem_attr.adb: Minor reformatting.
10519
10520 2011-08-02  Robert Dewar  <dewar@adacore.com>
10521
10522         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10523         (Has_Default_Component_Value): Removed
10524         * einfo.ads Comment updates
10525         (Has_Default_Aspect): Replaces Has_Default_Value
10526         (Has_Default_Component_Value): Removed
10527         * exp_ch13.adb
10528         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10529         * exp_ch3.adb
10530         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10531         (Get_Simple_Init_Val): Handle Default_Value aspect
10532         (Needs_Simple_Initialization): Handle Default_Value aspect
10533         * exp_ch3.ads: Needs_Simple_Initialization
10534         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10535         * par-prag.adb (Pragma_Default[_Component]Value) Removed
10536         * sem_ch13.adb
10537         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10538         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10539         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10540
10541 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10542
10543         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10544         package containing iteration primitives.
10545         exp_ch5.adb (Expand_Iterator_Loop): ditto.
10546
10547 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10548
10549         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10550         "of", pre-analyze expression in case it is a function call with
10551         finalization actions that must be placed ahead of the loop.
10552         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10553         on an Ada2012 iterator, insert them ahead of the rewritten loop.
10554
10555 2011-08-02  Geert Bosch  <bosch@adacore.com>
10556
10557         * cstand.adb (Create_Float_Types): Only consider C's long double for
10558         Long_Long_Float, in addition to double.
10559
10560 2011-08-02  Robert Dewar  <dewar@adacore.com>
10561
10562         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10563         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10564         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10565         Minor reformatting.
10566
10567 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10568
10569         * sem_attr.adb: handle properly 'Result when it is a prefix of an
10570         indexed component.
10571
10572 2011-08-02  Javier Miranda  <miranda@adacore.com>
10573
10574         * einfo.ads, einfo.adb
10575         (Original_Access_Type): Move this attribute to Node26 since there was
10576         an undocumented use of Node21 in E_Access_Subprogram_Type entities
10577         which causes conflicts and breaks the generation of the .NET compiler.
10578         (Interface_Name): Add missing documentation on JGNAT only uses of
10579         this attribute.
10580
10581 2011-08-02  Geert Bosch  <bosch@adacore.com>
10582
10583         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10584         (Find_Back_End_Float_Type): Likewise
10585         (Create_Back_End_Float_Types): Likewise
10586         (Create_Float_Types): Likewise
10587         (Register_Float_Type): Likewise
10588         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10589         Nlist and split out type selection in new local Find_Base_Type function.
10590         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10591         Nlist
10592         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10593
10594 2011-08-02  Robert Dewar  <dewar@adacore.com>
10595
10596         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10597         alpha order).
10598         * opt.ads: Minor comment change.
10599         * sem_ch12.adb: Minor code reorganization.
10600
10601 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10602
10603         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10604         subtype's list of rep items to the list on the full subtype in the case
10605         where the lists are the same.
10606
10607 2011-08-02  Geert Bosch  <bosch@adacore.com>
10608
10609         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10610         using the one from System.Strings, which also deallocates all strings.
10611
10612 2011-08-02  Geert Bosch  <bosch@adacore.com>
10613
10614         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10615         function.
10616         * gcc-interface/Make-lang.in: Update dependencies.
10617
10618 2011-08-02  Olivier Hainque  <hainque@adacore.com>
10619
10620         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10621         end_locus.
10622
10623 2011-08-02  Javier Miranda  <miranda@adacore.com>
10624
10625         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10626         associated with anonymous access to subprograms.
10627
10628 2011-08-02  Geert Bosch  <bosch@adacore.com>
10629
10630         * opt.ads
10631         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10632         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10633         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10634         (Add_Symbol_Definition): Move to switch-c.adb
10635         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10636         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10637         (Add_Symbol_Definition): Move to switch-c.adb.
10638         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10639         * sem_warn.adb
10640         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10641         Move to warnsw.adb.
10642         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10643         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10644         Move to warnsw.adb.
10645         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10646         (Add_Symbol_Definition): Moved from Prepcomp.
10647         * switch-c.ads: Update copyright notice. Use String_List instead of
10648         Argument_List, removing dependency on System.OS_Lib.
10649
10650 2011-08-02  Yannick Moy  <moy@adacore.com>
10651
10652         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10653         mode on initialization expression which does not respect SPARK
10654         restrictions.
10655         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10656         if the tree referenced by its argument represents an initialization
10657         expression in SPARK, suitable for initializing an object in an object
10658         declaration.
10659
10660 2011-08-02  Javier Miranda  <miranda@adacore.com>
10661
10662         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10663         internally generated access to subprogram with its associated protected
10664         subprogram type.
10665         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10666
10667 2011-08-02  Geert Bosch  <bosch@adacore.com>
10668
10669         * cstand.adb (Register_Float_Type): Print information about type to
10670         register, if the Debug_Flag_Dot_B is set.
10671         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10672         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10673         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10674         with a requested precision of more than Max_Digits digits and no more
10675         than Max_Base_Digits digits, if a range specification is present and the
10676         Predefined_Float_Types list has a suitable type to derive from.
10677         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10678         case of type completion with pragma Import
10679         * sem_prag.adb
10680         (Process_Import_Predefined_Type): Processing to complete a type
10681         with pragma Import. Currently supports floating point types only.
10682         (Set_Convention_From_Pragma): Do nothing without underlying type.
10683         (Process_Convention): Guard against absence of underlying type,
10684         which may happen when importing incomplete types.
10685         (Process_Import_Or_Interface): Handle case of importing predefined
10686         types. Tweak error message.
10687
10688 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10689
10690         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10691         functions to previous change.  Reorganize code slightly.
10692
10693 2011-08-02  Geert Bosch  <bosch@adacore.com>
10694
10695         * back_end.ads (Register_Type_Proc): New call back procedure type for
10696         allowing the back end to provide information about available types.
10697         (Register_Back_End_Types): New procedure to register back end types.
10698         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10699         available types.
10700         * cstand.adb (Back_End_Float_Types): New list for floating point types
10701         supported by the back end.
10702         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10703         (Copy_Float_Type): New procedure to make new copies of predefined types.
10704         (Register_Float_Type): New call back procedure to populate the BEFT list
10705         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10706         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10707         (Create_Float_Types): New procedure to create entities for floating
10708         point types predefined in Standard, and put these and any remaining
10709         BEFTs on the Predefined_Float_Types list.
10710         * stand.ads (Predefined_Float_Types): New list for predefined floating
10711         point types that do not have declarations in package Standard.
10712
10713 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10714
10715         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
10716         entity node for the unit containing the parameter.
10717         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10718         (Add_Inlined_Subprogram): Likewise.
10719         * gcc-interface/Make-lang.in: Update dependencies.
10720
10721 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10722
10723         * s-stusta.adb (Print): Make sure Pos is always initialized to a
10724         suitable value.
10725
10726 2011-08-02  Geert Bosch  <bosch@adacore.com>
10727
10728         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10729
10730 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10731
10732         * sem_type.adb (Covers): Move trivial case to the top and reuse the
10733         computed value of Base_Type.
10734
10735 2011-08-02  Yannick Moy  <moy@adacore.com>
10736
10737         * restrict.adb (Check_Restriction): issue an error for any use of
10738         class-wide, even if the No_Dispatch restriction is not set.
10739         * sem_aggr.adb: Correct typos in comments and messages in formal mode
10740         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10741         when completing a private extension, the type named in the private part
10742         is not the same as that named in the visible part.
10743         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10744         of an inherited primitive operations of a tagged type or type extension
10745         that returns the tagged type.
10746         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10747         function which returns True for an implicit operation inherited by the
10748         derived type declaration for the argument type.
10749         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10750         order.
10751
10752 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10753
10754         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10755         Process_Bounds, to perform analysis with expansion of a range or an
10756         expression that is the iteration scheme for a loop.
10757         (Analyze_Iterator_Specification): If domain of iteration is given by a
10758         function call with a controlled result, as is the case if call returns
10759         a predefined container, ensure that finalization actions are properly
10760         generated.
10761         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10762
10763 2011-08-02  Javier Miranda  <miranda@adacore.com>
10764
10765         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10766         * gcc-interface/Make-lang.in: Update dependencies.
10767
10768 2011-08-02  Javier Miranda  <miranda@adacore.com>
10769
10770         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10771         determine if the analysis is performed using N or Original_Node (N).
10772         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10773         functionality of routine Is_Variable avoids code duplication.
10774         * checks.adb (Determine_Range): Handle temporaries generated by
10775         Remove_Side_Effects.
10776
10777 2011-08-02  Javier Miranda  <miranda@adacore.com>
10778
10779         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10780         expansion of the condition. Required since the previous analysis was
10781         done with expansion disabled (see Resolve_Quantified_Expression) and
10782         hence checks were not inserted and record comparisons have not been
10783         expanded.
10784
10785 2011-08-02  Ed Falis  <falis@adacore.com>
10786
10787         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10788         Update header.
10789
10790 2011-08-02  Bob Duff  <duff@adacore.com>
10791
10792         * opt.ads: Minor comment fix.
10793
10794 2011-08-02  Bob Duff  <duff@adacore.com>
10795
10796         * sem_ch12.adb (Analyze_Package_Instantiation,
10797         Analyze_Subprogram_Instantiation): Turn off style checking while
10798         analyzing an instance. Whatever style checks that apply to the generic
10799         unit should apply, so it makes no sense to apply them in an instance.
10800         This was causing trouble when compiling an instance of a runtime
10801         unit that violates the -gnatyO switch.
10802         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10803         one of the two case statements, causing spurious errors.
10804
10805 2011-08-02  Robert Dewar  <dewar@adacore.com>
10806
10807         * uname.adb: Minor reformatting.
10808         * gnatcmd.adb: Minor reformatting.
10809         * exp_attr.adb: Minor reformatting.
10810
10811 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10812
10813         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10814         No_Dispatching_Calls, do not look for the Assign primitive, because
10815         predefined primitives are not created in this case.
10816
10817 2011-08-02  Bob Duff  <duff@adacore.com>
10818
10819         * stylesw.ads: Minor comment fixes.
10820
10821 2011-08-02  Robert Dewar  <dewar@adacore.com>
10822
10823         * freeze.adb (Add_To_Result): New procedure.
10824
10825 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
10826
10827         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10828         time, if the specific run-time routines for handling streams of strings
10829         are not available, use the default mechanism.
10830
10831 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10832
10833         * s-regpat.ads: Fix typo.
10834
10835 2011-08-02  Vincent Celier  <celier@adacore.com>
10836
10837         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10838         not null, call it to create the in memory config project file without
10839         parsing an existing default config project file.
10840
10841 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10842
10843         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10844
10845 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10846
10847         * sem_elim.adb: an abstract subprogram does not need an eliminate
10848         pragma for its descendant to be eliminable.
10849
10850 2011-08-02  Ed Falis  <falis@adacore.com>
10851
10852         * init.c: revert to handling before previous checkin for VxWorks
10853         * s-intman-vxworks.adb: delete unnecessary declarations related to
10854         using Ada interrupt facilities for handling signals.
10855         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10856         * s-intman-vxworks.ads: Import __gnat_install_handler as
10857         Initialize_Interrupts.
10858         * s-taprop-vxworks.adb: Delete Signal_Mask.
10859         (Abort_Handler): change construction of mask to unblock exception
10860         signals.
10861
10862 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10863
10864         * a-except-2005.adb (Raise_From_Signal_Handler): Call
10865         Debug_Raise_Exception before propagation starts.
10866
10867 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
10868
10869         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10870         to Restriction_Check_Required.
10871         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10872         * sem_res.adb (Resolve_Call): Likewise.
10873         * sem_attr.adb (Check_Stream_Attribute): Likewise.
10874
10875 2011-08-02  Bob Duff  <duff@adacore.com>
10876
10877         * stylesw.ads: Update comment.
10878         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10879         * errout.ads: Remove obsolete comment.
10880
10881 2011-08-02  Javier Miranda  <miranda@adacore.com>
10882
10883         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10884         (Set_Is_Safe_To_Reevaluate): new procedure.
10885         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10886         assignment is allowed on safe-to-reevaluate variables.
10887         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10888         temporary created to remove side effects in expressions that use
10889         the secondary stack as safe-to-reevaluate.
10890         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10891         variables that are not true constants.
10892
10893 2011-08-02  Robert Dewar  <dewar@adacore.com>
10894
10895         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10896         sem_res.adb, sem_ch6.adb: Minor reformatting.
10897
10898 2011-08-02  Jerome Guitton  <guitton@adacore.com>
10899
10900         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10901
10902 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10903
10904         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10905         not set Overridden_Operation if subprogram is an initialization
10906         procedure.
10907
10908 2011-08-02  Yannick Moy  <moy@adacore.com>
10909
10910         * par-ch6.adb: Correct obsolete name in comments
10911         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10912         which takes two message arguments (existing function takes one), with
10913         second message used for continuation.
10914         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10915         block statements that originate from a source block statement, not
10916         generated block statements
10917         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10918         symmetry with procedure case
10919         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10920         function to issue an error in formal mode if a package specification
10921         contains more than one tagged type or type extension.
10922         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10923         parameters matching formals of tagged types are objects (or ancestor
10924         type conversions of objects), not general expressions. Issue an error
10925         on view conversions that are not involving ancestor conversion of an
10926         extended type.
10927         (Resolve_Type_Conversion): in formal mode, issue an error on the
10928         operand of an ancestor type conversion which is not an object
10929         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10930         procedure so that it works also for actuals of function calls
10931         (Is_Actual_Tagged_Parameter): new function which determines if its
10932         argument is an actual parameter of a formal of tagged type in a
10933         subprogram call
10934         (Is_SPARK_Object_Reference): new function which determines if the tree
10935         referenced by its argument represents an object in SPARK
10936
10937 2011-08-02  Robert Dewar  <dewar@adacore.com>
10938
10939         * sem_ch3.adb: Minor reformatting
10940         Minor comment addition
10941         Minor error msg text change
10942
10943 2011-08-02  Javier Miranda  <miranda@adacore.com>
10944
10945         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10946         function. Used to be more precise when we generate a variable plus one
10947         assignment to remove side effects in the evaluation of the Bound
10948         expressions.
10949         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10950         of the bound expression to force its re-analysis and thus expand the
10951         associated transient scope (if required). Code cleanup replacing the
10952         previous code that declared the constant entity by an invocation to
10953         routine Force_Evaluation which centralizes this work in the frontend.
10954
10955 2011-08-02  Robert Dewar  <dewar@adacore.com>
10956
10957         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10958         (Base_Type): Now uses improved Is_Base_Type function
10959         * einfo.ads (Base_Type): Inline this function
10960
10961 2011-08-02  Robert Dewar  <dewar@adacore.com>
10962
10963         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10964         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10965
10966 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10967
10968         * gcc-interface/Make-lang.in: Update dependencies.
10969         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10970         targets.
10971
10972 2011-08-02  Yannick Moy  <moy@adacore.com>
10973
10974         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10975         non-simple expression used in delta constraint
10976         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10977         index constraint which is not a subtype mark
10978         * par.adb: With and use Restrict
10979         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10980         mode on component type which is not a subtype mark and default
10981         expression on component
10982         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10983         of string which does not have a lower index bound equal to 1
10984         (Array_Type_Declaration): issue an error in formal mode on index or
10985         component type which is not a subtype mark, and on aliased keyword on
10986         component
10987         (Derived_Type_Declaration): issue an error in formal mode on interface,
10988         limited or abstract type
10989         (Record_Type_Declaration): issue an error in formal mode on interface
10990         (Record_Type_Definition): issue an error in formal mode on tagged types
10991         and type extensions not declared in the specification of a library unit
10992         package; on null non-tagged record; on variant part
10993
10994 2011-08-02  Vincent Celier  <celier@adacore.com>
10995
10996         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10997         not declared for qualified library project when Library_Name is not
10998         declared, but Library_Dir is.
10999
11000 2011-08-02  Robert Dewar  <dewar@adacore.com>
11001
11002         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11003         pragmas (affects aspects [Component_]Default_Value
11004         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11005         component type for the resolution
11006
11007 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11008
11009         * einfo.adb (Base_Type): Tune implementation for speed.
11010
11011 2011-08-02  Robert Dewar  <dewar@adacore.com>
11012
11013         * freeze.adb: Minor reformatting.
11014
11015 2011-08-02  Thomas Quinot  <quinot@adacore.com>
11016
11017         * scos.ads: Update comments.
11018
11019 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11020
11021         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11022         base type, because the parent may be a subtype of a private type whose
11023         convention is established in a private part.
11024
11025 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11026
11027         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11028         statement in a block when the expansion of the return expression has
11029         created a finalization chain.
11030         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11031         with the parent node.
11032         Add N_Extended_Return_Statement to handle the case where a transient
11033         object declaration appears in the Return_Object_Declarations list of
11034         an extended return statement.
11035
11036 2011-08-02  Matthew Gingell  <gingell@adacore.com>
11037
11038         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11039         unused parameter 'name'.
11040
11041 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11042
11043         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11044         inherited operation, check whether its alias, which is the source
11045         operastion that it renames, has been marked eliminated.
11046
11047 2011-08-02  Javier Miranda  <miranda@adacore.com>
11048
11049         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11050         in-mode parameter whose type is an access type since it can be used to
11051         modify its designated object. Enforce code that handles as safe an
11052         access type that is not access-to-constant but it is the result of a
11053         previous removal of side-effects.
11054         (Remove_Side_Effects): Minor code reorganization of cases which require
11055         no action. Done to incorporate documentation on new cases uncovered
11056         working in this ticket: no action needed if this routine was invoked
11057         too early and the nodes are not yet decorated.
11058         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11059         to routine Remove_Side_Effects by calls to Force_Evaluation since they
11060         were issued with actuals that are implicitly provided by
11061         Force_Evaluation.
11062
11063 2011-08-02  Robert Dewar  <dewar@adacore.com>
11064
11065         * sem_ch3.adb, sem_res.adb: Minor reformatting.
11066
11067 2011-08-02  Yannick Moy  <moy@adacore.com>
11068
11069         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11070         to issue an error in formal mode on attribute not supported in this mode
11071         (Analyze_Attribute): issue errors on standard attributes not supported
11072         in formal mode.
11073         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11074         comment, and issue error in formal mode on modulus which is not a power
11075         of 2.
11076         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11077         range.
11078         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11079         subtype mark.
11080         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11081         operator on modular type (except 'not').
11082
11083 2011-08-02  Robert Dewar  <dewar@adacore.com>
11084
11085         * gnat_rm.texi: Minor reformatting.
11086
11087 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11088
11089         * s-osinte-linux.ads: Minor comment update and reformatting.
11090         * i-cexten.ads: Make this unit pure, as for its parent.
11091         Will allow its usage in more contexts if needed.
11092
11093 2011-08-02  Robert Dewar  <dewar@adacore.com>
11094
11095         * s-utf_32.ads: Minor comment fix.
11096
11097 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11098
11099         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11100         operation of a tagged synchronized type, handle the case where the
11101         controlling argument is overloaded.
11102
11103 2011-08-02  Yannick Moy  <moy@adacore.com>
11104
11105         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11106         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11107         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11108         SPARK mode and formal verification mode on processing SPARK restriction
11109         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11110         requiring consistency checking.
11111
11112 2011-08-02  Robert Dewar  <dewar@adacore.com>
11113
11114         * sem_res.adb: Minor reformatting.
11115
11116 2011-08-02  Robert Dewar  <dewar@adacore.com>
11117
11118         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11119         a-cforse.ads: Remove unneeded with of Ada.Containers
11120         Remove commented out pragma Inline's
11121         Move specifications of new subprograms to the actual specs
11122
11123 2011-08-02  Yannick Moy  <moy@adacore.com>
11124
11125         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11126         a-cforse.ads: Update comments.
11127
11128 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11129
11130         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11131
11132 2011-08-02  Robert Dewar  <dewar@adacore.com>
11133
11134         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11135         a-cforse.ads, a-cofove.ads: Minor reformatting.
11136
11137 2011-08-02  Claire Dross  <dross@adacore.com>
11138
11139         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11140         a-cofove.ads: Add comments.
11141
11142 2011-08-02  Yannick Moy  <moy@adacore.com>
11143
11144         * gnat_rm.texi: Document formal containers.
11145
11146 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11147
11148         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11149         are empty sections.
11150
11151 2011-08-02  Robert Dewar  <dewar@adacore.com>
11152
11153         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11154         reformatting.
11155
11156 2011-08-02  Robert Dewar  <dewar@adacore.com>
11157
11158         * aspects.adb: New aspects Default_Value and Default_Component_Value
11159         New format of Aspect_Names table checks for omitted entries
11160         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11161         handling of boolean aspects for derived types.
11162         New aspects Default_Value and Default_Component_Value
11163         New format of Aspect_Names table checks for omitted entries
11164         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11165         (Has_Default_Value): New flag
11166         (Has_Default_Component_Value): New flag
11167         (Has_Default_Value): New flag
11168         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11169         table.
11170         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11171         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11172         Default_Value and Default_Component_Value
11173         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11174         New aspects Default_Value and Default_Component_Value
11175         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11176         * sprint.adb: Print N_Aspect_Specification node when called from gdb
11177
11178 2011-08-02  Vincent Celier  <celier@adacore.com>
11179
11180         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11181         inherit library kind.
11182
11183 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11184
11185         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11186         Minor reformatting.
11187
11188 2011-08-02  Robert Dewar  <dewar@adacore.com>
11189
11190         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11191
11192 2011-08-02  Yannick Moy  <moy@adacore.com>
11193
11194         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11195
11196 2011-08-02  Robert Dewar  <dewar@adacore.com>
11197
11198         * impunit.adb: Add comment.
11199
11200 2011-08-02  Yannick Moy  <moy@adacore.com>
11201
11202         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11203         qualification of aggregates in formal mode
11204         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11205         another aggregate
11206         (Resolve_Aggregate): complete the test that an aggregate is adequately
11207         qualified in formal mode
11208
11209 2011-08-02  Pascal Obry  <obry@adacore.com>
11210
11211         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11212         * mlib-prj.adb: Supress warning when compiling binder generated file.
11213         (Build_Library): Supress all warnings when compiling the binder
11214         generated file.
11215
11216 2011-08-02  Yannick Moy  <moy@adacore.com>
11217
11218         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11219         from here...
11220         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11221         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11222         Add with/use clauses to make Check_Formal_Restriction visible
11223
11224 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11225
11226         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11227         in-parameters when type of the generic formal is private in the generic
11228         spec and non-private in the body.
11229
11230 2011-08-02  Claire Dross  <dross@adacore.com>
11231
11232         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11233         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11234         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11235         * impunit.adb, Makefile.rtl: Take new files into account.
11236
11237 2011-08-02  Robert Dewar  <dewar@adacore.com>
11238
11239         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11240         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11241
11242 2011-08-02  Yannick Moy  <moy@adacore.com>
11243
11244         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11245         formal mode
11246         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11247         matching static array bounds, taking into account the special case of
11248         string literals
11249         * sem_ch3.adb: Typo in comment.
11250
11251 2011-08-02  Yannick Moy  <moy@adacore.com>
11252
11253         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11254         which issues an error in formal mode if its argument node is originally
11255         from source
11256         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11257         has a discriminant specification so that it does not include the case
11258         of derived types
11259         (Derived_Type_Declaration): move here the test that a derived type has a
11260         discriminant specification
11261         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11262         first element of a component association before accessing its choices
11263         (presence of component association is not enough)
11264         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11265         declaration is a library item before accessing the next element in a
11266         list, as library items are not member of lists
11267         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11268         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11269         Check_Formal_Restriction whenever possible.
11270
11271 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11272
11273         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11274         reference when needed.
11275
11276 2011-08-02  Bob Duff  <duff@adacore.com>
11277
11278         * gnat_ugn.texi: Fix typo.
11279
11280 2011-08-02  Vincent Celier  <celier@adacore.com>
11281
11282         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11283         archive file name. Do not use the full path name of archives for Open
11284         VMS.
11285
11286 2011-08-02  Robert Dewar  <dewar@adacore.com>
11287
11288         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11289         Analyze_Aspect_Specifications
11290         * sem_ch13.adb
11291         (Analyze_Aspect_Specifications): New handling for boolean aspects
11292         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11293         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11294         sequence for Analyze_Aspect_Specifications
11295         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11296         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11297
11298 2011-08-02  Robert Dewar  <dewar@adacore.com>
11299
11300         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11301         aspects, since these no longer exist.
11302
11303 2011-08-02  Robert Dewar  <dewar@adacore.com>
11304
11305         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11306         semicolon, do not try to see if there are aspects following it.
11307         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11308         aspect spec.
11309
11310 2011-08-02  Robert Dewar  <dewar@adacore.com>
11311
11312         * sem_ch8.adb, aspects.ads: Minor reformatting.
11313
11314 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11315
11316         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11317         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11318         extracted from...
11319         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
11320
11321 2011-08-02  Yannick Moy  <moy@adacore.com>
11322
11323         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11324         mode on subprogram declaration outside of package specification, unless
11325         it is followed by a pragma Import
11326         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11327         Access_Type_Declaration): issue error in formal mode on access type
11328         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11329         incomplete type
11330         (Analyze_Object_Declaration): issue error in formal mode on object
11331         declaration which does not respect SPARK restrictions
11332         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11333         declaration which does not respect SPARK restrictions
11334         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11335         error in formal mode on digits or delta constraint
11336         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11337         decimal fixed point type
11338         (Derived_Type_Declaration): issue error in formal mode on derived type
11339         other than type extensions of tagged record types
11340         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11341         with check on access definition
11342         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11343         mode on protected definition.
11344         (Analyze_Task_Definition): issue error in formal mode on task definition
11345
11346 2011-08-02  Robert Dewar  <dewar@adacore.com>
11347
11348         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11349
11350 2011-08-02  Javier Miranda  <miranda@adacore.com>
11351
11352         * sem_ch6.adb (Can_Override_Operator): New function.
11353         (Verify_Overriding_Indicator): Add missing code to check overriding
11354         indicator in operators. Fixes regression.
11355         (Check_Overriding_Indicator): Minor reformating after replacing the
11356         code that evaluates if the subprogram can override an operator by
11357         invocations to the above new function.
11358         * einfo.adb
11359         (Write_Field26_Name): Add missing code to ensure that, following
11360         the documentation in einfo.ads, this field is not shown as attribute
11361         "Static_Initialization" on non-dispatching functions.
11362
11363 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11364
11365         * sem_res.adb (Resolve_Call): A call to
11366         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11367         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11368         i.e., when the second parameter is of type Time_Span.
11369
11370 2011-08-02  Vincent Celier  <celier@adacore.com>
11371
11372         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11373         with an archive instead of -L<library dir> -l<library name>.
11374
11375 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11376
11377         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11378         mark the base types In_Use in addition to making the operations
11379         use_visible.
11380
11381 2011-08-02  Ed Falis  <falis@adacore.com>
11382
11383         * init.c: add and setup __gnat_signal_mask for the exception signals
11384         * s-inmaop-vxworks.adb: new file.
11385         * s-intman-vxworks.adb: remove unnecessary initializations and
11386         simplify remaining
11387         * s-intman-vxworks.ads: remove unnecessary variable
11388         * s-taprop-vxworks.adb: simplify signal initialization
11389
11390 2011-08-02  Robert Dewar  <dewar@adacore.com>
11391
11392         * sem_ch8.adb: Minor code reorganization, comment updates.
11393
11394 2011-08-02  Robert Dewar  <dewar@adacore.com>
11395
11396         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11397         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11398         here from Sem_Res.
11399         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11400         (Matching_Static_Array_Bounds): Moved here from Sem_Res
11401
11402 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11403
11404         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11405         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11406         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11407         use_type_clauses, to handle more efficiently use_type and use_all_type
11408         constructs.
11409         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11410         Ada2012 Use_All_Type clause.
11411         (Use_Class_Wide_Operations): new procedure.
11412
11413 2011-08-02  Robert Dewar  <dewar@adacore.com>
11414
11415         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11416         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11417         expression to expression function.
11418
11419 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11420
11421         * sem_ch4.adb: transform simple Ada2012 membership into equality only
11422         if types are compatible.
11423
11424 2011-08-02  Yannick Moy  <moy@adacore.com>
11425
11426         * sem_res.adb (Matching_Static_Array_Bounds): new function which
11427         returns True if its argument array types have same dimension and same
11428         static bounds at each index.
11429         (Resolve_Actuals): issue an error in formal mode on actuals passed as
11430         OUT or IN OUT paramaters which are not view conversions in SPARK.
11431         (Resolve_Arithmetic_Op): issue an error in formal mode on
11432         multiplication or division with operands of fixed point types which are
11433         not qualified or explicitly converted.
11434         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11435         Boolean or array type (except String) operands.
11436         (Resolve_Equality_Op): issue an error in formal mode on equality
11437         operators for array types other than String with non-matching static
11438         bounds.
11439         (Resolve_Logical_Op): issue an error in formal mode on logical operators
11440         for array types with non-matching static bounds. Factorize the code in
11441         Matching_Static_Array_Bounds.
11442         (Resolve_Qualified_Expression): issue an error in formal mode on
11443         qualified expressions for array types with non-matching static bounds.
11444         (Resolve_Type_Conversion): issue an error in formal mode on type
11445         conversion for array types with non-matching static bounds
11446
11447 2011-08-02  Robert Dewar  <dewar@adacore.com>
11448
11449         * par-ch10.adb: Minor code reorganization (use Nkind_In).
11450
11451 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11452
11453         * par-ch9.adb: save location of entry for proper error message.
11454
11455 2011-08-02  Javier Miranda  <miranda@adacore.com>
11456
11457         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11458         (Use_Full_View) which permits this routine to climb through the
11459         ancestors using the full-view of private parents.
11460         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11461         Use_Full_View to true in calls to Is_Ancestor.
11462         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11463         true in call to Is_Ancestor.
11464         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11465         Use_Full_View to true in call to Is_Ancestor.
11466         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11467         call to Is_Ancestor.
11468         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11469         Use_Full_View to true in calls to Is_Ancestor.
11470         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11471         Make_Select_Specific_Data_Table, Register_Primitive,
11472         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11473         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11474         to true in call to Is_Ancestor.
11475         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11476         Use_Full_View to true in calls to Is_Ancestor.
11477         * exp_cg.adb
11478         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11479         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11480
11481 2011-08-02  Robert Dewar  <dewar@adacore.com>
11482
11483         * gnat_rm.texi: Minor reformatting.
11484         * sem_prag.adb: Minor reformatting.
11485
11486 2011-08-02  Tristan Gingold  <gingold@adacore.com>
11487
11488         * vms_data.ads: Add VMS qualifier for -gnateP.
11489
11490 2011-08-02  Robert Dewar  <dewar@adacore.com>
11491
11492         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11493         * par-ch7.adb (P_Package): Proper placement of aspects for package
11494         decl/instantiation.
11495         * par-endh.adb (Check_End): Ad Is_Sloc parameter
11496         (End_Statements): Add Is_Sloc parameterr
11497         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11498         (Check_End): Ad Is_Sloc parameter
11499         (End_Statements): Add Is_Sloc parameterr
11500
11501 2011-08-02  Vincent Celier  <celier@adacore.com>
11502
11503         * ug_words: Add VMS qualifier equivalent to -gnateP:
11504         /SYMBOL_PREPROCESSING.
11505
11506 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11507
11508         * gnat-style.texi: For hexadecimal numeric literals the typical
11509         grouping of digits is 4 to represent 2 bytes.
11510         A procedure spec which is split into several lines is indented two
11511         characters.
11512
11513 2011-08-02  Yannick Moy  <moy@adacore.com>
11514
11515         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11516         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11517         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11518         properly qualified
11519         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11520         choice in array aggregate
11521         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11522         mark as ancestor
11523         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11524         positional and named aggregate for record, or others in record
11525         aggregate, or multiple choice in record aggregate
11526         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11527         array operands to logical operations AND, OR and XOR do not have the
11528         same static lower and higher bounds
11529         * sem_ch5.adb, sinfo.ads: Correct typos in comments
11530
11531 2011-08-01  Robert Dewar  <dewar@adacore.com>
11532
11533         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11534         Replaces Last_Source_Node_In_Sequence.
11535         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11536         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11537         parens and blank in string (this was inconsistently implemented).
11538         * errout.ads
11539         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11540         blank in string (this was inconsistently implemented).
11541         * gnat1drv.adb
11542         (Set_Global_Switches): Set formal mode switches appropriately
11543         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11544         * par-prag.adb
11545         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11546         call Set_Error_Msg_Lang to set "spark" as language name.
11547         * par.adb: Remove unnecessary call to set formal language for errout
11548         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11549         appropriately and call Set_Error_Msg_Lang to set "spark" as language
11550         name.
11551         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11552         calls to it, moved after resolution so that types are known
11553         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11554         result of concatenation is not of type String
11555         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11556         concatenation is not properly restricted
11557         * gnat_rm.texi: Add doc on pragma Spark_95.
11558         * gcc-interface/Makefile.in: Remove obsolete target pairs for
11559         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11560         * gcc-interface/Make-lang.in: Update dependencies.
11561
11562 2011-08-01  Javier Miranda  <miranda@adacore.com>
11563
11564         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11565         condition that detects if the overridden operation must replace an
11566         existing entity.
11567
11568 2011-08-01  Javier Miranda  <miranda@adacore.com>
11569
11570         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11571         code declarations inserted by Insert_Actions in each alternative of the
11572         N_Case_Expression node.
11573
11574 2011-08-01  Robert Dewar  <dewar@adacore.com>
11575
11576         * sem_ch6.adb: Minor code reorganization.
11577         * sem_util.adb: Minor reformatting.
11578
11579 2011-08-01  Pascal Obry  <obry@adacore.com>
11580
11581         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11582         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11583
11584 2011-08-01  Yannick Moy  <moy@adacore.com>
11585
11586         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11587         literal or operator symbol which is prefixed
11588         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11589         mode on access attributes.
11590         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11591         that concatenation operands are properly restricted in formal mode
11592         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11593         Analyze_Concatenation_Operand. Issue an error in formal mode if the
11594         result of the concatenation has a type different from String.
11595         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11596         Analyze_Quantified_Expression, Analyze_Slice,
11597         Analyze_Null): issue an error in formal mode on unsupported constructs
11598         * sem_ch5.adb
11599         (Analyze_Block_Statement): only issue error on source block statement
11600         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11601         function which returns the last node in a list of nodes for which
11602         Comes_From_Source returns True, if any
11603         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11604         Last_Source_Node_In_Sequence
11605         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11606         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11607         mode on unsupported constructs
11608         * sem_ch9.adb Do not return after issuing error in formal mode, as the
11609         rest of the actions may be needed later on since the error is marked as
11610         not serious.
11611         * sinfo.ads: Typos in comments.
11612
11613 2011-08-01  Pascal Obry  <obry@adacore.com>
11614
11615         * projects.texi: Minor editing.
11616
11617 2011-08-01  Yannick Moy  <moy@adacore.com>
11618
11619         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11620         insertion character ~~
11621         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11622         (Set_Error_Msg_Lang): new procedure which fixes the language for use
11623         with insertion character ~~
11624         (Set_Msg_Text): treat insertion character ~~
11625         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11626         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11627         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11628         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11629         errors related to the formal language restriction not serious
11630         (insertion character |).
11631         * par.adb (Par): set formal language for error messages if needed
11632         * sem_ch6.adb (Check_Missing_Return): take into account possible
11633         generated statements at the end of the function
11634         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11635         enumeration value to define a new pragma SPARK_95
11636         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11637         SPARK_Version): new type and variables to store the SPARK version
11638         (none by default).
11639         (SPARK_Mode): return True when SPARK_Version is set
11640         * par-prag.adb: Correct indentation
11641         (Prag): take Pragma_SPARK_95 into account
11642         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11643         into account.
11644
11645 2011-08-01  Robert Dewar  <dewar@adacore.com>
11646
11647         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11648         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11649         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11650
11651 2011-08-01  Pascal Obry  <obry@adacore.com>
11652
11653         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11654         Target_Name to Get_Path call.
11655         (Parse_Single_Project): Likewise.
11656         (Post_Parse_Context_Clause): Likewise.
11657         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11658         Call Initialise_Project_Path with the proper Target_Name.
11659         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11660         search path.
11661         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11662         with the proper Target_Name.
11663         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11664         Part.Parse routine.
11665         (Parse_Project_And_Apply_Config): Likewise.
11666         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11667         This is fine as this part of the code is supporting only native
11668         compilation.
11669         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11670         is fine as this part of the code is supporting only native compilation.
11671
11672 2011-08-01  Yannick Moy  <moy@adacore.com>
11673
11674         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11675         of homonym, unless the homonym is one of the cases allowed in SPARK
11676         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11677         package declaration occurring after a body.
11678
11679 2011-08-01  Robert Dewar  <dewar@adacore.com>
11680
11681         * checks.adb, exp_ch4.adb: Minor reformatting.
11682
11683 2011-08-01  Javier Miranda  <miranda@adacore.com>
11684
11685         * einfo.ads (Access_Disp_Table): Fix documentation.
11686         (Dispatch_Table_Wrappers): Fix documentation.
11687
11688 2011-08-01  Pascal Obry  <obry@adacore.com>
11689
11690         * prj-env.adb, prj-env.ads: Minor reformatting.
11691
11692 2011-08-01  Yannick Moy  <moy@adacore.com>
11693
11694         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11695         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11696         procedures out of these packages.
11697         * errout.ads, errout.adb
11698         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11699         procedures in of this package
11700         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11701         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11702         on misplaced later vs initial declarations, like in Ada 83
11703         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11704         formal mode on attribute of private type whose full type declaration
11705         is not visible
11706         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11707         package declaration inside a package specification
11708         (Analyze_Full_Type_Declaration): issue error in formal mode on
11709         controlled type or discriminant type
11710         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11711         user-defined operator means that it should come from the source
11712         (New_Overloaded_Entity): issue error in formal mode on overloaded
11713         entity.
11714         * sem_ch6.ads, sem_ch13.ads: typos in comments.
11715
11716 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11717
11718         * atree.adb: Minor reformatting.
11719         * checks.adb: Minor reformatting.
11720
11721 2011-08-01  Vincent Celier  <celier@adacore.com>
11722
11723         * s-parame-vms-ia64.ads: Fix typo in comment
11724         Minor reformatting
11725         * s-parame-vms-restrict.ads: Removed, unused.
11726
11727 2011-08-01  Javier Miranda  <miranda@adacore.com>
11728
11729         * exp_ch3.adb
11730         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11731         * sem_ch3.adb
11732         (Constrain_Index): Remove side effects in the evaluation of the bounds.
11733         * sem_ch3.ads, sem_ch3.adb
11734         (Is_Constant_Bound): New extended version of the subprogram that was
11735         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11736         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11737         * sem_aux.ads (Constant_Value): Fix typo in comment.
11738         * checks.adb (Generate_Index_Checks): New implementation which, for
11739         array objects with constant bounds, generates the runtime check
11740         referencing the bounds of the array type. For other cases this routine
11741         provides its previous behavior obtaining such values from the array
11742         object.
11743         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11744         parent type.
11745         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11746         we cannot have semantic interpretations of the new node.
11747
11748 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11749
11750         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11751         expressions.
11752
11753 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11754
11755         * sem_ch8.adb: Minor code editing.
11756         * s-vxwext.adb: Remove trailing space.
11757         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11758         consistency with other files.
11759
11760 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11761
11762         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11763
11764 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11765
11766         * par-ch10.adb: reject parameterized expressions as compilation unit.
11767         * sem_ch4.adb: handle properly conditional expression with overloaded
11768         then_clause and no else_clause.
11769
11770 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11771
11772         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11773         like done by System.Aux_DEC.
11774         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11775
11776 2011-08-01  Yannick Moy  <moy@adacore.com>
11777
11778         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11779         missing label at end of declaration (subprogram or package)
11780         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11781         of positional and named parameter association
11782         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11783         Error_Msg_SP which adds a prefix to the error message giving the name
11784         of the formal language analyzed
11785         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11786         access result type in subprogram, unconstrained array as result type,.
11787         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11788         procedure
11789         * sem_ch8.adb: Code clean up.
11790
11791 2011-08-01  Javier Miranda  <miranda@adacore.com>
11792
11793         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11794         * einfo.ads (Access_Disp_Table): Fix documentation.
11795         (Dispatch_Table_Wrappers): Fix documentation.
11796         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11797         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11798         to enforce the documentation of this attribute.
11799         (Set_Is_Interface): Cleanup the assertion.
11800         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11801         the Underlying_Type entity before reading attribute Access_Disp_Table.
11802         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11803         Locate the Underlying_Type before reading attribute Access_Disp_Table.
11804         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11805         the Underlying_Type entity before reading attribute Access_Disp_Table.
11806         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11807         Locate the Underlying_Type entity before reading attribute
11808         Access_Disp_Table.
11809
11810 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11811
11812         * s-poosiz.ads: Additional overriding indicators.
11813
11814 2011-08-01  Yannick Moy  <moy@adacore.com>
11815
11816         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11817         formal mode.
11818         (Analyze_Iteration_Scheme): issue error in formal mode when loop
11819         parameter specification does not include a subtype mark.
11820         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11821         formal mode on abstract subprogram.
11822         (Analyze_Subprogram_Specification): issue error in formal mode on
11823         user-defined operator.
11824         (Process_Formals): issue error in formal mode on access parameter and
11825         default expression.
11826         * sem_ch9.adb (Analyze_Abort_Statement,
11827         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11828         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11829         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11830         Analyze_Requeue, Analyze_Selective_Accept,
11831         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11832         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11833         issue error in formal mode on user-defined raise statement.
11834
11835 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11836
11837         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11838         declaration being hidden when overriding an implicit inherited
11839         subprogram.
11840         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11841         (-gnats), do not complain about a source file that contains only a
11842         pragma No_Body.
11843
11844 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11845
11846         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11847         variable if already set.
11848
11849 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11850
11851         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11852         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11853         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11854         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11855         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11856         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11857         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11858         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11859         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11860         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11861         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11862         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11863         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11864         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11865         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11866         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11867         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11868         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11869         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11870         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11871         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11872         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11873         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11874         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11875         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11876         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11877         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11878         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11879         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11880         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11881         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11882         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11883         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11884         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11885         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11886         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11887         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11888         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11889         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11890         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11891         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11892         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11893         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11894         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11895         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11896         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11897         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11898         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11899         s-osinte-mingw.ads: Update to GPLv3 run-time license.
11900         Use GNAT instead of GNARL.
11901
11902 2011-08-01  Bob Duff  <duff@adacore.com>
11903
11904         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11905         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11906         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11907         reformatting.
11908
11909 2011-08-01  Yannick Moy  <moy@adacore.com>
11910
11911         * debug.adb (d.D) reverve flag for the SPARK mode
11912         (d.E) reverve flag for SPARK generation mode
11913         (d.F) reverve flag for Why generation mode
11914         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11915         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
11916         functions which return True when the corresponding modes are set
11917         (Formal_Language): return "spark" or "alfa" when in formal verification
11918         mode.
11919         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11920         Error_Msg to prefix the error message with a tag giving the formal
11921         language
11922         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11923         message with a tag giving the formal language
11924         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11925         block statement
11926         (Analyze_Case_Statement): issue error in formal mode on case statement
11927         with a single "others" case alternative
11928         (Analyze_Exit_Statement): issue errors in formal mode on exit
11929         statements which do not respect SPARK restrictions
11930         (Analyze_Goto_Statement): issue error in formal mode on goto statement
11931         (Check_Unreachable_Code): always issue an error (not a warning) in
11932         formal mode on unreachable code (concerns both code after an infinite
11933         loop and after an unconditional jump, both not allowed in SPARK)
11934         * sem_ch6.adb (Analyze_Return_Statement): add call to
11935         Set_Return_Present for a procedure containing a return statement
11936         (already done for functions in Analyze_Function_Return)
11937         (Analyze_Function_Return): issue error in formal mode on extended
11938         return or if return is not last statement in function
11939         (Check_Missing_Return): issue error in formal mode if function does
11940         not end with return or if procedure contains a return
11941         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11942         function to detect if there is an inner scope of its parameter S which
11943         is a loop.
11944
11945 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11946
11947         * sem_ch6.ads: Minor reformatting.
11948
11949 2011-08-01  Javier Miranda  <miranda@adacore.com>
11950
11951         * sem_util.adb (Abstract_Interface_List): Complete condition when
11952         processing private type declarations to avoid reading unavailable
11953         attribute.
11954         (Is_Synchronized_Tagged_Type): Complete condition when processing
11955         private extension declaration nodes to avoid reading unavailable
11956         attribute.
11957
11958 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11959
11960         * sem_ch3.adb: Minor reformatting.
11961
11962 2011-08-01  Thomas Quinot  <quinot@adacore.com>
11963
11964         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11965         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11966         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11967         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11968         for VMS, instead parametrize the common implementation with
11969         System.Parameters declarations.
11970
11971 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
11972
11973         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11974
11975 2011-08-01  Tristan Gingold  <gingold@adacore.com>
11976
11977         * seh_init.c: Fix SEH handler installation on win64.
11978
11979 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11980
11981         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11982         double analysis of an anonymous access to subprogram, because it can
11983         lead to improper sharing of profiles and a back-end crash.
11984
11985 2011-08-01  Robert Dewar  <dewar@adacore.com>
11986
11987         * make.adb, sem_ch4.adb: Minor reformatting.
11988         * gcc-interface/Make-lang.in: Update dependencies.
11989         * sem_util.adb, exp_ch5.adb: Minor reformatting.
11990
11991 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
11992
11993         * gnat_rm.texi: Fix definition of Long_Integer.
11994
11995 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
11996
11997         * exp_aggr.adb: check limit size of static aggregate unconditionally,
11998         to prevent storage exhaustion.
11999         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12000         finalized is a function body, insert the cleanup code before the final
12001         return statement, to prevent spurious warnings.
12002         * s-pooglo.ads: add overriding indicator.
12003
12004 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12005
12006         * sem_ch4.adb (Operator_Check): improve error message when both a
12007         with_clause and a use_clause are needed to make operator usage legal.
12008         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12009         determine whether a compilation unit is visible within an other,
12010         either through a with_clause in the current unit, or a with_clause in
12011         its library unit or one one of its parents.
12012
12013 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12014
12015         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12016         over an arbitrary expression of an array or container type.
12017         * lib-xref.adb: clarify comment.
12018
12019 2011-08-01  Bob Duff  <duff@adacore.com>
12020
12021         * einfo.ads: Minor reformatting.
12022         * debug.adb: Minor comment improvement.
12023
12024 2011-08-01  Javier Miranda  <miranda@adacore.com>
12025
12026         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12027         consider hidden subprograms as valid candidates.
12028
12029 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12030
12031         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12032
12033 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
12034
12035         * gnat_ugn.texi: Fix typo.
12036
12037 2011-08-01  Robert Dewar  <dewar@adacore.com>
12038
12039         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12040         lib-xref.adb: Minor reformatting
12041
12042 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
12043
12044         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12045         when to generate a call to Move_Final_List.
12046         (Has_Controlled_Parts): Remove this function.
12047
12048 2011-08-01  Geert Bosch  <bosch@adacore.com>
12049
12050         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12051         "," in choice list.
12052
12053 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12054
12055         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12056         explicit raise of a predefined exception as Comes_From_Source if the
12057         original N_Raise_Statement comes from source.
12058
12059 2011-08-01  Robert Dewar  <dewar@adacore.com>
12060
12061         * sinfo.ads: Add comment.
12062         * sem_ch6.adb: Minor reformatting.
12063
12064 2011-08-01  Robert Dewar  <dewar@adacore.com>
12065
12066         * freeze.adb (Freeze_Entity): Refine check for bad component size
12067         clause to avoid rejecting confirming clause when atomic/aliased present.
12068
12069 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12070
12071         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12072         better determine whether an entity reference is a write.
12073         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12074         subcomponent.
12075         * lib-xref.adb (Output_References): Do no suppress a read reference at
12076         the same location as an immediately preceeding modify-reference, to
12077         handle properly in-out actuals.
12078
12079 2011-08-01  Tristan Gingold  <gingold@adacore.com>
12080
12081         * env.c (__gnat_setenv) [VMS]: Refine previous change.
12082
12083 2011-08-01  Quentin Ochem  <ochem@adacore.com>
12084
12085         * i-cstrin.adb (New_String): Changed implementation, now uses only the
12086         heap to compute the result.
12087
12088 2011-08-01  Robert Dewar  <dewar@adacore.com>
12089
12090         * atree.ads: Minor reformatting.
12091
12092 2011-08-01  Emmanuel Briot  <briot@adacore.com>
12093
12094         * g-expect.adb (Get_Command_Output): Fix memory leak.
12095
12096 2011-08-01  Geert Bosch  <bosch@adacore.com>
12097
12098         * cstand.adb (P_Float_Type): New procedure to print the definition of
12099         predefined fpt types.
12100         (P_Mixed_Name): New procedure to print a name using mixed case
12101         (Print_Standard): Use P_Float_Type for printing floating point types
12102         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12103         precision IEEE float.
12104
12105 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12106
12107         * sem_ch3.adb: Minor reformatting.
12108
12109 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12110
12111         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12112         the completion of a generic function, insert the new body rather than
12113         rewriting the original.
12114
12115 2011-08-01  Yannick Moy  <moy@adacore.com>
12116
12117         * sinfo.ads, errout.ads: Typos in comments.
12118
12119 2011-08-01  Robert Dewar  <dewar@adacore.com>
12120
12121         * par-endh.adb: Minor reformatting.
12122
12123 2011-08-01  Robert Dewar  <dewar@adacore.com>
12124
12125         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12126         (Pre_Post_Aspects): New subtype.
12127         * par-ch12.adb (P_Generic): New syntax for aspects in packages
12128         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12129         * par-ch7.adb (P_Package): Remove Decl parameter
12130         (P_Package): Handle new syntax for aspects (before IS)
12131         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12132         new aspect syntax
12133         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12134         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12135         (P_Package): Remove Decl parameter
12136         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12137         aspects
12138         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12139         specs
12140         * sem_util.ads, sem_util.adb (Static_Boolean): New function
12141         * sinfo.ads: Document new syntax for aspects in packages etc.
12142         * sprint.adb: Handle new syntax of aspects before IS in package
12143
12144 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12145
12146         * atree.ads: Minor reformatting.
12147         * sem_prag.adb: Minor reformatting.
12148
12149 2011-08-01  Robert Dewar  <dewar@adacore.com>
12150
12151         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12152         case expr alternative.
12153
12154 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12155
12156         * sem_ch12.adb: Fix typo.
12157
12158 2011-08-01  Geert Bosch  <bosch@adacore.com>
12159
12160         * sem_prag.adb (Check_No_Link_Name): New procedure.
12161         (Process_Import_Or_Interface): Use Check_No_Link_Name.
12162         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12163         instead of Standard_Long_Long_Float_Size global. Preparation for
12164         eventual removal of per type constants.
12165         * exp_util.ads (Get_Stream_Size): New function returning the stream
12166         size value of subtype E.
12167         * exp_util.adb (Get_Stream_Size): Implement new function.
12168         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12169         function.
12170         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12171         * einfo.adb:
12172         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12173
12174 2011-08-01  Geert Bosch  <bosch@adacore.com>
12175
12176         * cstand.adb: Fix comments.
12177         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12178         count of arguments.
12179
12180 2011-08-01  Robert Dewar  <dewar@adacore.com>
12181
12182         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12183
12184 2011-08-01  Geert Bosch  <bosch@adacore.com>
12185
12186         * atree.ads: Fix comment.
12187
12188 2011-08-01  Robert Dewar  <dewar@adacore.com>
12189
12190         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12191         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12192         * par.adb: Add with for Namet.Sp.
12193         * par-tchk.adb: Minor reformatting.
12194
12195 2011-08-01  Vincent Celier  <celier@adacore.com>
12196
12197         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12198         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12199         of the init procedure of a SAL.
12200         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12201         New procedure.
12202
12203 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12204
12205         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12206         reformatting.
12207
12208 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12209
12210         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12211
12212 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12213
12214         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12215         conformant with its spec (return True only for types that have
12216         an overriding Initialize primitive operation that prevents them from
12217         having preelaborable initialization).
12218         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12219         initialization for controlled types in Ada 2005 or later mode.
12220
12221 2011-08-01  Robert Dewar  <dewar@adacore.com>
12222
12223         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12224         Postcondition.
12225         (Same_Aspect): New function.
12226         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12227         Type_Invariant, Precondition, Postcondition.
12228         * snames.ads-tmpl: Add Name_Type_Invariant.
12229
12230 2011-08-01  Robert Dewar  <dewar@adacore.com>
12231
12232         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12233         here.
12234         (Freeze_All_Ent): Fix error in handling inherited aspects.
12235         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12236         already analyzed, but don't skip entire processing of a declaration,
12237         that's wrong in some cases of declarations being rewritten.
12238         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12239         Don't delay for integer, string literals
12240         Treat predicates in usual manner for delay, remove special case code,
12241         not needed.
12242         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12243         (Build_Predicate_Function): Update saved expression in aspect
12244         (Build_Invariant_Procedure): Update saved expression in aspect
12245         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12246         of replacement of discriminant references if the reference is simple.
12247
12248 2011-08-01  Robert Dewar  <dewar@adacore.com>
12249
12250         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12251         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12252         Static_Predicate and Dynamic_Predicate.
12253         (Build_Predicate_Function): Add processing for Static_Predicate
12254         and Dynamic_Predicate.
12255         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12256         (From_Static_Predicate): New flag
12257         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12258
12259 2011-08-01  Robert Dewar  <dewar@adacore.com>
12260
12261         * usage.adb: Documentation cleanup for Ada version modes in usage.
12262         * expander.adb: Minor reformatting.
12263
12264 2011-08-01  Robert Dewar  <dewar@adacore.com>
12265
12266         * atree.ads: Minor comment fix.
12267         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12268         a-witeio.ads, sem_prag.adb: Minor reformatting.
12269
12270 2011-08-01  Doug Rupp  <rupp@adacore.com>
12271
12272         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12273         pointers. Use descrip.h header file for convenience. Add some
12274         comments.
12275
12276 2011-08-01  Robert Dewar  <dewar@adacore.com>
12277
12278         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12279         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12280         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12281         New procedure.
12282         (Check_Aspect_At_End_Of_Declarations): New procedure
12283         (Analye_Aspect_Specification): Minor changes for above procedures
12284         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12285         specification node as well.
12286
12287 2011-08-01  Pascal Obry  <obry@adacore.com>
12288
12289         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12290         Windows files. Use GetFilesAttributes() in this case to check for file
12291         existence instead of returning with an error code.
12292
12293 2011-08-01  Vincent Celier  <celier@adacore.com>
12294
12295         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12296         High is above Source length.
12297
12298 2011-08-01  Robert Dewar  <dewar@adacore.com>
12299
12300         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12301
12302 2011-08-01  Robert Dewar  <dewar@adacore.com>
12303
12304         * aspects.ads (Boolean_Aspects): New subtype.
12305         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12306         for derived types in cases where the parent type and derived type have
12307         aspects.
12308         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12309         with aspects when parent type also has aspects.
12310         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12311         boolean expression at this point).
12312         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12313         accordance with final decision on the Ada 2012 feature.
12314         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12315
12316 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12317
12318         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12319
12320 2011-08-01  Pascal Obry  <obry@adacore.com>
12321
12322         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12323         Fix Replace_Slice when High is above current string size.
12324         (Replace_Slice): Fix DL computation when High is above current
12325         string length.
12326
12327 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
12328
12329         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12330
12331 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12332
12333         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12334         of node.
12335
12336 2011-08-01  Pascal Obry  <obry@adacore.com>
12337
12338         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12339         reformatting.
12340
12341 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12342
12343         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12344         access to protected subprograms in generic bodies.
12345         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12346         protected type, indicate that the convention of the subprogram is
12347         Convention_Protected, because it may be used in subsequent declarations
12348         within the protected declaration.
12349
12350 2011-08-01  Vincent Celier  <celier@adacore.com>
12351
12352         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12353         and "final" procedures when the name of the library is "ada", to avoid
12354         duplicate symbols "adainit" and "adafinal" in executables.
12355
12356 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12357
12358         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12359         quantified expression that appears within a postcondition and uses the
12360         Ada2012 'Result attribute.
12361
12362 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12363
12364         * init.c (__gnat_error_handler): Cast reason to int.
12365         (__gnat_install_handler): Explain sa_sigaction use.
12366
12367 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12368
12369         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12370         subprogram has copy-in copy-out parameters, try to promote the mode of
12371         the return type if it is passed in registers.
12372
12373 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12374
12375         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12376         left operand as addressable.
12377
12378 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12379
12380         * gcc-interface/gigi.h (build_function_stub): Remove.
12381         (build_return_expr): Likewise.
12382         (convert_vms_descriptor): Declare.
12383         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12384         (build_function_stub): Move to...
12385         * gcc-interface/utils2.c (build_return_expr): Move to...
12386         * gcc-interface/trans.c (build_function_stub): ...here.
12387         (build_return_expr): ...here.
12388         (Subprogram_Body_to_gnu): Add local variable for language_function.
12389         Disconnect the parameter attributes cache, if any, once done with it.
12390         Call end_subprog_body only after setting the end_locus.
12391         Build the stub associated with the function, if any, at the very end.
12392         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12393         variables and streamline control flow.
12394
12395 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
12396
12397         PR ada/49819
12398         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12399         g-trasym-dwarf.adb.
12400
12401 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12402
12403         PR bootstrap/49794
12404         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12405         Assign to act.sa_sigaction.
12406         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12407         current->return_address to char * before arithmetic.
12408
12409 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12410
12411         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12412         Correct argument types.
12413         Extract code from reason.
12414         (__gnat_install_handler): Assign to act.sa_sigaction.
12415
12416 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
12417
12418         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12419         (GNAT1_OBJS): ...here.
12420
12421 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
12422
12423         PR ada/48711
12424         * g-socthi-mingw.adb (Fill): Fix formatting.
12425
12426         * gcc-interface/gigi.h: Move around comment.
12427
12428 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
12429
12430         PR ada/46350
12431         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12432
12433 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
12434
12435         PR ada/48711
12436         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12437
12438 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12439
12440         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12441         range comparison if Pmode is SImode.
12442
12443 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
12444             Eric Botcazou  <ebotcazou@adacore.com>
12445
12446         * adadecode.c: Wrap up in extern "C" block.
12447         * adadecode.h: Likewise.
12448         * adaint.c: Likewise.  Remove 'const' keyword.
12449         * adaint.h: Likewise.
12450         * argv.c: Likewise.
12451         * atree.h: Likewise.
12452         * cio.c: Likewise.
12453         * cstreams.c: Likewise.
12454         * env.c: Likewise.
12455         * exit.c: Likewise.
12456         * fe.h: Likewise.
12457         * final.c: Likewise.
12458         * init.c: Likewise.
12459         * initialize.c: Likewise.
12460         * link.c: Likewise.
12461         * namet.h: Likewise.
12462         * nlists.h: Likewise.
12463         * raise.c: Likewise.
12464         * raise.h: Likewise.
12465         * repinfo.h: Likewise.
12466         * seh_init.c: Likewise.
12467         * targext.c: Likewise.
12468         * tracebak.c: Likewise.
12469         * uintp.h: Likewise.
12470         * urealp.h: Likewise.
12471         * xeinfo.adb: Wrap up generated C code in extern "C" block.
12472         * xsinfo.adb: Likewise.
12473         * xsnamest.adb: Likewise.
12474         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12475         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12476         * gcc-interface/misc.c: Likewise.
12477         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12478         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
12479         ada/targext.o here...
12480         (GNAT_ADA_OBJS): ...and not here.
12481         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12482         (GNATBIND_OBJS): Reorder.
12483
12484 2011-07-07  Richard Henderson  <rth@redhat.com>
12485
12486         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12487         dwarf2out_frame_init.
12488
12489 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
12490
12491         * gcc-interface/misc.c (gnat_init): Tweak previous change.
12492
12493 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12494
12495         PR target/39150
12496         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12497
12498 2011-07-06  Richard Guenther  <rguenther@suse.de>
12499
12500         * gcc-interface/misc.c (gnat_init): Merge calls to
12501         build_common_tree_nodes and build_common_tree_nodes_2.
12502         Re-initialize boolean_false_node.
12503
12504 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
12505             Olivier Hainque  <hainque@adacore.com>
12506             Nicolas Setton  <setton@adacore.com>
12507
12508         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12509         the type according to the ARTIFICIAL_P parameter.
12510         (create_type_decl): Likewise.
12511         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12512
12513 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
12514
12515         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12516         (gnatbind): Likewise.
12517
12518 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12519
12520         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12521
12522 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12523
12524         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12525         local variable throughout.  Remove useless call to Base_Type.
12526         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12527         Take it also into account for the volatileness of the field.  Set the
12528         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
12529
12530 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12531
12532         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12533         on a dereference built for a by-ref object if it has an address clause.
12534
12535 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12536
12537         * einfo.ads (Address_Taken): Document use for the second argument of
12538         Asm_Input and Asm_Output attributes.
12539         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12540         argument is an entity name, then set Address_Taken on it.
12541         <Attribute_Asm_Output>: Likewise.
12542         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12543         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12544         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12545         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12546
12547 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
12548
12549         PR middle-end/46500
12550         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12551
12552 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
12553
12554         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12555         (ada/utils.o): Update dependencies.
12556         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12557         ../../../libcpp/libcpp.a.
12558         * gcc-interface/utils.c: Include common/common-target.h.
12559         (process_attributes): Use targetm_common.have_named_sections.
12560
12561 2011-06-07  Richard Guenther  <rguenther@suse.de>
12562
12563         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12564         set_sizetype.
12565
12566 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12567
12568         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12569         TREE_THIS_NOTRAP flag.
12570
12571 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12572
12573         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12574         Fix thinko.
12575
12576 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12577
12578         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12579         constants whose full view has discriminants specially.
12580
12581 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12582
12583         * gcc-interface/utils.c: Include diagnostic.h.
12584         (gnat_write_global_declarations): Output debug information for all
12585         global type declarations before finalizing the compilation unit.
12586         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12587
12588 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
12589
12590         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12591
12592 2011-05-25  Kai Tietz  <ktietz@redhat.com>
12593
12594         * adaint.c (__gnat_to_canonical_file_list_next): Use array
12595         initialization instead of const/none-const pointer assignment.
12596
12597 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
12598
12599         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12600         $(EXTRA_GNAT1_OBJS).
12601         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12602         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12603         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12604         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12605         libcommon-target.a instead of prefix.o.
12606
12607 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
12608
12609         PR ada/49097
12610         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12611
12612 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
12613
12614         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12615         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12616         instead of version.o.
12617
12618 2011-05-18  Kai Tietz  <ktietz@redhat.com>
12619
12620         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12621         boolean_false_node instead of integer_zero_node.
12622         (convert_with_check): Likewise.
12623         * gcc-interface/decl.c (choices_to_gnu): Likewise.
12624
12625 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
12626
12627         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12628         type of the parameter is an unconstrained array, convert the actual to
12629         the type of the formal in the In Out and Out cases as well.
12630
12631 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12632
12633         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12634         call build_function_type_array or build_varargs_function_type_array
12635         instead.
12636         (create_subprog_type): Don't call build_function_type; call
12637         build_function_type_vec instead.
12638
12639 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
12640
12641         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12642         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12643         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12644
12645 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
12646
12647         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12648
12649         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12650         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12651
12652 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12653
12654         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12655
12656 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
12657
12658         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12659         instead of accessing TYPE_ARG_TYPES directly.
12660         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12661
12662 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12663
12664         PR ada/48844
12665         * gcc-interface/gigi.h (get_variant_part): Declare.
12666         * gcc-interface/decl.c (get_variant_part): Make global.
12667         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12668         types have the same constant size, are record types and T1 has a
12669         variant part while T2 doesn't.
12670
12671 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
12672
12673         * gcc-interface/utils.c (begin_subprog_body): Do not call
12674         get_pending_sizes.
12675         (end_subprog_body): Likewise.
12676
12677 2011-05-04  Richard Guenther  <rguenther@suse.de>
12678
12679         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12680         int_const_binop.
12681         (pos_to_constructor): Likewise.
12682
12683 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
12684             Eric Botcazou  <ebotcazou@adacore.com>
12685
12686         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12687         of build_function_type.  Adjust calls to...
12688         (build_raise_check): ...this.  Do not take a void_tree parameter.
12689         Call build_function_type_list instead of build_function_type.
12690         Fix head comment and swap couple of conditional blocks.
12691
12692 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
12693
12694         * gnatvsn.ads (Library_Version): Bump to 4.7.
12695         (Current_Year): Bump to 2011.
12696
12697 2011-04-29  Michael Matz  <matz@suse.de>
12698
12699         * gcc-interface/misc.c (gnat_handle_option): Set
12700         warn_maybe_uninitialized.
12701
12702 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
12703
12704         * gnat_ugn.texi (Complexity Metrics Control): Update link to
12705         the Watson/McCabe paper.
12706
12707 2011-04-23  Jim Meyering  <meyering@redhat.com>
12708
12709         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12710
12711 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12712
12713         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12714         onto the new type.
12715
12716 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
12717
12718         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12719         parameter.
12720         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
12721         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12722         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12723         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12724         <all>: Do not set flags on the reused DECL node coming from an alias.
12725         Set DECL_IGNORED_P on the DECL node built for subprograms if they
12726         don't need debug info here...
12727         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12728         (gigi): Adjust calls to create_subprog_decl.
12729         (build_raise_check): Likewise.
12730         (establish_gnat_vms_condition_handler): Likewise.
12731         (Compilation_Unit_to_gnu): Likewise.
12732         (gnat_to_gnu): Likewise.
12733
12734 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
12735
12736         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12737         (NO_REORDER_ADAFLAGS): New variable.
12738         (EXTRA_GNATTOOLS): Always define.
12739         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12740         Clean up and adjust list of files compiled with special options.
12741         * gcc-interface/Make-lang.in: Likewise.
12742         (ada/decl.o): Cosmetical change.
12743         (ada/misc.o): Remove dependency on $(PLUGIN_H).
12744
12745 2011-04-20  Jim Meyering  <meyering@redhat.com>
12746
12747         * initialize.c (__gnat_initialize): Remove useless if-before-free.
12748
12749 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12750
12751         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12752         $(CFLAGS) on the link line.
12753
12754 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
12755
12756         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12757         padded type built for the return type if it is unconstrained.
12758
12759 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
12760
12761         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12762
12763 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
12764
12765         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12766         before calling TREE_CHAIN.
12767         * gcc-interface/misc.c (gnat_init_ts): New function.
12768         (LANG_HOOKS_INIT_TS): Define.
12769
12770 2011-04-12  Martin Jambor  <mjambor@suse.cz>
12771
12772         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12773         instead of cgraph_node.
12774
12775 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12776
12777         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12778         alignment on fields of the RETURN type built for the Copy-In Copy-Out
12779         mechanism.
12780
12781 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
12782
12783         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12784         of aggregate types that contain a placeholder.
12785
12786 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
12787
12788         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12789         TYPE_ARG_TYPES.
12790         (handle_type_generic_attribute): Likewise.
12791
12792 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
12793
12794         PR ada/47163
12795         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12796
12797 2011-04-04  Kai Tietz  <ktietz@redhat.com>
12798
12799         PR ada/47163
12800         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12801         to flag value.
12802
12803 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12804
12805         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12806         type case, do not strip a padding type around the array type.
12807
12808 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12809
12810         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12811         types.
12812
12813 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12814
12815         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12816         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12817         code for -feliminate-unused-debug-types.
12818         (gnat_post_options): Likewise.
12819
12820 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12821
12822         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12823         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12824         distinct copy.
12825
12826 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12827
12828         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12829         DECL_ARTIFICIAL flag on enumeration types.
12830
12831 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12832
12833         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12834         fat pointer types artificial unconditionally.
12835         <E_Array_Subtype>: Attach the base array type as a parallel type if it
12836         isn't artificial.
12837
12838 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12839
12840         * gcc-interface/gigi.h (get_dummy_type): Declare.
12841         (build_dummy_unc_pointer_types): Likewise.
12842         (finish_fat_pointer_type): Likewise.
12843         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12844         fat pointer type has been built, complete it in place.
12845         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12846         and thin pointers.  Remove useless variable.
12847         (finish_fat_pointer_type): Make global and move to...
12848         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12849         (get_dummy_type): New function.
12850         (build_dummy_unc_pointer_types): Likewise.
12851         (gnat_pushdecl): Propage the name to the anonymous variants only.
12852         (update_pointer_to): Only adjust the pointer types in the unconstrained
12853         array case.
12854
12855 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12856
12857         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12858         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12859         if this is a Taft amendment type and the full declaration is available.
12860         * gcc-interface/trans.c (process_type): Likewise.
12861         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12862         (process_freeze_entity): Likewise.
12863         * gcc-interface/utils.c (dummy_global): New static variable.
12864         (gnat_write_global_declarations): If there are types declared as used
12865         at the global level, insert them in the global hash table.
12866
12867 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12868
12869         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12870         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12871         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12872         copy.
12873         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
12874         flag of the type accordingly.
12875         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12876
12877 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
12878
12879         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12880         finalizing types when updating the pointers to the designated type.
12881         <all>: Finalize the deferred types even if we didn't defer processing
12882         of incomplete types in this invocation.
12883
12884 2011-04-01  Olivier Hainque  <hainque@adacore.com>
12885             Nicolas Setton  <setton@adacore.com>
12886             Eric Botcazou  <ebotcazou@adacore.com>
12887
12888         * gcc-interface/misc.c (gnat_descriptive_type): New function.
12889         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12890
12891 2011-03-28  Kai Tietz  <ktietz@redhat.com>
12892
12893         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12894         Windows targets.
12895         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12896         * system-mingw.ads (System): Change ZCX_By_Default default to True.
12897
12898         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12899
12900 2011-03-28  Tristan Gingold  <gingold@adacore.com>
12901
12902         PR ada/44431
12903         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12904         Use ada output of gnatbind.
12905         (ada/b_gnatb.adb): Ditto.
12906         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12907         (ada.mostlyclean, ada.stage1)
12908         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12909         (ada.stagefeedback): Adjust.
12910         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12911         Use ada output of gnatbind.
12912         (b_gnatm.adb): Ditto.
12913         (b_gnatl.o, b_gnatm.o): New rules.
12914
12915 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12916
12917         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12918         for the padded type built to support a specified size or alignment.
12919
12920 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12921
12922         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12923         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12924         unconditionally to the end of the unit when the designated type is
12925         limited_with'ed.
12926         <all>: Rename local variable.  Attempt to un-defer types only and do it
12927         for limited_with'ed types as well.
12928         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
12929         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12930         consistently and remove redundant call to finalize_from_with_types.
12931
12932 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
12933
12934         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12935         subprograms without a previous spec declared in the same unit.
12936         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12937         subprograms at the end of the unit instead of at the beginning.
12938         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12939         isn't public for the special handling of non-inline functions nested
12940         inside inline external functions.
12941
12942 2011-03-25  Jeff Law  <law@redhat.com>
12943
12944         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12945
12946 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12947
12948         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12949         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12950         to compute Set_Size_Depends_On_Discriminant.
12951         (Layout_Type): Call it on array types in back-end layout mode.
12952         * sem_util.adb (Requires_Transient_Scope): Return true for array
12953         types only if the size depends on the value of discriminants.
12954         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12955         type if the RHS is a call to a function that returns an unconstrained
12956         type with default discriminant.
12957
12958 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
12959
12960         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12961         non-conversion to the nominal result type at the end.
12962
12963 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12964
12965         * gcc-interface/trans.c (create_temporary): New function taken from...
12966         (create_init_temporary): ...here.  Call it.
12967         (call_to_gnu): Create the temporary for the return value early, if any.
12968         Create it for a function with copy-in/copy-out parameters if there is
12969         no target; in other cases of copy-in/copy-out, use another temporary.
12970         Push the new binding level lazily.  Add and rename local variables.
12971
12972 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12973
12974         * gcc-interface/decl.c (validate_size): Improve comments and tweak
12975         error message.
12976         (set_rm_size): Likewise.
12977
12978 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
12979
12980         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12981         for the padded type built in order to support a specified alignment.
12982         Fix incorrect formatting.
12983
12984 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12985
12986         PR bootstrap/48216
12987         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12988
12989 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12990
12991         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12992         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12993         to the end of the list.  Adjust recursive call.  Rename local variable.
12994         If REORDER is true, reorder components of the record type.
12995         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12996         components_to_record and adjust the parameter list.
12997
12998 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
12999
13000         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13001         disabled, use the variable for bounds of loop iteration scheme.
13002
13003 2011-03-21  Kai Tietz  <ktietz@redhat.com>
13004
13005         PR target/12171
13006         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13007
13008 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
13009
13010         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13011         out whether the expression is read-only.  Short-circuit placeholder
13012         case and rename a couple of local variables.
13013
13014 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
13015
13016         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13017         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13018         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13019         (convert): Deal with conversions from a smaller form type specially.
13020
13021 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
13022
13023         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13024         its argument, except for the special -I- switch.
13025
13026 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
13027
13028         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13029         "Ada Issues".
13030
13031 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
13032
13033         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13034
13035 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
13036
13037         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13038         GNAT_FORMAL.
13039         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13040         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
13041         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
13042         Do not generate the check directly, instead instantiate the template
13043         check present in the descriptor.
13044         (make_descriptor_field): Move around.
13045         (build_vms_descriptor32): Build a template check in the POINTER field.
13046         (build_vms_descriptor): Remove useless suffixes.
13047         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13048
13049 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
13050
13051         PR bootstrap/47467
13052         * targext.c: Include target files if IN_RTS is defined.
13053
13054 2011-01-26  Richard Guenther  <rguenther@suse.de>
13055
13056         PR bootstrap/47467
13057         * targext.c: Include config.h.
13058         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13059         dependency.
13060
13061 2011-01-04  Pascal Obry  <obry@adacore.com>
13062             Eric Botcazou  <ebotcazou@adacore.com>
13063
13064         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13065
13066 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13067
13068         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13069         end-of-case on the end label and its associated gotos, if any.
13070
13071 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13072
13073         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13074         expressions of the parameter cache within the statement group of
13075         the CICO mechanism.
13076
13077 2011-01-04  Olivier Hainque  <hainque@adacore.com>
13078             Eric Botcazou  <ebotcazou@adacore.com>
13079
13080         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13081         (set_end_locus_from_node): New function.
13082         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13083         make and the function end_locus.
13084         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13085         for the elaboration subprogram.
13086         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13087         set the end_locus of the expression as well.
13088
13089 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13090
13091         PR ada/47131
13092         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13093         variables that are referenced in exception handlers volatile.
13094
13095
13096 \f
13097 Copyright (C) 2011 Free Software Foundation, Inc.
13098
13099 Copying and distribution of this file, with or without modification,
13100 are permitted in any medium without royalty provided the copyright
13101 notice and this notice are preserved.
13102
13103         * gnat_rm.texi: Ramification of pragma Eliminate documentation
13104          - fix bugs in the description of Source_Trace;
13105          - get rid of UNIT_NAME;
13106
13107 2011-08-02  Javier Miranda  <miranda@adacore.com>
13108
13109         * exp_ch9.adb
13110         (Build_Dispatching_Requeue): Adding support for VM targets
13111         since we cannot directly reference the Tag entity.
13112         * exp_sel.adb (Build_K): Adding support for VM targets.
13113         (Build_S_Assignment): Adding support for VM targets.
13114         * exp_disp.adb
13115         (Default_Prim_Op_Position): In VM targets do not restrict availability
13116         of predefined interface primitives to compiling in Ada 2005 mode.
13117         (Is_Predefined_Interface_Primitive): In VM targets this service is not
13118         restricted to compiling in Ada 2005 mode.
13119         (Make_VM_TSD): Generate code that declares and initializes the OSD
13120         record. Needed to support dispatching calls through synchronized
13121         interfaces.
13122         * exp_ch3.adb
13123         (Make_Predefined_Primitive_Specs): Enable generation of predefined
13124         primitives associated with synchronized interfaces.
13125         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
13126         primitives associated with synchronized interfaces.
13127
13128 2011-08-02  Yannick Moy  <moy@adacore.com>
13129
13130         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
13131         statements hidden in SPARK if preceded by the HIDE directive
13132         (Parse_Exception_Handlers): mark each exception handler in a sequence of
13133         exception handlers as hidden in SPARK if preceded by the HIDE directive
13134         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
13135         if starting with the HIDE directive
13136         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
13137         starting with the HIDE directive; mark the declarations in a private
13138         part as hidden in SPARK if the private part starts with the HIDE
13139         directive
13140         * restrict.adb, restrict.ads
13141         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
13142         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
13143         argument node belongs to a part which is hidden in SPARK
13144         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
13145         parts in SPARK; protect the possibly costly call to
13146         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
13147         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
13148         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
13149         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
13150         Tok_SPARK_Hide.
13151         (Scan): recognize special comment starting with '#' and followed by
13152         SPARK keyword "hide" as a HIDE directive.
13153
13154 2011-08-02  Yannick Moy  <moy@adacore.com>
13155
13156         * types.ads, erroutc.ads: Minor reformatting.
13157
13158 2011-08-02  Vincent Celier  <celier@adacore.com>
13159
13160         * link.c: Add response file support for cross platforms.
13161
13162 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13163
13164         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
13165         in an association, set parent field of copy before partial analysis.
13166         * sem_res.adb (Resolve_Slice): create reference to itype only when
13167         expansion is enabled.
13168
13169 2011-08-02  Yannick Moy  <moy@adacore.com>
13170
13171         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
13172         for new flag denoting which subprogram bodies are in ALFA
13173         * restrict.adb, sem_ch7.adb: Update comment
13174         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
13175         sem_ch9.adb, sem_res.adb: Add calls to
13176         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
13177         * sem_ch6.adb (Analyze_Function_Return): add calls to
13178         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
13179         middle of the body, and extended return.
13180         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13181         False when missing return.
13182         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13183         to True for subprograms whose spec is in ALFA. Remove later on the flag
13184         on the entity used for a subprogram body when there exists a separate
13185         declaration.
13186         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13187         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13188         False, otherwise do nothing.
13189
13190 2011-08-02  Robert Dewar  <dewar@adacore.com>
13191
13192         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13193
13194 2011-08-02  Yannick Moy  <moy@adacore.com>
13195
13196         * sem_ch4.ads: minor formatting.
13197
13198 2011-08-02  Yannick Moy  <moy@adacore.com>
13199
13200         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13201         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13202         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13203         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13204         opt.ads: cleanup of SPARK mode
13205
13206 2011-08-02  Yannick Moy  <moy@adacore.com>
13207
13208         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13209         types.
13210         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13211         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13212         * sem_ch3.adb
13213         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13214         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13215         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13216         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13217         types.
13218         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13219         non-static range.
13220         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13221         functions whose return type is not in ALFA.
13222         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13223         specifications.
13224         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13225         parameter's type is not in ALFA.
13226         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13227         types are in ALFA.
13228
13229 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13230
13231         * sem_ch6 (Analyze_Expression_Function): treat the function as
13232         Inline_Always, and introduce a subprogram declaration for it when it is
13233         not a completion.
13234         * inline.adb (Add_Inlined_Body): recognize bodies that come from
13235         expression functions, so that the back-end can determine whether they
13236         can in fact be inlined.
13237         * sem_util.adb (Is_Expression_Function): predicate to determine whether
13238         a function body comes from an expression function.
13239
13240 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13241
13242         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13243         null exclusions to test Can_Never_Be_Null on the anonymous access types
13244         of the formals rather than testing the formals themselves. Exclude this
13245         check in cases where the Old_Formal is marked as a controlling formal,
13246         to avoid issuing spurious errors for bodies completing dispatching
13247         operations (due to the flag not getting set on controlling access
13248         formals in body specs).
13249         (Find_Corresponding_Spec): When checking full and subtype conformance of
13250         subprogram bodies in instances, pass Designated and E in that order, for
13251         consistency with the expected order of the formals (New_Id followed by
13252         Old_Id).
13253
13254 2011-08-02  Robert Dewar  <dewar@adacore.com>
13255
13256         * sem_ch8.adb: Minor reformatting.
13257
13258 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13259
13260         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13261         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13262         primitive operations of class-wide actuals.
13263
13264 2011-08-02  Javier Miranda  <miranda@adacore.com>
13265
13266         * exp_atag.ads, exp_atag.adb
13267         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13268         since its value is implicitly passed in argument Typ.
13269         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13270         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13271         Build_Common_Dispatching_Select_Statements.
13272
13273 2011-08-02  Robert Dewar  <dewar@adacore.com>
13274
13275         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13276         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13277         Minor reformatting.
13278
13279 2011-08-02  Robert Dewar  <dewar@adacore.com>
13280
13281         * sem_res.adb: Minor reformatting.
13282         * sem_prag.adb: Minor reformatting.
13283
13284 2011-08-02  Javier Miranda  <miranda@adacore.com>
13285
13286         * exp_atag.adb, exp_atags.ads
13287         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13288         by the tagged type Entity. Required to use this routine in the VM
13289         targets since we do not have available the Tag entity in the VM
13290         platforms.
13291         * exp_ch6.adb
13292         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13293         Ada.Tags has not been previously loaded.
13294         * exp_ch7.adb
13295         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13296         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13297         * sem_aux.adb
13298         (Enclosing_Dynamic_Scope): Add missing support to handle the full
13299         view of enclosing scopes. Required to handle enclosing scopes that
13300         are synchronized types whose full view is a task type.
13301         * exp_disp.adb
13302         (Build_VM_TSDs): Minor code improvement to avoid generating and
13303         analyzing lists with empty nodes.
13304         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13305         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13306         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13307         (Make_Disp_Timed_Select_Body): Add support for VM targets.
13308         (Make_Select_Specific_Data_Table): Add support for VM targets.
13309         (Make_VM_TSD): Generate code to initialize the SSD structure of
13310         the TSD.
13311
13312 2011-08-02  Yannick Moy  <moy@adacore.com>
13313
13314         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13315         cross-references section in ALI.
13316         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13317         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13318         Sub).
13319         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13320         subprogram or package entity of a node
13321         (Is_Local_Reference_Type): new function returns True for references
13322         selected in local cross-references.
13323         (Lt): function extracted from Lt in Output_References
13324         (Write_Entity_Name): function extracted from Output_References
13325         (Generate_Definition): generate reference with type 'D' for definition
13326         of objects (object declaration and parameter specification), with
13327         appropriate locations and units, for use in local cross-references.
13328         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13329         references of type 'I' for initialization in object definition.
13330         (Output_References): move part of function Lt and procedure
13331         Write_Entity_Name outside of the body. Ignore references of types 'D'
13332         and 'I' introduced for local cross-references.
13333         (Output_Local_References): new procedure to output the local
13334         cross-references sections.
13335         (Lref_Entity_Status): new array defining whether an entity is a local
13336         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13337         with 'I' type when initialization expression is present.
13338         * get_scos.adb, get_scos.ads: Correct comments and typos
13339
13340 2011-08-02  Javier Miranda  <miranda@adacore.com>
13341
13342         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13343         the JVM target.
13344         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13345         the JVM target.
13346         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13347         TSD support.
13348
13349 2011-08-02  Vincent Celier  <celier@adacore.com>
13350
13351         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13352         (No_Space_Img): New function
13353         (Find_Excluded_Sources): When reading from a file, record the file name
13354         and the line number for each excluded source.
13355         (Mark_Excluded_Sources): When reporting an error, if the excluded
13356         sources were read from a file, include file name and line number in
13357         the error message.
13358
13359 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13360
13361         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13362
13363 2011-08-02  Robert Dewar  <dewar@adacore.com>
13364
13365         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13366
13367 2011-08-02  Javier Miranda  <miranda@adacore.com>
13368
13369         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13370         generation of TSDs to the DOTNET compiler.
13371         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13372         generation of TSDs to the DOTNET compiler.
13373
13374 2011-08-02  Javier Miranda  <miranda@adacore.com>
13375
13376         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13377         record of all the tagged types declared inside library level package
13378         declarations, library level package bodies or library level subprograms.
13379         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13380         associated with a given tagged type.
13381         (Build_VM_TSDs): New subprogram.
13382         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13383         compilation units that are subprograms.
13384         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13385         compilation units that are package bodies.
13386         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13387         units that are a package declaration or a package instantiation.
13388         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13389         reorganization to improve the error generated by the frontend when the
13390         function Ada.Tags.Secondary_Tag is not available.
13391         * rtsfind.ads (RE_Register_TSD): New runtime entity.
13392         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13393
13394 2011-08-02  Javier Miranda  <miranda@adacore.com>
13395
13396         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13397
13398 2011-08-02  Robert Dewar  <dewar@adacore.com>
13399
13400         * s-imenne.ads: Minor reformatting.
13401
13402 2011-08-02  Robert Dewar  <dewar@adacore.com>
13403
13404         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13405         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13406         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13407
13408 2011-08-02  Robert Dewar  <dewar@adacore.com>
13409
13410         * einfo.ads (Materialize_Entity): Document this is only for renamings
13411         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13412         required debug information in the case where we transform the object
13413         declaration into a renaming declaration.
13414         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13415         object
13416         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13417         Materialize_Entity.
13418
13419 2011-08-02  Robert Dewar  <dewar@adacore.com>
13420
13421         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13422         Suppress_Init_Procs.
13423         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13424         Suppress_Initialization/Initialization_Suppressed.
13425         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13426         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13427         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13428         * sem_prag.adb: New processing for pragma Suppress_Initialization.
13429
13430 2011-08-02  Robert Dewar  <dewar@adacore.com>
13431
13432         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13433         Minor reformatting.
13434
13435 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13436
13437         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13438         only have inheritable classwide pre/postconditions.
13439
13440 2011-08-02  Javier Miranda  <miranda@adacore.com>
13441
13442         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13443         * rtsfind.ads (RE_Check_TSD): New runtime entity.
13444         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13445         checks if the external tag of a type is the same as the external tag
13446         of some other declaration.
13447
13448 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13449
13450         * s-taskin.ads: Minor reformatting.
13451
13452 2011-08-02  Emmanuel Briot  <briot@adacore.com>
13453
13454         * g-comlin.adb (Display_Help): swap the order in which it prints the
13455         short help and the general usage.
13456
13457 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13458
13459         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13460         the aspect declarations and attach them to the generic copy for
13461         subsequent analysis.
13462         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13463         declarations of the generic tree to the new subprogram declarations.
13464         * sem_attr.adb (Check_Precondition_Postcondition): recognize
13465         conditions that apply to a subprogram instance.
13466
13467 2011-08-02  Robert Dewar  <dewar@adacore.com>
13468
13469         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13470
13471 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13472
13473         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13474         private type with a tagged full view is not derived in the immediate
13475         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13476
13477 2011-08-02  Robert Dewar  <dewar@adacore.com>
13478
13479         * exp_ch4.adb: Minor reformatting.
13480
13481 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13482
13483         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
13484         Ada2012 iterator, the loop will be rewritten during expansion into a
13485         while loop with a cursor and an element declaration. Do not analyze the
13486         body in this case, because if the container is for indefinite types the
13487         actual subtype of the elements will only be determined when the cursor
13488         declaration is analyzed.
13489
13490 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13491
13492         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13493         size/alignment related attributes in CodePeer_Mode.
13494
13495 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13496
13497         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13498         Prepend_Element, since this can result in the operation getting the
13499         wrong slot in the full type's dispatch table if the full type has
13500         inherited operations. The incomplete type's operation will get added
13501         to the proper position in the full type's primitives
13502         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13503         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13504         dispatching operations, since there are cases where nonprimitive
13505         subprograms can get added to the list of incomplete dependents (such
13506         as subprograms in nested packages).
13507         * sem_ch6.adb (Process_Formals): First, remove test for being in a
13508         private part when determining whether to add a primitive with a
13509         parameter of a tagged incomplete type to the Private_Dependents list.
13510         Such primitives can also occur in the visible part, and should not have
13511         been excluded from being private dependents.
13512         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13513         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13514         list of a Taft-amendment incomplete type is a primitive before issuing
13515         an error that the full type must appear in the same unit. There are
13516         cases where nonprimitives can be in the list (such as subprograms in
13517         nested packages).
13518         * sem_disp.adb (Derives_From): Use correct condition for checking that
13519         a formal's type is derived from the type of the corresponding formal in
13520         the parent subprogram (the condition was completely wrong). Add
13521         checking that was missing for controlling result types being derived
13522         from the result type of the parent operation.
13523
13524 2011-08-02  Yannick Moy  <moy@adacore.com>
13525
13526         * errout.adb (First_Node): minor renaming
13527         * restrict.adb (Check_Formal_Restriction): put restriction warning on
13528         first node.
13529
13530 2011-08-02  Yannick Moy  <moy@adacore.com>
13531
13532         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13533         before accessing operands.
13534         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13535         decide whether an initialization expression respects SPARK rules, as
13536         the plain node is the expanded one. This allows for more valid warnings
13537         to be issued.
13538         * gnat_rm.texi: Minor update.
13539
13540 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13541
13542         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13543         previous change.
13544
13545 2011-08-02  Robert Dewar  <dewar@adacore.com>
13546
13547         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13548
13549 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13550
13551         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13552         loop statements and the element renaming declaration with a block when
13553         the element type is controlled.
13554
13555 2011-08-02  Yannick Moy  <moy@adacore.com>
13556
13557         * sinfo.ads: Minor formatting.
13558
13559 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13560
13561         * sem_aggr.adb (Add_Association): if the association has a box and no
13562         expression, use the Sloc of the aggregate itself for the new
13563         association.
13564         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13565         the Original_Node.
13566
13567 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13568
13569         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13570         When a container is provided via a function call, generate a renaming
13571         of the function result. This avoids the creation of a transient scope
13572         and the premature finalization of the container.
13573         * exp_ch7.adb (Is_Container_Cursor): Removed.
13574         (Wrap_Transient_Declaration): Remove the supression of the finalization
13575         of the list controller when the declaration denotes a container cursor,
13576         it is not needed.
13577
13578 2011-08-02  Yannick Moy  <moy@adacore.com>
13579
13580         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13581         node is from source, instead of the original node being from source.
13582         * sem_aggr.adb
13583         (Resolve_Array_Aggregate): refine the check for a static expression, to
13584         recognize also static ranges
13585         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13586         Array_Type_Declaration): postpone the test for the type being a subtype
13587         mark after the type has been resolved, so that component-selection and
13588         expanded-name are discriminated.
13589         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13590         to distinguish the case of an iteration scheme, so that an error is
13591         issed on a non-static range in SPARK except in an iteration scheme.
13592         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13593         In_Iter_Schm = True.
13594         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13595         user-defined operators so that they are allowed in renaming
13596         * sem_ch8.adb
13597         (Find_Selected_Component): refine the check for prefixing of operators
13598         so that they are allowed in renaming. Move the checks for restrictions
13599         on selector name after analysis discriminated between
13600         component-selection and expanded-name.
13601         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13602         concatenation argument of string type if it is static.
13603         * sem_util.adb, sem_util.ads
13604         (Check_Later_Vs_Basic_Declarations): add a new function
13605         Is_Later_Declarative_Item to decice which declarations are allowed as
13606         later items, in the two different modes Ada 83 and SPARK. In the SPARK
13607         mode, add that renamings are considered as later items.
13608         (Enclosing_Package): new function to return the enclosing package
13609         (Enter_Name): correct the rule for homonyms in SPARK
13610         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13611         from source (result of expansion) to avoid issuing wrong warnings.
13612
13613 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13614
13615         * errout.adb: On anything but an expression First_Node returns its
13616         argument.
13617
13618 2011-08-02  Pascal Obry  <obry@adacore.com>
13619
13620         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13621
13622 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13623
13624         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13625         Set the associated loop as the related expression of internally
13626         generated cursors.
13627         * exp_ch7.adb (Is_Container_Cursor): New routine.
13628         (Wrap_Transient_Declaration): Supress the finalization of the list
13629         controller when the declaration denotes a container cursor.
13630
13631 2011-08-02  Yannick Moy  <moy@adacore.com>
13632
13633         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13634         command line now.
13635         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13636         expression is a simple expression. This check cannot be performed in
13637         the semantics, so just drop it.
13638         (P_Index_Or_Discriminant_Constraint): move check that the index or
13639         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13640         semantics. Other cases were previously checked in the semantics.
13641         * par-ch4.adb (P_Name): move checks that a selector name is not
13642         character literal or an operator symbol to Find_Selected_Component in
13643         the semantics
13644         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13645         declarations are not placed after later declarations in a separate
13646         procedure in Sem_Util (possibly not the best choice?), to be used both
13647         during parsing, for Ada 83 mode, and during semantic analysis, for
13648         SPARK mode.
13649         * par-endh.adb (Check_End): move check that end label is not missing
13650         to Process_End_Label in the semantics
13651         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13652         the special case for SPARK restriction
13653         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13654         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13655         parameter Force to issue the error message even on internal node (used
13656         for generated end label). Call Check_Restriction to check when an error
13657         must be issued. In SPARK mode, issue an error message even if the
13658         restriction is not set.
13659         (Check_Restriction): new procedure with an additional out parameter to
13660         inform the caller that a message has been issued
13661         * sem_aggr.adb: Minor modification of message
13662         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13663         instead of issuing an error message directly
13664         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13665         declarations are not placed after later declarations, by calling
13666         Check_Later_Vs_Basic_Declarations
13667         (Analyze_Subtype_Declaration): move here the check that an index or
13668         discriminant constraint must be a subtype mark. Change the check that
13669         a subtype of String must start at one so that it works on subtype marks.
13670         * sem_ch4.adb (Analyze_Call): move here the check that a named
13671         association cannot follow a positional one in a call
13672         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13673         instead of issuing an error message directly
13674         * sem_ch8.adb (Find_Selected_Component): move here the check that a
13675         selector name is not a character literal or an operator symbol. Move
13676         here the check that the prefix of an expanded name cannot be a
13677         subprogram or a loop statement.
13678         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13679         procedure called from parsing and semantics to check that basic
13680         declarations are not placed after later declarations
13681         (Process_End_Label): move here the check that end label is not missing
13682
13683 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13684
13685         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13686         representation clause in codepeer mode, since it confuses CodePeer and
13687         does not bring useful info.
13688
13689 2011-08-02  Ed Falis  <falis@adacore.com>
13690
13691         * init.c: initialize fp hw on MILS.
13692
13693 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13694
13695         * errout.adb (First_Node): for bodies, return the node itself (small
13696         optimization). For other nodes, do not check source_unit if the node
13697         comes from Standard.
13698
13699 2011-08-02  Robert Dewar  <dewar@adacore.com>
13700
13701         * exp_ch3.adb: Minor comment additions.
13702         * sem_ch13.adb: Minor reformatting.
13703
13704 2011-08-02  Pascal Obry  <obry@adacore.com>
13705
13706         * make.adb, makeutl.adb: Removes some superfluous directory separator.
13707
13708 2011-08-02  Robert Dewar  <dewar@adacore.com>
13709
13710         * sem_attr.adb: Minor reformatting.
13711
13712 2011-08-02  Robert Dewar  <dewar@adacore.com>
13713
13714         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13715         (Has_Default_Component_Value): Removed
13716         * einfo.ads Comment updates
13717         (Has_Default_Aspect): Replaces Has_Default_Value
13718         (Has_Default_Component_Value): Removed
13719         * exp_ch13.adb
13720         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13721         * exp_ch3.adb
13722         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13723         (Get_Simple_Init_Val): Handle Default_Value aspect
13724         (Needs_Simple_Initialization): Handle Default_Value aspect
13725         * exp_ch3.ads: Needs_Simple_Initialization
13726         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13727         * par-prag.adb (Pragma_Default[_Component]Value) Removed
13728         * sem_ch13.adb
13729         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13730         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13731         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13732
13733 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13734
13735         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13736         package containing iteration primitives.
13737         exp_ch5.adb (Expand_Iterator_Loop): ditto.
13738
13739 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13740
13741         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13742         "of", pre-analyze expression in case it is a function call with
13743         finalization actions that must be placed ahead of the loop.
13744         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13745         on an Ada2012 iterator, insert them ahead of the rewritten loop.
13746
13747 2011-08-02  Geert Bosch  <bosch@adacore.com>
13748
13749         * cstand.adb (Create_Float_Types): Only consider C's long double for
13750         Long_Long_Float, in addition to double.
13751
13752 2011-08-02  Robert Dewar  <dewar@adacore.com>
13753
13754         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13755         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13756         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13757         Minor reformatting.
13758
13759 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13760
13761         * sem_attr.adb: handle properly 'Result when it is a prefix of an
13762         indexed component.
13763
13764 2011-08-02  Javier Miranda  <miranda@adacore.com>
13765
13766         * einfo.ads, einfo.adb
13767         (Original_Access_Type): Move this attribute to Node26 since there was
13768         an undocumented use of Node21 in E_Access_Subprogram_Type entities
13769         which causes conflicts and breaks the generation of the .NET compiler.
13770         (Interface_Name): Add missing documentation on JGNAT only uses of
13771         this attribute.
13772
13773 2011-08-02  Geert Bosch  <bosch@adacore.com>
13774
13775         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13776         (Find_Back_End_Float_Type): Likewise
13777         (Create_Back_End_Float_Types): Likewise
13778         (Create_Float_Types): Likewise
13779         (Register_Float_Type): Likewise
13780         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13781         Nlist and split out type selection in new local Find_Base_Type function.
13782         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13783         Nlist
13784         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13785
13786 2011-08-02  Robert Dewar  <dewar@adacore.com>
13787
13788         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13789         alpha order).
13790         * opt.ads: Minor comment change.
13791         * sem_ch12.adb: Minor code reorganization.
13792
13793 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13794
13795         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13796         subtype's list of rep items to the list on the full subtype in the case
13797         where the lists are the same.
13798
13799 2011-08-02  Geert Bosch  <bosch@adacore.com>
13800
13801         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13802         using the one from System.Strings, which also deallocates all strings.
13803
13804 2011-08-02  Geert Bosch  <bosch@adacore.com>
13805
13806         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13807         function.
13808         * gcc-interface/Make-lang.in: Update dependencies.
13809
13810 2011-08-02  Olivier Hainque  <hainque@adacore.com>
13811
13812         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13813         end_locus.
13814
13815 2011-08-02  Javier Miranda  <miranda@adacore.com>
13816
13817         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13818         associated with anonymous access to subprograms.
13819
13820 2011-08-02  Geert Bosch  <bosch@adacore.com>
13821
13822         * opt.ads
13823         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13824         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13825         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13826         (Add_Symbol_Definition): Move to switch-c.adb
13827         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13828         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13829         (Add_Symbol_Definition): Move to switch-c.adb.
13830         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13831         * sem_warn.adb
13832         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13833         Move to warnsw.adb.
13834         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13835         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13836         Move to warnsw.adb.
13837         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13838         (Add_Symbol_Definition): Moved from Prepcomp.
13839         * switch-c.ads: Update copyright notice. Use String_List instead of
13840         Argument_List, removing dependency on System.OS_Lib.
13841
13842 2011-08-02  Yannick Moy  <moy@adacore.com>
13843
13844         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13845         mode on initialization expression which does not respect SPARK
13846         restrictions.
13847         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13848         if the tree referenced by its argument represents an initialization
13849         expression in SPARK, suitable for initializing an object in an object
13850         declaration.
13851
13852 2011-08-02  Javier Miranda  <miranda@adacore.com>
13853
13854         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13855         internally generated access to subprogram with its associated protected
13856         subprogram type.
13857         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13858
13859 2011-08-02  Geert Bosch  <bosch@adacore.com>
13860
13861         * cstand.adb (Register_Float_Type): Print information about type to
13862         register, if the Debug_Flag_Dot_B is set.
13863         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13864         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13865         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13866         with a requested precision of more than Max_Digits digits and no more
13867         than Max_Base_Digits digits, if a range specification is present and the
13868         Predefined_Float_Types list has a suitable type to derive from.
13869         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13870         case of type completion with pragma Import
13871         * sem_prag.adb
13872         (Process_Import_Predefined_Type): Processing to complete a type
13873         with pragma Import. Currently supports floating point types only.
13874         (Set_Convention_From_Pragma): Do nothing without underlying type.
13875         (Process_Convention): Guard against absence of underlying type,
13876         which may happen when importing incomplete types.
13877         (Process_Import_Or_Interface): Handle case of importing predefined
13878         types. Tweak error message.
13879
13880 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13881
13882         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13883         functions to previous change.  Reorganize code slightly.
13884
13885 2011-08-02  Geert Bosch  <bosch@adacore.com>
13886
13887         * back_end.ads (Register_Type_Proc): New call back procedure type for
13888         allowing the back end to provide information about available types.
13889         (Register_Back_End_Types): New procedure to register back end types.
13890         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13891         available types.
13892         * cstand.adb (Back_End_Float_Types): New list for floating point types
13893         supported by the back end.
13894         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13895         (Copy_Float_Type): New procedure to make new copies of predefined types.
13896         (Register_Float_Type): New call back procedure to populate the BEFT list
13897         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13898         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13899         (Create_Float_Types): New procedure to create entities for floating
13900         point types predefined in Standard, and put these and any remaining
13901         BEFTs on the Predefined_Float_Types list.
13902         * stand.ads (Predefined_Float_Types): New list for predefined floating
13903         point types that do not have declarations in package Standard.
13904
13905 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13906
13907         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
13908         entity node for the unit containing the parameter.
13909         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13910         (Add_Inlined_Subprogram): Likewise.
13911         * gcc-interface/Make-lang.in: Update dependencies.
13912
13913 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13914
13915         * s-stusta.adb (Print): Make sure Pos is always initialized to a
13916         suitable value.
13917
13918 2011-08-02  Geert Bosch  <bosch@adacore.com>
13919
13920         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13921
13922 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13923
13924         * sem_type.adb (Covers): Move trivial case to the top and reuse the
13925         computed value of Base_Type.
13926
13927 2011-08-02  Yannick Moy  <moy@adacore.com>
13928
13929         * restrict.adb (Check_Restriction): issue an error for any use of
13930         class-wide, even if the No_Dispatch restriction is not set.
13931         * sem_aggr.adb: Correct typos in comments and messages in formal mode
13932         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13933         when completing a private extension, the type named in the private part
13934         is not the same as that named in the visible part.
13935         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13936         of an inherited primitive operations of a tagged type or type extension
13937         that returns the tagged type.
13938         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13939         function which returns True for an implicit operation inherited by the
13940         derived type declaration for the argument type.
13941         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13942         order.
13943
13944 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13945
13946         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13947         Process_Bounds, to perform analysis with expansion of a range or an
13948         expression that is the iteration scheme for a loop.
13949         (Analyze_Iterator_Specification): If domain of iteration is given by a
13950         function call with a controlled result, as is the case if call returns
13951         a predefined container, ensure that finalization actions are properly
13952         generated.
13953         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13954
13955 2011-08-02  Javier Miranda  <miranda@adacore.com>
13956
13957         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13958         * gcc-interface/Make-lang.in: Update dependencies.
13959
13960 2011-08-02  Javier Miranda  <miranda@adacore.com>
13961
13962         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13963         determine if the analysis is performed using N or Original_Node (N).
13964         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13965         functionality of routine Is_Variable avoids code duplication.
13966         * checks.adb (Determine_Range): Handle temporaries generated by
13967         Remove_Side_Effects.
13968
13969 2011-08-02  Javier Miranda  <miranda@adacore.com>
13970
13971         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13972         expansion of the condition. Required since the previous analysis was
13973         done with expansion disabled (see Resolve_Quantified_Expression) and
13974         hence checks were not inserted and record comparisons have not been
13975         expanded.
13976
13977 2011-08-02  Ed Falis  <falis@adacore.com>
13978
13979         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13980         Update header.
13981
13982 2011-08-02  Bob Duff  <duff@adacore.com>
13983
13984         * opt.ads: Minor comment fix.
13985
13986 2011-08-02  Bob Duff  <duff@adacore.com>
13987
13988         * sem_ch12.adb (Analyze_Package_Instantiation,
13989         Analyze_Subprogram_Instantiation): Turn off style checking while
13990         analyzing an instance. Whatever style checks that apply to the generic
13991         unit should apply, so it makes no sense to apply them in an instance.
13992         This was causing trouble when compiling an instance of a runtime
13993         unit that violates the -gnatyO switch.
13994         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13995         one of the two case statements, causing spurious errors.
13996
13997 2011-08-02  Robert Dewar  <dewar@adacore.com>
13998
13999         * uname.adb: Minor reformatting.
14000         * gnatcmd.adb: Minor reformatting.
14001         * exp_attr.adb: Minor reformatting.
14002
14003 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14004
14005         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
14006         No_Dispatching_Calls, do not look for the Assign primitive, because
14007         predefined primitives are not created in this case.
14008
14009 2011-08-02  Bob Duff  <duff@adacore.com>
14010
14011         * stylesw.ads: Minor comment fixes.
14012
14013 2011-08-02  Robert Dewar  <dewar@adacore.com>
14014
14015         * freeze.adb (Add_To_Result): New procedure.
14016
14017 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14018
14019         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
14020         time, if the specific run-time routines for handling streams of strings
14021         are not available, use the default mechanism.
14022
14023 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14024
14025         * s-regpat.ads: Fix typo.
14026
14027 2011-08-02  Vincent Celier  <celier@adacore.com>
14028
14029         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
14030         not null, call it to create the in memory config project file without
14031         parsing an existing default config project file.
14032
14033 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14034
14035         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
14036
14037 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14038
14039         * sem_elim.adb: an abstract subprogram does not need an eliminate
14040         pragma for its descendant to be eliminable.
14041
14042 2011-08-02  Ed Falis  <falis@adacore.com>
14043
14044         * init.c: revert to handling before previous checkin for VxWorks
14045         * s-intman-vxworks.adb: delete unnecessary declarations related to
14046         using Ada interrupt facilities for handling signals.
14047         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
14048         * s-intman-vxworks.ads: Import __gnat_install_handler as
14049         Initialize_Interrupts.
14050         * s-taprop-vxworks.adb: Delete Signal_Mask.
14051         (Abort_Handler): change construction of mask to unblock exception
14052         signals.
14053
14054 2011-08-02  Jerome Guitton  <guitton@adacore.com>
14055
14056         * a-except-2005.adb (Raise_From_Signal_Handler): Call
14057         Debug_Raise_Exception before propagation starts.
14058
14059 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14060
14061         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
14062         to Restriction_Check_Required.
14063         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
14064         * sem_res.adb (Resolve_Call): Likewise.
14065         * sem_attr.adb (Check_Stream_Attribute): Likewise.
14066
14067 2011-08-02  Bob Duff  <duff@adacore.com>
14068
14069         * stylesw.ads: Update comment.
14070         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
14071         * errout.ads: Remove obsolete comment.
14072
14073 2011-08-02  Javier Miranda  <miranda@adacore.com>
14074
14075         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
14076         (Set_Is_Safe_To_Reevaluate): new procedure.
14077         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
14078         assignment is allowed on safe-to-reevaluate variables.
14079         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
14080         temporary created to remove side effects in expressions that use
14081         the secondary stack as safe-to-reevaluate.
14082         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
14083         variables that are not true constants.
14084
14085 2011-08-02  Robert Dewar  <dewar@adacore.com>
14086
14087         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
14088         sem_res.adb, sem_ch6.adb: Minor reformatting.
14089
14090 2011-08-02  Jerome Guitton  <guitton@adacore.com>
14091
14092         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
14093
14094 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14095
14096         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
14097         not set Overridden_Operation if subprogram is an initialization
14098         procedure.
14099
14100 2011-08-02  Yannick Moy  <moy@adacore.com>
14101
14102         * par-ch6.adb: Correct obsolete name in comments
14103         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
14104         which takes two message arguments (existing function takes one), with
14105         second message used for continuation.
14106         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
14107         block statements that originate from a source block statement, not
14108         generated block statements
14109         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
14110         symmetry with procedure case
14111         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
14112         function to issue an error in formal mode if a package specification
14113         contains more than one tagged type or type extension.
14114         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
14115         parameters matching formals of tagged types are objects (or ancestor
14116         type conversions of objects), not general expressions. Issue an error
14117         on view conversions that are not involving ancestor conversion of an
14118         extended type.
14119         (Resolve_Type_Conversion): in formal mode, issue an error on the
14120         operand of an ancestor type conversion which is not an object
14121         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
14122         procedure so that it works also for actuals of function calls
14123         (Is_Actual_Tagged_Parameter): new function which determines if its
14124         argument is an actual parameter of a formal of tagged type in a
14125         subprogram call
14126         (Is_SPARK_Object_Reference): new function which determines if the tree
14127         referenced by its argument represents an object in SPARK
14128
14129 2011-08-02  Robert Dewar  <dewar@adacore.com>
14130
14131         * sem_ch3.adb: Minor reformatting
14132         Minor comment addition
14133         Minor error msg text change
14134
14135 2011-08-02  Javier Miranda  <miranda@adacore.com>
14136
14137         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
14138         function. Used to be more precise when we generate a variable plus one
14139         assignment to remove side effects in the evaluation of the Bound
14140         expressions.
14141         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
14142         of the bound expression to force its re-analysis and thus expand the
14143         associated transient scope (if required). Code cleanup replacing the
14144         previous code that declared the constant entity by an invocation to
14145         routine Force_Evaluation which centralizes this work in the frontend.
14146
14147 2011-08-02  Robert Dewar  <dewar@adacore.com>
14148
14149         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
14150         (Base_Type): Now uses improved Is_Base_Type function
14151         * einfo.ads (Base_Type): Inline this function
14152
14153 2011-08-02  Robert Dewar  <dewar@adacore.com>
14154
14155         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
14156         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
14157
14158 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14159
14160         * gcc-interface/Make-lang.in: Update dependencies.
14161         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
14162         targets.
14163
14164 2011-08-02  Yannick Moy  <moy@adacore.com>
14165
14166         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
14167         non-simple expression used in delta constraint
14168         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
14169         index constraint which is not a subtype mark
14170         * par.adb: With and use Restrict
14171         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
14172         mode on component type which is not a subtype mark and default
14173         expression on component
14174         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
14175         of string which does not have a lower index bound equal to 1
14176         (Array_Type_Declaration): issue an error in formal mode on index or
14177         component type which is not a subtype mark, and on aliased keyword on
14178         component
14179         (Derived_Type_Declaration): issue an error in formal mode on interface,
14180         limited or abstract type
14181         (Record_Type_Declaration): issue an error in formal mode on interface
14182         (Record_Type_Definition): issue an error in formal mode on tagged types
14183         and type extensions not declared in the specification of a library unit
14184         package; on null non-tagged record; on variant part
14185
14186 2011-08-02  Vincent Celier  <celier@adacore.com>
14187
14188         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14189         not declared for qualified library project when Library_Name is not
14190         declared, but Library_Dir is.
14191
14192 2011-08-02  Robert Dewar  <dewar@adacore.com>
14193
14194         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14195         pragmas (affects aspects [Component_]Default_Value
14196         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14197         component type for the resolution
14198
14199 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14200
14201         * einfo.adb (Base_Type): Tune implementation for speed.
14202
14203 2011-08-02  Robert Dewar  <dewar@adacore.com>
14204
14205         * freeze.adb: Minor reformatting.
14206
14207 2011-08-02  Thomas Quinot  <quinot@adacore.com>
14208
14209         * scos.ads: Update comments.
14210
14211 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14212
14213         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14214         base type, because the parent may be a subtype of a private type whose
14215         convention is established in a private part.
14216
14217 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14218
14219         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14220         statement in a block when the expansion of the return expression has
14221         created a finalization chain.
14222         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14223         with the parent node.
14224         Add N_Extended_Return_Statement to handle the case where a transient
14225         object declaration appears in the Return_Object_Declarations list of
14226         an extended return statement.
14227
14228 2011-08-02  Matthew Gingell  <gingell@adacore.com>
14229
14230         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14231         unused parameter 'name'.
14232
14233 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14234
14235         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14236         inherited operation, check whether its alias, which is the source
14237         operastion that it renames, has been marked eliminated.
14238
14239 2011-08-02  Javier Miranda  <miranda@adacore.com>
14240
14241         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14242         in-mode parameter whose type is an access type since it can be used to
14243         modify its designated object. Enforce code that handles as safe an
14244         access type that is not access-to-constant but it is the result of a
14245         previous removal of side-effects.
14246         (Remove_Side_Effects): Minor code reorganization of cases which require
14247         no action. Done to incorporate documentation on new cases uncovered
14248         working in this ticket: no action needed if this routine was invoked
14249         too early and the nodes are not yet decorated.
14250         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14251         to routine Remove_Side_Effects by calls to Force_Evaluation since they
14252         were issued with actuals that are implicitly provided by
14253         Force_Evaluation.
14254
14255 2011-08-02  Robert Dewar  <dewar@adacore.com>
14256
14257         * sem_ch3.adb, sem_res.adb: Minor reformatting.
14258
14259 2011-08-02  Yannick Moy  <moy@adacore.com>
14260
14261         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14262         to issue an error in formal mode on attribute not supported in this mode
14263         (Analyze_Attribute): issue errors on standard attributes not supported
14264         in formal mode.
14265         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14266         comment, and issue error in formal mode on modulus which is not a power
14267         of 2.
14268         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14269         range.
14270         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14271         subtype mark.
14272         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14273         operator on modular type (except 'not').
14274
14275 2011-08-02  Robert Dewar  <dewar@adacore.com>
14276
14277         * gnat_rm.texi: Minor reformatting.
14278
14279 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14280
14281         * s-osinte-linux.ads: Minor comment update and reformatting.
14282         * i-cexten.ads: Make this unit pure, as for its parent.
14283         Will allow its usage in more contexts if needed.
14284
14285 2011-08-02  Robert Dewar  <dewar@adacore.com>
14286
14287         * s-utf_32.ads: Minor comment fix.
14288
14289 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14290
14291         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14292         operation of a tagged synchronized type, handle the case where the
14293         controlling argument is overloaded.
14294
14295 2011-08-02  Yannick Moy  <moy@adacore.com>
14296
14297         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14298         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14299         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14300         SPARK mode and formal verification mode on processing SPARK restriction
14301         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14302         requiring consistency checking.
14303
14304 2011-08-02  Robert Dewar  <dewar@adacore.com>
14305
14306         * sem_res.adb: Minor reformatting.
14307
14308 2011-08-02  Robert Dewar  <dewar@adacore.com>
14309
14310         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14311         a-cforse.ads: Remove unneeded with of Ada.Containers
14312         Remove commented out pragma Inline's
14313         Move specifications of new subprograms to the actual specs
14314
14315 2011-08-02  Yannick Moy  <moy@adacore.com>
14316
14317         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14318         a-cforse.ads: Update comments.
14319
14320 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14321
14322         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14323
14324 2011-08-02  Robert Dewar  <dewar@adacore.com>
14325
14326         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14327         a-cforse.ads, a-cofove.ads: Minor reformatting.
14328
14329 2011-08-02  Claire Dross  <dross@adacore.com>
14330
14331         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14332         a-cofove.ads: Add comments.
14333
14334 2011-08-02  Yannick Moy  <moy@adacore.com>
14335
14336         * gnat_rm.texi: Document formal containers.
14337
14338 2011-08-02  Emmanuel Briot  <briot@adacore.com>
14339
14340         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14341         are empty sections.
14342
14343 2011-08-02  Robert Dewar  <dewar@adacore.com>
14344
14345         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14346         reformatting.
14347
14348 2011-08-02  Robert Dewar  <dewar@adacore.com>
14349
14350         * aspects.adb: New aspects Default_Value and Default_Component_Value
14351         New format of Aspect_Names table checks for omitted entries
14352         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14353         handling of boolean aspects for derived types.
14354         New aspects Default_Value and Default_Component_Value
14355         New format of Aspect_Names table checks for omitted entries
14356         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14357         (Has_Default_Value): New flag
14358         (Has_Default_Component_Value): New flag
14359         (Has_Default_Value): New flag
14360         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14361         table.
14362         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14363         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14364         Default_Value and Default_Component_Value
14365         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14366         New aspects Default_Value and Default_Component_Value
14367         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14368         * sprint.adb: Print N_Aspect_Specification node when called from gdb
14369
14370 2011-08-02  Vincent Celier  <celier@adacore.com>
14371
14372         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14373         inherit library kind.
14374
14375 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14376
14377         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14378         Minor reformatting.
14379
14380 2011-08-02  Robert Dewar  <dewar@adacore.com>
14381
14382         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14383
14384 2011-08-02  Yannick Moy  <moy@adacore.com>
14385
14386         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14387
14388 2011-08-02  Robert Dewar  <dewar@adacore.com>
14389
14390         * impunit.adb: Add comment.
14391
14392 2011-08-02  Yannick Moy  <moy@adacore.com>
14393
14394         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14395         qualification of aggregates in formal mode
14396         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14397         another aggregate
14398         (Resolve_Aggregate): complete the test that an aggregate is adequately
14399         qualified in formal mode
14400
14401 2011-08-02  Pascal Obry  <obry@adacore.com>
14402
14403         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14404         * mlib-prj.adb: Supress warning when compiling binder generated file.
14405         (Build_Library): Supress all warnings when compiling the binder
14406         generated file.
14407
14408 2011-08-02  Yannick Moy  <moy@adacore.com>
14409
14410         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14411         from here...
14412         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14413         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14414         Add with/use clauses to make Check_Formal_Restriction visible
14415
14416 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14417
14418         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14419         in-parameters when type of the generic formal is private in the generic
14420         spec and non-private in the body.
14421
14422 2011-08-02  Claire Dross  <dross@adacore.com>
14423
14424         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14425         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14426         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14427         * impunit.adb, Makefile.rtl: Take new files into account.
14428
14429 2011-08-02  Robert Dewar  <dewar@adacore.com>
14430
14431         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14432         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14433
14434 2011-08-02  Yannick Moy  <moy@adacore.com>
14435
14436         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14437         formal mode
14438         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14439         matching static array bounds, taking into account the special case of
14440         string literals
14441         * sem_ch3.adb: Typo in comment.
14442
14443 2011-08-02  Yannick Moy  <moy@adacore.com>
14444
14445         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14446         which issues an error in formal mode if its argument node is originally
14447         from source
14448         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14449         has a discriminant specification so that it does not include the case
14450         of derived types
14451         (Derived_Type_Declaration): move here the test that a derived type has a
14452         discriminant specification
14453         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14454         first element of a component association before accessing its choices
14455         (presence of component association is not enough)
14456         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14457         declaration is a library item before accessing the next element in a
14458         list, as library items are not member of lists
14459         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14460         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14461         Check_Formal_Restriction whenever possible.
14462
14463 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14464
14465         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14466         reference when needed.
14467
14468 2011-08-02  Bob Duff  <duff@adacore.com>
14469
14470         * gnat_ugn.texi: Fix typo.
14471
14472 2011-08-02  Vincent Celier  <celier@adacore.com>
14473
14474         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14475         archive file name. Do not use the full path name of archives for Open
14476         VMS.
14477
14478 2011-08-02  Robert Dewar  <dewar@adacore.com>
14479
14480         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14481         Analyze_Aspect_Specifications
14482         * sem_ch13.adb
14483         (Analyze_Aspect_Specifications): New handling for boolean aspects
14484         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14485         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14486         sequence for Analyze_Aspect_Specifications
14487         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14488         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14489
14490 2011-08-02  Robert Dewar  <dewar@adacore.com>
14491
14492         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14493         aspects, since these no longer exist.
14494
14495 2011-08-02  Robert Dewar  <dewar@adacore.com>
14496
14497         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14498         semicolon, do not try to see if there are aspects following it.
14499         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14500         aspect spec.
14501
14502 2011-08-02  Robert Dewar  <dewar@adacore.com>
14503
14504         * sem_ch8.adb, aspects.ads: Minor reformatting.
14505
14506 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14507
14508         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14509         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14510         extracted from...
14511         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
14512
14513 2011-08-02  Yannick Moy  <moy@adacore.com>
14514
14515         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14516         mode on subprogram declaration outside of package specification, unless
14517         it is followed by a pragma Import
14518         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14519         Access_Type_Declaration): issue error in formal mode on access type
14520         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14521         incomplete type
14522         (Analyze_Object_Declaration): issue error in formal mode on object
14523         declaration which does not respect SPARK restrictions
14524         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14525         declaration which does not respect SPARK restrictions
14526         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14527         error in formal mode on digits or delta constraint
14528         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14529         decimal fixed point type
14530         (Derived_Type_Declaration): issue error in formal mode on derived type
14531         other than type extensions of tagged record types
14532         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14533         with check on access definition
14534         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14535         mode on protected definition.
14536         (Analyze_Task_Definition): issue error in formal mode on task definition
14537
14538 2011-08-02  Robert Dewar  <dewar@adacore.com>
14539
14540         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14541
14542 2011-08-02  Javier Miranda  <miranda@adacore.com>
14543
14544         * sem_ch6.adb (Can_Override_Operator): New function.
14545         (Verify_Overriding_Indicator): Add missing code to check overriding
14546         indicator in operators. Fixes regression.
14547         (Check_Overriding_Indicator): Minor reformating after replacing the
14548         code that evaluates if the subprogram can override an operator by
14549         invocations to the above new function.
14550         * einfo.adb
14551         (Write_Field26_Name): Add missing code to ensure that, following
14552         the documentation in einfo.ads, this field is not shown as attribute
14553         "Static_Initialization" on non-dispatching functions.
14554
14555 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14556
14557         * sem_res.adb (Resolve_Call): A call to
14558         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14559         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14560         i.e., when the second parameter is of type Time_Span.
14561
14562 2011-08-02  Vincent Celier  <celier@adacore.com>
14563
14564         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14565         with an archive instead of -L<library dir> -l<library name>.
14566
14567 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14568
14569         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14570         mark the base types In_Use in addition to making the operations
14571         use_visible.
14572
14573 2011-08-02  Ed Falis  <falis@adacore.com>
14574
14575         * init.c: add and setup __gnat_signal_mask for the exception signals
14576         * s-inmaop-vxworks.adb: new file.
14577         * s-intman-vxworks.adb: remove unnecessary initializations and
14578         simplify remaining
14579         * s-intman-vxworks.ads: remove unnecessary variable
14580         * s-taprop-vxworks.adb: simplify signal initialization
14581
14582 2011-08-02  Robert Dewar  <dewar@adacore.com>
14583
14584         * sem_ch8.adb: Minor code reorganization, comment updates.
14585
14586 2011-08-02  Robert Dewar  <dewar@adacore.com>
14587
14588         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14589         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14590         here from Sem_Res.
14591         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14592         (Matching_Static_Array_Bounds): Moved here from Sem_Res
14593
14594 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14595
14596         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14597         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14598         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14599         use_type_clauses, to handle more efficiently use_type and use_all_type
14600         constructs.
14601         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14602         Ada2012 Use_All_Type clause.
14603         (Use_Class_Wide_Operations): new procedure.
14604
14605 2011-08-02  Robert Dewar  <dewar@adacore.com>
14606
14607         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14608         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14609         expression to expression function.
14610
14611 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14612
14613         * sem_ch4.adb: transform simple Ada2012 membership into equality only
14614         if types are compatible.
14615
14616 2011-08-02  Yannick Moy  <moy@adacore.com>
14617
14618         * sem_res.adb (Matching_Static_Array_Bounds): new function which
14619         returns True if its argument array types have same dimension and same
14620         static bounds at each index.
14621         (Resolve_Actuals): issue an error in formal mode on actuals passed as
14622         OUT or IN OUT paramaters which are not view conversions in SPARK.
14623         (Resolve_Arithmetic_Op): issue an error in formal mode on
14624         multiplication or division with operands of fixed point types which are
14625         not qualified or explicitly converted.
14626         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14627         Boolean or array type (except String) operands.
14628         (Resolve_Equality_Op): issue an error in formal mode on equality
14629         operators for array types other than String with non-matching static
14630         bounds.
14631         (Resolve_Logical_Op): issue an error in formal mode on logical operators
14632         for array types with non-matching static bounds. Factorize the code in
14633         Matching_Static_Array_Bounds.
14634         (Resolve_Qualified_Expression): issue an error in formal mode on
14635         qualified expressions for array types with non-matching static bounds.
14636         (Resolve_Type_Conversion): issue an error in formal mode on type
14637         conversion for array types with non-matching static bounds
14638
14639 2011-08-02  Robert Dewar  <dewar@adacore.com>
14640
14641         * par-ch10.adb: Minor code reorganization (use Nkind_In).
14642
14643 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14644
14645         * par-ch9.adb: save location of entry for proper error message.
14646
14647 2011-08-02  Javier Miranda  <miranda@adacore.com>
14648
14649         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14650         (Use_Full_View) which permits this routine to climb through the
14651         ancestors using the full-view of private parents.
14652         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14653         Use_Full_View to true in calls to Is_Ancestor.
14654         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14655         true in call to Is_Ancestor.
14656         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14657         Use_Full_View to true in call to Is_Ancestor.
14658         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14659         call to Is_Ancestor.
14660         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14661         Use_Full_View to true in calls to Is_Ancestor.
14662         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14663         Make_Select_Specific_Data_Table, Register_Primitive,
14664         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14665         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14666         to true in call to Is_Ancestor.
14667         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14668         Use_Full_View to true in calls to Is_Ancestor.
14669         * exp_cg.adb
14670         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14671         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14672
14673 2011-08-02  Robert Dewar  <dewar@adacore.com>
14674
14675         * gnat_rm.texi: Minor reformatting.
14676         * sem_prag.adb: Minor reformatting.
14677
14678 2011-08-02  Tristan Gingold  <gingold@adacore.com>
14679
14680         * vms_data.ads: Add VMS qualifier for -gnateP.
14681
14682 2011-08-02  Robert Dewar  <dewar@adacore.com>
14683
14684         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14685         * par-ch7.adb (P_Package): Proper placement of aspects for package
14686         decl/instantiation.
14687         * par-endh.adb (Check_End): Ad Is_Sloc parameter
14688         (End_Statements): Add Is_Sloc parameterr
14689         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14690         (Check_End): Ad Is_Sloc parameter
14691         (End_Statements): Add Is_Sloc parameterr
14692
14693 2011-08-02  Vincent Celier  <celier@adacore.com>
14694
14695         * ug_words: Add VMS qualifier equivalent to -gnateP:
14696         /SYMBOL_PREPROCESSING.
14697
14698 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14699
14700         * gnat-style.texi: For hexadecimal numeric literals the typical
14701         grouping of digits is 4 to represent 2 bytes.
14702         A procedure spec which is split into several lines is indented two
14703         characters.
14704
14705 2011-08-02  Yannick Moy  <moy@adacore.com>
14706
14707         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14708         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14709         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14710         properly qualified
14711         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14712         choice in array aggregate
14713         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14714         mark as ancestor
14715         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14716         positional and named aggregate for record, or others in record
14717         aggregate, or multiple choice in record aggregate
14718         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14719         array operands to logical operations AND, OR and XOR do not have the
14720         same static lower and higher bounds
14721         * sem_ch5.adb, sinfo.ads: Correct typos in comments
14722
14723 2011-08-01  Robert Dewar  <dewar@adacore.com>
14724
14725         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14726         Replaces Last_Source_Node_In_Sequence.
14727         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14728         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14729         parens and blank in string (this was inconsistently implemented).
14730         * errout.ads
14731         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14732         blank in string (this was inconsistently implemented).
14733         * gnat1drv.adb
14734         (Set_Global_Switches): Set formal mode switches appropriately
14735         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14736         * par-prag.adb
14737         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14738         call Set_Error_Msg_Lang to set "spark" as language name.
14739         * par.adb: Remove unnecessary call to set formal language for errout
14740         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14741         appropriately and call Set_Error_Msg_Lang to set "spark" as language
14742         name.
14743         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14744         calls to it, moved after resolution so that types are known
14745         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14746         result of concatenation is not of type String
14747         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14748         concatenation is not properly restricted
14749         * gnat_rm.texi: Add doc on pragma Spark_95.
14750         * gcc-interface/Makefile.in: Remove obsolete target pairs for
14751         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14752         * gcc-interface/Make-lang.in: Update dependencies.
14753
14754 2011-08-01  Javier Miranda  <miranda@adacore.com>
14755
14756         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14757         condition that detects if the overridden operation must replace an
14758         existing entity.
14759
14760 2011-08-01  Javier Miranda  <miranda@adacore.com>
14761
14762         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14763         code declarations inserted by Insert_Actions in each alternative of the
14764         N_Case_Expression node.
14765
14766 2011-08-01  Robert Dewar  <dewar@adacore.com>
14767
14768         * sem_ch6.adb: Minor code reorganization.
14769         * sem_util.adb: Minor reformatting.
14770
14771 2011-08-01  Pascal Obry  <obry@adacore.com>
14772
14773         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14774         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14775
14776 2011-08-01  Yannick Moy  <moy@adacore.com>
14777
14778         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14779         literal or operator symbol which is prefixed
14780         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14781         mode on access attributes.
14782         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14783         that concatenation operands are properly restricted in formal mode
14784         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14785         Analyze_Concatenation_Operand. Issue an error in formal mode if the
14786         result of the concatenation has a type different from String.
14787         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14788         Analyze_Quantified_Expression, Analyze_Slice,
14789         Analyze_Null): issue an error in formal mode on unsupported constructs
14790         * sem_ch5.adb
14791         (Analyze_Block_Statement): only issue error on source block statement
14792         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14793         function which returns the last node in a list of nodes for which
14794         Comes_From_Source returns True, if any
14795         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14796         Last_Source_Node_In_Sequence
14797         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14798         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14799         mode on unsupported constructs
14800         * sem_ch9.adb Do not return after issuing error in formal mode, as the
14801         rest of the actions may be needed later on since the error is marked as
14802         not serious.
14803         * sinfo.ads: Typos in comments.
14804
14805 2011-08-01  Pascal Obry  <obry@adacore.com>
14806
14807         * projects.texi: Minor editing.
14808
14809 2011-08-01  Yannick Moy  <moy@adacore.com>
14810
14811         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14812         insertion character ~~
14813         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14814         (Set_Error_Msg_Lang): new procedure which fixes the language for use
14815         with insertion character ~~
14816         (Set_Msg_Text): treat insertion character ~~
14817         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14818         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14819         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14820         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14821         errors related to the formal language restriction not serious
14822         (insertion character |).
14823         * par.adb (Par): set formal language for error messages if needed
14824         * sem_ch6.adb (Check_Missing_Return): take into account possible
14825         generated statements at the end of the function
14826         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14827         enumeration value to define a new pragma SPARK_95
14828         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14829         SPARK_Version): new type and variables to store the SPARK version
14830         (none by default).
14831         (SPARK_Mode): return True when SPARK_Version is set
14832         * par-prag.adb: Correct indentation
14833         (Prag): take Pragma_SPARK_95 into account
14834         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14835         into account.
14836
14837 2011-08-01  Robert Dewar  <dewar@adacore.com>
14838
14839         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14840         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14841         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14842
14843 2011-08-01  Pascal Obry  <obry@adacore.com>
14844
14845         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14846         Target_Name to Get_Path call.
14847         (Parse_Single_Project): Likewise.
14848         (Post_Parse_Context_Clause): Likewise.
14849         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14850         Call Initialise_Project_Path with the proper Target_Name.
14851         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14852         search path.
14853         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14854         with the proper Target_Name.
14855         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14856         Part.Parse routine.
14857         (Parse_Project_And_Apply_Config): Likewise.
14858         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14859         This is fine as this part of the code is supporting only native
14860         compilation.
14861         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14862         is fine as this part of the code is supporting only native compilation.
14863
14864 2011-08-01  Yannick Moy  <moy@adacore.com>
14865
14866         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14867         of homonym, unless the homonym is one of the cases allowed in SPARK
14868         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14869         package declaration occurring after a body.
14870
14871 2011-08-01  Robert Dewar  <dewar@adacore.com>
14872
14873         * checks.adb, exp_ch4.adb: Minor reformatting.
14874
14875 2011-08-01  Javier Miranda  <miranda@adacore.com>
14876
14877         * einfo.ads (Access_Disp_Table): Fix documentation.
14878         (Dispatch_Table_Wrappers): Fix documentation.
14879
14880 2011-08-01  Pascal Obry  <obry@adacore.com>
14881
14882         * prj-env.adb, prj-env.ads: Minor reformatting.
14883
14884 2011-08-01  Yannick Moy  <moy@adacore.com>
14885
14886         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14887         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14888         procedures out of these packages.
14889         * errout.ads, errout.adb
14890         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14891         procedures in of this package
14892         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14893         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14894         on misplaced later vs initial declarations, like in Ada 83
14895         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14896         formal mode on attribute of private type whose full type declaration
14897         is not visible
14898         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14899         package declaration inside a package specification
14900         (Analyze_Full_Type_Declaration): issue error in formal mode on
14901         controlled type or discriminant type
14902         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14903         user-defined operator means that it should come from the source
14904         (New_Overloaded_Entity): issue error in formal mode on overloaded
14905         entity.
14906         * sem_ch6.ads, sem_ch13.ads: typos in comments.
14907
14908 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14909
14910         * atree.adb: Minor reformatting.
14911         * checks.adb: Minor reformatting.
14912
14913 2011-08-01  Vincent Celier  <celier@adacore.com>
14914
14915         * s-parame-vms-ia64.ads: Fix typo in comment
14916         Minor reformatting
14917         * s-parame-vms-restrict.ads: Removed, unused.
14918
14919 2011-08-01  Javier Miranda  <miranda@adacore.com>
14920
14921         * exp_ch3.adb
14922         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14923         * sem_ch3.adb
14924         (Constrain_Index): Remove side effects in the evaluation of the bounds.
14925         * sem_ch3.ads, sem_ch3.adb
14926         (Is_Constant_Bound): New extended version of the subprogram that was
14927         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14928         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14929         * sem_aux.ads (Constant_Value): Fix typo in comment.
14930         * checks.adb (Generate_Index_Checks): New implementation which, for
14931         array objects with constant bounds, generates the runtime check
14932         referencing the bounds of the array type. For other cases this routine
14933         provides its previous behavior obtaining such values from the array
14934         object.
14935         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14936         parent type.
14937         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14938         we cannot have semantic interpretations of the new node.
14939
14940 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14941
14942         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14943         expressions.
14944
14945 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
14946
14947         * sem_ch8.adb: Minor code editing.
14948         * s-vxwext.adb: Remove trailing space.
14949         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14950         consistency with other files.
14951
14952 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14953
14954         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14955
14956 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14957
14958         * par-ch10.adb: reject parameterized expressions as compilation unit.
14959         * sem_ch4.adb: handle properly conditional expression with overloaded
14960         then_clause and no else_clause.
14961
14962 2011-08-01  Tristan Gingold  <gingold@adacore.com>
14963
14964         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14965         like done by System.Aux_DEC.
14966         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14967
14968 2011-08-01  Yannick Moy  <moy@adacore.com>
14969
14970         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14971         missing label at end of declaration (subprogram or package)
14972         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14973         of positional and named parameter association
14974         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14975         Error_Msg_SP which adds a prefix to the error message giving the name
14976         of the formal language analyzed
14977         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14978         access result type in subprogram, unconstrained array as result type,.
14979         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14980         procedure
14981         * sem_ch8.adb: Code clean up.
14982
14983 2011-08-01  Javier Miranda  <miranda@adacore.com>
14984
14985         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14986         * einfo.ads (Access_Disp_Table): Fix documentation.
14987         (Dispatch_Table_Wrappers): Fix documentation.
14988         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14989         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14990         to enforce the documentation of this attribute.
14991         (Set_Is_Interface): Cleanup the assertion.
14992         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14993         the Underlying_Type entity before reading attribute Access_Disp_Table.
14994         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14995         Locate the Underlying_Type before reading attribute Access_Disp_Table.
14996         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14997         the Underlying_Type entity before reading attribute Access_Disp_Table.
14998         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14999         Locate the Underlying_Type entity before reading attribute
15000         Access_Disp_Table.
15001
15002 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15003
15004         * s-poosiz.ads: Additional overriding indicators.
15005
15006 2011-08-01  Yannick Moy  <moy@adacore.com>
15007
15008         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
15009         formal mode.
15010         (Analyze_Iteration_Scheme): issue error in formal mode when loop
15011         parameter specification does not include a subtype mark.
15012         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
15013         formal mode on abstract subprogram.
15014         (Analyze_Subprogram_Specification): issue error in formal mode on
15015         user-defined operator.
15016         (Process_Formals): issue error in formal mode on access parameter and
15017         default expression.
15018         * sem_ch9.adb (Analyze_Abort_Statement,
15019         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
15020         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
15021         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
15022         Analyze_Requeue, Analyze_Selective_Accept,
15023         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
15024         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
15025         issue error in formal mode on user-defined raise statement.
15026
15027 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15028
15029         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
15030         declaration being hidden when overriding an implicit inherited
15031         subprogram.
15032         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
15033         (-gnats), do not complain about a source file that contains only a
15034         pragma No_Body.
15035
15036 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15037
15038         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
15039         variable if already set.
15040
15041 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15042
15043         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
15044         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
15045         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
15046         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
15047         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
15048         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
15049         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
15050         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
15051         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
15052         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
15053         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
15054         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
15055         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
15056         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
15057         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
15058         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
15059         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
15060         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
15061         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
15062         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
15063         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
15064         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
15065         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
15066         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
15067         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
15068         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
15069         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
15070         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
15071         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
15072         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
15073         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
15074         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
15075         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
15076         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
15077         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
15078         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
15079         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
15080         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
15081         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
15082         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
15083         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
15084         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
15085         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
15086         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
15087         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
15088         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
15089         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
15090         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
15091         s-osinte-mingw.ads: Update to GPLv3 run-time license.
15092         Use GNAT instead of GNARL.
15093
15094 2011-08-01  Bob Duff  <duff@adacore.com>
15095
15096         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
15097         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
15098         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
15099         reformatting.
15100
15101 2011-08-01  Yannick Moy  <moy@adacore.com>
15102
15103         * debug.adb (d.D) reverve flag for the SPARK mode
15104         (d.E) reverve flag for SPARK generation mode
15105         (d.F) reverve flag for Why generation mode
15106         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
15107         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
15108         functions which return True when the corresponding modes are set
15109         (Formal_Language): return "spark" or "alfa" when in formal verification
15110         mode.
15111         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
15112         Error_Msg to prefix the error message with a tag giving the formal
15113         language
15114         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
15115         message with a tag giving the formal language
15116         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
15117         block statement
15118         (Analyze_Case_Statement): issue error in formal mode on case statement
15119         with a single "others" case alternative
15120         (Analyze_Exit_Statement): issue errors in formal mode on exit
15121         statements which do not respect SPARK restrictions
15122         (Analyze_Goto_Statement): issue error in formal mode on goto statement
15123         (Check_Unreachable_Code): always issue an error (not a warning) in
15124         formal mode on unreachable code (concerns both code after an infinite
15125         loop and after an unconditional jump, both not allowed in SPARK)
15126         * sem_ch6.adb (Analyze_Return_Statement): add call to
15127         Set_Return_Present for a procedure containing a return statement
15128         (already done for functions in Analyze_Function_Return)
15129         (Analyze_Function_Return): issue error in formal mode on extended
15130         return or if return is not last statement in function
15131         (Check_Missing_Return): issue error in formal mode if function does
15132         not end with return or if procedure contains a return
15133         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
15134         function to detect if there is an inner scope of its parameter S which
15135         is a loop.
15136
15137 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15138
15139         * sem_ch6.ads: Minor reformatting.
15140
15141 2011-08-01  Javier Miranda  <miranda@adacore.com>
15142
15143         * sem_util.adb (Abstract_Interface_List): Complete condition when
15144         processing private type declarations to avoid reading unavailable
15145         attribute.
15146         (Is_Synchronized_Tagged_Type): Complete condition when processing
15147         private extension declaration nodes to avoid reading unavailable
15148         attribute.
15149
15150 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15151
15152         * sem_ch3.adb: Minor reformatting.
15153
15154 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15155
15156         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
15157         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
15158         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
15159         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
15160         for VMS, instead parametrize the common implementation with
15161         System.Parameters declarations.
15162
15163 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
15164
15165         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
15166
15167 2011-08-01  Tristan Gingold  <gingold@adacore.com>
15168
15169         * seh_init.c: Fix SEH handler installation on win64.
15170
15171 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15172
15173         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
15174         double analysis of an anonymous access to subprogram, because it can
15175         lead to improper sharing of profiles and a back-end crash.
15176
15177 2011-08-01  Robert Dewar  <dewar@adacore.com>
15178
15179         * make.adb, sem_ch4.adb: Minor reformatting.
15180         * gcc-interface/Make-lang.in: Update dependencies.
15181         * sem_util.adb, exp_ch5.adb: Minor reformatting.
15182
15183 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15184
15185         * gnat_rm.texi: Fix definition of Long_Integer.
15186
15187 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15188
15189         * exp_aggr.adb: check limit size of static aggregate unconditionally,
15190         to prevent storage exhaustion.
15191         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15192         finalized is a function body, insert the cleanup code before the final
15193         return statement, to prevent spurious warnings.
15194         * s-pooglo.ads: add overriding indicator.
15195
15196 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15197
15198         * sem_ch4.adb (Operator_Check): improve error message when both a
15199         with_clause and a use_clause are needed to make operator usage legal.
15200         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15201         determine whether a compilation unit is visible within an other,
15202         either through a with_clause in the current unit, or a with_clause in
15203         its library unit or one one of its parents.
15204
15205 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15206
15207         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15208         over an arbitrary expression of an array or container type.
15209         * lib-xref.adb: clarify comment.
15210
15211 2011-08-01  Bob Duff  <duff@adacore.com>
15212
15213         * einfo.ads: Minor reformatting.
15214         * debug.adb: Minor comment improvement.
15215
15216 2011-08-01  Javier Miranda  <miranda@adacore.com>
15217
15218         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15219         consider hidden subprograms as valid candidates.
15220
15221 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15222
15223         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15224
15225 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
15226
15227         * gnat_ugn.texi: Fix typo.
15228
15229 2011-08-01  Robert Dewar  <dewar@adacore.com>
15230
15231         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15232         lib-xref.adb: Minor reformatting
15233
15234 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
15235
15236         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15237         when to generate a call to Move_Final_List.
15238         (Has_Controlled_Parts): Remove this function.
15239
15240 2011-08-01  Geert Bosch  <bosch@adacore.com>
15241
15242         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15243         "," in choice list.
15244
15245 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15246
15247         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15248         explicit raise of a predefined exception as Comes_From_Source if the
15249         original N_Raise_Statement comes from source.
15250
15251 2011-08-01  Robert Dewar  <dewar@adacore.com>
15252
15253         * sinfo.ads: Add comment.
15254         * sem_ch6.adb: Minor reformatting.
15255
15256 2011-08-01  Robert Dewar  <dewar@adacore.com>
15257
15258         * freeze.adb (Freeze_Entity): Refine check for bad component size
15259         clause to avoid rejecting confirming clause when atomic/aliased present.
15260
15261 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15262
15263         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15264         better determine whether an entity reference is a write.
15265         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15266         subcomponent.
15267         * lib-xref.adb (Output_References): Do no suppress a read reference at
15268         the same location as an immediately preceeding modify-reference, to
15269         handle properly in-out actuals.
15270
15271 2011-08-01  Tristan Gingold  <gingold@adacore.com>
15272
15273         * env.c (__gnat_setenv) [VMS]: Refine previous change.
15274
15275 2011-08-01  Quentin Ochem  <ochem@adacore.com>
15276
15277         * i-cstrin.adb (New_String): Changed implementation, now uses only the
15278         heap to compute the result.
15279
15280 2011-08-01  Robert Dewar  <dewar@adacore.com>
15281
15282         * atree.ads: Minor reformatting.
15283
15284 2011-08-01  Emmanuel Briot  <briot@adacore.com>
15285
15286         * g-expect.adb (Get_Command_Output): Fix memory leak.
15287
15288 2011-08-01  Geert Bosch  <bosch@adacore.com>
15289
15290         * cstand.adb (P_Float_Type): New procedure to print the definition of
15291         predefined fpt types.
15292         (P_Mixed_Name): New procedure to print a name using mixed case
15293         (Print_Standard): Use P_Float_Type for printing floating point types
15294         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15295         precision IEEE float.
15296
15297 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15298
15299         * sem_ch3.adb: Minor reformatting.
15300
15301 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15302
15303         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15304         the completion of a generic function, insert the new body rather than
15305         rewriting the original.
15306
15307 2011-08-01  Yannick Moy  <moy@adacore.com>
15308
15309         * sinfo.ads, errout.ads: Typos in comments.
15310
15311 2011-08-01  Robert Dewar  <dewar@adacore.com>
15312
15313         * par-endh.adb: Minor reformatting.
15314
15315 2011-08-01  Robert Dewar  <dewar@adacore.com>
15316
15317         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15318         (Pre_Post_Aspects): New subtype.
15319         * par-ch12.adb (P_Generic): New syntax for aspects in packages
15320         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15321         * par-ch7.adb (P_Package): Remove Decl parameter
15322         (P_Package): Handle new syntax for aspects (before IS)
15323         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15324         new aspect syntax
15325         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15326         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15327         (P_Package): Remove Decl parameter
15328         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15329         aspects
15330         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15331         specs
15332         * sem_util.ads, sem_util.adb (Static_Boolean): New function
15333         * sinfo.ads: Document new syntax for aspects in packages etc.
15334         * sprint.adb: Handle new syntax of aspects before IS in package
15335
15336 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15337
15338         * atree.ads: Minor reformatting.
15339         * sem_prag.adb: Minor reformatting.
15340
15341 2011-08-01  Robert Dewar  <dewar@adacore.com>
15342
15343         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15344         case expr alternative.
15345
15346 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15347
15348         * sem_ch12.adb: Fix typo.
15349
15350 2011-08-01  Geert Bosch  <bosch@adacore.com>
15351
15352         * sem_prag.adb (Check_No_Link_Name): New procedure.
15353         (Process_Import_Or_Interface): Use Check_No_Link_Name.
15354         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15355         instead of Standard_Long_Long_Float_Size global. Preparation for
15356         eventual removal of per type constants.
15357         * exp_util.ads (Get_Stream_Size): New function returning the stream
15358         size value of subtype E.
15359         * exp_util.adb (Get_Stream_Size): Implement new function.
15360         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15361         function.
15362         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15363         * einfo.adb:
15364         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15365
15366 2011-08-01  Geert Bosch  <bosch@adacore.com>
15367
15368         * cstand.adb: Fix comments.
15369         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15370         count of arguments.
15371
15372 2011-08-01  Robert Dewar  <dewar@adacore.com>
15373
15374         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15375
15376 2011-08-01  Geert Bosch  <bosch@adacore.com>
15377
15378         * atree.ads: Fix comment.
15379
15380 2011-08-01  Robert Dewar  <dewar@adacore.com>
15381
15382         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15383         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15384         * par.adb: Add with for Namet.Sp.
15385         * par-tchk.adb: Minor reformatting.
15386
15387 2011-08-01  Vincent Celier  <celier@adacore.com>
15388
15389         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15390         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15391         of the init procedure of a SAL.
15392         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15393         New procedure.
15394
15395 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15396
15397         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15398         reformatting.
15399
15400 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15401
15402         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15403
15404 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15405
15406         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15407         conformant with its spec (return True only for types that have
15408         an overriding Initialize primitive operation that prevents them from
15409         having preelaborable initialization).
15410         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15411         initialization for controlled types in Ada 2005 or later mode.
15412
15413 2011-08-01  Robert Dewar  <dewar@adacore.com>
15414
15415         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15416         Postcondition.
15417         (Same_Aspect): New function.
15418         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15419         Type_Invariant, Precondition, Postcondition.
15420         * snames.ads-tmpl: Add Name_Type_Invariant.
15421
15422 2011-08-01  Robert Dewar  <dewar@adacore.com>
15423
15424         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15425         here.
15426         (Freeze_All_Ent): Fix error in handling inherited aspects.
15427         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15428         already analyzed, but don't skip entire processing of a declaration,
15429         that's wrong in some cases of declarations being rewritten.
15430         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15431         Don't delay for integer, string literals
15432         Treat predicates in usual manner for delay, remove special case code,
15433         not needed.
15434         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15435         (Build_Predicate_Function): Update saved expression in aspect
15436         (Build_Invariant_Procedure): Update saved expression in aspect
15437         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15438         of replacement of discriminant references if the reference is simple.
15439
15440 2011-08-01  Robert Dewar  <dewar@adacore.com>
15441
15442         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15443         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15444         Static_Predicate and Dynamic_Predicate.
15445         (Build_Predicate_Function): Add processing for Static_Predicate
15446         and Dynamic_Predicate.
15447         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15448         (From_Static_Predicate): New flag
15449         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15450
15451 2011-08-01  Robert Dewar  <dewar@adacore.com>
15452
15453         * usage.adb: Documentation cleanup for Ada version modes in usage.
15454         * expander.adb: Minor reformatting.
15455
15456 2011-08-01  Robert Dewar  <dewar@adacore.com>
15457
15458         * atree.ads: Minor comment fix.
15459         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15460         a-witeio.ads, sem_prag.adb: Minor reformatting.
15461
15462 2011-08-01  Doug Rupp  <rupp@adacore.com>
15463
15464         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15465         pointers. Use descrip.h header file for convenience. Add some
15466         comments.
15467
15468 2011-08-01  Robert Dewar  <dewar@adacore.com>
15469
15470         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15471         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15472         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15473         New procedure.
15474         (Check_Aspect_At_End_Of_Declarations): New procedure
15475         (Analye_Aspect_Specification): Minor changes for above procedures
15476         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15477         specification node as well.
15478
15479 2011-08-01  Pascal Obry  <obry@adacore.com>
15480
15481         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15482         Windows files. Use GetFilesAttributes() in this case to check for file
15483         existence instead of returning with an error code.
15484
15485 2011-08-01  Vincent Celier  <celier@adacore.com>
15486
15487         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15488         High is above Source length.
15489
15490 2011-08-01  Robert Dewar  <dewar@adacore.com>
15491
15492         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15493
15494 2011-08-01  Robert Dewar  <dewar@adacore.com>
15495
15496         * aspects.ads (Boolean_Aspects): New subtype.
15497         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15498         for derived types in cases where the parent type and derived type have
15499         aspects.
15500         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15501         with aspects when parent type also has aspects.
15502         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15503         boolean expression at this point).
15504         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15505         accordance with final decision on the Ada 2012 feature.
15506         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15507
15508 2011-08-01  Matthew Heaney  <heaney@adacore.com>
15509
15510         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15511
15512 2011-08-01  Pascal Obry  <obry@adacore.com>
15513
15514         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15515         Fix Replace_Slice when High is above current string size.
15516         (Replace_Slice): Fix DL computation when High is above current
15517         string length.
15518
15519 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
15520
15521         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15522
15523 2011-08-01  Matthew Heaney  <heaney@adacore.com>
15524
15525         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15526         of node.
15527
15528 2011-08-01  Pascal Obry  <obry@adacore.com>
15529
15530         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15531         reformatting.
15532
15533 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15534
15535         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15536         access to protected subprograms in generic bodies.
15537         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15538         protected type, indicate that the convention of the subprogram is
15539         Convention_Protected, because it may be used in subsequent declarations
15540         within the protected declaration.
15541
15542 2011-08-01  Vincent Celier  <celier@adacore.com>
15543
15544         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15545         and "final" procedures when the name of the library is "ada", to avoid
15546         duplicate symbols "adainit" and "adafinal" in executables.
15547
15548 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15549
15550         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15551         quantified expression that appears within a postcondition and uses the
15552         Ada2012 'Result attribute.
15553
15554 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15555
15556         * init.c (__gnat_error_handler): Cast reason to int.
15557         (__gnat_install_handler): Explain sa_sigaction use.
15558
15559 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15560
15561         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15562         subprogram has copy-in copy-out parameters, try to promote the mode of
15563         the return type if it is passed in registers.
15564
15565 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15566
15567         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15568         left operand as addressable.
15569
15570 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15571
15572         * gcc-interface/gigi.h (build_function_stub): Remove.
15573         (build_return_expr): Likewise.
15574         (convert_vms_descriptor): Declare.
15575         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15576         (build_function_stub): Move to...
15577         * gcc-interface/utils2.c (build_return_expr): Move to...
15578         * gcc-interface/trans.c (build_function_stub): ...here.
15579         (build_return_expr): ...here.
15580         (Subprogram_Body_to_gnu): Add local variable for language_function.
15581         Disconnect the parameter attributes cache, if any, once done with it.
15582         Call end_subprog_body only after setting the end_locus.
15583         Build the stub associated with the function, if any, at the very end.
15584         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15585         variables and streamline control flow.
15586
15587 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
15588
15589         PR ada/49819
15590         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15591         g-trasym-dwarf.adb.
15592
15593 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15594
15595         PR bootstrap/49794
15596         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15597         Assign to act.sa_sigaction.
15598         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15599         current->return_address to char * before arithmetic.
15600
15601 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15602
15603         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15604         Correct argument types.
15605         Extract code from reason.
15606         (__gnat_install_handler): Assign to act.sa_sigaction.
15607
15608 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
15609
15610         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15611         (GNAT1_OBJS): ...here.
15612
15613 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
15614
15615         PR ada/48711
15616         * g-socthi-mingw.adb (Fill): Fix formatting.
15617
15618         * gcc-interface/gigi.h: Move around comment.
15619
15620 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
15621
15622         PR ada/46350
15623         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15624
15625 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
15626
15627         PR ada/48711
15628         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15629
15630 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
15631
15632         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15633         range comparison if Pmode is SImode.
15634
15635 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
15636             Eric Botcazou  <ebotcazou@adacore.com>
15637
15638         * adadecode.c: Wrap up in extern "C" block.
15639         * adadecode.h: Likewise.
15640         * adaint.c: Likewise.  Remove 'const' keyword.
15641         * adaint.h: Likewise.
15642         * argv.c: Likewise.
15643         * atree.h: Likewise.
15644         * cio.c: Likewise.
15645         * cstreams.c: Likewise.
15646         * env.c: Likewise.
15647         * exit.c: Likewise.
15648         * fe.h: Likewise.
15649         * final.c: Likewise.
15650         * init.c: Likewise.
15651         * initialize.c: Likewise.
15652         * link.c: Likewise.
15653         * namet.h: Likewise.
15654         * nlists.h: Likewise.
15655         * raise.c: Likewise.
15656         * raise.h: Likewise.
15657         * repinfo.h: Likewise.
15658         * seh_init.c: Likewise.
15659         * targext.c: Likewise.
15660         * tracebak.c: Likewise.
15661         * uintp.h: Likewise.
15662         * urealp.h: Likewise.
15663         * xeinfo.adb: Wrap up generated C code in extern "C" block.
15664         * xsinfo.adb: Likewise.
15665         * xsnamest.adb: Likewise.
15666         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15667         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15668         * gcc-interface/misc.c: Likewise.
15669         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15670         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
15671         ada/targext.o here...
15672         (GNAT_ADA_OBJS): ...and not here.
15673         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15674         (GNATBIND_OBJS): Reorder.
15675
15676 2011-07-07  Richard Henderson  <rth@redhat.com>
15677
15678         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15679         dwarf2out_frame_init.
15680
15681 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
15682
15683         * gcc-interface/misc.c (gnat_init): Tweak previous change.
15684
15685 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15686
15687         PR target/39150
15688         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15689
15690 2011-07-06  Richard Guenther  <rguenther@suse.de>
15691
15692         * gcc-interface/misc.c (gnat_init): Merge calls to
15693         build_common_tree_nodes and build_common_tree_nodes_2.
15694         Re-initialize boolean_false_node.
15695
15696 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
15697             Olivier Hainque  <hainque@adacore.com>
15698             Nicolas Setton  <setton@adacore.com>
15699
15700         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15701         the type according to the ARTIFICIAL_P parameter.
15702         (create_type_decl): Likewise.
15703         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15704
15705 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
15706
15707         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15708         (gnatbind): Likewise.
15709
15710 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15711
15712         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15713
15714 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15715
15716         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15717         local variable throughout.  Remove useless call to Base_Type.
15718         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15719         Take it also into account for the volatileness of the field.  Set the
15720         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
15721
15722 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15723
15724         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15725         on a dereference built for a by-ref object if it has an address clause.
15726
15727 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15728
15729         * einfo.ads (Address_Taken): Document use for the second argument of
15730         Asm_Input and Asm_Output attributes.
15731         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15732         argument is an entity name, then set Address_Taken on it.
15733         <Attribute_Asm_Output>: Likewise.
15734         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15735         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15736         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15737         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15738
15739 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
15740
15741         PR middle-end/46500
15742         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15743
15744 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
15745
15746         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15747         (ada/utils.o): Update dependencies.
15748         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15749         ../../../libcpp/libcpp.a.
15750         * gcc-interface/utils.c: Include common/common-target.h.
15751         (process_attributes): Use targetm_common.have_named_sections.
15752
15753 2011-06-07  Richard Guenther  <rguenther@suse.de>
15754
15755         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15756         set_sizetype.
15757
15758 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15759
15760         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
15761         TREE_THIS_NOTRAP flag.
15762
15763 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15764
15765         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15766         Fix thinko.
15767
15768 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15769
15770         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15771         constants whose full view has discriminants specially.
15772
15773 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15774
15775         * gcc-interface/utils.c: Include diagnostic.h.
15776         (gnat_write_global_declarations): Output debug information for all
15777         global type declarations before finalizing the compilation unit.
15778         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15779
15780 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
15781
15782         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15783
15784 2011-05-25  Kai Tietz  <ktietz@redhat.com>
15785
15786         * adaint.c (__gnat_to_canonical_file_list_next): Use array
15787         initialization instead of const/none-const pointer assignment.
15788
15789 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
15790
15791         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15792         $(EXTRA_GNAT1_OBJS).
15793         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15794         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15795         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15796         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15797         libcommon-target.a instead of prefix.o.
15798
15799 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
15800
15801         PR ada/49097
15802         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
15803
15804 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
15805
15806         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15807         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15808         instead of version.o.
15809
15810 2011-05-18  Kai Tietz  <ktietz@redhat.com>
15811
15812         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15813         boolean_false_node instead of integer_zero_node.
15814         (convert_with_check): Likewise.
15815         * gcc-interface/decl.c (choices_to_gnu): Likewise.
15816
15817 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
15818
15819         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15820         type of the parameter is an unconstrained array, convert the actual to
15821         the type of the formal in the In Out and Out cases as well.
15822
15823 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
15824
15825         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15826         call build_function_type_array or build_varargs_function_type_array
15827         instead.
15828         (create_subprog_type): Don't call build_function_type; call
15829         build_function_type_vec instead.
15830
15831 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
15832
15833         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15834         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15835         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15836
15837 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
15838
15839         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15840
15841         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15842         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15843
15844 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
15845
15846         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
15847
15848 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
15849
15850         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15851         instead of accessing TYPE_ARG_TYPES directly.
15852         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15853
15854 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
15855
15856         PR ada/48844
15857         * gcc-interface/gigi.h (get_variant_part): Declare.
15858         * gcc-interface/decl.c (get_variant_part): Make global.
15859         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15860         types have the same constant size, are record types and T1 has a
15861         variant part while T2 doesn't.
15862
15863 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
15864
15865         * gcc-interface/utils.c (begin_subprog_body): Do not call
15866         get_pending_sizes.
15867         (end_subprog_body): Likewise.
15868
15869 2011-05-04  Richard Guenther  <rguenther@suse.de>
15870
15871         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15872         int_const_binop.
15873         (pos_to_constructor): Likewise.
15874
15875 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
15876             Eric Botcazou  <ebotcazou@adacore.com>
15877
15878         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15879         of build_function_type.  Adjust calls to...
15880         (build_raise_check): ...this.  Do not take a void_tree parameter.
15881         Call build_function_type_list instead of build_function_type.
15882         Fix head comment and swap couple of conditional blocks.
15883
15884 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
15885
15886         * gnatvsn.ads (Library_Version): Bump to 4.7.
15887         (Current_Year): Bump to 2011.
15888
15889 2011-04-29  Michael Matz  <matz@suse.de>
15890
15891         * gcc-interface/misc.c (gnat_handle_option): Set
15892         warn_maybe_uninitialized.
15893
15894 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
15895
15896         * gnat_ugn.texi (Complexity Metrics Control): Update link to
15897         the Watson/McCabe paper.
15898
15899 2011-04-23  Jim Meyering  <meyering@redhat.com>
15900
15901         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15902
15903 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
15904
15905         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15906         onto the new type.
15907
15908 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
15909
15910         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15911         parameter.
15912         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
15913         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15914         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15915         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15916         <all>: Do not set flags on the reused DECL node coming from an alias.
15917         Set DECL_IGNORED_P on the DECL node built for subprograms if they
15918         don't need debug info here...
15919         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15920         (gigi): Adjust calls to create_subprog_decl.
15921         (build_raise_check): Likewise.
15922         (establish_gnat_vms_condition_handler): Likewise.
15923         (Compilation_Unit_to_gnu): Likewise.
15924         (gnat_to_gnu): Likewise.
15925
15926 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
15927
15928         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15929         (NO_REORDER_ADAFLAGS): New variable.
15930         (EXTRA_GNATTOOLS): Always define.
15931         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15932         Clean up and adjust list of files compiled with special options.
15933         * gcc-interface/Make-lang.in: Likewise.
15934         (ada/decl.o): Cosmetical change.
15935         (ada/misc.o): Remove dependency on $(PLUGIN_H).
15936
15937 2011-04-20  Jim Meyering  <meyering@redhat.com>
15938
15939         * initialize.c (__gnat_initialize): Remove useless if-before-free.
15940
15941 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
15942
15943         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15944         $(CFLAGS) on the link line.
15945
15946 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
15947
15948         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15949         padded type built for the return type if it is unconstrained.
15950
15951 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
15952
15953         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15954
15955 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
15956
15957         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15958         before calling TREE_CHAIN.
15959         * gcc-interface/misc.c (gnat_init_ts): New function.
15960         (LANG_HOOKS_INIT_TS): Define.
15961
15962 2011-04-12  Martin Jambor  <mjambor@suse.cz>
15963
15964         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15965         instead of cgraph_node.
15966
15967 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
15968
15969         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15970         alignment on fields of the RETURN type built for the Copy-In Copy-Out
15971         mechanism.
15972
15973 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
15974
15975         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15976         of aggregate types that contain a placeholder.
15977
15978 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
15979
15980         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
15981         TYPE_ARG_TYPES.
15982         (handle_type_generic_attribute): Likewise.
15983
15984 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
15985
15986         PR ada/47163
15987         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15988
15989 2011-04-04  Kai Tietz  <ktietz@redhat.com>
15990
15991         PR ada/47163
15992         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15993         to flag value.
15994
15995 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
15996
15997         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15998         type case, do not strip a padding type around the array type.
15999
16000 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16001
16002         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
16003         types.
16004
16005 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16006
16007         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
16008         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
16009         code for -feliminate-unused-debug-types.
16010         (gnat_post_options): Likewise.
16011
16012 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16013
16014         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16015         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
16016         distinct copy.
16017
16018 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16019
16020         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
16021         DECL_ARTIFICIAL flag on enumeration types.
16022
16023 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16024
16025         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
16026         fat pointer types artificial unconditionally.
16027         <E_Array_Subtype>: Attach the base array type as a parallel type if it
16028         isn't artificial.
16029
16030 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16031
16032         * gcc-interface/gigi.h (get_dummy_type): Declare.
16033         (build_dummy_unc_pointer_types): Likewise.
16034         (finish_fat_pointer_type): Likewise.
16035         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
16036         fat pointer type has been built, complete it in place.
16037         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
16038         and thin pointers.  Remove useless variable.
16039         (finish_fat_pointer_type): Make global and move to...
16040         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
16041         (get_dummy_type): New function.
16042         (build_dummy_unc_pointer_types): Likewise.
16043         (gnat_pushdecl): Propage the name to the anonymous variants only.
16044         (update_pointer_to): Only adjust the pointer types in the unconstrained
16045         array case.
16046
16047 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16048
16049         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
16050         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
16051         if this is a Taft amendment type and the full declaration is available.
16052         * gcc-interface/trans.c (process_type): Likewise.
16053         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
16054         (process_freeze_entity): Likewise.
16055         * gcc-interface/utils.c (dummy_global): New static variable.
16056         (gnat_write_global_declarations): If there are types declared as used
16057         at the global level, insert them in the global hash table.
16058
16059 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16060
16061         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
16062         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16063         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
16064         copy.
16065         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
16066         flag of the type accordingly.
16067         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
16068
16069 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16070
16071         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16072         finalizing types when updating the pointers to the designated type.
16073         <all>: Finalize the deferred types even if we didn't defer processing
16074         of incomplete types in this invocation.
16075
16076 2011-04-01  Olivier Hainque  <hainque@adacore.com>
16077             Nicolas Setton  <setton@adacore.com>
16078             Eric Botcazou  <ebotcazou@adacore.com>
16079
16080         * gcc-interface/misc.c (gnat_descriptive_type): New function.
16081         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
16082
16083 2011-03-28  Kai Tietz  <ktietz@redhat.com>
16084
16085         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
16086         Windows targets.
16087         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
16088         * system-mingw.ads (System): Change ZCX_By_Default default to True.
16089
16090         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
16091
16092 2011-03-28  Tristan Gingold  <gingold@adacore.com>
16093
16094         PR ada/44431
16095         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
16096         Use ada output of gnatbind.
16097         (ada/b_gnatb.adb): Ditto.
16098         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
16099         (ada.mostlyclean, ada.stage1)
16100         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
16101         (ada.stagefeedback): Adjust.
16102         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
16103         Use ada output of gnatbind.
16104         (b_gnatm.adb): Ditto.
16105         (b_gnatl.o, b_gnatm.o): New rules.
16106
16107 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
16108
16109         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16110         for the padded type built to support a specified size or alignment.
16111
16112 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
16113
16114         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
16115         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16116         unconditionally to the end of the unit when the designated type is
16117         limited_with'ed.
16118         <all>: Rename local variable.  Attempt to un-defer types only and do it
16119         for limited_with'ed types as well.
16120         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
16121         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
16122         consistently and remove redundant call to finalize_from_with_types.
16123
16124 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
16125
16126         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
16127         subprograms without a previous spec declared in the same unit.
16128         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
16129         subprograms at the end of the unit instead of at the beginning.
16130         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
16131         isn't public for the special handling of non-inline functions nested
16132         inside inline external functions.
16133
16134 2011-03-25  Jeff Law  <law@redhat.com>
16135
16136         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
16137
16138 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
16139
16140         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
16141         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
16142         to compute Set_Size_Depends_On_Discriminant.
16143         (Layout_Type): Call it on array types in back-end layout mode.
16144         * sem_util.adb (Requires_Transient_Scope): Return true for array
16145         types only if the size depends on the value of discriminants.
16146         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
16147         type if the RHS is a call to a function that returns an unconstrained
16148         type with default discriminant.
16149
16150 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
16151
16152         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
16153         non-conversion to the nominal result type at the end.
16154
16155 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16156
16157         * gcc-interface/trans.c (create_temporary): New function taken from...
16158         (create_init_temporary): ...here.  Call it.
16159         (call_to_gnu): Create the temporary for the return value early, if any.
16160         Create it for a function with copy-in/copy-out parameters if there is
16161         no target; in other cases of copy-in/copy-out, use another temporary.
16162         Push the new binding level lazily.  Add and rename local variables.
16163
16164 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16165
16166         * gcc-interface/decl.c (validate_size): Improve comments and tweak
16167         error message.
16168         (set_rm_size): Likewise.
16169
16170 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16171
16172         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16173         for the padded type built in order to support a specified alignment.
16174         Fix incorrect formatting.
16175
16176 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16177
16178         PR bootstrap/48216
16179         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16180
16181 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16182
16183         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16184         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16185         to the end of the list.  Adjust recursive call.  Rename local variable.
16186         If REORDER is true, reorder components of the record type.
16187         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16188         components_to_record and adjust the parameter list.
16189
16190 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16191
16192         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16193         disabled, use the variable for bounds of loop iteration scheme.
16194
16195 2011-03-21  Kai Tietz  <ktietz@redhat.com>
16196
16197         PR target/12171
16198         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16199
16200 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
16201
16202         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16203         out whether the expression is read-only.  Short-circuit placeholder
16204         case and rename a couple of local variables.
16205
16206 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
16207
16208         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16209         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16210         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16211         (convert): Deal with conversions from a smaller form type specially.
16212
16213 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
16214
16215         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16216         its argument, except for the special -I- switch.
16217
16218 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
16219
16220         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16221         "Ada Issues".
16222
16223 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
16224
16225         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16226
16227 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
16228
16229         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16230         GNAT_FORMAL.
16231         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16232         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
16233         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
16234         Do not generate the check directly, instead instantiate the template
16235         check present in the descriptor.
16236         (make_descriptor_field): Move around.
16237         (build_vms_descriptor32): Build a template check in the POINTER field.
16238         (build_vms_descriptor): Remove useless suffixes.
16239         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16240
16241 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
16242
16243         PR bootstrap/47467
16244         * targext.c: Include target files if IN_RTS is defined.
16245
16246 2011-01-26  Richard Guenther  <rguenther@suse.de>
16247
16248         PR bootstrap/47467
16249         * targext.c: Include config.h.
16250         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16251         dependency.
16252
16253 2011-01-04  Pascal Obry  <obry@adacore.com>
16254             Eric Botcazou  <ebotcazou@adacore.com>
16255
16256         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16257
16258 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16259
16260         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16261         end-of-case on the end label and its associated gotos, if any.
16262
16263 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16264
16265         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16266         expressions of the parameter cache within the statement group of
16267         the CICO mechanism.
16268
16269 2011-01-04  Olivier Hainque  <hainque@adacore.com>
16270             Eric Botcazou  <ebotcazou@adacore.com>
16271
16272         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16273         (set_end_locus_from_node): New function.
16274         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16275         make and the function end_locus.
16276         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16277         for the elaboration subprogram.
16278         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16279         set the end_locus of the expression as well.
16280
16281 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16282
16283         PR ada/47131
16284         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16285         variables that are referenced in exception handlers volatile.
16286
16287
16288 \f
16289 Copyright (C) 2011 Free Software Foundation, Inc.
16290
16291 Copying and distribution of this file, with or without modification,
16292 are permitted in any medium without royalty provided the copyright
16293 notice and this notice are preserved.