OSDN Git Service

5092d57b397aa6532bddc5ef5624cacf429f1c87
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2011-11-21  Gary Dismukes  <dismukes@adacore.com>
2
3         * sem_elab.adb: Minor reformatting
4
5 2011-11-21  Robert Dewar  <dewar@adacore.com>
6
7         * exp_ch6.adb: Minor reformatting.
8
9 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
10
11         * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
12         subprogram of the formal package is covered by an others
13         association with a box initialization, no check is needed
14         against the actual in the instantiation of the formal package.
15
16 2011-11-21  Robert Dewar  <dewar@adacore.com>
17
18         * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
19         elab warning from within precondition/postcondition etc.
20
21 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
22
23         * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
24         with out parameters may generate assignments to force constraint
25         checks. These checks must be properly placed in the code after the
26         declaration or statement that contains the call.
27
28 2011-11-21  Fedor Rybin  <frybin@adacore.com>
29
30         * gnat_ugn.texi: Adding info on current gnattest limitations an
31         support of -X option.
32
33 2011-11-21  Robert Dewar  <dewar@adacore.com>
34
35         * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
36
37 2011-11-20  Robert Dewar  <dewar@adacore.com>
38
39         * exp_ch6.adb, exp_util.adb: Minor reformatting
40
41 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
42
43         * sinfo.ads (Reference): Document that it is OK to set
44         Is_Known_Non_Null on a temporary initialized to a N_Reference
45         node.
46
47 2011-11-20  Matthew Heaney  <heaney@adacore.com>
48
49         * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
50         for Source list.
51
52 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
53
54         * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
55         Declare NEW_EXPR local variable and attach the
56         temporary to it.  Set Is_Known_Non_Null on the temporary.
57         (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
58         * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
59         the temporary created to hold the 'Reference of the expression,
60         if any.
61         * checks.adb (Install_Null_Excluding_Check): Bail out for the
62         Get_Current_Excep.all.all idiom generated by the expander.
63
64 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
65
66         * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
67         (f_gnat_ret): New macro.
68         (struct nrv_data): Add GNAT_RET.
69         (finalize_nrv_unc_r): New helper function.
70         (finalize_nrv): Add GNAT_RET parameter.  Copy it into DATA.  If the
71         function returns unconstrained, use finalize_nrv_unc_r as callback.
72         (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
73         RET_OBJ is non-null.
74         (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
75         (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
76         if optimization is enabled, record candidates for the Named Return
77         Value optimization.
78
79 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
80
81         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
82         (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
83         test.  Tweak default case.
84         <N_Goto_Statement>: Use better formatting.
85         * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
86         MODIFY_EXPR to initialize the storage.
87         (build_allocator): Likewise.
88
89 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
90
91         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
92         call to components_to_record.
93         (components_to_record): Add FIRST_FREE_POS parameter.  For the variant
94         part, reuse enclosing union even if there is a representation clause
95         on the Unchecked_Union.  If there is a variant part, compute the new
96         first free position, if any.  Adjust call to self.  Use a single field
97         directly only if it hasn't got a representation clause or is placed at
98         offset zero.  Create the variant part at offset 0 if all the fields
99         down to this level have a rep clause.  Do not chain the variant part
100         immediately and adjust downstream.
101         Do not test ALL_REP before moving the fields without rep clause to the
102         previous level.  Call create_rep_part to create the REP part and force
103         a minimum size on it if necessary.  Do not chain it immediately.
104         Create a fake REP part if there are fields without rep clause that need
105         to be laid out starting from FIRST_FREE_POS.
106         At the end, chain the REP part and then the variant part.
107         (create_rep_part): New function.
108         (get_rep_part): Minor tweak.
109         * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
110
111 2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
112
113         PR target/50678
114         * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
115         bug filed as radar #10302855 from __gnat_error_handler to...
116         (__gnat_adjust_context_for_raise) [Darwin]: ...here.  New function.
117         (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
118
119 2011-11-18  Tristan Gingold  <gingold@adacore.com>
120             Iain Sandoe  <iains@gcc.gnu.org>
121
122         PR target/49992
123         * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
124         * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
125
126 2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
127
128         * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
129         s-oscons.ads.
130         (OSCONS_CPP, OSCONS_EXTRACT): New.
131         (./bldtools/oscons/xoscons): New target.
132         ($(RTSDIR)/s-oscons.ads): Likewise.
133         (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
134         * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
135         * Make-generated.in: Remove machinery to generate xoscons and
136         ada/s-oscons.ads.
137
138 2011-11-10  Eric Botcazou  <ebotcazou@adacore.com>
139
140         * fe.h (Serious_Errors_Detected): New macro.
141         * gcc-interface/gigi.h (build_atomic_load): Declare.
142         (build_atomic_store): Likewise.
143         * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
144         (call_to_gnu): Add ATOMIC_SYNC parameter.  Use local variable.
145         Build an atomic load for an In or In Out parameter if needed.
146         Build an atomic store for the assignment of an Out parameter if needed.
147         Build an atomic store to the target if ATOMIC_SYNC is true.
148         (present_in_lhs_or_actual_p): New predicate.
149         (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
150         <N_Explicit_Dereference>: Likewise.
151         <N_Indexed_Component>: Likewise.
152         <N_Selected_Component>: Likewise.
153         <N_Assignment_Statement>: Adjust call to call_to_gnu.
154         Build an atomic store to the LHS if needed.
155         <N_Function_Call>:  Adjust call to call_to_gnu.
156         * gcc-interface/utils2.c: Include toplev.h.
157         (resolve_atomic_size): New static function.
158         (build_atomic_load): New function.
159         (build_atomic_store): Likewise.
160         * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
161
162 2011-11-07  Olivier Hainque  <hainque@adacore.com>
163
164         * sigtramp-ppcvxw.c: Add general comments.
165         (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
166         rules for r2 to r13, plus CTR and XER.
167         (CFA_REG): New, register number used to hold the local CFA.
168         (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
169         Make that 15, not 14, with documentation.
170         (TCR): Undef before definition, preventing conflict with reg number in
171         VxWorks headers.
172
173 2011-11-07  Robert Dewar  <dewar@adacore.com>
174
175         * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
176         aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
177         * gcc-interface/Make-lang.in: Update dependencies.
178
179 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
180
181         * exp_ch6.adb: A tagged type is a legal actual for an aliased
182         formal.
183
184 2011-11-07  Pascal Obry  <obry@adacore.com>
185
186         * g-socket.adb, g-socket.ads: Minor reformatting.
187
188 2011-11-07  Robert Dewar  <dewar@adacore.com>
189
190         * sem_res.adb (Resolve_Actuals): Minor error message improvement.
191
192 2011-11-07  Robert Dewar  <dewar@adacore.com>
193
194         * gnat_ugn.texi: Add discussion of default mode handling of
195         source representation with no -gnatW option given, in particular
196         noting that NEL (next line) is not recognized in this context.
197
198 2011-11-07  Yannick Moy  <moy@adacore.com>
199
200         * sem_util.adb (Note_Possible_Modification): In Alfa mode,
201         generate a reference for a modification even when the modification
202         does not come from source.
203
204 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
205
206         * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
207         use the indexing attributes rather than the Element function,
208         to obtain variable references.
209         * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
210         Find_Aspect rather than iterating over representation
211         items. Improve error message.
212         * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
213         of Reference functions.
214
215 2011-11-07  Yannick Moy  <moy@adacore.com>
216
217         * sem_util.adb (Unique_Entity): For a parameter on a subprogram
218         body that has a corresponding parameter on the subprogram
219         declaration, define the unique entity as being the declaration
220         one.
221
222 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
223
224         * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
225         return type of a function is the class-wide type of an incomplete
226         type T, T can be a Taft-amendment type and does not have to be
227         completed in the current private part.
228
229 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
230
231         * aspects.ads (Inherited_Aspect): Map that indicates type aspects
232         that are inherited by default, and apply to the class-wide type
233         as well.
234         * aspects.adb (Find_Aspect): If the entity is class-wide and the
235         aspect is inherited, use the aspect of the specific type.
236
237 2011-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
238
239         * exp_alfa.adb: Remove with and use clause for
240         Exp_Ch8. Add with and use clause for Exp_Util.
241         Remove local constant Disable_Processing_Of_Renamings.
242         (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
243         object renamings has been reenabled.
244         (Expand_Possible_Renaming):
245         The expansion of identifier and expanded names has been
246         reenabled. Perform the substitutions only for entities that
247         denote an object.
248         * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
249         * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
250         (Remove_Side_Effects): Alphabetize local variables. Add a guard
251         to avoid the infinite expansion of an expression in Alfa mode. Add
252         processing for function calls in Alfa mode.
253         * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
254
255 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
256
257         * freeze.adb (Freeze_Entity): If the entity is an access to
258         subprogram whose designated type is itself a subprogram type,
259         its own return type must be decorated with size information.
260
261 2011-11-04  Arnaud Charlet  <charlet@adacore.com>
262
263         * gcc-interface/Make-lang.in: Update dependencies.
264
265 2011-11-04  Robert Dewar  <dewar@adacore.com>
266
267         * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
268         Avoid junk semicolon after argument of machine code Asm operand.
269
270 2011-11-04  Robert Dewar  <dewar@adacore.com>
271
272         * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
273         CodePeer mode or if restriction No_Exception_Handlers is present.
274         * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
275         nodes in CodePeer mode or if restriction No_Exception_Handlers
276         is present.
277
278 2011-11-04  Robert Dewar  <dewar@adacore.com>
279
280         * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
281
282 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
283
284         * sem_ch6.adb (Analyze_Subprogram_Specification): The
285         specification is legal if it is a function that returns an
286         abstract type, if it comes from an attribute renaming of a stream
287         attribute of an abstract type.
288
289 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
290
291         * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
292         components, check whether recursively check whether the prefix
293         denotes an unaligned object.
294
295 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
296
297         * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
298         the pragma is legal if it is an expanded name that denotes a
299         procedure that be can called without parameters.
300
301 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
302
303         * gnat_ugn.texi (Performance Considerations) <Vectorization
304         of loops>: New sub-section.  <Other Optimization Switches>:
305         Minor tweak.
306
307 2011-11-04  Robert Dewar  <dewar@adacore.com>
308
309         * gnat_rm.texi: Minor reformatting.
310
311 2011-11-04  Matthew Heaney  <heaney@adacore.com>
312
313         * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
314         when Target and Source denote same non-empty object
315         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
316
317 2011-11-04  Robert Dewar  <dewar@adacore.com>
318
319         * exp_attr.adb: Minor reformatting.
320
321 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
322
323         * exp_ch5.adb (Expand_Assign_Record): Do not generate a
324         discriminant assignment within an initialization proc if the
325         record is an unchecked union, as it can only come from the
326         initialization of an unchecked union component.
327
328 2011-11-04  Robert Dewar  <dewar@adacore.com>
329
330         * gnat_ugn.texi: Minor reformatting.
331
332 2011-11-04  Robert Dewar  <dewar@adacore.com>
333
334         * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
335         warning message.
336
337 2011-11-04  Robert Dewar  <dewar@adacore.com>
338
339         * exp_ch4.adb: Minor code reorganization (remove junk obsolete
340         var Save_Space).
341
342 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
343
344         * exp_alfa.adb: Add local constant
345         Disable_Processing_Of_Renamings;
346         (Expand_Alfa_N_Object_Renaming_Declaration): Disable
347         the name evaluation of object renamings for now.
348         (Expand_Potential_Renaming): Do not perform the substitution
349         for now.
350         * exp_util.adb (Remove_Side_Effects): Remove processing for
351         functions with side effects in Alfa mode.
352
353 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
354
355         * bindgen.adb (Gen_Elab_Calls): In the case
356         of the AAMP target, set elaboration entities to 1 rather than
357         incrementing.
358
359 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
360
361         * sem_ch10.adb (Install_Limited_With_Unit): To establish the
362         proper entities on the ancestors of a child unit that appear
363         in a limited_with clause, follow the unit links because the
364         units are not analyzed and scope information is incomplete.
365
366 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
367
368         * exp_ch4.adb (Expand_N_Selected_Component): Refine code
369         setting the Atomic_Sync_Required flag to detect one more case.
370         * exp_util.adb (Activate_Atomic_Synchronization): Refine code
371         setting the Atomic_Sync_Required flag to exclude more cases,
372         depending on the parent of the node to be examined.
373
374 2011-11-04  Bob Duff  <duff@adacore.com>
375
376         * g-excact.adb: Minor: use named notation.
377
378 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
379
380         * sem_ch5.adb: Improve error messages for illegal iterators.
381
382 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
383
384         * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
385         Sem_Util.
386         (Expand_Alfa): Alphabetize cases on first choice. Add
387         processing for object renaming declarations, identifiers and
388         expanded names.
389         (Expand_Alfa_N_In): Remove useless return.
390         (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
391         (Expand_Potential_Renaming): New routine.
392         * exp_ch8.adb (Evaluate_Name): Moved to the top level.
393         (Expand_N_Object_Declaration): Alphabetize local variables. Move
394         Evaluate_Name out to the top level.
395         * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
396         * exp_util.adb (Remove_Side_Effects): Add processing for
397         functions with side effects in Alfa mode.
398
399 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
400
401         * gnat_rm.texi: Add entries for
402         restrictions No_Relative_Delay, No_Requeue_Statements and
403         No_Stream_Optimizations.
404
405 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
406
407         * sem_ch4.adb: Set type of entity in prefixed call, for
408         completeness in a generic context.
409
410 2011-11-04  Yannick Moy  <moy@adacore.com>
411
412         * sem_prag.adb: Minor refactoring (renaming of a parameter).
413
414 2011-11-04  Robert Dewar  <dewar@adacore.com>
415
416         * atree.ads: Minor reformatting.
417
418 2011-11-04  Robert Dewar  <dewar@adacore.com>
419
420         * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
421         and -gnatd.e here
422         * exp_ch2.adb (Expand_Entity_Reference): Use
423         Activate_Atomic_Synchronization
424         * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
425         Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
426         Activate_Atomic_Synchronization (Expand_N_Selected_Component):
427         Use Activate_Atomic_Synchronization
428         * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
429         procedure.
430         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
431         N_Selected_Component node
432
433 2011-11-04  Robert Dewar  <dewar@adacore.com>
434
435         * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
436
437 2011-11-04  Yannick Moy  <moy@adacore.com>
438
439         * atree.adb, atree.ads (Set_Original_Node): New set procedure.
440         * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
441         In ASIS mode, no splitting of aspects between conjuncts.
442         (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
443         expressions refer to the original aspect expressions through
444         the Original_Node link. This is used in semantic analysis for
445         ASIS mode, so that the original expression also gets analyzed.
446         * sem_prag.adb (Preanalyze_TC_Args,
447         Check_Precondition_Postcondition,
448         Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
449         generated from a source aspect, also analyze the original aspect
450         expression.
451         (Check_Expr_Is_Static_Expression): New procedure
452         similar to existing procedure Check_Arg_Is_Static_Expression,
453         except called on expression inside pragma.
454
455 2011-11-04  Tristan Gingold  <gingold@adacore.com>
456
457         * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
458         Find_Project.Try_Path_Name.
459         (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
460
461 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
462
463         * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
464
465 2011-11-04  Pascal Obry  <obry@adacore.com>
466
467         * projects.texi: Add short description for qualifiers aggregate
468         and aggregate library.
469
470 2011-11-04  Matthew Heaney  <heaney@adacore.com>
471
472         * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
473         * a-cgaaso.adb: Replaced implementation with instantiation
474         of Generic_Sort.
475         * a-cogeso.ad[sb] This is the new Ada 2012 unit
476         Ada.Containers.Generic_Sort
477
478 2011-11-04  Robert Dewar  <dewar@adacore.com>
479
480         * exp_ch2.adb (Expand_Entity_Reference): Do not set
481         Atomic_Sync_Required for the case of a prefix of an attribute.
482         * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
483         atomic synchronization
484         (Expand_N_Indexed_Component): Ditto.
485         (Expand_B_Selected_Component): Ditto.
486         * sem_prag.adb (Process_Suppress_Unsuppress):
487         Disable/Enable_Atomic_Synchronization can now occur for array
488         types with pragma Atomic_Components.
489         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
490         N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
491
492 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
493
494         * gnat_ugn.texi: Editorial corrections for gnattest section.
495
496 2011-11-04  Robert Dewar  <dewar@adacore.com>
497
498         * sem_prag.adb: Minor reformatting.
499         * gnat_rm.texi: Update documentation for pragma Warnings (Off,
500         "***") usage.
501         * exp_ch2.adb (Expand_Entity_Reference): Only set
502         Atomic_Sync_Required on entities that are variables. Doesn't
503         make any sense on anything else.
504
505 2011-11-04  Robert Dewar  <dewar@adacore.com>
506
507         * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
508         atomic sync to type case.
509         * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
510         apply to types.
511
512 2011-11-04  Robert Dewar  <dewar@adacore.com>
513
514         * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
515         for call vs assign.
516         * gcc-interface/Make-lang.in: Update dependencies.
517
518 2011-11-04  Robert Dewar  <dewar@adacore.com>
519
520         * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
521         compile time.
522
523 2011-11-04  Matthew Heaney  <heaney@adacore.com>
524
525         * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
526         * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
527         a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
528         * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
529         a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
530         a-sulcin.ad[sb]: New files.
531
532 2011-11-04  Geert Bosch  <bosch@adacore.com>
533
534         * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
535         s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
536         i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
537         s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
538         * gcc-interface/Makefile.in: Remove libgnala and related objects.
539
540 2011-11-04  Matthew Heaney  <heaney@adacore.com>
541
542         * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
543         a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
544         a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
545         a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
546         added to package.
547
548 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
549
550         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
551         that the type of the parameters isn't dummy in type_annotate_only mode.
552
553 2011-11-04  Robert Dewar  <dewar@adacore.com>
554
555         * sem_ch12.adb: Minor reformatting
556
557 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
558
559         * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
560         initialize elaboration entities to zero when specs are processed.
561
562 2011-10-28  Iain Sandoe  <iains@gcc.gnu.org>
563             Eric Botcazou  <ebotcazou@adacore.com>
564
565         PR target/50678
566         * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
567         bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
568
569 2011-10-28  Eric Botcazou  <ebotcazou@adacore.com>
570
571         PR ada/50842
572         * gcc-interface/Makefile.in (SYMDEPS): Delete.
573         (LIBICONV): New variable.
574         (LIBICONV_DEP): Likewise.
575         (LIBS): Add $(LIBICONV).
576         (LIBDEPS): Add $(LIBICONV_DEP).
577         (EXTRA_GNATTOOLS_OBJS): Merge into...
578         (TOOLS_LIBS): ...this.  Add $(LIBICONV).
579
580 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
581
582         * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
583         variable.  Always create the elaboration variable, if any, as constant.
584
585 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
586
587         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
588         make a packable type for fields of union types as well.
589         <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
590         (gnat_to_gnu_component_type): Try to make a packable type for fields
591         of union types as well.
592         (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
593         (maybe_pad_type): Try to make a packable type for fields of union types
594         as well.
595         (gnat_to_gnu_field): Likewise.
596         (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
597         (set_rm_size): Likewise.
598         (rm_size): Likewise.
599         * gcc-interface/misc.c (gnat_type_max_size): Likewise.
600         * gcc-interface/trans.c (add_decl_expr): Likewise.
601         * gcc-interface/utils.c (finish_record_type): Likewise.
602         * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
603
604 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
605
606         * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
607         declared as atomic.  Move around conditionally executed code.
608
609 2011-10-24  Robert Dewar  <dewar@adacore.com>
610
611         * sem.adb (Initialize): Fix bug that blew up if called a second time.
612
613 2011-10-24  Robert Dewar  <dewar@adacore.com>
614
615         * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
616         tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
617
618 2011-10-24  Robert Dewar  <dewar@adacore.com>
619
620         * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
621         name in error msg.
622
623 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
624
625         * gnat_rm.texi: Add an entry for restriction No_Finalization.
626
627 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
628
629         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
630         current instance is within the one that contains the generic,
631         the freeze node for the current one must appear in the current
632         declarative part. Ditto if the current instance is within another
633         package instance. In both of these cases the freeze node of the
634         previous instance is not relevant.
635
636 2011-10-24  Gary Dismukes  <dismukes@adacore.com>
637
638         * switch-m.adb (Normalize_Compiler_Switches): Add recognition
639         of AAMP-specific switches -univ and -aamp_target.
640
641 2011-10-24  Robert Dewar  <dewar@adacore.com>
642
643         * a-tienau.adb (Put): Deal properly with limited line length.
644
645 2011-10-24  Robert Dewar  <dewar@adacore.com>
646
647         * sem_warn.adb, sem_ch12.adb: Minor reformatting.
648
649 2011-10-24  Tristan Gingold  <gingold@adacore.com>
650
651         * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
652         on AIX.
653
654 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
655
656         * sem_ch12.adb (Earlier): make available globally. If both
657         nodes have the same sloc, the freeze node that does not come
658         from source is the later one.
659         (True_Parent): Make available globally.
660         (Previous_Instance): Subsidiary of
661         Insert_Freeze_Node_For_Instance, to check whether the generic
662         parent of the current instance is declared within a previous
663         instance in the same unit or declarative  part, in which case the
664         freeze nodes of both instances must appear in order to prevent
665         elaboration problems in gigi.
666         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
667         freeze point, and the freeze node of a preceding instantiation
668         must be inserted before it.
669
670 2011-10-24  Robert Dewar  <dewar@adacore.com>
671
672         * checks.ads, checks.adb: Add handling of Synchronization_Check
673         * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
674         atomic sync).
675         * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
676         flag Minor code reorganization.
677         * opt.ads (Warn_On_Atomic_Synchronization): New switch.
678         * par-prag.adb: Add dummy entries for pragma
679         Disable/Enable_Atomic_Synchronization.
680         * sem_prag.adb (Process_Suppress_Unsuppress): Handle
681         case of Atomic_Synchronization specially (not suppressed
682         by All_Checks, cannot be set from Source).
683         (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
684         * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
685         * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
686         entry for pragma Disable/Enable_Atomic_Synchronization
687         * switch-c.adb: The -gnatp switch does not disable
688         Atomic_Synchronization Add -gnatep switch to disable
689         Atomic_Synchronization.
690         * types.ads: Add entry for Synchronization_Check
691         * usage.adb: Add line for -gnated switch
692         * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
693
694 2011-10-24  Geert Bosch  <bosch@adacore.com>
695
696         * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
697         at Integer'First.
698
699 2011-10-24  Robert Dewar  <dewar@adacore.com>
700
701         * sem_ch12.adb, s-gearop.adb: Minor reformatting.
702
703 2011-10-24  Robert Dewar  <dewar@adacore.com>
704
705         * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
706         * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
707
708 2011-10-24  Emmanuel Briot  <briot@adacore.com>
709
710         * prj-proc.adb (Process_Expression_Variable_Decl): No special
711         handling for Project_Path unless it is an attribute.
712
713 2011-10-24  Javier Miranda  <miranda@adacore.com>
714
715         * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
716         (Install_Hidden_Primitives): New subprogram.
717         (Restore_Hidden_Primitives): New subprogram.
718         (Analyze_Formal_Package_Declaration,
719         Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
720         Invoke Check_Hidden_Primitives after every call to
721         Analyze_Associations, and invoke Restore_Hidden_Primitives to
722         restore their visibility after processing the instantiation.
723         (Instantiate_Package_Body): Install visible primitives before
724         analyzing the instantiation and uninstall them to restore their
725         visibility when the instantiation has been analyzed.
726         * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
727         (Remove_Suffix): New subprogram
728         * sem_ch3.adb (Derive_Subprogram): When handling
729         a derived subprogram for the instantiation of a formal derived
730         tagged type, inherit the dispatching attributes from the actual
731         subprogram (not from the parent type).
732
733 2011-10-24  Vasiliy Fofanov  <fofanov@adacore.com>
734
735         * gnat_ugn.texi: Document explicit use of XDECGNAT library.
736
737 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
738
739         * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
740         update its uses.
741         (Build_Discriminant_Assignments): Add local variable D_Loc and update
742         its uses.
743         (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
744         Var_Loc and update their uses.
745         (Build_Record_Init_Proc): Code reformatting.
746         (Increment_Counter): Add formal parameter Loc.
747         (Make_Counter): Add formal parameter Loc.
748
749 2011-10-24  Eric Botcazou  <ebotcazou@adacore.com>
750
751         * sem_disp.adb (Covers_Some_Interface): Fix typo.
752
753 2011-10-24  Matthew Heaney  <heaney@adacore.com>
754
755         * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
756         of predicate.
757
758 2011-10-24  Yannick Moy  <moy@adacore.com>
759
760         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
761         Translate arguments in positional notation into pragma argument
762         association arguments for the generated pragma.
763
764 2011-10-24  Arnaud Charlet  <charlet@adacore.com>
765
766         * exp_ch5.adb: Fix minor typo.
767
768 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
769
770         * sem_ch3.adb (Is_Visible_Component): Refine predicate for
771         the case of a component reference in an instance body, when the
772         enclosing type is private.
773
774 2011-10-24  Sergey Rybin  <rybin@adacore.com frybin>
775
776         * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
777         driver for getting the project support into gnatelim section.
778
779 2011-10-24  Robert Dewar  <dewar@adacore.com>
780
781         * gnat_rm.texi: Minor correction to documentation on address clause.
782
783 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
784
785         * s-finmas.adb (Attach): Synchronize and call the unprotected version.
786         (Attach_Unprotected): New routine.
787         (Delete_Finalize_Address): Removed.
788         (Delete_Finalize_Address_Unprotected): New routine.
789         (Detach): Synchronize and call the unprotected version.
790         (Detach_Unprotected): Remove locking.
791         (Finalize): Add various comment on synchronization. Lock the critical
792         region and call the unprotected versions of routines.
793         (Finalize_Address): Removed.
794         (Finalize_Address_Unprotected): New routine.
795         (Set_Finalize_Address): Synchronize and call
796         the unprotected version.
797         (Set_Finalize_Address_Unprotected): New routine.
798         (Set_Heterogeneous_Finalize_Address): Removed.
799         (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
800         (Set_Is_Heterogeneous): Add comment on synchronization and
801         locking.
802         * s-finmas.ads: Flag Finalization_Started is no longer atomic
803         because synchronization uses task locking / unlocking.
804         (Attach): Add comment on usage.
805         (Attach_Unprotected): New routine.
806         (Delete_Finalize_Address): Renamed to
807         Delete_Finalize_Address_Unprotected.
808         (Detach): Add comment on usage.
809         (Detach_Unprotected): New routine.
810         (Finalize_Address): Renamed to Finalize_Address_Unprotected.
811         (Set_Finalize_Address): Add comment on usage.
812         (Set_Finalize_Address_Unprotected): New routine.
813         (Set_Heterogeneous_Finalize_Address): Renamed to
814         Set_Heterogeneous_Finalize_Address_Unprotected.
815         * s-stposu.adb (Allocate_Any_Controlled): Add local variable
816         Allocation_Locked. Add various comments on synchronization. Lock
817         the critical region and call the unprotected version of
818         routines.
819         (Deallocate_Any_Controlled): Add various comments on
820         synchronization. Lock the critical region and call the unprotected
821         version of routines.
822
823 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
824
825         * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
826         are universal and must carry the corresponding type.
827         * sem_eval.adb (Check_Non_Static_Context): If the type of the
828         expression is universal real, as may be the case for a fixed point
829         expression with constant operands in the context of a conversion,
830         there is nothing to check.
831         * s-finmas.adb: Minor reformatting
832
833 2011-10-23  Eric Botcazou  <ebotcazou@adacore.com>
834
835         * gcc-interface/decl.c (create_concat_name): Add explicit cast.
836
837 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
838
839         * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
840         TRACE): Reintroduce.
841         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
842         ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
843
844 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
845
846         * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
847         (unchecked_conversion_nop): Use it.
848         (gnat_to_gnu): Likewise.
849
850 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
851
852         * back_end.adb (Call_Back_End): Pass the maximum logical line number
853         instead of the maximum physical line number to gigi.
854         * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
855
856 2011-10-16  Tom Tromey  <tromey@redhat.com>
857             Dodji Seketeli  <dodji@redhat.com>
858
859         * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
860         public ordinary map interface.
861
862 2011-10-16  Tristan Gingold  <gingold@adacore.com>
863
864         * link.c (_AIX): Add support for GNU ld.
865
866 2011-10-16  Fedor Rybin  <frybin@adacore.com>
867
868         * gnat_ugn.texi: Fixing gnattest example names in the doc.
869         Adding explanation to additional tests usage.
870
871 2011-10-16  Robert Dewar  <dewar@adacore.com>
872
873         * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
874
875 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
876
877         * a-convec.adb: Fix minor inconsistencies.
878
879 2011-10-16  Matthew Heaney  <heaney@adacore.com>
880
881         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
882         Implementation): Specify pragma Implementation_Defined.
883
884 2011-10-15  Nicolas Roche  <roche@adacore.com>
885
886         * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
887         either rtp-smp or ravenscar-cert-rtp runtimes.
888
889 2011-10-15  Bob Duff  <duff@adacore.com>
890
891         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
892         Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
893         is available.
894         (Expand_N_Extended_Return_Statement): Do not create a renaming of the
895         build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
896         available.
897         (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
898         pool only if RE_Root_Storage_Pool_Ptr is available.
899         (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
900         pool actual unless RE_Root_Storage_Pool_Ptr is available.
901         * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
902         formal only if RE_Root_Storage_Pool_Ptr is available.
903
904 2011-10-15  Matthew Heaney  <heaney@adacore.com>
905
906         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
907         type): Specify Priority aspect for protected type.
908
909 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
910
911         * exp_disp.adb (Check_Premature_Freezing): If an untagged type
912         is a generic actual, it is a subtype of a type that was frozen
913         by the instantiation, and even if not marked frozen it does not
914         affect the construction of the dispatch table.
915
916 2011-10-14  Robert Dewar  <dewar@adacore.com>
917
918         * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
919         reformatting.
920         * s-rident.ads: Add missing Compiler_Unit pragma.
921
922 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
923
924         * sem_res.adb: Minor reformatting.
925
926 2011-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
927
928         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
929         Code and comment reformatting. Use BIP_Task_Master
930         when creating a _master.
931         (BIP_Formal_Suffix): Code reformatting. Correct the case for
932         BIP_Task_Master.
933         (Make_Build_In_Place_Call_In_Object_Declaration): Use
934         BIP_Task_Master when creating a reference to the enclosing
935         function's _master formal.
936         (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
937         to the _master.
938         * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
939         (Needs_BIP_Finalization_Master): Alphabetized.
940         * sem_ch6.adb (Create_Extra_Formals): Update the usage of
941         BIP_Task_Master.
942
943 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
944
945         * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
946         reject an aliased keyword on the object declaration of an extended
947         return statement. In older versions of the language indicate
948         that this is illegal in the standard.
949
950 2011-10-14  Pascal Obry  <obry@adacore.com>
951
952         * sem_util.adb, sem_ch4.adb: Minor reformatting.
953
954 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
955
956         * sem_ch13.adb: Recognize properly procedure calls that are
957         transformed into code statements.
958
959 2011-10-14  Vincent Celier  <celier@adacore.com>
960
961         * projects.texi: Minor fix in project example.
962
963 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
964
965         * sem_util.adb: Return objects are aliased if their type is
966         immutably limited as per AI05-0053.
967
968 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
969
970         * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
971         expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
972         Short_Circuit_And_Or expansion code (moved to sem_res).
973         * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
974         "and" and "or" operators as short-circuit "and then" and "or
975         else", when pragma Short_Circuit_And_Or is active.
976
977 2011-10-13  Robert Dewar  <dewar@adacore.com>
978
979         * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
980         sem_ch6.adb, exp_ch3.adb: Minor reformatting.
981
982 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
983
984         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
985
986 2011-10-13  Jerome Guitton  <guitton@adacore.com>
987
988         * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
989
990 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
991
992         * a-convec.ads (Cursor): Minor reformatting.
993         * a-convec.adb (Next): Fix minor inconsistencies.
994         (Previous): Likewise.
995
996 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
997
998         * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
999         New predicate to determine whether some operations on an array
1000         type are available when the full view of its component may differ
1001         from the view of the point of the array declaration.
1002         * sem_ch4.adb (Find_Equality_Types): Use
1003         Available_Full_View_Of_Component.
1004         * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
1005
1006 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1007
1008         * sem_ch9.adb: Analyze aspects while discriminants of protected
1009         type are visible.
1010
1011 2011-10-13  Geert Bosch  <bosch@adacore.com>
1012
1013         * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
1014         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
1015         longer depend on an external library.
1016         * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
1017         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
1018         Update dependencies.
1019         * gcc-interface/Make-lang.in: Update dependencies. 
1020
1021 2011-10-13  Cyrille Comar  <comar@adacore.com>
1022
1023         * gnat_ugn.texi: Minor editing.
1024
1025 2011-10-13  Vincent Celier  <celier@adacore.com>
1026
1027         * projects.texi: Add documentation on packages and attributes
1028         that are inherited from a project being extended into the
1029         extended project.
1030
1031 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
1032
1033         * exp_ch3.adb (Build_Master): Rewritten.
1034         (Expand_N_Full_Type_Declaration): Reformat the declarative
1035         region. Update the call to Build_Master_Renaming.
1036         (Expand_Previous_Access_Type): Rewritten.
1037         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
1038         Add local constant Result_Subt and update related usage.
1039         (Expand_N_Extended_Return_Statement): Add local constant
1040         Result_Subt and update related usage.
1041         * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
1042         new context detection mechanism.
1043         (Build_Class_Wide_Master):
1044         Use Insert_Action to add the renaming into the tree.
1045         (Build_Master_Entity): Rewritten to use the new context detection
1046         mechanism.
1047         (Build_Master_Renaming): Add formal parameter Ins_Nod
1048         and related usage. Use Insert_Action to add the renaming into the
1049         tree.
1050         (Find_Enclosing_Context): New subsidiary routine. Rather
1051         than relying on enclosing scopes, this routine looks at the
1052         tree structure to figure out the proper context for a _master
1053         or a _chain. This approach eliminates the issues with transient
1054         scopes which have not been converted into blocks.
1055         * exp_ch9.ads (Build_Master_Entity): Change parameter profile
1056         to better reflect the new usage. Update the related comment.
1057         (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
1058         the comment on usage.
1059         * sem_ch3.adb (Access_Definition): Update the calls to
1060         Build_Master_Entity and Build_Master_Renaming.
1061         * sem_ch6.adb (Create_Extra_Formals): Add local variable
1062         Full_Subt. Code reformatting.
1063         * sem_util.adb (Is_Iterator): Alphabetized.
1064         (Is_LHS): Alphabetized.
1065         (Is_Limited_Class_Wide_Type): New routine.
1066         * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
1067
1068 2011-10-13  Geert Bosch  <bosch@adacore.com>
1069
1070         * a-ngrear.adb (Solve): Make generic and move to
1071         System.Generic_Array_Operations.
1072         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1073         New generic solvers to  compute a vector resp. matrix Y such
1074         that A * Y = X, approximately.
1075         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1076         Implement using Forward_Eliminate and Back_Substitute
1077         * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
1078         on BLAS and LAPACK.
1079         * a-ngcoar.ads ("abs"): Fix return type to be real.
1080
1081 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1082
1083         PR ada/50589
1084         * s-linux-alpha.ads: Do not "with" Interfaces.C.
1085         * s-linux-sparc.ads: Likewise.
1086
1087 2011-10-13  Geert Bosch  <bosch@adacore.com>
1088
1089         * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
1090         returning a Real.
1091         * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
1092         and use formal.
1093         * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
1094         new profile.
1095
1096 2011-10-13  Geert Bosch  <bosch@adacore.com>
1097
1098         * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
1099         move to System.Generic_Array_Operations.
1100
1101 2011-10-13  Geert Bosch  <bosch@adacore.com>
1102
1103         * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
1104         * s-gearop.ads (L2_Norm): Change profile to be suitable for
1105         Complex_Vector
1106         * s-gearop.adb (L2_Norm): Reimplement using direct definition,
1107         not inner product
1108
1109 2011-10-13  Robert Dewar  <dewar@adacore.com>
1110
1111         * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
1112         prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
1113         sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
1114         par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
1115         par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
1116         exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
1117
1118 2011-10-13  Geert Bosch  <bosch@adacore.com>
1119
1120         * s-gearop.adb: Minor comment additions.
1121
1122 2011-10-13  Fedor Rybin  <frybin@adacore.com>
1123
1124         * gnat_ugn.texi: Add gnattest section.
1125
1126 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1127
1128         * freeze.adb: Do not create body of renaming if declaration has
1129         errors.
1130
1131 2011-10-13  Olivier Hainque  <hainque@adacore.com>
1132
1133         * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
1134         further, to the ppc+kernel case only.
1135
1136 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
1137
1138         * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
1139         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
1140         Do not create a pool formal on .NET/JVM.
1141         (Expand_N_Extended_Return_Statement): Alphabetize local
1142         variables. Do not create a renaming of the build-in-place pool
1143         parameter on .NET/JVM.  (Make_Build_In_Place_Call_In_Allocator):
1144         Add the user-defined pool only on non-VM targets.
1145         (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
1146         local variables.  Do not add a pool actual on .NET/JVM.
1147         * sem_ch6.adb: Add with and use clause for Targparm.
1148         (Create_Extra_Formals): Add build-in-place pool formal only on
1149         non-VM targets.
1150         * rtsfind.ads: Alphabetize entries.
1151
1152 2011-10-13  Sergey Rybin  <rybin@adacore.com>
1153
1154         * gnat_ugn.texi: Minor correction.
1155
1156 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1157
1158         * sem_ch8.adb: Minor error message improvement.
1159
1160 2011-10-13  Robert Dewar  <dewar@adacore.com>
1161
1162         * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
1163
1164 2011-10-13  Gary Dismukes  <dismukes@adacore.com>
1165
1166         * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
1167         of a for loop for an enumeration type with an enumeration rep
1168         clause, which involves moving the original loop parameter into
1169         a nested block, the loop parameter's entity must be removed from
1170         the entity list of the loop scope.
1171
1172 2011-10-13  Bob Duff  <duff@adacore.com>
1173
1174         * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
1175         that gets passed in the same cases where BIP_Alloc_Form is passed
1176         (caller-unknown-size results). BIP_Storage_Pool is used when
1177         BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
1178         to the user-defined storage pool is passed at the call site,
1179         and this pool is used in callee to allocate the result.
1180         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
1181         version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
1182         the additional BIP_Storage_Pool actual.
1183         (Expand_N_Extended_Return_Statement): Allocate the function
1184         result using the user-defined storage pool, if BIP_Alloc_Form =
1185         User_Storage_Pool.
1186         * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
1187         * exp_ch4.adb: Don't overwrite storage pool set by
1188         Expand_N_Extended_Return_Statement.
1189         * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
1190         for use in build-in-place function calls within allocators
1191         where the access type has a user-defined storage pool.
1192
1193 2011-10-13  Sergey Rybin  <rybin@adacore.com>
1194
1195         * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
1196         literal casing.
1197
1198 2011-10-13  Nicolas Roche  <roche@adacore.com>
1199
1200         * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
1201         with 'rtp'.
1202
1203 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1204
1205         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
1206         account that an unchecked union type can be limited.
1207
1208 2011-10-13  Olivier Hainque  <hainque@adacore.com>
1209
1210         * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
1211         the use of the signal trampoline for PPC in the sjlj case as well.
1212         Add legitimate casts, preventing compile time warnings on the
1213         (sighandler *) profile.
1214
1215 2011-10-13  Yannick Moy  <moy@adacore.com>
1216
1217         * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
1218         in Alfa mode.
1219
1220 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1221
1222         * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
1223         expressions are legal limited return values if each one of their
1224         dependent expressions are legal.
1225
1226 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1227
1228         * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
1229         if the prefix of the call is a qualified expression, rewrite as
1230         a code statement.
1231         * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
1232         code statement is legal if it is a rewriting of a procedure call.
1233
1234 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1235
1236         * exp_aggr.adb (Flatten): If a component association has a box,
1237         assume that aggregate is not static.
1238         (Safe_Aggregate): If a component association in a non-limited
1239         aggregate has a box, assume that it cannot be expanded in place.
1240
1241 2011-10-13  Vincent Celier  <celier@adacore.com>
1242
1243         * prj-conf.adb (Get_Or_Create_Configuration_File): Call
1244         Process_Project_Tree_Phase_1 with Packages_To_Check.
1245         (Process_Project_And_Apply_Config): Ditto
1246         * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
1247         Remove default for argument Packages_To_Check.
1248         * prj-proc.adb (Recursive_Process): New argument
1249         Packages_To_Check.
1250         (Process): Ditto.
1251         (Process_Project_Tree_Phase_1): Ditto.
1252         (Recursive_Project.Process_Aggregated_Projects): Call
1253         Prj.Part.Parse and Process_Project_Tree_Phase_1 with
1254         Packages_To_Check.
1255         * prj-proc.ads (Process): New argument Packages_To_Check
1256         (Process_Project_Tree_Phase_1): Ditto
1257
1258 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
1259
1260         * gcc-interface/Makefile.in: Fix typo.
1261
1262 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1263
1264         * sem_ch12.adb (Analyze_Formal_{Floating_Type,
1265         Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
1266         Use sloc of defining identifier of farmal type declaration,
1267         as sloc of generated internal entity, to prevent misplaced
1268         references in ali.
1269
1270 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1271
1272         * sem_intr.adb (Check_Intrinsic_Operator): Check that type
1273         is fully defined before checking that it is a numeric type.
1274
1275 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1276
1277         * sem_aggr.adb (Resolve_Record_Aggregate): If a component
1278         association for component X has a box, then X is covered in the
1279         aggregate even if there is not default value for X in the type
1280         declaration, and X has to be default-initialized.
1281
1282 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1283
1284         * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
1285         literals as referenced only if reference is in current source unit.
1286
1287 2011-10-13  Matthew Heaney  <heaney@adacore.com>
1288
1289         * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
1290
1291 2011-10-13  Olivier Hainque  <hainque@adacore.com>
1292
1293         * sigtramp.h: New file.  Prototype and spec of the signal
1294         trampoline to be called by an established handler to provide
1295         dwarf call frame info before the real signal processing code.
1296         * sigtramp-ppcvxw.c: New file.  Implementation of the signal
1297         trampoline for ppc-vxworks.
1298         * init.c (vxworks section): Use it for ppc.
1299
1300 2011-10-13  Thomas Quinot  <quinot@adacore.com>
1301
1302         * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
1303         (Check_Future_Identifier): New subprogram,
1304         factors duplicated code from Par.Ch2.P_Identifier and
1305         Par.Ch3.P_Defining_Identifier.
1306
1307 2011-10-13  Thomas Quinot  <quinot@adacore.com>
1308
1309         * s-taprop-posix.adb (Initialize): Always raise Storage_Error
1310         if we fail to initialize CV attributes or CV.
1311
1312 2011-10-13  Thomas Quinot  <quinot@adacore.com>
1313
1314         * s-tasren.adb (Timed_Selective_Wait, case
1315         Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
1316         we know abortion is already deferred.
1317
1318 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
1319
1320         * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
1321         (Build_Master_Renaming (function)): Removed.
1322         (Build_Master_Renaming (procedure)): Moved to exp_ch9.
1323         (Expand_Full_Type_Declaration): Alphabetize
1324         variables. Reformatting of code and comments. Rewrite the
1325         section on processing of anonymous access-to-task types in
1326         record components.
1327         * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
1328         (Build_Master_Renaming): Moved to exp_ch9.
1329         * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
1330         (Build_Master_Entity): Add formal parameter
1331         Use_Current. Reformatting of code and comments.
1332         (Build_Master_Renaming): Moved from exp_ch3.
1333         * exp_ch9.ads (Build_Class_Wide_Master): Moved from
1334         exp_ch3. Update comment on usage.
1335         (Build_Master_Entity):
1336         Add formal parameter Use_Current. Update comment on usage.
1337         (Build_Master_Renaming): Moved from exp_ch3.
1338         * sem_ch3.adb (Access_Definition): Remove redundant code to
1339         create a _master and a renaming.
1340
1341 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
1342
1343         * lib-xref.adb: Do no emit reference to overridden operation,
1344         if it is internally generated.
1345
1346 2011-10-13  Vincent Celier  <celier@adacore.com>
1347
1348         * bindgen.adb: Remove any processing related to g-trasym
1349         * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
1350         * mlib-prj.adb: Remove any processing related to g-trasym.
1351
1352 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
1353
1354         * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
1355         * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
1356         (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
1357         (ADA_FLAGS_TO_PASS): Likewise.
1358         (COMMON_FLAGS_TO_PASS): New.
1359         (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
1360         native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
1361         (gnatlib): Use COMMON_FLAGS_TO_PASS.
1362         (ada.install-common): Likewise.
1363         (install-gnatlib): Likewise.
1364         (install-gnatlib-obj): Likewise.
1365         (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
1366         (gnat-cross): Delete.
1367         (gnatboot): Likewise.
1368         (gnatboot2): Likewise.
1369         (gnatboot3): Likewise.
1370         (gnatstage1): Likewise.
1371         (gnatstage2): Likewise.
1372         * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
1373         (MOST_ADAFLAGS): Likewise.
1374         (LOOSE_CFLAGS): Likewise.
1375         (gnat-cross): Likewise.
1376         (GNATLIBFLAGS): Add -W -Wall.
1377         (GNATLIBCFLAGS_FOR_C): Likewise.
1378         * gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
1379         * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
1380
1381 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
1382
1383         * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
1384         (push_range_check_info): Likewise.
1385         (gnat_to_gnu) <N_Code_Statement>: Likewise.
1386         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
1387         (gnat_invariant_expr): Likewise.
1388         * gcc-interface/utils.c (compute_related_constant): Likewise.
1389         (max_size): Fix handling of SAVE_EXPR.
1390         (remove_conversions): Fix formatting.
1391
1392 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
1393
1394         * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
1395         (DECL_INDUCTION_VAR): New macro.
1396         (SET_DECL_INDUCTION_VAR): Likewise.
1397         * gcc-interface/gigi.h (convert_to_index_type): Declare.
1398         (gnat_invariant_expr): Likewise.
1399         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
1400         parameter, set DECL_LOOP_PARM_P on it.
1401         * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
1402         is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
1403         * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
1404         (struct range_check_info_d): New type.
1405         (struct loop_info_d): Likewise.
1406         (gnu_loop_stack): New stack.
1407         (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
1408         built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
1409         is set, do not test DECL_RENAMED_OBJECT.
1410         (push_range_check_info): New function.
1411         (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
1412         the label.  Reference the label and the iteration variable from it.
1413         Build the special induction variable in the unsigned version of the
1414         size type, if it is larger than the base type.  And attach it to the
1415         iteration variable if the latter isn't by-ref.  In the iteration scheme
1416         case, initialize the invariant conditions in front of the loop if
1417         deemed profitable.  Use gnu_loop_stack.
1418         (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
1419         <N_Raise_Constraint_Error>: Always process the reason.  In the range
1420         check and related cases, and if loop unswitching is enabled, compute
1421         invariant conditions and push this information onto the stack.
1422         Do not translate again the condition if it has been already translated.
1423         * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
1424         DECL_LOOP_PARM_P isn't set.
1425         (convert_to_index_type): New function.
1426         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
1427         to convert the index from the base index type to sizetype.
1428         (gnat_invariant_expr): New function.
1429
1430 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1431
1432         * gcc-interface/utils.c (def_builtin_1): Delete old interface with
1433         two parallel arrays to hold standard builtin declarations, and
1434         replace it with a function based interface that can support
1435         creating builtins on the fly in the future.
1436         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
1437         (gnat_to_gnu): Ditto.
1438
1439 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
1440
1441         PR lto/50492
1442         * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
1443         * gcc-interface/utils.c (global_context): New variable.
1444         (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
1445         that are either public external or at top level.  Use "No" macro.
1446         (end_subprog_body): Call decl_function_context.
1447         (rest_of_subprog_body_compilation): Likewise.
1448
1449 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
1450
1451         * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
1452         (rest_of_subprog_body_compilation): Likewise.
1453         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
1454         test for useless conversions by means of gnat_useless_type_conversion.
1455         * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
1456         (language_function): Add named_ret_val and other_ret_val.
1457         (f_named_ret_val): New macro.
1458         (f_other_ret_val): Likewise.
1459         (gigi): Call rest_of_subprog_body_compilation.
1460         (struct nrv_data): New structure.
1461         (is_nrv_p): New predicate.
1462         (prune_nrv_r): New helper function.
1463         (prune_nrv_in_block): New function.
1464         (finalize_nrv_r): New helper function.
1465         (finalize_nrv): New function.
1466         (return_value_ok_for_nrv_p): New predicate.
1467         (build_return_expr): If optimization is enabled, record candidates for
1468         the Named Return Value optimization.
1469         (build_function_stub): Call rest_of_subprog_body_compilation.
1470         (Subprogram_Body_to_gnu): If optimization is enabled and there are
1471         candidates, finalize the Named Return Value optimization.
1472         Call rest_of_subprog_body_compilation.
1473         (call_to_gnu): At the end, if a return value is needed, simplify the
1474         result before wrapping it up in a COMPOUND_EXPR.
1475         * gcc-interface/utils.c (end_subprog_body): Split into...
1476         (rest_of_subprog_body_compilation): ...this.  New function.
1477         (gnat_useless_type_conversion): Likewise.
1478
1479 2011-10-06  Thomas Quinot  <quinot@adacore.com>
1480
1481         * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
1482         exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
1483         g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
1484         par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
1485         sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1486         sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
1487         s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
1488         * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
1489
1490 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
1491
1492         * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
1493         references.
1494
1495 2011-10-06  Matthew Heaney  <heaney@adacore.com>
1496
1497         * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
1498         (Dequeue_Only_High_Priority): Protected procedure now implemented.
1499
1500 2011-10-06  Vincent Celier  <celier@adacore.com>
1501
1502         * g-trasym.adb: Replace old implementation with the default
1503         implementation that returns list of addresses as "0x...".
1504         * g-trasym.ads: Update the list of platforms with the full
1505         capability.  Indicate that there is a default implementation
1506         for other platforms.
1507         * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
1508         * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
1509         is now a default implementation for all platforms without the full
1510         capability.
1511
1512 2011-10-06  Robert Dewar  <dewar@adacore.com>
1513
1514         * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
1515         a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
1516         a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
1517         reorganization (use conditional expressions).
1518
1519 2011-10-06  Robert Dewar  <dewar@adacore.com>
1520
1521         * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
1522         floating divide by zero.
1523
1524 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
1525
1526         * sem_ch6.adb: Limited interfaces that are not immutably limited
1527         are OK in return statements.
1528
1529 2011-09-30  Iain Sandoe  <iains@gcc.gnu.org>
1530
1531         * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
1532         change to powerpc section.
1533
1534 2011-09-29  Iain Sandoe  <iains@gcc.gnu.org>
1535
1536         * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
1537         across the port.
1538
1539 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1540
1541         * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
1542         a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
1543         a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
1544         indefinite sets.
1545         * a-coorma.ads: Minor reformmating.
1546         * einfo.ads: Improve the comment describing the
1547         Directly_Designated_Type function.
1548         * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
1549         ordered maps.
1550         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1551         dependencies.
1552
1553 2011-09-27  Robert Dewar  <dewar@adacore.com>
1554
1555         * a-comutr.ads: Minor reformatting.
1556
1557 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1558
1559         * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
1560         iterators to multiway trees.
1561
1562 2011-09-27  Yannick Moy  <moy@adacore.com>
1563
1564         * debug.adb (d.D): New option for strict Alfa mode.
1565         * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
1566         permissions as strictly as possible.
1567         * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
1568         Alfa mode, now, interpret ranges of base types like GNAT does; in
1569         strict mode, simply change the range of the implicit base Itype.
1570         * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
1571
1572 2011-09-27  Robert Dewar  <dewar@adacore.com>
1573
1574         * exp_ch9.adb: Minor comment fixes.
1575
1576 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1577
1578         * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
1579         trees.
1580
1581 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
1582
1583         * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
1584         instead of Directly_Designated_Type in the indirect array case.
1585
1586 2011-09-27  Robert Dewar  <dewar@adacore.com>
1587
1588         * exp_util.adb, exp_aggr.adb: Minor reformatting.
1589
1590 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1591
1592         * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
1593         on subtype declarations.
1594         * exp_aggr.adb: Minor comment update.
1595
1596 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
1597
1598         * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
1599         test in the N_Explicit_Dereference case.  Fold double logical
1600         negation in the special loop case and conditionalize it on
1601         Variable_Ref being true.
1602
1603 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
1604
1605         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
1606         single protected object and the selector is a discriminant or an
1607         entry family, this is a non-overloaded candidate interpretation,
1608         and possible primitive operations of the type must not be
1609         examined.
1610
1611 2011-09-27  Arnaud Charlet  <charlet@adacore.com>
1612
1613         * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
1614
1615 2011-09-27  Pascal Obry  <obry@adacore.com>
1616
1617         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
1618         s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
1619         Add dummy definitions for pthread_rwlock_t
1620         and pthread_rwlockattr_t on all POSIX platforms.
1621         * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
1622         reference.
1623         (Finalize_Lock): Likewise.
1624         (Write_Lock): Likewise.
1625         (Unlock): Likewise.
1626
1627 2011-09-27  Tristan Gingold  <gingold@adacore.com>
1628
1629         * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
1630         windows 64.
1631
1632 2011-09-27  Pascal Obry  <obry@adacore.com>
1633
1634         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
1635         s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
1636         s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
1637         s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
1638         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
1639         s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
1640         s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
1641         s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
1642         s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
1643         s-taprop-posix.adb: Revert previous changes.
1644         (Lock): Now a record containing the two possible lock
1645         (mutex and read/write) defined in OS_Interface.
1646         * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
1647         'R' locking policy.
1648         (Initialize_Protection): Likewise.
1649         (Lock): Likewise.
1650         (Lock_Read_Only): Likewise.
1651         (Unlock): Likewise.
1652
1653 2011-09-27  Pascal Obry  <obry@adacore.com>
1654
1655         * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
1656         OS_Interface.pthread_rwlock_t.
1657
1658 2011-09-27  Robert Dewar  <dewar@adacore.com>
1659
1660         * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
1661         a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
1662         sem_ch5.adb, sem_util.adb: Minor reformatting.
1663
1664 2011-09-27  Pascal Obry  <obry@adacore.com>
1665
1666         * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
1667         (Finalize_Lock)[RW_Lock]: Likewise.
1668         (Write_Lock)[RW_Lock]: Likewise.
1669         (Unlock)[RW_Lock]: Likewise.
1670         (Read_Lock): Define L as RW_Lock (instead of Lock).
1671         * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
1672         routine for r/w lock.
1673         (Finalize_Lock)[RW_Lock]: Likewise.
1674         (Write_Lock)[RW_Lock]: Likewise.
1675         (Unlock)[RW_Lock]: Likewise.
1676         (Read_Lock): Define L as RW_Lock (instead of Lock).
1677
1678         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1679         s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
1680         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1681         (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
1682         routine for standard lock.
1683         (Finalize_Lock)[RW_Lock]: Likewise.
1684         (Write_Lock)[RW_Lock]: Likewise.
1685         (Unlock)[RW_Lock]: Likewise.
1686         (Read_Lock): Define L as RW_Lock (instead of Lock).
1687         * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
1688         in the record definition.
1689         * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
1690         lock for 'R' locking policy.
1691         (Initialize_Protection): Likewise.
1692         (Lock): Likewise.
1693         (Lock_Read_Only): Likewise.
1694         (Unlock): Likewise.
1695         * s-taspri-posix.ads (RW_Lock): New type defined as
1696         OS_Interface.pthread_rwlock_t.
1697
1698         * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
1699         s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
1700         s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
1701         s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
1702
1703 2011-09-27  Pascal Obry  <obry@adacore.com>
1704
1705         * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
1706
1707 2011-09-27  Pascal Obry  <obry@adacore.com>
1708
1709         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1710         s-osinte-hpux.ads, s-osinte-irix.ads,
1711         s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
1712         pthread_mutex_t.
1713         (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
1714         * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
1715         pthread_rwlockattr_init, pthread_rwlockattr_destroy,
1716         pthread_rwlockattr_setkind_np, pthread_rwlock_init,
1717         pthread_rwlock_destroy, pthread_rwlock_rdlock,
1718         pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
1719
1720 2011-09-27  Pascal Obry  <obry@adacore.com>
1721
1722         * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
1723         (RE_Id): Add RE_Lock_Read_Only.
1724         (RE_Unit_Table): Likewise.
1725         * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
1726         to lift restriction on first character. Handle now the
1727         Name_Concurrent_Readers_Locking where policy character is set to
1728         'R'.
1729         * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
1730         constant.
1731         * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
1732         read only lock for function in protected object.
1733         * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
1734         this routine is now used.
1735
1736 2011-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1737
1738         * s-atocou-x86.adb (Decrement): Use %;.
1739         (Increment): Likewise.
1740
1741 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1742
1743         * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
1744         dereference of the pointer to the storage area.  Remove useless type
1745         conversions and factor out common code.
1746
1747 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1748
1749         * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
1750         variable and use it throughout.
1751         <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
1752         <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
1753         first step.  Also convert to the unpadded type as a last step.
1754
1755 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1756
1757         * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
1758         DECL_CHAIN in comment.
1759         * gcc-interface/trans.c (gigi): Likewise.
1760         (Attribute_to_gnu): Likewise.
1761         (build_function_stub): Likewise.
1762         (gnat_to_gnu): Likewise.
1763         * gcc-interface/utils.c (create_subprog_decl): Likewise.
1764         (convert_vms_descriptor64): Likewise.
1765         (convert_vms_descriptor32): Likewise.
1766
1767 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1768
1769         * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
1770         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
1771         issues.  Use COMPLETE_TYPE_P in assertion.  Also set TREE_READONLY if
1772         the type of the record is TYPE_READONLY.
1773
1774 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1775             Robert Dewar  <dewar@adacore.com>
1776
1777         * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
1778         OUT formal parameter which is of an null-exclusion access subtype.
1779
1780 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1781
1782         * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
1783         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
1784         (gnat_to_gnu_param): Likewise.
1785         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
1786         maybe_unconstrained_array instead of doing the work manually.
1787         (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
1788         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
1789         is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
1790         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
1791         (gnat_stabilize_reference): Likewise.
1792
1793 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
1794
1795         * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
1796         (SET_TYPE_NULL_BOUNDS): Likewise.
1797         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
1798         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
1799         * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
1800         pointer types.
1801         * gcc-interface/utils.c (create_var_decl_1): If the object is external,
1802         check that the initializer is a valid constant expression for use in
1803         initializing a static variable.  Add missing guard.
1804         (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
1805         (convert_to_fat_pointer): In the null fat pointer case, build a valid
1806         pointer for the bounds.
1807         * gcc-interface/utils2.c (compare_fat_pointers): New function.
1808         (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
1809
1810 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1811
1812         * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
1813         * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
1814         the by-ref case.  Do not set TREE_READONLY on a renamed object.  Set
1815         TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
1816         (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
1817         to the indirect case.
1818         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
1819         the TREE_THIS_NOTRAP flag.
1820
1821 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1822
1823         * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
1824         iteration scheme, always generate the do-while form if optimization
1825         is enabled.  Use more straightforward test at the end.
1826
1827 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1828
1829         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
1830         XNEW instead of xmalloc.  Do not build useless pointer type.
1831         <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
1832         * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
1833         * gcc-interface/utils2.c (build_unary_op): Remove local variable.
1834
1835 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
1836
1837         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
1838         the alignment if this doesn't prevent BLKmode access to the object.
1839
1840 2011-09-24  Iain Sandoe  <iains@gcc.gnu.org>
1841
1842         * gcc-interface/Makefile.in (darwin): Do not issue the
1843         '-flat_namespace' linker flag during Ada build.
1844         * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
1845         default shared library options.
1846
1847 2011-09-19  Alexandre Oliva  <aoliva@redhat.com>
1848
1849         * gcc-interface/decl.c (annotate_value): Look up expression for
1850         insertion in the cache at the end.
1851
1852 2011-09-19  Arnaud Charlet  <charlet@adacore.com>
1853
1854         * gcc-interface/Make-lang.in: Update dependencies.
1855
1856 2011-09-19  Steve Baird  <baird@adacore.com>
1857
1858         * snames.ads-tmpl: Move declaration of Name_Annotate into range of
1859         configuration pragma names so that Is_Configuration_Pragma_Name
1860         will return True for Name_Annotate.  Make corresponding change in
1861         Pragma_Id enumeration type.  This is needed to allow an Annotate
1862         pragma to occur in a configuration pragma file (typically,
1863         a gnat.adc file).
1864         * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
1865         * gnat_rm.texi: Note that pragma Annotate may be used as a
1866         configuration pragma.
1867
1868 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
1869
1870         * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
1871         a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
1872
1873 2011-09-19  Yannick Moy  <moy@adacore.com>
1874
1875         * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
1876         for expansion of set membership.
1877         (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
1878         * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
1879         visible for use in Alfa expansion.
1880         * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
1881         variable in Alfa mode.
1882
1883 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1884
1885         * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1886
1887 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1888
1889         * exp_ch9.adb: Minor reformatting.
1890
1891 2011-09-19  Hristian Kirtchev  <kirtchev@adacore.com>
1892
1893         * freeze.adb (Build_Renamed_Body): Generic subprograms
1894         instantiations cannot be poperly inlined by the compiler, do
1895         not set the Body_To_Inline attribute in such cases.
1896         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1897         inlining-related flags from the generic subprogram declaration.
1898
1899 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1900
1901         * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1902         (Build_Stub_Type): Remove, instead copy components from
1903         System.Partition_Interface.RACW_Stub_Type.
1904         (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1905         (Copy_Component_List): New subprogram.
1906
1907 2011-09-19  Yannick Moy  <moy@adacore.com>
1908
1909         * lib-xref.adb (Generate_Reference): Ignore references to
1910         constants in Standard.
1911
1912 2011-09-19  Robert Dewar  <dewar@adacore.com>
1913
1914         * err_vars.ads, errout.ads: Minor reformatting.
1915
1916 2011-09-19  Robert Dewar  <dewar@adacore.com>
1917
1918         * aspects.ads (Impl_Defined_Aspects): New array
1919         * lib-writ.adb (No_Dependences): New name for No_Dependence
1920         * restrict.adb (No_Dependences): New name for No_Dependence
1921         (Check_Restriction_No_Specification_Of_Aspect): New
1922         procedure.
1923         (Set_Restriction_No_Specification_Of_Aspect): New procedure
1924         (Restricted_Profile_Result): New variable
1925         (No_Specification_Of_Aspects): New variable
1926         (No_Specification_Of_Aspect_Warning): New variable
1927         * restrict.ads (No_Dependences): New name for No_Dependence
1928         (Check_Restriction_No_Specification_Of_Aspect): New procedure
1929         (Set_Restriction_No_Specification_Of_Aspect): New procedure
1930         * s-rident.ads: Add restriction
1931         No_Implementation_Aspect_Specifications, this is also added to
1932         the No_Implementation_Extensions profile.
1933         * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1934         No_Implementation_Defined_Aspects
1935         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1936         * sem_prag.adb (Analyze_Aspect_Specifications): Check
1937         No_Implementation_Aspects
1938         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1939         * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1940
1941 2011-09-19  Yannick Moy  <moy@adacore.com>
1942
1943         * lib-xref.adb (Generate_Reference): Take into account multiple
1944         renamings for Alfa refs.
1945
1946 2011-09-19  Thomas Quinot  <quinot@adacore.com>
1947
1948         * g-socthi-mingw.adb: Minor reformatting.
1949
1950 2011-09-19  Yannick Moy  <moy@adacore.com>
1951
1952         * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1953         expansion to False in mode Alfa
1954
1955 2011-09-19  Pascal Obry  <obry@adacore.com>
1956
1957         * mingw32.h: Remove obsolete code needed for old versions
1958         of MingW.
1959
1960 2011-09-19  Robert Dewar  <dewar@adacore.com>
1961
1962         * errout.ads: Minor reformatting.
1963
1964 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
1965
1966         * sem_ch6.adb (Analyze_Expression_Function): When the expression
1967         function is transformed into a declaration and a body, insert
1968         body at the end of the declarative part, to prevent premature
1969         freeze actions, and preserve original specification in the
1970         subprogram declaration.
1971
1972 2011-09-19  Vincent Celier  <celier@adacore.com>
1973
1974         * projects.texi: Minor editing.
1975
1976 2011-09-19  Robert Dewar  <dewar@adacore.com>
1977
1978         * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1979         exp_aggr.adb: Minor reformatting.
1980
1981 2011-09-19  Yannick Moy  <moy@adacore.com>
1982
1983         * lib-xref.adb (Generate_Reference): Change entity referenced
1984         to underlying object if any, or else reference to the HEAP.
1985
1986 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
1987
1988         * gcc-interface/Make-lang.in: Update dependencies.
1989
1990 2011-09-15  Robert Dewar  <dewar@adacore.com>
1991
1992         * tree_io.ads: Minor reformatting.
1993         * a-intnam.ads: Fix bad header.
1994
1995 2011-09-15  Thomas Quinot  <quinot@adacore.com>
1996
1997         * a-exexpr-gcc.adb: Minor reformatting.
1998
1999 2011-09-15  Yannick Moy  <moy@adacore.com>
2000
2001         * sem_ch6.adb: Propagate information that an expression function comes
2002         from source (otherwise references to this entity are not stored).
2003
2004 2011-09-15  Robert Dewar  <dewar@adacore.com>
2005
2006         * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
2007         a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
2008         a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
2009
2010 2011-09-15  Ed Schonberg  <schonberg@adacore.com>
2011
2012         * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
2013         if the expression function is not a completion, create a
2014         new specification for the generated declaration, and keep the
2015         original specification in the generated body. Shorter code also
2016         ensures that proper warnings are generated for unused formals
2017         in all cases.
2018
2019 2011-09-15  Sergey Rybin  <rybin@adacore.com>
2020
2021         * tree_io.ads: Update ASIS_Version_Number because of the changes
2022         in the tree structures for expression functions.
2023
2024 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
2025
2026         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
2027         s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
2028         s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
2029         (CLOCK_REALTIME): Fix wrong value on some OSes.
2030         * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
2031
2032 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2033
2034         * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
2035         to unconstrained array case, deal with each branch of a COND_EXPR.
2036         * gcc-interface/utils2.c (build_allocator): Deal with each branch of
2037         a COND_EXPR in the initializer, if present.
2038
2039 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2040
2041         * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
2042         of an addressable type.
2043         * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
2044         Deal with those cases for which creating a temporary is mandatory.
2045
2046 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2047
2048         * gcc-interface/trans.c (call_to_gnu): Use local variable.  Make sure
2049         this is a real formal parameter before testing whether it is by ref.
2050
2051 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2052
2053         * gcc-interface/gigi.h (build_call_0_expr): Delete.
2054         (build_call_1_expr): Likewise.
2055         (build_call_2_expr): Likewise.
2056         (build_call_n_expr): New prototype.
2057         * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
2058         * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
2059         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2060         (Exception_Handler_to_gnu_zcx): Likewise.
2061         (gnat_to_gnu): Likewise.
2062         (build_binary_op_trapv): Likewise.
2063         * gcc-interface/utils2.c (build_call_0_expr): Delete.
2064         (build_call_1_expr): Likewise.
2065         (build_call_2_expr): Likewise.
2066         (build_call_n_expr): New function.
2067         (build_call_raise): Use build_call_n_expr.
2068         (build_call_raise_range): Likewise.
2069         (build_call_raise_column): Likewise.
2070         (build_call_alloc_dealloc_proc): Likewise.
2071         (maybe_wrap_malloc): Likewise.
2072         (maybe_wrap_free): Likewise.
2073
2074 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
2075
2076         * gcc-interface/trans.c (build_return_expr): Use void_type_node for
2077         MODIFY_EXPR.
2078         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
2079         the result type is null if ENABLE_CHECKING.  Set operation_type at the
2080         end unconditionally if not set in the previous cases.
2081         Use build2 and void_type_node for MODIFY_EXPR.
2082         (build_allocator): Use NULL_TREE for MODIFY_EXPR.
2083
2084 2011-09-08  Eric Botcazou  <ebotcazou@adacore.com>
2085
2086         * gcc-interface/utils.c (unchecked_convert): Use a field of the right
2087         precision when converting to or from an integral type whose precision
2088         is not equal to its size.
2089
2090 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
2091
2092         * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
2093
2094 2011-09-07  Iain Sandoe  <iains@gcc.gnu.org>
2095
2096         * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
2097         implementation.
2098         * system-darwin-ppc64.ads: New file.
2099
2100 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
2101
2102         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
2103         reference to "-lm".
2104
2105 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
2106
2107         * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
2108         size switches to the link phase for shared libs.
2109
2110 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
2111
2112         * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
2113         LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
2114
2115 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2116
2117         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
2118         (gnattools, regnattools, cross-gnattools, canadian-gnattools,
2119         gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
2120         New targets.
2121         (TOOLS_FLAGS_TO_PASS): New.
2122         (../stamp-tools): Reintroduce, to avoid merge conflicts.
2123
2124 2011-09-06  Robert Dewar  <dewar@adacore.com>
2125
2126         * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
2127         name for Is_RM_Defined_Unit. Also several fixes to this unit.
2128
2129 2011-09-06  Robert Dewar  <dewar@adacore.com>
2130
2131         * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
2132         * s-rident.ads: New restriction No_Implementation_Units
2133         (this restriction is also part of the profile
2134         No_Implementation_Extensions)
2135         * sem_ch10.adb (Analyze_With_Clause): Add check for
2136         No_Implementation_Units restriction.
2137
2138 2011-09-06  Jerome Guitton  <guitton@adacore.com>
2139
2140         * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
2141         on vThreads.
2142
2143 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2144
2145         * s-solita.adb: Minor reformatting.
2146
2147 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2148
2149         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
2150         is a rewriting of an expression function does not freeze previous
2151         entities.
2152
2153 2011-09-06  Robert Dewar  <dewar@adacore.com>
2154
2155         * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
2156
2157 2011-09-06  Tristan Gingold  <gingold@adacore.com>
2158
2159         * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
2160         powerpc-wrs-vxworksae.
2161
2162 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2163
2164         * s-os_lib.ads (Spawn): Minor documentation clarification,
2165         Success is True for a zero exit status.
2166
2167 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2168
2169         * sem_ch5.adb: Add message for common iterator error.
2170
2171 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2172
2173         * exp_ch3.adb (Build_Initialization_Call): If the target is a
2174         selected component discriminated by a current instance, replace
2175         the constraint with a reference to the target object, regardless
2176         of whether the context is an init_proc.
2177
2178 2011-09-06  Robert Dewar  <dewar@adacore.com>
2179
2180         * exp_attr.adb: Descriptor_Size is never static.
2181
2182 2011-09-06  Robert Dewar  <dewar@adacore.com>
2183
2184         * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
2185
2186 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2187
2188         * gnat_rm.texi: Clarify that attribute Descriptor_Size is
2189         non-static.
2190
2191 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2192
2193         * sem_res.adb (Resolve): An expression that is the body of an
2194         expression function does not freeze.
2195
2196 2011-09-06  Matthew Heaney  <heaney@adacore.com>
2197
2198         * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
2199         a-cuprqu.adb: Changed copyright notice to indicate current
2200         year only.
2201
2202 2011-09-06  Vincent Celier  <celier@adacore.com>
2203
2204         * prj.adb: Minor spelling error fix in comment
2205         * sem_res.adb: Minor reformatting
2206
2207 2011-09-06  Pascal Obry  <obry@adacore.com>
2208
2209         * sysdep.c (winflush_nt): Removed as not needed anymore.
2210         (winflush_95): Likewise.
2211         (winflush_init): Likewise.
2212         (winflush_function): Likewise.
2213         (getc_immediate_common): Remove call to winflush_function.
2214
2215 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2216
2217         * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
2218         processing for Descriptor_Size.
2219         * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
2220         to account for its broader usage.
2221         * sem_attr.adb (Analyze_Attribute): Change the error detection
2222         circuitry for Descriptor_Size as the attribute is now applicable
2223         to all types.
2224
2225 2011-09-06  Robert Dewar  <dewar@adacore.com>
2226
2227         * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
2228
2229 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2230
2231         * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
2232         in a parameter association must not set the Referenced flag on
2233         the formal.
2234         * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
2235
2236 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2237
2238         * gnat_rm.texi: Add a section on attribute Descriptor_Size
2239
2240 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2241
2242         * gcc-interface/Makefile.in (common-tools, gnatmake-re,
2243         gnatlink-re): Speed up by using -j0.
2244
2245 2011-09-06  Yannick Moy  <moy@adacore.com>
2246
2247         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
2248         Set_Corresponding_Aspect when creating pragma from aspect.
2249         (Add_Predicates): Use new field Corresponding_Aspect.
2250         * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
2251         name when present, for the purpose of issuing error messages;
2252         remove local procedure Error_Pragma_Arg_Alternate_Name.
2253         * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
2254         N_Pragma node.
2255         (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
2256         N_Pragma node.
2257
2258 2011-09-06  Robert Dewar  <dewar@adacore.com>
2259
2260         * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
2261
2262 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2263
2264         * exp_ch6.adb (Build_Heap_Allocator): Add new
2265         local variable Desig_Typ. Code and comment reformatting. Add
2266         machinery to ensure that the allocation uses a fat pointer when
2267         the type of the return object is a constrained array and the
2268         function return type is an unconstrained array.
2269
2270 2011-09-06  Vincent Celier  <celier@adacore.com>
2271
2272         * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
2273         parameters in subprograms.
2274
2275 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2276
2277         * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
2278
2279 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2280
2281         * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
2282         (System.Tasking.Primitive_Operations.Specific.Delete): Remove
2283         subprogram.
2284         (System.Tasking.Primitive_Operations.Specific.Set): If argument
2285         is null, destroy task specific data, to make API consistent with
2286         other platforms, and thus compatible with the shared version
2287         of s-tpoaal.adb.
2288         (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
2289         Document the above assumption.
2290
2291 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2292
2293         * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
2294         variable for type of return value when return type is
2295         unconstrained and context is an assignment.
2296
2297 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2298
2299         * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
2300         class-wide operation if expansion is not enabled.
2301
2302 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
2303
2304         * checks.adb (Apply_Scalar_Range_Check): Deal with access
2305         type prefix.
2306
2307 2011-09-06  Yannick Moy  <moy@adacore.com>
2308
2309         * sem_ch13.adb (Analyze_Aspect_Specifications, case
2310         Aspect_Invariant): Do not issue error at this point on illegal
2311         pragma placement, as this is checked later on when analyzing
2312         the corresponding pragma.
2313         * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
2314         similar to Error_Pragma_Arg, except the source name of the
2315         aspect/pragma to use in warnings may be equal to parameter
2316         Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
2317         message to distinguish source name of pragma/aspect, and whether
2318         the illegality resides in the type being public, or being private
2319         without a public declaration
2320
2321 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2322
2323         * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
2324         size check (fd_set is implemented differently on that platform).
2325
2326 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2327
2328         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
2329         s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2330         s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
2331         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
2332         (ATCB_Allocation): New subpackage of
2333         System.Tasking.Primitive_Operations, shared across all targets
2334         with full tasking runtime.
2335         (ATCB_Allocation.New_ATCB): Moved there (from target specific
2336         s-taprop bodies).
2337         (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
2338         taking care of establishing a local temporary ATCB if the one
2339         being deallocated is Self, to avoid a reference to the freed
2340         ATCB in Abort_Undefer.
2341
2342 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2343
2344         * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
2345         terminated, mark it for deallocation upon termination.
2346         (Terminate_Task): Call Free_Task again if the task is marked
2347         for automatic deallocation upon termination.
2348
2349 2011-09-06  Robert Dewar  <dewar@adacore.com>
2350
2351         * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
2352         a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
2353         a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
2354         a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
2355         a-intnam-solaris.ads, a-intnam-tru64.ads,
2356         a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
2357         cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
2358         * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
2359         * par-prag.adb: Add dummy entry for pragma Implementation_Defined
2360         * s-rident.ads: Add new restriction No_Implementation_Identifiers
2361         Add new profile No_Implementation_Extensions
2362         * sem_prag.adb: Implement pragma Implementation_Defined Implement
2363         profile No_Implementation_Extensions
2364         * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
2365         Check violation of restriction No_Implementation_Identifiers
2366         * snames.ads-tmpl: Add entries for pragma Implementation_Defined
2367         Add entry for Name_No_Implementation_Extensions
2368
2369 2011-09-06  Robert Dewar  <dewar@adacore.com>
2370
2371         * impunit.ads: Minor reformatting.
2372
2373 2011-09-06  Robert Dewar  <dewar@adacore.com>
2374
2375         * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
2376
2377 2011-09-06  Pascal Obry  <obry@adacore.com>
2378
2379         * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
2380         types.
2381
2382 2011-09-06  Robert Dewar  <dewar@adacore.com>
2383
2384         * g-socket.adb: Minor reformatting
2385
2386 2011-09-06  Javier Miranda  <miranda@adacore.com>
2387
2388         * ali.adb (Scan_ALI): Add missing support to load references of
2389         entities imported from other languages.
2390         * ali.ads (Xref_Record): Adding new fields to store the language and
2391         name of an imported entity.
2392         * lib-xref.adb (Output_Import_Export_Info): Fix typo
2393         in comment.
2394
2395 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2396
2397         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
2398         is allowed on a full type declaration if it is the completion of
2399         a private declarations.
2400         * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
2401         aspect is allowed on a full type declaration in the private part
2402         of a package.
2403
2404 2011-09-06  Robert Dewar  <dewar@adacore.com>
2405
2406         * sem_ch8.ads: Minor reformatting
2407
2408 2011-09-06  Thomas Quinot  <quinot@adacore.com>
2409
2410         * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
2411         Guard against socket values that are not in [0;FD_SETSIZE[
2412
2413 2011-09-06  Robert Dewar  <dewar@adacore.com>
2414
2415         * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
2416         reformatting.
2417
2418 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2419
2420         * s-linux-alpha.ads: Minor reformatting
2421         * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
2422         Use sizeof instead of corresponding C defines in s-oscons template.
2423
2424 2011-09-06  Vadim Godunko  <godunko@adacore.com>
2425
2426         * a-convec.ads, a-iteint.ads: Minor reformatting.
2427
2428 2011-09-06  Vincent Celier  <celier@adacore.com>
2429
2430         * projects.texi: Add menus and @node lines.
2431
2432 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2433
2434         * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
2435         where the return type is an unconstrained array and the context
2436         is an assignment. Optimize the case when the target of the
2437         assignment is a selected component.
2438
2439 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2440
2441         * s-solita.adb: Update comments.
2442
2443 2011-09-06  Pascal Obry  <obry@adacore.com>
2444
2445         * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
2446         s-linux-sparc.ads: Remove hard coded and now wrong definitions.
2447         * s-oscons-tmplt.c: Add support for generating pthread related
2448         types size on GNU/Linux as done for Darwin.
2449         * s-osinte-linux.ads: Use s-oscons to define the pthread types.
2450
2451 2011-09-06  Robert Dewar  <dewar@adacore.com>
2452
2453         * exp_ch6.adb: Fix minor typo.
2454
2455 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2456
2457         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2458         (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
2459         (Double_Size_Of): Alphabetized. Update the comment on usage.
2460         (Make_Finalize_Address_Stmts): Update comments and reformat code.
2461         (Nearest_Multiple_Rounded_Up): New routine.
2462         (Size_Of): Update comment on usage. The generated expression now
2463         accounts for alignment gaps by rounding the size of the type to the
2464         nearest multiple rounded up of the type's alignment.
2465
2466 2011-09-06  Robert Dewar  <dewar@adacore.com>
2467
2468         * exp_ch7.adb, g-comlin.adb: Minor reformatting.
2469
2470 2011-09-06  Steve Baird  <baird@adacore.com>
2471
2472         * exp_ch4.adb (Expand_Allocator_Expression): Look through
2473         derived subprograms in checking for presence of an
2474         Extra_Accessibility_Of_Result formal parameter.
2475         * exp_ch6.adb (Expand_Call): Look through derived subprograms in
2476         checking for presence of an Extra_Accessibility_Of_Result formal
2477         parameter.
2478         (Expand_Call.Add_Actual_Parameter): Fix a bug in the
2479         case where the Parameter_Associatiations attribute is already set,
2480         but set to an empty list.
2481         (Needs_Result_Accessibility_Level):
2482         Unconditionally return False. This is a temporary
2483         change, disabling the Extra_Accessibility_Of_Result
2484         mechanism.
2485         (Expand_Simple_Function_Return): Check for
2486         Extra_Accessibility_Of_Result parameter's presence instead of
2487         testing Ada_Version when generating a runtime accessibility
2488         check which makes use of the parameter.
2489
2490 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
2491
2492         * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
2493         expression in a given case alternative must be attached to the
2494         statement list of the ccrresponding case statement alternative
2495         They cannot be propagated ahead of the case statement, because
2496         the validity of the expression that generated the action may
2497         hold only for that alternative.
2498
2499 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2500
2501         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
2502         (Alignment_Of): Remove the code for strict alignment targets.
2503         (Double_Alignment_Of): Removed.
2504         (Double_Size_Of): New routine.
2505         (Make_Finalize_Address_Stmts): Change the
2506         calculation of the dope's size.  Update relevant comments.
2507         (Size_Of): New routine.
2508
2509 2011-09-06  Steve Baird  <baird@adacore.com>
2510
2511         * einfo.ads (Extra_Accessibility): Update associated comment to use
2512         the term "present" correctly ("present" just means that it is not
2513         an error to query the value of the attribute - it does not imply
2514         that the value must be non-null).
2515         (Extra_Constrained): Ditto.
2516         (Is_Visible_Formal): Ditto.
2517         (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
2518         (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
2519         * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
2520         * exp_ch6.adb (Expand_Call): The callee may require an
2521         Extra_Accessibility_Of_Result actual parameter even if Ada_Version
2522         < Ada_2012. This can occur if the callee is exported from a Gnat
2523         runtimes unit. Also improve a comment.
2524
2525 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
2526
2527         * exp_ch7.adb: Add with and use clauses for Get_Targ.
2528         (Alignment_Of): Rename formal parameter Some_Typ
2529         to Typ, update related comment. Use the allocator alignment on
2530         strict alignment targets such as SPARC.
2531         (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
2532         related comment.
2533
2534 2011-09-06  Gary Dismukes  <dismukes@adacore.com>
2535
2536         * sem_ch9.adb (Check_Interfaces): Test
2537         Is_Limited_Type rather than Is_Limited_Record when checking that
2538         the partial view of a synchronized full view must be limited.
2539
2540 2011-09-06  Emmanuel Briot  <briot@adacore.com>
2541
2542         * g-comlin.adb (Free): Fix memory leak.
2543
2544 2011-09-06  Robert Dewar  <dewar@adacore.com>
2545
2546         * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
2547
2548 2011-09-06  Steve Baird  <baird@adacore.com>
2549
2550         * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
2551         (Ada2012) cases described in AI05-0234 where the accessibility
2552         level of a function result is "determined by the point of
2553         call", an implicit parameter representing that accessibility
2554         level is passed in. Extra_Accessibilty_Of_Result yields this
2555         additional formal parameter. Extra_Accessibility_Of_Result
2556         is analogous to the existing Extra_Accessibility
2557         function used in the implementation of access parameters.
2558         (Set_Extra_Accessibility_Of_Result): New procedure; sets
2559         Extra_Accessibility_Of_Result attribute.
2560         * einfo.adb (Extra_Accessibility_Of_Result): New function.
2561         (Set_Extra_Accessibility_Of_Result): New procedure.
2562         (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
2563         * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
2564         an accessibility level literal to Natural; introduce a nested
2565         function, Make_Level_Literal, to do this.
2566         * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
2567         determines whether a given function (or access-to-function
2568         type) needs to have an implicitly-declared accessibility-level
2569         parameter added to its profile.
2570         (Add_Extra_Actual_To_Call): Export an existing procedure which was
2571         previously declared in the body of Exp_Ch6.
2572         * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
2573         it to exp_ch6.ads.
2574         (Has_Unconstrained_Access_Discriminants): New Function; a
2575         predicate on subtype entities which returns True if the given
2576         subtype is unconstrained and has one or more access discriminants.
2577         (Expand_Call): When expanding a call to a function which takes an
2578         Extra_Accessibility_Of_Result parameter, pass in the appropriate
2579         actual parameter value. In the case of a function call which is
2580         used to initialize an allocator, this may not be possible because
2581         the Etype of the allocator may not have been set yet. In this
2582         case, we defer passing in the parameter and handle it later in
2583         Expand_Allocator_Expression.
2584         (Expand_Simple_Function_Return): When returning from a function which
2585         returns an unconstrained subtype having at least one access
2586         discriminant, generate the accessibility check needed to ensure that
2587         the function result will not outlive any objects designated by its
2588         discriminants.
2589         (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
2590         description.
2591         * exp_ch4.adb (Expand_Allocator_Expression): When a function call
2592         is used to initialize an allocator, we may need to pass in "the
2593         accessibility level determined by the point of call" (AI05-0234)
2594         to the function. Expand_Call, where such actual parameters are
2595         usually generated, is too early in this case because the Etype of
2596         the allocator (which is used in determining the level to be passed
2597         in) may not have been set yet when Expand_Call executes. Instead,
2598         we generate code to pass in the appropriate actual parameter
2599         in Expand_Allocator_Expression.
2600         * sem_ch6.adb (Create_Extra_Formals): Create
2601         the new Extra_Accessibility_Of_Result formal if
2602         Needs_Result_Accessibility_Level returns True. This includes the
2603         introduction of a nested procedure, Check_Against_Result_Level.
2604
2605 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
2606
2607         * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
2608         declaration.
2609
2610 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2611
2612         * s-finmas.adb (Set_Finalize_Address): Explain the reason
2613         for the synchronization. Move the test for null from
2614         s-stposu.Allocate_Any_Controlled to this routine since the check
2615         needs to be protected too.
2616         (Set_Heterogeneous_Finalize_Address): Explain the reason for the
2617         synchronization code.
2618         * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
2619         explaining the context in which this routine is used.
2620         * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
2621         to s-finmas.Set_Finalize_Address.
2622
2623 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2624
2625         * einfo.ads: Document that itypes have no parent field.
2626
2627 2011-09-05  Robert Dewar  <dewar@adacore.com>
2628
2629         * rtsfind.adb (Check_CRT): Check for overloaded entity
2630         * rtsfind.ads: Document that entities to be found by rtsfind
2631         cannot be overloaded
2632         * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
2633         (Lock_Entries_With_Status): New name for Lock_Entries with two
2634         arguments (changed to meet rtsfind no overloading rule).
2635
2636 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2637
2638         * s-finmas.adb (Set_Finalize_Address (Address,
2639         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2640         (Set_Finalize_Address (in out Finalization_Master,
2641         Finalize_Address_Ptr): Add synchronization code.
2642         * s-finmas.ads (Set_Finalize_Address (Address,
2643         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
2644         * s-stposu.adb (Allocate_Any_Controlled): Update the call to
2645         Set_Finalize_Address for the heterogeneous case.
2646
2647 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2648
2649         * sem_ch3.adb: Undo previous change, not suitable after all.
2650
2651 2011-09-05  Robert Dewar  <dewar@adacore.com>
2652
2653         * einfo.ads: Minor comment clarification.
2654
2655 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2656
2657         * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
2658         no longer needs to search through the entities of the return
2659         statement scope to find the _chain.
2660         * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
2661         (Analyze_Block_Statement): Add local variable
2662         Is_BIP_Return_Statement. Add machinery to install all entities
2663         produced by the expansion of the return object declaration.
2664         (Install_Return_Entities): New routine.
2665         * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
2666
2667 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2668
2669         * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
2670         of subunit is incomplete.
2671         (Analyze_Proper_Body): If parent spec is not available, do not
2672         attempt analysis.
2673
2674 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2675
2676         * sem_disp.adb (Find_Controlling_Arg): Add checks for
2677         interface type conversions, that are expanded into dereferences.
2678
2679 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2680
2681         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2682         Examine the parameter and return profile of a subprogram and swap
2683         any incomplete types coming from a limited context with their
2684         corresponding non-limited views.
2685         (Exchange_Limited_Views): New routine.
2686
2687 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2688
2689         * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
2690         of internal entity to the subtype declaration, so that when
2691         entities are subsequently exchanged in a package body, the tree
2692         remains properly formatted for ASIS.
2693
2694 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2695
2696         * g-comlin.adb (Set_Usage): Additional optional argument to set help
2697         message.
2698         (Display_Help): display the user given help message, if available.
2699
2700 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2701
2702         * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
2703         is legal if the original node is an identifier that is a
2704         parameterless function call.
2705
2706 2011-09-05  Pascal Obry  <obry@adacore.com>
2707
2708         * prj-nmsc.adb: Minor reformatting.
2709         Add support for standalone aggregate library.
2710         (Check_Stand_Alone_Library): Handle standalone aggregate library.
2711         * projects.texi: Fix documentation for aggregate library projects.
2712
2713 2011-09-05  Robert Dewar  <dewar@adacore.com>
2714
2715         * sem_ch6.adb: Minor reformatting.
2716
2717 2011-09-05  Matthew Gingell  <gingell@adacore.com>
2718
2719         * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
2720         stack guard page on PPC Linux. This patch ensures the 64K guard page at
2721         the bottom of the stack is not overwritten.
2722
2723 2011-09-05  Thomas Quinot  <quinot@adacore.com>
2724
2725         * exp_intr.adb, s-tasini.adb: Minor reformatting.
2726
2727 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2728
2729         * sem_ch3.adb (Access_Definition): If an access type declaration
2730         appears in a child unit, the scope of whatever anonymous type
2731         may be generated is the child unit itself.
2732
2733 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2734
2735         * sem_ch6.adb (Analyze_Expression_Function): Do not set
2736         Comes_From_Source on rewritten body.
2737         (Analyze_Subprogram_Body_Helper): Check that the original node for
2738         the body comes from source, when determining whether expansion
2739         of a protected operation is needed.
2740
2741 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2742
2743         * exp_aggr.adb (Replace_Type): If the target of the assignment is
2744         a selected component and the right-hand side is a self-referential
2745         access, the proper prefix of the rewritten attribute is a copy
2746         of the left-hand side, not of its prefix.
2747
2748 2011-09-05  Robert Dewar  <dewar@adacore.com>
2749
2750         * sem_ch5.adb: Minor reformatting.
2751         * sem_ch3.adb: Minor code clean up.
2752
2753 2011-09-05  Jose Ruiz  <ruiz@adacore.com>
2754
2755         * exp_ch9.adb (Make_Initialize_Protection): The fact that
2756         restriction No_Dynamic_Attachment is in effect or not should
2757         not influence the default priority associated to a protected
2758         object. With this change, when the restriction is in effect (as
2759         is the case for the Ravenscar profile) the default priority of
2760         a protected object with an interrupt handler is in the range of
2761         interrupt priorities (Default_Interrupt_Priority) as required
2762         by D.3(10).
2763
2764 2011-09-05  Arnaud Charlet  <charlet@adacore.com>
2765
2766         * a-iteint.ads: Fix header.
2767
2768 2011-09-05  Vincent Celier  <celier@adacore.com>
2769
2770         * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
2771         with a directory separator to avoid output such as:
2772           "/path/to/objauto.cgpr" has been deleted.
2773
2774 2011-09-05  Robert Dewar  <dewar@adacore.com>
2775
2776         * sem_ch3.adb: Minor reformatting.
2777
2778 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2779
2780         * sem_ch5.adb: Better error message.
2781
2782 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2783
2784         * exp_aggr.adb: Add with and use clause for Exp_Ch6.
2785         (Expand_Array_Aggregate): Detect a special case of an aggregate
2786         which contains tasks in the context of an unexpanded return
2787         statement of a build-in-place function.
2788         * exp_ch6.adb: Add with and use clause for Exp_Aggr.
2789         (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
2790         which contains tasks and expand it now that the original simple
2791         return statement has been rewritten.
2792         * exp_ch9.adb (Build_Activation_Chain_Entity): Code
2793         reformatting. Do not create a chain for an extended return
2794         statement if one is already available.
2795         (Has_Activation_Chain): New routine.
2796
2797 2011-09-05  Marc Sango  <sango@adacore.com>
2798
2799         * sem_ch3.adb (Analyze_Object_Declaration): Remove
2800         the wrong test and add the correct test to detect the violation
2801         of illegal use of unconstrained string type in SPARK mode.
2802
2803 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2804
2805         * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
2806         message on an iterator over an array.
2807
2808 2011-09-05  Robert Dewar  <dewar@adacore.com>
2809
2810         * lib-xref-alfa.adb: Minor reformatting.
2811
2812 2011-09-05  Robert Dewar  <dewar@adacore.com>
2813
2814         * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
2815         exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
2816
2817 2011-09-05  Gary Dismukes  <dismukes@adacore.com>
2818
2819         * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
2820
2821 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2822
2823         * lib-xref-alfa.adb: Update comments.
2824
2825 2011-09-05  Thomas Quinot  <quinot@adacore.com>
2826
2827         * sem_res.adb: Minor reformatting
2828
2829 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2830
2831         * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
2832         present, create them now.  Needed in case the return type was
2833         a limited view in the function declaration.
2834         (Make_Build_In_Place_Call_In_Allocator): If return type contains
2835         tasks, build the activation chain for it.  Pass a reference to
2836         the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
2837         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
2838         with build_in_place calls.
2839         * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
2840         incomplete, inatialize its Corresponding_Record_Type component.
2841         * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
2842         of limited views.
2843
2844 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2845
2846         * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
2847         information.
2848
2849 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2850
2851         * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
2852         appears within a package specification and the token after "IS"
2853         is not a parenthesis, assume that this is an unparenthesized
2854         expression function, even if the token appears in a line by
2855         itself.
2856         * par.adb: Clarify use of Labl field of scope stack in error
2857         recovery.
2858
2859 2011-09-05  Bob Duff  <duff@adacore.com>
2860
2861         * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
2862         conversions instead of normal type conversions in all cases where a
2863         type conversion would be illegal. In particular, use unchecked
2864         conversions when the operand types are private.
2865
2866 2011-09-05  Johannes Kanig  <kanig@adacore.com>
2867
2868         * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
2869         objects of task type or protected type.
2870
2871 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
2872
2873         * sem_ch6.adb (Analyze_Expression_Function): If the expression
2874         function comes from source, indicate that so does its rewriting,
2875         so it is compatible with any subsequent expansion of the
2876         subprogram body (e.g. when it is a protected operation).
2877         * sem_ch4.adb: minor reformatting
2878
2879 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
2880
2881         * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2882         Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2883         may lead to wrong ancestor package in the case of instantiated subunit
2884         bodies. If a subunit is instantiated, follow the chain of instantiations
2885         rather than the stub structure.
2886
2887 2011-09-02  Robert Dewar  <dewar@adacore.com>
2888
2889         * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2890         * gcc-interface/Make-lang.in: Update dependencies.
2891
2892 2011-09-02  Marc Sango  <sango@adacore.com>
2893
2894         * sem_ch3.adb (Analyze_Object_Declaration): Change
2895         comment and add additional check to differentiate constant of
2896         type string from others unconstrained type.
2897
2898 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2899
2900         * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2901         present in incomplete type declarations to refine the error
2902         message the full declaration is in the same unit.
2903         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2904         an incomplete type, set the Premature_Use for additional message.
2905         * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2906         and Premature_Use is set, place additional information at the
2907         point of premature use.
2908
2909 2011-09-02  Bob Duff  <duff@adacore.com>
2910
2911         * sem_ch6.adb: (Check_Post_State): Suppress warning
2912         "postcondition refers only to pre-state" when the expression has not
2913         yet been analyzed, because it causes false alarms. This can happen when
2914         the postcondition contains a quantified expression, because those are
2915         analyzed later. This is a temporary/partial fix.
2916         (Process_Post_Conditions): Minor: change wording of warning.
2917
2918 2011-09-02  Marc Sango  <sango@adacore.com>
2919
2920         * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2921         illegal use of unconstrained string type in SPARK mode.
2922         * sem_res.adb (Analyze_Operator_Symbol): Set the
2923         right place where the string operand of concatenation should be
2924         violate in SPARK mode.
2925
2926 2011-09-02  Robert Dewar  <dewar@adacore.com>
2927
2928         * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2929         exp_ch3.adb: Minor reformatting.
2930
2931 2011-09-02  Vincent Celier  <celier@adacore.com>
2932
2933         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2934         as the compiler driver so Is_Compilable returns True for sources.
2935         * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2936         for the body.
2937
2938 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2939
2940         * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2941         condition, a reference to a controlling formal must be interpreted
2942         as having the class-wide type (or an access to such) so that the
2943         inherited condition can be properly applied to any overriding
2944         operation (see ARM12 6.6.1 (7)).
2945
2946 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2947
2948         * init.c (__gnat_is_vms_v7): Fix case and add prototype
2949         for LIB$GETSYI.
2950
2951 2011-09-02  Javier Miranda  <miranda@adacore.com>
2952
2953         * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2954         initializing expression of a class-wide interface object declaration
2955         if its type is limited.
2956
2957 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2958
2959         * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2960         literals, take into account the type name; the type is *not*
2961         the scope for an enumeration literal.
2962
2963 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2964
2965         * sem_ch6.adb (Check_Overriding_Indicator): add special check
2966         to reject an overriding indicator on a user-defined Adjust
2967         subprogram for a limited controlled type.
2968
2969 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
2970
2971         * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2972         for an actual that is a function call returning an unconstrained
2973         limited controlled type.
2974
2975 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2976
2977         * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2978
2979 2011-09-02  Johannes Kanig  <kanig@adacore.com>
2980
2981         * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2982         from "HEAP" to __HEAP Change comment that refers to that variable
2983         * put_alfa.adb: Change comment that refers to that variable
2984
2985 2011-09-02  Robert Dewar  <dewar@adacore.com>
2986
2987         * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2988
2989 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
2990
2991         * exp_util.adb (Extract_Renamed_Object): Renamed to
2992         Find_Renamed_Object. This routine has been reimplemented and now uses
2993         tree traversal to locate a renamed object.
2994         (Is_Aliased): Replace call to Extract_Renamed_Object with
2995         Find_Renamed_Object.
2996
2997 2011-09-02  Tristan Gingold  <gingold@adacore.com>
2998
2999         * init.c: (__gnat_is_vms_v7): New function.
3000
3001 2011-09-02  Olivier Hainque  <hainque@adacore.com>
3002
3003         * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
3004         that have a misaligned backchain, necessarily bogus.
3005
3006 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3007
3008         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
3009         TSS routine Finalize_Address when compiling in Alfa mode.
3010         (Expand_Freeze_Record_Type): Do not create TSS routine
3011         Finalize_Address when compiling in Alfa mode.
3012         * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
3013         call to Set_Finalize_Address in Alfa mode because Finalize_Address is
3014         not built.
3015         (Expand_N_Allocator): Do not produce a call to
3016         Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
3017         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
3018         produce a call to primitive Set_Finalize_Address in Alfa mode because
3019         Finalize_Address is not built.
3020         * exp_ch7.adb (Build_Finalization_Master): Do not create
3021         finalization masters in Afa mode since they are not needed.
3022         (Build_Finalizer): Do not create scope and library-level
3023         finalizers in Alfa mode since they are not needed.
3024         * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
3025         "new" and "free" when applied to controlled objects in Alfa mode since
3026         this is not needed.
3027
3028 2011-09-02  Vincent Celier  <celier@adacore.com>
3029
3030         * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
3031         only library names with the syntax of Ada identifiers, to avoid errors
3032         when compiling the binder generated files.
3033         * projects.texi: Document restriction on SAL library names
3034
3035 2011-09-02  Thomas Quinot  <quinot@adacore.com>
3036
3037         * a-chtgbo.adb: Minor comment fix.
3038
3039 2011-09-02  Robert Dewar  <dewar@adacore.com>
3040
3041         * lib-xref.adb: Minor reformatting
3042
3043 2011-09-02  Vincent Celier  <celier@adacore.com>
3044
3045         * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
3046         gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
3047         --version and --help in usage.
3048         * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
3049
3050 2011-09-02  Bob Duff  <duff@adacore.com>
3051
3052         * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
3053         compilers don't understand it.
3054
3055 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
3056
3057         * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
3058         underlying subtype rather than its base type on the call to
3059         Build_Record_Or_Elementary_Input_Function, so that any
3060         constraints on a discriminated subtype will be available for
3061         doing the check required by AI05-0192.
3062         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3063         If the prefix subtype of the 'Input attribute is a constrained
3064         discriminated subtype, then check each constrained discriminant value
3065         against the corresponding value read from the stream.
3066
3067 2011-09-02  Yannick Moy  <moy@adacore.com>
3068
3069         * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
3070         warnings on suspicious contracts, and enable them with -gnatwa.
3071
3072 2011-09-02  Robert Dewar  <dewar@adacore.com>
3073
3074         * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
3075         reformatting.
3076
3077 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3078
3079         * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
3080         which ensure that restriction No_Dynamic_Attachment has not been
3081         violated.
3082         (Make_Initialize_Protection): Protected types with attach or
3083         interrupt handlers must not violate restriction No_Dynamic_Attachment.
3084         * exp_util.adb (Corresponding_Runtime_Package): Add a guard
3085         which ensures that restriction No_Dynamic_Attachment has not been
3086         violated.
3087         * sem_attr.adb: (Eval_Attribute): Transform
3088         VAX_Float_Type'First and 'Last into references to
3089         the temporaries which store the corresponding bounds. The
3090         transformation is needed since the back end cannot evaluate
3091         'First and 'Last on VAX.
3092         (Is_VAX_Float): New routine.
3093
3094 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3095
3096         * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
3097         generic unit is not intrinsic and has an explicit convention,
3098         the instance inherits it.
3099
3100 2011-09-02  Robert Dewar  <dewar@adacore.com>
3101
3102         * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
3103         prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
3104
3105 2011-09-02  Thomas Quinot  <quinot@adacore.com>
3106
3107         * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
3108         Guard against a prefix that is an N_Has_Entity but has no
3109         associated entity.
3110
3111 2011-09-02  Yannick Moy  <moy@adacore.com>
3112
3113         * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
3114         references.
3115
3116 2011-09-02  Yannick Moy  <moy@adacore.com>
3117
3118         * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
3119         * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
3120         contracts.
3121         * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
3122         procedure looking for suspicious postconditions.
3123         * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
3124         * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
3125         options -gnatw.t and -gnatw.T.
3126
3127 2011-09-02  Pascal Obry  <obry@adacore.com>
3128
3129         * prj.adb: Minor code refactoring. Move check for null project in
3130         Project_Changed.
3131         * projects.texi: Fix minor typos.
3132
3133 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3134
3135         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
3136         of iteration is an expression, its value must be captured in a
3137         renaming declaration, so that modification of the elements is
3138         propagated to the original container.
3139
3140 2011-09-02  Pascal Obry  <obry@adacore.com>
3141
3142         * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
3143         prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
3144         prj-tree.adb: Minor reformatting and style fixes.
3145
3146 2011-09-02  Robert Dewar  <dewar@adacore.com>
3147
3148         * s-rident.ads: Add new restriction No_Implicit_Aliasing
3149         * sem_attr.adb: (Analyze_Access_Attribute): Deal with
3150         No_Implicit_Aliasing
3151         (Analyze_Attribute, case Address): ditto
3152         (Analyze_Attribute, case Unrestricted_Access): ditto
3153         * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
3154         No_Implicit_Aliasing restriction.
3155         * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
3156
3157 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3158
3159         * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
3160         is an unchecked conversion, apply test to its expression.
3161
3162 2011-09-02  Javier Miranda  <miranda@adacore.com>
3163
3164         * sem_ch3.adb (Check_Abstract_Overriding): When
3165         traversing the chain of aliased subprograms avoid reporting a
3166         redundant error on the current entity.
3167
3168 2011-09-02  Sergey Rybin  <rybin@adacore.com>
3169
3170         * gnat_ugn.texi: Minor clean up.
3171
3172 2011-09-02  Bob Duff  <duff@adacore.com>
3173
3174         * s-htable.adb (Set_If_Not_Present): Use renaming
3175         instead of ":=", because the type Key is limited in the generic (even
3176         if not in the instances).
3177
3178 2011-09-02  Robert Dewar  <dewar@adacore.com>
3179
3180         * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
3181         g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
3182         reformatting.
3183
3184 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3185
3186         * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
3187         inherited component with the enclosing derived type. Code reformatting.
3188
3189 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
3190
3191         * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
3192         return done when overflow checks are enabled, since comparisons against
3193         Lor and Hir should not be done when OK1 is False.
3194
3195 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
3196
3197         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
3198         Add new formal Master_Exp. When present, add that expression to the
3199         call as an extra actual.
3200         (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
3201         Fmaster_Actual and in the case of a BIP call initializing a return
3202         object of an enclosing BIP function set it to a
3203         new reference to the implicit finalization master
3204         formal of the enclosing function. Fmaster_Actual is
3205         then passed to the new formal Master_Exp on the call to
3206         Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
3207         initializations of Enclosing_Func to its declaration.
3208
3209 2011-09-02  Thomas Quinot  <quinot@adacore.com>
3210
3211         * csets.ads: Minor reformatting
3212
3213 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3214
3215         * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
3216         the full view of a private type coming from an instantiation.
3217         * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
3218         loop to iterate over the declarations rather than use the
3219         First_Entity / Next_Entity scheme.
3220
3221 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3222
3223         * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
3224         X'range (N) into X'First (N) ..  X'Last (N), do not share the
3225         dimension indicator N, if present. Even though it is a static
3226         constant, its source location may be modified when printing
3227         expanded code under -gnatDL, and node sharing will lead to chaos
3228         in Sprint on large files, by generating a sloc value that does
3229         not correspond to any source file.
3230
3231 2011-09-02  Bob Duff  <duff@adacore.com>
3232
3233         * einfo.adb: (Has_Xref_Entry): Do not call
3234         Implementation_Base_Type. Lib.Xref has been
3235         rewritten to avoid the need for it, and it was costly.
3236         * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
3237         functions in support of efficient xref.
3238         * lib-xref-alfa.adb: Misc changes related to Key component of
3239         type Xref_Entry.
3240         * lib-xref.adb: (Add_Entry,etc): Speed improvement.
3241         (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
3242         no longer does. This is the one place where it is needed.
3243
3244 2011-09-02  Johannes Kanig  <kanig@adacore.com>
3245
3246         * g-comlin.adb (Getopt): New optional argument Concatenate to have
3247         similar interface as the other Getopt function.
3248
3249 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
3250
3251         * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
3252         a call to Set_Finalize_Address if there is no allocator available.
3253         * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
3254         a case of allocator expansion where the allocator is not expanded but
3255         needs a custom allocate routine. Code reformatting.
3256         (Is_Finalizable_Transient): Remove local variables Has_Rens and
3257         Ren_Obj. Code reformatting.
3258         (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
3259         through the use of 'reference.
3260         * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
3261         as part of build-in-place expansion. They are intentionally marked as
3262         coming from source, but their parents are not.
3263
3264 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3265
3266         * sem_ch10.adb (Analyze_With_Clause): If the library unit
3267         is the generated subprogram declaration for a child unit body
3268         that acts as spec, use the original body in the with_clause,
3269         to prevent binding errors.
3270
3271 2011-09-02  Vincent Celier  <celier@adacore.com>
3272
3273         * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
3274         qualifier /MULTI_UNIT_INDEX=
3275
3276 2011-09-02  Johannes Kanig  <kanig@adacore.com>
3277
3278         * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
3279         instead of calling the callback function
3280
3281 2011-09-02  Robert Dewar  <dewar@adacore.com>
3282
3283         * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
3284         prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
3285
3286 2011-09-02  Vincent Celier  <celier@adacore.com>
3287
3288         * prj-nmsc.adb: (Find_Sources): When the list of sources is
3289         explicitly declared in an extending project, do not warn if a source
3290         for an inherited naming exception is not found.
3291
3292 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
3293
3294         * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
3295         expansion is inactive.
3296
3297 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
3298
3299         * sem_util.adb (Note_Possible_Modification): If the entity
3300         being modified is the renaming generated for an Ada2012 iterator
3301         element, the enclosing container or array is modified as well.
3302
3303 2011-09-02  Jose Ruiz  <ruiz@adacore.com>
3304
3305         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
3306         Initialize): Define and initialize the
3307         mutex attributes and condition variable attributes locally.
3308
3309 2011-09-02  Vincent Celier  <celier@adacore.com>
3310
3311         * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
3312         exception replaced in an extending project.
3313         (Check_Object): No error when the other source is locally removed.
3314
3315 2011-09-02  Yannick Moy  <moy@adacore.com>
3316
3317         * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
3318         unresolved calls.
3319
3320 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3321
3322         * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
3323         run-time files.
3324         * gcc-interface/Make-lang.in: Update dependencies.
3325
3326 2011-09-01  Robert Dewar  <dewar@adacore.com>
3327
3328         * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
3329
3330 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3331
3332         * adaint.h (__gnat_cpu_free): Fix the name of this profile.
3333         * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
3334         __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
3335         specific for systems where their glibc version does not define the
3336         routines to handle dynamically allocated CPU sets.
3337
3338 2011-09-01  Vincent Celier  <celier@adacore.com>
3339
3340         * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
3341         prj-env.adb: Implement inheritance of naming exceptions in extending
3342         projects.
3343
3344 2011-09-01  Romain Berrendonner  <berrendo@adacore.com>
3345
3346         * gnatls.adb: Display simple message instead of content of
3347         gnatlic.adl.
3348
3349 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3350
3351         * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
3352         access discriminant and anonymous access component scopes.
3353         (Inherit_Component): Reuse the itype of an access discriminant
3354         or anonymous access component by copying it in order to set the proper
3355         scope. This is done only when the parent and the derived type
3356         are in different scopes.
3357         (Set_Anonymous_Etype): New routine.
3358
3359 2011-09-01  Robert Dewar  <dewar@adacore.com>
3360
3361         * a-convec.adb: Minor reformatting throughout.
3362
3363 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3364
3365         * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
3366         __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
3367         CPU_ALLOC_SIZE and CPU_FREE linux macros.
3368         (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
3369         CPU_SET_S respectively because we are now using dynamically allocated
3370         CPU sets which are more portable across different glibc versions.
3371         * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
3372         CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
3373         masks dynamically according to the number of processors in the target
3374         platform.
3375         (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
3376         respectively, so we need to pass the size of the masks as
3377         parameters.
3378         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
3379         created cpu_set_t masks
3380         with the number of processors available in the target platform,
3381         instead of static bit arrays. It enhances portability because
3382         it uses the information from the target platform.
3383         * sem_ch8.adb: (Attribute_Renaming): When checking whether we
3384         are using a restricted run-time library, use the flag
3385         Configurable_Run_Time_Mode instead of Restricted_Profile.
3386
3387 2011-09-01  Vincent Celier  <celier@adacore.com>
3388
3389         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
3390         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
3391
3392 2011-09-01  Nicolas Roche  <roche@adacore.com>
3393
3394         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
3395         on VxWorks in kernel mode.
3396
3397 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3398
3399         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
3400         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
3401         directly the bit array.
3402         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
3403         the linux macros with the same name.
3404         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
3405         wrappers around the CPU_ZERO and CPU_SET linux macros.
3406
3407 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3408
3409         * exp_ch7.adb (Find_Insertion_List): Removed.
3410         (Process_Transient_Objects): Insert the declarations of the hook
3411         access type and the hook object before the associated transient object.
3412
3413 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3414
3415         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
3416         package System.Aux_Dec when using restricted run-time libraries which
3417         do not have this package.
3418
3419 2011-09-01  Tristan Gingold  <gingold@adacore.com>
3420
3421         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
3422
3423 2011-09-01  Bob Duff  <duff@adacore.com>
3424
3425         * sem_attr.adb (Analyze_Access_Attribute): Do not call
3426         Kill_Current_Values for P'Unrestricted_Access, where P is library level
3427
3428 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3429
3430         * exp_ch5.adb: Minor reformatting
3431         * gnat_ugn.texi: Fix minor typos.
3432         * gcc-interface/Make-lang.in: Update dependencies.
3433
3434 2011-09-01  Robert Dewar  <dewar@adacore.com>
3435
3436         * inline.adb, sem_aggr.adb: Minor reformatting.
3437
3438 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3439
3440         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
3441
3442 2011-09-01  Robert Dewar  <dewar@adacore.com>
3443
3444         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
3445
3446 2011-09-01  Bob Duff  <duff@adacore.com>
3447
3448         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
3449         body" the same as "in inlined body", because visibility shouldn't
3450         apply there.
3451
3452 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
3453
3454         * inline.adb (Add_Inlined_Body): Refine previous change.
3455
3456 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
3457
3458         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
3459         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3460         Test for case where call
3461         initializes an object of a return statement before testing for
3462         a constrained call, to ensure that all such cases get handled
3463         by simply passing on the caller's parameters. Also, in that
3464         case call Needs_BIP_Alloc_Form to determine whether to pass on
3465         the BIP_Alloc_Form parameter of the enclosing function rather
3466         than testing Is_Constrained. Add similar tests for the return
3467         of a BIP call to later processing to ensure consistent handling.
3468         (Needs_BIP_Alloc_Form): New utility function.
3469         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
3470         a BIP_Alloc_Form formal with call to new utility function
3471         Needs_BIP_Alloc_Form.
3472
3473 2011-09-01  Pascal Obry  <obry@adacore.com>
3474
3475         * prj-part.adb: Minor reformatting.
3476
3477 2011-09-01  Vincent Celier  <celier@adacore.com>
3478
3479         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
3480         half character in the unit name.
3481
3482 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3483
3484         * exp_ch4.adb: Minor code and comment reformatting.
3485
3486 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3487
3488         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
3489         for Is_Limited_Type and Is_Tagged_Type in condition checking
3490         for by-reference type.
3491         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
3492         subprograms may have a completion because of a previous
3493         Inline_Always clause, but the enclosing package must be marked
3494         inlined for the subprogram body to become visible to the backend.
3495
3496 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3497
3498         * sem_aux.adb, exp_ch4.adb: Minor reformatting
3499
3500 2011-09-01  Pascal Obry  <obry@adacore.com>
3501
3502         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
3503
3504 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3505
3506         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
3507         the formals of a subprogram stub that acts as a spec.
3508
3509 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3510
3511         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
3512         type, declare a renaming for it, not an object declaration.
3513
3514 2011-09-01  Yannick Moy  <moy@adacore.com>
3515
3516         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
3517         Ignore_Errors to ignore failures to read ALI files when True.
3518
3519 2011-09-01  Javier Miranda  <miranda@adacore.com>
3520
3521         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
3522         constructor calls associated with non-tagged record types.
3523
3524 2011-09-01  Robert Dewar  <dewar@adacore.com>
3525
3526         * g-socthi-vms.adb: Minor reformatting.
3527
3528 2011-09-01  Nicolas Roche  <roche@adacore.com>
3529
3530         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
3531         in order to avoid impact of imcompatible changes.
3532         * cstreams.c: Likewise
3533         * cio.c: Likewise
3534         * aux-io.c: Likewise
3535
3536 2011-09-01  Yannick Moy  <moy@adacore.com>
3537
3538         * lib-writ.adb (Write_With_Lines): Always output complete information
3539         on "with" line in Alfa mode, as this is required by formal verification
3540         back-end.
3541
3542 2011-09-01  Tristan Gingold  <gingold@adacore.com>
3543
3544         * g-socthi-vms.adb: Add comments.
3545
3546 2011-09-01  Pascal Obry  <obry@adacore.com>
3547
3548         * prj.ads: Minor reformatting.
3549
3550 2011-09-01  Vincent Celier  <celier@adacore.com>
3551
3552         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
3553         exceptions in the config pragmas file.
3554
3555 2011-09-01  Tristan Gingold  <gingold@adacore.com>
3556
3557         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
3558
3559 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3560
3561         * exp_ch7.adb (Find_Insertion_List): New routine.
3562         (Process_Transient_Objects): Add code to handle the abnormal
3563         finalization of a controlled transient associated with a subprogram
3564         call. Since transients are cleaned up right after the associated
3565         context, an exception raised during a subprogram call may bypass the
3566         finalization code.
3567
3568 2011-09-01  Robert Dewar  <dewar@adacore.com>
3569
3570         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
3571         aliased.
3572
3573 2011-09-01  Robert Dewar  <dewar@adacore.com>
3574
3575         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
3576
3577 2011-09-01  Robert Dewar  <dewar@adacore.com>
3578
3579         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
3580
3581 2011-09-01  Thomas Quinot  <quinot@adacore.com>
3582
3583         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
3584         GNATRTL_NONTASKING_OBJS.
3585
3586 2011-09-01  Robert Dewar  <dewar@adacore.com>
3587
3588         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
3589         possibility of this flag being set for formals in Ada 2012 mode.
3590         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
3591         2012.
3592         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
3593         mode.
3594         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
3595         Ada 2012.
3596         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
3597         Ada 2012.
3598
3599 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3600
3601         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
3602         insertion node in a tree of nested Expression_With_Actions nodes.
3603         (Process_Transient_Object): In the case where a complex if statement
3604         has been converted into nested Expression_With_Actions nodes, the
3605         "hook" object and the associated access type must be inserted before
3606         the top most Expression_With_Actions.
3607
3608 2011-09-01  Robert Dewar  <dewar@adacore.com>
3609
3610         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
3611         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
3612
3613 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3614
3615         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
3616
3617 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
3618
3619         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
3620         aspect.
3621         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
3622         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
3623         in a similar way as we do for the Priority or Dispatching_Domain aspect.
3624         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
3625         Dispatching_Domains_Frozen): Move this local data to package
3626         System.Tasking because with the CPU aspect we need to have access
3627         to this data when creating the task in System.Tasking.Stages.Create_Task
3628         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
3629         Move these variables from the body of
3630         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
3631         we need to have access to this data when creating the task in
3632         System.Tasking.Stages.Create_Task.
3633         * s-taskin.adb (Initialize): Signal the allocation of the environment
3634         task to a CPU, if any, so that we know whether the CPU can be
3635         transferred to a different dispatching domain.
3636         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
3637         is being allocated belongs to the dispatching domain where the task
3638         lives. Signal the allocation of the task to a CPU, if any, so that we
3639         know whether the CPU can be transferred to a different dispatching
3640         domain.
3641
3642 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
3643
3644         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
3645         attributes Same_Storage and Overlaps_Storage.
3646
3647 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
3648
3649         * exp_strm.adb: Remove with and use clause for Opt.
3650         (Build_Array_Input_Function): Remove the version-dependent generation
3651         of the return statement. The Ada 2005 tree is now the default.
3652
3653 2011-09-01  Yannick Moy  <moy@adacore.com>
3654
3655         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
3656         it is never empty when compiling in Alfa mode.
3657
3658 2011-09-01  Robert Dewar  <dewar@adacore.com>
3659
3660         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
3661         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
3662         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
3663         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
3664
3665 2011-09-01  Matthew Heaney  <heaney@adacore.com>
3666
3667         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
3668         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
3669         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
3670         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
3671         unbounded queue container.
3672         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
3673         bounded queue container.
3674         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
3675         unbounded priority queue container.
3676         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
3677         bounded priority queue container.
3678
3679 2011-08-31  Pascal Obry  <obry@adacore.com>
3680
3681         * a-direct.adb: Do not try to create an UNC path on Windows.
3682         (Create_Path): Skip leading computer name in UNC path if any.
3683
3684 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3685
3686         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
3687         version-dependent generation of the return statement. The Ada 2005 tree
3688         is now the default.
3689
3690 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3691
3692         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
3693         types Stream_Element_Offset and Storage_Offset have a different native
3694         type depending on whether the platform is 32 or 64 bits. When
3695         exchanging them, always convert to 64 bits.
3696
3697 2011-08-31  Yannick Moy  <moy@adacore.com>
3698
3699         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
3700         --force-alfa to gnat2why.
3701
3702 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3703
3704         * sem_ch12.adb (Save_References): If the node has aspects, save
3705         references within the corresponding expressions in a separate step,
3706         because the aspects are not directly in the tree for the declaration
3707         to which they belong.
3708
3709 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3710
3711         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
3712         in CodePeer mode, since representation clauses are partially ignored.
3713         * gcc-interface/Make-lang.in: Update dependencies.
3714
3715 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3716
3717         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3718         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
3719         to any dispatching domain.
3720
3721 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3722
3723         * exp_ch4.adb: Minor reformatting.
3724
3725 2011-08-31  Bob Duff  <duff@adacore.com>
3726
3727         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
3728         on nodes for which it is not defined.
3729         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
3730         parent type.
3731
3732 2011-08-31  Bob Duff  <duff@adacore.com>
3733
3734         * sem_ch3.adb (Process_Full_View): Disable legality check if
3735         In_Instance, to avoid spurious errors.
3736         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
3737         if In_Instance, to avoid spurious errors.
3738
3739 2011-08-31  Pascal Obry  <obry@adacore.com>
3740
3741         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
3742         directory speparators.
3743         (Compose): Use Dir_Seps to handle both forms.
3744         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
3745         changes.
3746         (Extension): Use Dir_Seps to handle both forms.
3747
3748 2011-08-31  Pascal Obry  <obry@adacore.com>
3749
3750         * prj-conf.adb: Minor reformatting.
3751
3752 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3753
3754         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
3755         dispatching domain aspect.
3756         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
3757         aspect.
3758         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
3759         Dispatching_Domain aspect in a similar way as we do for the Priority
3760         aspect.
3761         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
3762         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
3763         is present.
3764         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
3765         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
3766         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
3767         Dispatching_Domain and add it to the task definition.
3768         (Sig_Flags): Add Pragma_Dispatching_Domain.
3769         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
3770         support to find the types Dispatching_Domain and
3771         Dispatching_Domain_Access.
3772         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
3773         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
3774         query the availability of a pragma Dispatching_Domain.
3775         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
3776         the expander to pass the Dispatching_Domain when creating a task.
3777         (Name_Dispatching_Domain): Add this new name for a pragma.
3778         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
3779         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
3780         task has been allocated at creation time.
3781         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
3782         Ravenscar is always null.
3783         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
3784         the task has been allocated at creation time.
3785         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
3786         a specific dispatching domain.
3787         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
3788         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
3789         and CPU are specified for the task, and the CPU value is not contained
3790         within the range of processors for the domain.
3791
3792 2011-08-31  Vincent Celier  <celier@adacore.com>
3793
3794         * make.adb (Original_Gcc) : New constant String_Access.
3795         (Gnatmake): For VM targets, do not use VM version of the compiler if
3796         --GCC= has been specified.
3797
3798 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3799
3800         * sem_ch5.adb: Minor reformatting.
3801
3802 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3803
3804         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
3805         not reanalyze it.
3806
3807 2011-08-31  Bob Duff  <duff@adacore.com>
3808
3809         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
3810         the access type is private; we don't care about privacy in expansion.
3811
3812 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3813
3814         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
3815         subcomponents tnat may be limited, because they originate in view
3816         conflicts. If the original aggregate is legal and the actuals are
3817         legal, the aggregate itself is legal.
3818
3819 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3820
3821         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
3822         status.
3823
3824 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3825
3826         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
3827         errors in B tests.
3828
3829 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
3830
3831         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
3832         Interrupt_Priority aspects, force the analysis of the aspect expression
3833         (when building the equivalent pragma). Otherwise, its analysis is done
3834         too late, after the task or protected object has been created.
3835         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
3836         Analyze_Single_Task_Declaration): Remove the code to move the aspects
3837         to the object declaration because they are needed in the type
3838         declaration.
3839
3840 2011-08-31  Robert Dewar  <dewar@adacore.com>
3841
3842         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
3843         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
3844         reformatting.
3845
3846 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3847
3848         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
3849         if the corresponding type is malformed due to restriction violations.
3850
3851 2011-08-31  Robert Dewar  <dewar@adacore.com>
3852
3853         * s-ransee.ads, s-ransee.adb: Minor reformatting.
3854
3855 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3856
3857         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
3858         would cause the generation of Set_Finalize_Address if the target is a
3859         VM and the designated type is not derived from [Limited_]Controlled.
3860
3861 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
3862
3863         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
3864         subprogram.
3865         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
3866         case of a compilation error.
3867
3868 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3869
3870         * init.c (__gnat_error_handler): Standardize the stack overflow or
3871         erroneous memory access message.
3872         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
3873         or erroneous memory access message.
3874
3875 2011-08-31  Robert Dewar  <dewar@adacore.com>
3876
3877         * sem_ch4.adb: Minor reformatting.
3878         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
3879
3880 2011-08-31  Thomas Quinot  <quinot@adacore.com>
3881
3882         * scos.ads: Minor documentation clarification.
3883         * put_scos.adb: Do not generate SCO unit header line for a unit that
3884         has no SCO lines.
3885
3886 2011-08-31  Robert Dewar  <dewar@adacore.com>
3887
3888         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3889
3890 2011-08-31  Tristan Gingold  <gingold@adacore.com>
3891
3892         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3893         hold variables between these following subprograms.
3894         (Build_Exception_Handler, Build_Object_Declarations,
3895         Build_Raise_Statement): Use the above type as parameter.
3896         Make the above adjustments.
3897         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3898
3899 2011-08-31  Pascal Obry  <obry@adacore.com>
3900
3901         * projects.texi: Minor reformatting.
3902
3903 2011-08-31  Tristan Gingold  <gingold@adacore.com>
3904
3905         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3906         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3907
3908 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3909
3910         * exp_ch5.adb: Minor code cleanup.
3911         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3912         prevent cascaded errors.
3913         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3914         variable of an iterator specification in current scope.
3915         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3916         postconditions on the stack, as they contain no return statements.
3917
3918 2011-08-31  Yannick Moy  <moy@adacore.com>
3919
3920         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3921         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3922         call Qualify_Entity_Names.
3923         (Expand_Alfa): call Qualify_Entity_Names in more cases
3924         * lib-xref-alfa.adb: Take into account system package.
3925         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3926         CodePeer mode in which we are interested in finding bugs even if
3927         compiler cannot compile source.
3928         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3929         deferred constant.
3930
3931 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3932
3933         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3934         denoted by the subtype mark to ensure getting the concurrent type in
3935         the case where the subtype mark denotes a private subtype of a
3936         concurrent type (needed when using -gnatc).
3937         (Process_Subtype): For the processing specific to type kinds, case on
3938         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3939         subtype denotes a private subtype whose base type is nonprivate (needed
3940         for subtypes of private fulfilled by task types when compiling with
3941         -gnatc).
3942
3943 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3944
3945         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3946         late primitives that override interface operations when the full
3947         expander is not active, to avoid blowups in Register_Primitive when
3948         types don't have associated secondary dispatch tables.
3949
3950 2011-08-31  Yannick Moy  <moy@adacore.com>
3951
3952         * alfa_test.adb: Code clean up.
3953
3954 2011-08-31  Marc Sango  <sango@adacore.com>
3955
3956         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3957         by Comes_From_Source (Original_Node (N)) in order to treat also the
3958         nodes which have been rewritten.
3959         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3960         explicit dereference and slice violation in spark mode on the nodes 
3961         coming only from the source code.
3962
3963 2011-08-31  Robert Dewar  <dewar@adacore.com>
3964
3965         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3966         lib-xref-alfa.adb: Minor reformatting.
3967
3968 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3969
3970         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3971
3972 2011-08-31  Javier Miranda  <miranda@adacore.com>
3973
3974         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3975         only for class-wide subprograms conflicting with entities of concurrent
3976         tagged types.
3977
3978 2011-08-31  Matthew Heaney  <heaney@adacore.com>
3979
3980         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3981         node to null value.
3982
3983 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
3984
3985         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3986         general description of the routine.
3987
3988 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
3989
3990         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3991         doubly-linked lists.
3992
3993 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
3994
3995         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3996         check is needed for a left-hand side that is a dereference, and the
3997         base type is private without discriminants (whereas the full type does
3998         have discriminants), an extra retrieval of the underlying type may be
3999         needed in the case where the subtype is a record subtype whose base
4000         type is private. Update comments.
4001
4002 2011-08-31  Javier Miranda  <miranda@adacore.com>
4003
4004         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
4005         found check if there is a class-wide subprogram covering the primitive.
4006         
4007 2011-08-31  Yannick Moy  <moy@adacore.com>
4008
4009         * sem_res.adb: Further cases where full expansion test is needed,
4010         rather than expansion test.
4011
4012 2011-08-31  Pascal Obry  <obry@adacore.com>
4013
4014         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
4015
4016 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4017
4018         * exp_ch5.adb: Handle iterators over derived container types.
4019
4020 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4021
4022         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
4023         (Has_Anonymous_Master): New routine.
4024         (Set_Has_Anonymous_Master): New routine.
4025         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
4026         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
4027         (Current_Anonymous_Master): New routine.
4028         (Current_Unit_First_Declaration): Removed.
4029         (Current_Unit_Scope): Removed.
4030         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
4031         their objects on a per-unit heterogeneous finalization master.
4032
4033 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4034
4035         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
4036         array.
4037
4038 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4039
4040         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
4041         when not needed.
4042
4043 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4044
4045         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
4046         where the actual is an unexpanded call to 'Input.
4047
4048 2011-08-31  Yannick Moy  <moy@adacore.com>
4049
4050         * sem_ch4.adb: Code clean up.
4051
4052 2011-08-31  Yannick Moy  <moy@adacore.com>
4053
4054         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
4055
4056 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4057
4058         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
4059         and TSS primitive Finalize_Address if finalization is suppressed.
4060         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
4061         primitive Finalize_Address if finalization is suppressed.
4062
4063 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4064
4065         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
4066         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
4067         sure that the underlying task has already been created before trying
4068         to change its affinity.
4069         (Set_CPU): Use the term processor instead of CPU, as we do in
4070         Assign_Task.
4071
4072 2011-08-31  Vincent Celier  <celier@adacore.com>
4073
4074         * prj-attr.adb: New Compiler attribute Source_File_Switches.
4075         * prj-nmsc.adb (Process_Compiler): Process attribute
4076         Source_File_Switches.
4077         * prj.ads (Language_Config): New name list component
4078         Name_Source_File_Switches.
4079         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
4080
4081 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
4082
4083         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
4084         discriminated component of an actual, expand at once to prevent
4085         ouf-of-order references with generated subtypes.
4086
4087 2011-08-31  Yannick Moy  <moy@adacore.com>
4088
4089         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
4090         reference to operator in Alfa xrefs.
4091
4092 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4093
4094         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
4095         where the parent instance was frozen before the current instance due to
4096         the presence of a source body. Update calls to Insert_After_Last_Decl.
4097         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
4098         Update the comment which illustrates the purpose of the routine.
4099         Package instances are now frozen by source bodies which appear after
4100         the instance. This ensures that entities coming from within the
4101         instance are available for use in the said bodies.
4102         (Install_Body): Add code to handle the case where the parent instance
4103         was frozen before the current instance due to the presence of a source
4104         body. Update calls to Insert_After_Last_Decl.
4105
4106 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
4107
4108         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
4109         access types.
4110         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
4111
4112 2011-08-31  Yannick Moy  <moy@adacore.com>
4113
4114         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
4115         full-expander test.
4116         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
4117         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
4118         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
4119         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
4120         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
4121         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4122         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
4123         ALFA in Alfa (we dropped acronym).
4124         * einfo.adb (Primitive_Operations): Correctly return list of primitive
4125         operations in a case where it returned previously No_Elist.
4126
4127 2011-08-31  Robert Dewar  <dewar@adacore.com>
4128
4129         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
4130         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
4131         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
4132         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
4133         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
4134         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
4135         reformatting.
4136
4137 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
4138
4139         * sem_ch12 (Check_Private_View): Revert previous change.
4140         * sem_res.adb (Conversion_Check): Do not emit the error message if the
4141         conversion is in a generic instance.
4142
4143 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4144
4145         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
4146         * a-chtgbo.adb (Free): Allow 0 as index value.
4147
4148 2011-08-31  Matthew Heaney  <heaney@adacore.com>
4149
4150         * a-cborma.adb (Insert): Add comment to explain why no element
4151         assignment.
4152
4153 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
4154
4155         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
4156         spec discriminant is already a concurrent type, in which case just use
4157         it, otherwise fetch the Corresponding_Concurrent_Type as before.
4158
4159 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4160
4161         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
4162         system-linux-mips.ads, system-linux-mipsel.ads,
4163         system-linux-mips64el.ads, system-linux-ppc64.ads,
4164         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
4165
4166 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4167
4168         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
4169         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
4170         (build_unary_op): Likewise.
4171
4172 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4173
4174         * raise-gcc.c: Do not include coretypes.h and tm.h.
4175         (setup_to_install): Remove test for compiler macro.
4176         * targext.c: Document use for the library.
4177         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
4178
4179 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4180
4181         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
4182         the expression to the nominal type if the latter is a record type with
4183         a variant part and the type of the former is a record type without one.
4184
4185 2011-08-30  Yannick Moy  <moy@adacore.com>
4186
4187         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4188         expansion in Alfa mode.
4189         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
4190         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
4191         Alfa mode.
4192         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
4193         * sem_res.adb: Ditto.
4194         * gcc-interface/Make-lang.in: Update dependencies.
4195
4196 2011-08-30  Thomas Quinot  <quinot@adacore.com>
4197
4198         * g-socket.ads: Minor documentation adjustment.
4199
4200 2011-08-30  Robert Dewar  <dewar@adacore.com>
4201
4202         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
4203
4204 2011-08-30  Yannick Moy  <moy@adacore.com>
4205
4206         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
4207         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
4208         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
4209         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
4210         Revert change which introduced files for "light"
4211         expansion, to be replaced by a single file for Alfa expansion.
4212
4213 2011-08-30  Robert Dewar  <dewar@adacore.com>
4214
4215         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
4216         Minor code reorg/reformatting.
4217
4218 2011-08-30  Yannick Moy  <moy@adacore.com>
4219
4220         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
4221         common shorthand for (Expander_Active and not ALFA_Mode) that can be
4222         used for testing full expansion, that is active expansion not in the
4223         reduced mode for Alfa
4224         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
4225         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
4226         of the verbose (Expander_Active and not ALFA_Mode)
4227
4228 2011-08-30  Tristan Gingold  <gingold@adacore.com>
4229
4230         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
4231         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
4232         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
4233         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
4234
4235 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
4236
4237         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
4238         access conversions to check that the conversion is a rewritten node,
4239         rather than just having Comes_From_Source set to False, which wasn't
4240         sufficient.
4241
4242 2011-08-30  Robert Dewar  <dewar@adacore.com>
4243
4244         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
4245         g-socket.ads: Minor reformatting.
4246
4247 2011-08-30  Thomas Quinot  <quinot@adacore.com>
4248
4249         * sem_util.adb: Minor reformatting.
4250
4251 2011-08-30  Tristan Gingold  <gingold@adacore.com>
4252
4253         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
4254         to be compliant with the ABI.
4255
4256 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
4257
4258         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
4259         of a designated type when the related access type is an actual in an
4260         instance. This ensures that the full view of designated type is
4261         available when inside the body of the instance.
4262
4263 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
4264
4265         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
4266         in a position to be modified, a slice is treated like an indexed
4267         component.
4268
4269 2011-08-30  Thomas Quinot  <quinot@adacore.com>
4270
4271         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
4272         field tv_sec in struct timeval.
4273
4274 2011-08-30  Yannick Moy  <moy@adacore.com>
4275
4276         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
4277         blocks of code doing full expansion, previously only guarded by
4278         Expander_Active, by anding the test that ALFA_Mode is not set
4279
4280 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
4281
4282         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
4283         add the function to the list of private dependents, for subsequent
4284         legality check on Taft amendment types.
4285         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
4286         Private_Dependents, as for other incomplete types.
4287         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
4288         Taft-amendment type is used as the return type of a function.
4289
4290 2011-08-30  Javier Miranda  <miranda@adacore.com>
4291
4292         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
4293         which emits an error by a call to a new routine which report the error.
4294         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
4295         entity does not cover an existing interface.
4296         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
4297         code.
4298         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
4299         protected procedures or entries whose mode is not conformant.
4300         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
4301         an error by a call to a new routine which report the error.
4302
4303 2011-08-30  Robert Dewar  <dewar@adacore.com>
4304
4305         * gnat_rm.texi: Minor change.
4306         * exp_attr_light.adb: Minor reformatting.
4307
4308 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
4309
4310         * sem_ch3.adb: Patch inheritance of aspects in
4311         Complete_Private_Subtype, to avoid infinite loop.
4312
4313 2011-08-30  Javier Miranda  <miranda@adacore.com>
4314
4315         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
4316         been reported and a subprogram covering an interface primitive is not
4317         found then skip generating the internal entity. Done to avoid crashing
4318         the frontend.
4319         (Check_Abstract_Overriding): Change text of error of wrong formal of
4320         protected subprogram or entry. Done for consistency to emit exactly the
4321         same error reported by Check_Synchronized_Overriding. In addition, the
4322         error is restricted to protected types (bug found working on AI05-0090)
4323
4324 2011-08-30  Yannick Moy  <moy@adacore.com>
4325
4326         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
4327         expansion in Alfa mode.
4328         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
4329         * exp_light.adb, exp_light.ads: New package defining light expansion.
4330         * expander.adb (Expand): Call light expansion in Alfa mode
4331         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
4332         constructs.
4333         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
4334         constructs.
4335         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
4336         * gnat1drv.adb (Adjust_Global_Switches): Comment
4337
4338 2011-08-30  Yannick Moy  <moy@adacore.com>
4339
4340         * lib-xref-alfa.adb: Minor refactoring.
4341
4342 2011-08-30  Yannick Moy  <moy@adacore.com>
4343
4344         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
4345         mode.
4346         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
4347         expansion in Alfa mode.
4348         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
4349         mode.
4350
4351 2011-08-30  Robert Dewar  <dewar@adacore.com>
4352
4353         * debug_a.adb: Update comment.
4354
4355 2011-08-30  Robert Dewar  <dewar@adacore.com>
4356
4357         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
4358         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
4359         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
4360         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
4361
4362 2011-08-30  Robert Dewar  <dewar@adacore.com>
4363
4364         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
4365         volatile.
4366
4367 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
4368
4369         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
4370         Build_Finalization_Master by supplying an insertion node and enclosing
4371         scope. In its old version, the call did not generate a finalization
4372         master.
4373         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
4374         recognize anonymous access-to-controlled components. Rewrite the
4375         machinery which creates finalization masters to service anonymous
4376         access-to-controlled components of a record type. In its current state,
4377         only one heterogeneous master is necessary to handle multiple anonymous
4378         components.
4379         (Freeze_Type): Comment reformatting.
4380         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
4381         RE_Unit_Table.
4382         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
4383         associates TSS primitive Finalize_Address with either the master itself
4384         or with the internal hash table depending on the mode of operation of
4385         the master.
4386
4387 2011-08-30  Javier Miranda  <miranda@adacore.com>
4388
4389         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
4390         interface type then do not generate code to compare this component.
4391         Required since they have no components and their equality operator is
4392         abstract.
4393
4394 2011-08-30  Steve Baird  <baird@adacore.com>
4395
4396         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
4397         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
4398         returns the (static) accessibility level of the object. Otherwise, the
4399         same as Type_Access_Level.
4400         (Dynamic_Accessibility_Level): New function; given an expression which
4401         could occur as the rhs of an assignment to a saooaaat (i.e., an
4402         expression of an access-to-object type), return the new value for the
4403         saooaaat's associated Extra_Accessibility object.
4404         (Effective_Extra_Accessibility): New function; same as
4405         Einfo.Extra_Accessibility except that object renames are looked through.
4406         * sem_util.adb 
4407         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
4408         (Dynamic_Accessibility_Level): New function; see sem_util.ads
4409         description.
4410         (Effective_Extra_Accessibility): New function; see sem_util.ads
4411         description.
4412         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
4413         (Extra_Accessibility): Update comments.
4414         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
4415         except RM_Size field (which is only for types) is unaffected.
4416         * einfo.adb
4417         (Extra_Accessibility): Expand domain to allow objects, not just formals.
4418         (Set_Extra_Accessibility): Expand domain to allow objects, not just
4419         formals.
4420         (Init_Size): Add assertion that we are not trashing the
4421         Extra_Accessibility attribute of an object.
4422         (Init_Size_Align): Add assertion that we are not trashing the
4423         Extra_Accessibility attribute of an object.
4424         (Init_Object_Size_Align): New procedure; see einfo.ads description.
4425         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
4426         differently for the type of a (non-library-level) saooaaat depending
4427         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
4428         is queried in this set of changes - everything else (in particular,
4429         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
4430         driven off of the setting of the Is_Local_Anonymous_Access attribute.
4431         The special treatment of library-level saooaaats is an optimization,
4432         not required for correctnesss. This is based on the observation that the
4433         Ada2012 rules (static and dynamic) for saooaaats turn out to be
4434         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
4435         * exp_ch3.adb
4436         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
4437         false for the type of a saooaaat, declare and initialize its
4438         accessibility level object and set the Extra_Accessibility attribute
4439         of the saooaaat to refer to this object.
4440         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
4441         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
4442         calls to Effective_Extra_Accessibility in order to support
4443         renames of saooaaats.
4444         (Expand_N_Type_Conversion): Add new local function,
4445         Has_Extra_Accessibility, and call it when determining whether an
4446         accessibility check is needed.
4447         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
4448         evaluate to True (without raising an exception).
4449         * exp_ch5.adb
4450         (Expand_N_Assignment_Statement): When assigning to an Ada2012
4451         saooaaat, update its associated Extra_Accessibility object (if
4452         it has one). This includes an accessibility check.
4453         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
4454         a saooaaat, update its Extra_Accessibility object too (if it
4455         has one).
4456         (Expand_Call): Replace a couple of calls to Type_Access_Level
4457         with calls to Dynamic_Access_Level to handle cases where
4458         passing a literal (any literal) is incorrect.
4459         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
4460         checks associated with "Saooaat := Some_Object'Access;"; this must
4461         be rejected if Some_Object is declared in a more nested scope
4462         than Saooaat.
4463         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
4464         assignment to a saooaaat even if Is_Local_Anonymous_Access
4465         returns False for its type (indicating a 2012-style saooaaat).
4466         * sem_ch8.adb
4467         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
4468         (which is only appropriate for objects, not types) with a call
4469         of Init_Object_Size_Align in order to avoid trashing the
4470         Extra_Accessibility attribute of a rename (the two attributes
4471         share storage).
4472         * sem_res.adb
4473         (Valid_Conversion) Replace six calls to Type_Access_Level with
4474         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
4475         Ada2012 non-library-level saooaaat, the former returns library level
4476         while the latter returns the (static) accessibility level of the
4477         saooaaat. A type conversion to the anonymous type of a saooaaat
4478         can only occur as part of an assignment to the saooaaat, so we
4479         know that such a conversion must be in a lhs context, so Deepest
4480         yields the result that we need. If such a conversion could occur,
4481         say, as the operand of an equality operator, then this might not
4482         be right. Also add a test so that static accessibilty checks are
4483         performed for converting to a saooaaat's type even if
4484         Is_Local_Anonymous_Access yields False for the type.
4485
4486 2011-08-30  Javier Miranda  <miranda@adacore.com>
4487
4488         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
4489         controls generation of a warning associated with late declaration of
4490         dispatching functions. Required to avoid generating spurious
4491         warnings.
4492
4493 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
4494
4495         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
4496         return object has an anonymous access type and the function's type is
4497         a named access type.
4498         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
4499         conversions on implicit conversions, since such conversions can occur
4500         for anonymous access cases due to expansion. Issue error for attempt
4501         to rename an anonymous expression as an object of a named access type.
4502         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
4503         to indicate whether this function should report errors on invalid
4504         conversions.
4505         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
4506         the expression is of an anonymous access type and the expected type is
4507         a named general access type, rewrite the expression as a type
4508         conversion, unless this is an expression of a membership test.
4509         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
4510         calling of Error_Msg_N on new formal Report_Errs.
4511         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
4512         calling of Error_Msg_NE on new formal Report_Errs.
4513         (Valid_Conversion): Move declaration of this function to the package
4514         spec, to allow calls from membership test processing. For Ada 2012,
4515         enforce legality restrictions on implicit conversions of anonymous
4516         access values to general access types, disallowing such conversions in
4517         cases where the expression has a dynamic accessibility level (access
4518         parameters, stand-alone anonymous access objects, or a component of a
4519         dereference of one of the first two cases).
4520         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
4521         in the context of a named general access expected type.
4522         * exp_ch4.adb Add with and use of Exp_Ch2.
4523         (Expand_N_In): Add processing for membership tests applied to
4524         expressions of an anonymous access type. First, Valid_Conversion is
4525         called to check whether the test is statically False, and then the
4526         conversion is expanded to test that the expression's accessibility
4527         level is no deeper than that of the tested type. In the case of
4528         anonymous access-to-tagged types, a tagged membership test is applied
4529         as well.
4530         (Tagged_Membership): Extend to handle access type cases, applying the
4531         test to the designated types.
4532         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
4533         accessibility level, and the actual is a 'Access applied to a current
4534         instance, pass the accessibility level of the type of the current
4535         instance rather than applying Object_Access_Level to the prefix. Add a
4536         ??? comment, since this level isn't quite right either (will eventually
4537         need to pass an implicit level parameter to init procs).
4538
4539 2011-08-30  Bob Duff  <duff@adacore.com>
4540
4541         * s-taskin.ads: Minor comment fix.
4542
4543 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
4544
4545         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
4546         component and the selector is a dispatching operation, check if it is
4547         a prefixed call before rewriting as a parameterless function call.
4548
4549 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
4550
4551         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
4552         tsystem.h into $(RTSDIR) instead of rts.
4553
4554 2011-08-29  Robert Dewar  <dewar@adacore.com>
4555
4556         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
4557         reformatting.
4558         * gcc-interface/Make-lang.in: Update dependencies.
4559
4560 2011-08-29  Yannick Moy  <moy@adacore.com>
4561
4562         * alfa.ads (Name_Of_Heap_Variable): New constant name.
4563         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
4564         table to hold dereferences.
4565         (Add_ALFA_Xrefs): Take into account dereferences as special
4566         reads/writes to the variable "HEAP".
4567         (Enclosing_Subprogram_Or_Package): Move subprogram here.
4568         (Generate_Dereference): New procedure to store a read/write dereferencew
4569         in the table Drefs.
4570         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
4571         the special "HEAP" var.
4572         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
4573         in ALFA mode.
4574         * sem_util.adb (Note_Possible_Modification): Store write dereference
4575         in ALFA mode.
4576
4577 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4578
4579         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
4580         ensures that the level of the subpool access type is not deeper than
4581         that of the pool object.
4582         * sem_util.adb (Object_Access_Level): Expand to handle defining
4583         identifiers.
4584         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
4585         subpool handle name of a rewritten allocator.
4586
4587 2011-08-29  Robert Dewar  <dewar@adacore.com>
4588
4589         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
4590
4591 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4592
4593         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
4594         values, we generate multiple triples of parameters in the TypeCode.
4595         Bump Choice_Index for each such triple so that a subsequent default
4596         choice is associated with the correct index in the typecode.
4597
4598 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4599
4600         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
4601         container.
4602         (First, Last): Handle properly an iterator over a null container.
4603
4604 2011-08-29  Bob Duff  <duff@adacore.com>
4605
4606         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
4607         processing if we run across a node with no Scope. This can happen if
4608         we're with-ing an library-level instance, and that instance got errors
4609         that caused "instantiation abandoned".
4610         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
4611         an exception instead of using Assert, so it won't go into an infinite
4612         loop, even when assertions are turned off.
4613
4614 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4615
4616         * a-coorse.adb: Proper handling of empty ordered sets.
4617
4618 2011-08-29  Johannes Kanig  <kanig@adacore.com>
4619
4620         * debug.adb: Add comments.
4621
4622 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4623
4624         * a-except.adb, a-except-2005.adb: Minor comment rewording and
4625         reformatting.
4626
4627 2011-08-29  Yannick Moy  <moy@adacore.com>
4628
4629         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
4630         declaration for Itypes in Alfa mode.
4631
4632 2011-08-29  Robert Dewar  <dewar@adacore.com>
4633
4634         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
4635         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
4636         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
4637         reformatting.
4638
4639 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4640
4641         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
4642         package spec.
4643         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
4644         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
4645         while raising PE.
4646
4647 2011-08-29  Robert Dewar  <dewar@adacore.com>
4648
4649         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
4650
4651 2011-08-29  Javier Miranda  <miranda@adacore.com>
4652
4653         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
4654         renamings of formal subprograms when the actual for a formal type is
4655         class-wide.
4656
4657 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4658
4659         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
4660         to Target.
4661
4662 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4663
4664         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
4665         components of record type.
4666         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
4667         to Target.
4668
4669 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4670
4671         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
4672         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
4673         container packages.
4674
4675 2011-08-29  Robert Dewar  <dewar@adacore.com>
4676
4677         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
4678         reformatting.
4679
4680 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4681
4682         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
4683         components of record type.
4684
4685 2011-08-29  Bob Duff  <duff@adacore.com>
4686
4687         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
4688         by the termination handler.
4689
4690 2011-08-29  Yannick Moy  <moy@adacore.com>
4691
4692         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
4693         created in Alfa mode, instead of inserting artificial declarations of
4694         non-Itypes in the tree.
4695         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
4696         know if an Itype has a corresponding declaration, as defined in
4697         itypes.ads.
4698
4699 2011-08-29  Yannick Moy  <moy@adacore.com>
4700
4701         * gnat1drv.adb: Minor rewrite.
4702
4703 2011-08-29  Bob Duff  <duff@adacore.com>
4704
4705         * s-tasuti.adb (Make_Passive): Work around race condition in
4706         Make_Independent, which can cause Wait_Count to be zero. So instead of
4707         asserting that Wait_Count > 0, and then decrementing it, decrement it
4708         only if Wait_Count > 0.
4709         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
4710         should be nonnegative, so declare them Natural instead of Integer.
4711
4712 2011-08-29  Robert Dewar  <dewar@adacore.com>
4713
4714         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
4715         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
4716         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
4717         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
4718         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
4719
4720 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4721
4722         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
4723
4724 2011-08-29  Vadim Godunko  <godunko@adacore.com>
4725
4726         * s-parint.ads: Minor comment clarification.
4727
4728 2011-08-29  Vincent Celier  <celier@adacore.com>
4729
4730         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
4731         may be used as identifiers.
4732
4733 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4734
4735         * a-coinho.ads: Minor reformating.
4736
4737 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4738
4739         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
4740         container of a derived type.
4741
4742 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4743
4744         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
4745         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
4746
4747 2011-08-29  Pascal Obry  <obry@adacore.com>
4748
4749         * exp_disp.adb: Minor comment fix.
4750         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
4751         to avoid warnings when compiling with -Wall.
4752         (Make_Disp_Conditional_Select_Body): Likewise.
4753         (Make_Disp_Timed_Select_Body): Likewise.
4754
4755 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4756
4757         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
4758         an entity name, generate reference for it.
4759
4760 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4761
4762         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
4763         iterator form.
4764         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
4765         the class-wide type.
4766         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
4767
4768 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4769
4770         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
4771         subtype for an object whose type is an unconstrained union.
4772
4773 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4774
4775         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
4776         is allowed in a component definition, by AI95-406.
4777
4778 2011-08-29  Matthew Heaney  <heaney@adacore.com>
4779
4780         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
4781
4782 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4783
4784         * a-except-2005.adb: Alphabetize all routines.
4785         (Triggered_By_Abort): New routine.
4786         * a-except-2005.ads (Triggered_By_Abort): New routine.
4787         * a-except.adb Alphabetize all routines.
4788         (Triggered_By_Abort): New routine.
4789         * a-except.ads (Triggered_By_Abort): New routine.
4790         * exp_ch7.adb: Update all comments involving the detection of aborts in
4791         finalization code.
4792         (Build_Object_Declarations): Do not generate code to detect the
4793         presence of an abort at the start of finalization code, use a runtime
4794         routine istead.
4795         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
4796         RE_Unit_Table.
4797         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
4798         allocate a task on a subpool.
4799         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
4800         The flag disables all actions related to the maintenance of
4801         Finalize_Address_Table when subpools are not in use.
4802         (Allocate_Any_Controlled): Signal the machinery that subpools are in
4803         use.
4804         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
4805         performs costly task locking when subpools are not in use.
4806
4807 2011-08-29  Yannick Moy  <moy@adacore.com>
4808
4809         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
4810         types and dispatching calls in Alfa mode.
4811         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
4812         correspondance between body and spec scopes, to reuse utility functions
4813         (Traverse_Declarations_Or_Statements): Protect access to body for stub
4814         by testing the presence of the library unit for the body
4815         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
4816         mode the expansion of accept statements is skipped
4817         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
4818         the unique entity corresponding to the one returned by
4819         Unique_Defining_Entity applied to the enclosing declaration of the
4820         argument.
4821
4822 2011-08-29  Bob Duff  <duff@adacore.com>
4823
4824         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
4825         gdb when x is not a node (it can be a node list, name_id, etc). pp is
4826         an alias for pn. ppp is an alias for pt.
4827
4828 2011-08-29  Javier Miranda  <miranda@adacore.com>
4829
4830         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
4831         aggregate to take a consistent decision on the need to convert into
4832         assignments aggregates that initialize constant objects.
4833
4834 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
4835
4836         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
4837         Build_Allocate_Deallocate_Proc in order to handle allocation of
4838         non-controlled objects on subpools.
4839         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
4840         to be end-user visible.
4841         * s-finmas.adb: Add with and use clause for System.HTable.
4842         Add an instantiation of Simple_HTable which provides a mapping between
4843         the address of a controlled object and the corresponding
4844         Finalize_Address used to clean up the object. The table is used when a
4845         master is operating in heterogeneous mode.
4846         (Attach): Explain why the input node is not verified on being already
4847         attached.
4848         (Delete_Finalize_Address): New routine.
4849         (Detach): Add pragma Assert which ensures that a node is already
4850         attached.
4851         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
4852         since nodes are no longer removed on traversal. Explain why node
4853         detachment is undesirable in this case.
4854         (Get_Finalize_Address): New routine.
4855         (Hash): New routine.
4856         (Is_Empty_List): Removed.
4857         (pm): Renamed to Print_Master. Add output for discriminant
4858         Is_Homogeneous.
4859         Comment reformatting.
4860         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4861         * s-finmas.ads: Various comments additions / improvements.
4862         Type Finalization_Master has a discriminant which determines the mode of
4863         operation.
4864         (Delete_Finalize_Address): New routine.
4865         (Get_Finalize_Address): New routine.
4866         (pm): Renamed to Print_Master.
4867         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
4868         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
4869         use clause for System.IO.
4870         (Allocate_Any_Controlled): Add machinery to set TSS primitive
4871         Finalize_Address depending on the mode of allocation and the mode of
4872         the master.
4873         (Deallocate_Any_Controlled): Remove the relation pair object -
4874         Finalize_Address regardless of the master mode. Add comment explaining
4875         the reason.
4876         (Detach): Ensure that fields Prev and Next are null after detachment.
4877         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
4878         scheme to check whether the list of subpools is empty. There is no
4879         longer need to store the next subpool or advance the current pointer.
4880         (Is_Empty_List): New routine.
4881         (Print_Pool): New routine.
4882         (Print_Subpool): New routine.
4883         * s-stposu.ads: Various comments additions / improvements.
4884         Field Master of type Root_Subpool is now a heterogeneous collection.
4885         (Print_Pool): New routine.
4886         (Print_Subpool): New routine.
4887
4888 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4889
4890         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4891         forms, using aspects of container types.
4892         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4893         Has_Implicit_Dereference flags, that may be set on the partial view.
4894         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4895         container type with an indexing aspect.
4896         (Analyze_Quantified_Expression): Analyze construct with expansion
4897         disabled, because it will be rewritten as a loop during expansion.
4898         (Try_Container_Indexing): The prefix itself may be a container type
4899         with an indexing aspect, as with a vector of vectors.
4900         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4901         the original doamin of iteration, for name capture.
4902         (Analyze_Iterator_Specification): If the domain is an expression that
4903         needs finalization, create a separate declaration for it.
4904         For an iterator with "of" retrieve default iterator info from aspect of
4905         container type. For "in" iterator, retrieve type of Iterate function.
4906         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4907         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4908         analysis, to prevent spurious errors about late attributes.
4909         * sprint.adb: Handle quantified expression with either loop or iterator
4910         specification.
4911         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4912         iterator.
4913
4914 2011-08-29  Vincent Celier  <celier@adacore.com>
4915
4916         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4917         Binder or Linker of the main project file.
4918
4919 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4920
4921         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4922         unit.
4923
4924 2011-08-29  Yannick Moy  <moy@adacore.com>
4925
4926         * exp_ch9.adb: Partial revert of previous change for Alfa mode
4927
4928 2011-08-29  Yannick Moy  <moy@adacore.com>
4929
4930         * exp_ch11.adb: Minor expansion of comment.
4931
4932 2011-08-29  Yannick Moy  <moy@adacore.com>
4933
4934         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4935
4936 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4937
4938         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4939         interpretation, set the type before resolving the operands, because
4940         legality checks on an exponention operand need to know the type of the
4941         context.
4942
4943 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4944
4945         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4946         cleanups on a master if the instance is within a generic unit.
4947         Complement to the corresponding fix to inline.adb for K520-030.
4948
4949 2011-08-29  Tristan Gingold  <gingold@adacore.com>
4950
4951         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4952         occurrence.
4953         * exp_intr.adb: Minor comment fix.
4954
4955 2011-08-29  Bob Duff  <duff@adacore.com>
4956
4957         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4958         Delay_Required was used as an uninitialized variable.
4959
4960 2011-08-29  Robert Dewar  <dewar@adacore.com>
4961
4962         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4963         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4964         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4965
4966 2011-08-29  Thomas Quinot  <quinot@adacore.com>
4967
4968         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4969         Remove unused variables.
4970
4971 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4972
4973         * sem_res.adb: Remove Build_Explicit_Dereference.
4974         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4975         from sem_res.adb, used in analysis of additional constructs.
4976         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4977         expansion of iterators.
4978         (Is_Object_Reference): Recognize variables rewritten as explicit
4979         dereferences in Ada2012.
4980         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4981         Reversible_Iterator names, for expansion of Ada2012 iterators.
4982         * aspects.ads, aspects.adb (Find_Aspect): Utility.
4983         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4984         linked list container.
4985         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4986         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4987
4988 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
4989
4990         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4991         containers.
4992
4993 2011-08-29  Vincent Celier  <celier@adacore.com>
4994
4995         * make.adb (Gnatmake): Get the maximum number of simultaneous
4996         compilation processes after the Builder switches has been scanned, as
4997         there may include -jnn.
4998
4999 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5000
5001         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
5002
5003 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5004
5005         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
5006         GNAT_DRIVER_COMMAND_LINE to 255.
5007
5008 2011-08-29  Pascal Obry  <obry@adacore.com>
5009
5010         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
5011         reformatting and style fix (class attribute casing).
5012
5013 2011-08-29  Yannick Moy  <moy@adacore.com>
5014
5015         * exp_ch11.adb: Yet another case where expansion should be common
5016         between CodePeer and Alfa.
5017
5018 2011-08-29  Yannick Moy  <moy@adacore.com>
5019
5020         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
5021
5022 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5023
5024         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
5025         incomplete type and its completion match.
5026
5027 2011-08-29  Yannick Moy  <moy@adacore.com>
5028
5029         * exp_ch13.adb: Adjust previous change.
5030
5031 2011-08-29  Robert Dewar  <dewar@adacore.com>
5032
5033         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
5034         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
5035         Minor reformatting.
5036
5037 2011-08-29  Emmanuel Briot  <briot@adacore.com>
5038
5039         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
5040         initialize aggregated projects.
5041
5042 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5043
5044         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
5045         depth of candidates to resolve a potentially spurious ambiguity between
5046         two visible subprograms.
5047
5048 2011-08-29  Yannick Moy  <moy@adacore.com>
5049
5050         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
5051         Requires/Ensures.
5052         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
5053         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
5054         Requires/Ensures.
5055
5056 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5057
5058         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
5059         Add comment.
5060
5061 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5062
5063         * sem_res.adb: Minor reformatting.
5064
5065 2011-08-29  Johannes Kanig  <kanig@adacore.com>
5066
5067         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
5068         mode.
5069         * gnat1drv.adb (Adjust_Global_Switches): Set
5070         Use_Expressions_With_Actions to False in ALFA mode.
5071         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
5072         ALFA mode.
5073
5074 2011-08-29  Yannick Moy  <moy@adacore.com>
5075
5076         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
5077         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
5078         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
5079         tagged types and dispatching calls in Alfa mode.
5080
5081 2011-08-29  Javier Miranda  <miranda@adacore.com>
5082
5083         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
5084         we do not report an error on an Empty node.
5085
5086 2011-08-29  Geert Bosch  <bosch@adacore.com>
5087
5088         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
5089         a-nlrear.o and a-nurear.o.
5090
5091 2011-08-29  Robert Dewar  <dewar@adacore.com>
5092
5093         * freeze.adb: Minor code reorganization.
5094         Minor reformatting.
5095         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
5096         sem_ch6.adb: Minor reformatting
5097
5098 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5099
5100         * s-except.ads, s-except.adb: Provide dummy body.
5101
5102 2011-08-29  Yannick Moy  <moy@adacore.com>
5103
5104         * sem_warn.adb (Within_Postcondition): Take into account the case of
5105         an Ensures component in a Test_Case.
5106
5107 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5108
5109         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
5110         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
5111         System_Exceptions_Debug
5112         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
5113         * a-except.adb: With and use System.Exceptions_Debug instead of
5114         System.Exceptions.
5115         * a-except-2005.adb: Likewise.
5116         * s-assert.adb: Likewise.
5117         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
5118         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
5119         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
5120         s-excdeb. Update dependencies.
5121         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
5122         as these no longer need external libraries.
5123
5124 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5125
5126         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
5127         exponentiation operator on universal values in a context that requires
5128         a fixed-point type.
5129
5130 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5131
5132         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
5133         before calling notify_handled_exception.
5134         * a-exextr.adb: Fix comment.
5135
5136 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5137
5138         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
5139         Finalize_Address of the access type's finalization master.
5140         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
5141         access type's finalization master. Add a guard to prevent
5142         Associated_Storage_Pool from being set on .NET/JVM.
5143         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
5144         attribute Finalize_Address of the access type's finalization master.
5145         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
5146         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
5147         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
5148         RE_Unit_Table.
5149         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
5150         use clause for System.IO
5151         (Detach): Relax the assertion, to be reinstated later.
5152         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
5153         Relax the assertion on Finalize_Address, to be reinstated later.
5154         (Is_Empty_List): New routine.
5155         (pm): New debug routine.
5156         (Set_Finalize_Address): New routine.
5157         * s-finmas.ads (pm): New debug routine.
5158         (Set_Finalize_Address): New routine.
5159         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
5160
5161 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5162
5163         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
5164         Remove convention C.
5165
5166 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5167
5168         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
5169         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
5170         (Finalize_TCB): Remove its finalization.
5171         (Initialize): Remove assignment of GET_Exc_Stack_Addr
5172         * s-soflin.adb (NT_Exc_Stack): Remove
5173         (Get_Exc_Stack_Addr_NT): Likewise.
5174         (Get_Exc_Stack_Addr_Soft): Likewise.
5175         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
5176         (Get_Exc_Stack_Addr): Likewise.
5177         (Get_Exc_Stack_Addr_Soft): Likewise
5178         * s-taspri-vms.ads (Exc_Stack_T): Remove.
5179         (Exc_Stack_Ptr_T): Likewise.
5180         (Private_Data): Remove Exc_Stack_Ptr component.
5181
5182 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5183
5184         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
5185
5186 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5187
5188         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
5189
5190 2011-08-29  Geert Bosch  <bosch@adacore.com>
5191
5192         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
5193         L2_Norm, Swap_Column): New generic subprograms
5194         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
5195         L2_Norm, Swap_Column): Implement new subprograms in order to
5196         eliminate dependency on BLAS and LAPACK libraries in
5197         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
5198         version. Forward_Eliminate/Back_Substitute can be used to put a
5199         matrix in row echelon or reduced row echelon form using partial
5200         pivoting.
5201         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
5202         Swap_Column): Instantiate from System.Generic_Array_Operations.
5203         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
5204         (Sqrt): Local function for simple computation of square root without
5205         adding dependencies on Generic_Elementary_Functions.
5206         (Swap): New subprogram to exchange floating point numbers.
5207         (Inverse): Reimplement using Jordan-Gauss elimination.
5208         (Jacobi): New procedure implementing Jacobi's method for computation
5209         of eigensystems, based on Rutishauser's implementation.
5210         (L2_Norm): Implement directly using the inner product.
5211         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
5212         decreasing eigenvalue as required by the Ada RM.
5213         (Swap_Column): New helper procedure for Sort_Eigensystem.
5214         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
5215         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
5216         Sort_Eigensystems.
5217
5218 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5219
5220         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
5221         statements line.
5222
5223 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5224
5225         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
5226         than the current node.
5227         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
5228         Finalization_Master. The list headers have two fields instead of three.
5229         This should fix alignment issue but subpool allocations are now
5230         unusable. Alphabetize subprograms.
5231         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
5232         the size of the header when converting the beginning of the object to
5233         a FM_Node. Set the master's Finalize_Address attribute if not already
5234         set.
5235         (Deallocate_Any_Controlled): Use the offset rather than the size of the
5236         header when converting the beginning of the object to a FM_Node.
5237
5238 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
5239
5240         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
5241         reraise when compiling for CodePeer.
5242
5243 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
5244
5245         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
5246         now needed by a-convec.adb. Fix warning.
5247
5248 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5249
5250         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
5251         processing of TSS routine Finalize_Address when compiling in
5252         CodePeer_Mode.
5253
5254 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5255
5256         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
5257         sem_warn.adb: Minor reformatting.
5258
5259 2011-08-29  Emmanuel Briot  <briot@adacore.com>
5260
5261         * prj-conf.adb (Get_Config_Switches): Also collect the list of
5262         languages from aggregated projects.
5263
5264 2011-08-29  Yannick Moy  <moy@adacore.com>
5265
5266         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
5267         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
5268         Traverse_Package_Declaration, Traverse_Subprogram_Body,
5269         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
5270         for stubs are traversed too when parameter is set
5271         (Traverse_All_Compilation_Units): Traverse without going inside stubs
5272         (Traverse_Declarations_Or_Statements): Do the special traversing for
5273         stubs when required.
5274         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
5275         return subprogram or package body from stub.
5276         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
5277         stubs without prior subprogram decl.
5278
5279 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
5280
5281         * gnat_ugn.texi: Fix typo.
5282
5283 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5284
5285         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
5286         which accounts for size vs alignment issues and calculates the size of
5287         the list header.
5288         (Deallocate_Any_Controlled): Ditto.
5289         (Nearest_Multiple_Rounded_Up): New routine.
5290
5291 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5292
5293         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
5294         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
5295         (Set_Exception_Msg): Ditto.
5296         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
5297         Private_Data.
5298         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
5299         Use Save_Occurrence instead of Save_Occurrence_No_Private.
5300         (Raise_With_Msg): Remove Cleanup_Flag.
5301         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
5302         Clean_Flag and Private_Data components.
5303
5304 2011-08-29  Yannick Moy  <moy@adacore.com>
5305
5306         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
5307         in CodePeer mode.
5308         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
5309         of an explicitly declared type, so that the base types of the original
5310         type and this generated type are the same, and a "type" (not a subtype
5311         like previously).
5312         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
5313         small" in Alfa mode, like in CodePeer mode.
5314         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
5315         clauses in Alfa mode.
5316
5317 2011-08-29  Javier Miranda  <miranda@adacore.com>
5318
5319         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
5320         function to the package spec.
5321         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
5322         internally generated bodies of null procedures locate the internally
5323         generated spec enforcing mode conformance.
5324         (Is_Interface_Conformant): Ensure that the controlling formal of the
5325         primitives match.
5326
5327 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5328
5329         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
5330         reject the pragma if it appears to apply to a formal subprogram.
5331
5332 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5333
5334         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
5335         inner expression, to prevent double evaluation.
5336
5337 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5338
5339         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
5340         they were unused.
5341         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
5342         * a-except-2005.adb (Propagate_Exception): Adjust spec.
5343         (Raise_Current_Excep): Adjust call.
5344         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
5345
5346 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5347
5348         * exp_disp.adb: Minor reformatting.
5349
5350 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5351
5352         * a-exexpr.adb (Setup_Exception): Removed.
5353         * a-exexpr-gcc.adb (Setup_Exception): Removed.
5354         * a-except.adb (Exception_Propagation): Removed.
5355         * a-except-2005.adb (Setup_Exception): Removed.
5356         (Reraise): Remove call to Setup_Exception.
5357         (Reraise_Occurrence): Ditto.
5358         (Reraise_Occurrence_Always): Ditto.
5359         (Reraise_Occurrence_No_Defer): Ditto.
5360         (Transfer_Occurrence): Ditto.
5361         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
5362         (Set_Exception_Msg): Ditto.
5363
5364 2011-08-29  Robert Dewar  <dewar@adacore.com>
5365
5366         * a-convec.adb, exp_disp.adb: Minor reformatting.
5367
5368 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5369
5370         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
5371
5372 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
5373
5374         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
5375         Exception_Handlers to No_List instead of Empty_List in the case where
5376         there are no handlers.
5377
5378 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5379
5380         * gcc-interface/gigi.h (enum standard_datatypes): Add
5381         ADT_reraise_zcx_decl
5382         (reraise_zcx_decl): New macro.
5383         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
5384         (gigi): Set reraise_zcx_decl.
5385         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
5386         (gnat_to_gnu): Handle N_Raise_Statement.
5387
5388 2011-08-29  Robert Dewar  <dewar@adacore.com>
5389
5390         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
5391         a-undesu.adb: Minor reformatting.
5392
5393 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5394
5395         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
5396         table, accept an unfrozen untagged component if it is an actual for a
5397         formal incomplete type.
5398         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
5399         provide new iterator forms over vectors.
5400         Introduce type Iterator in package body to implement operations of
5401         Reversible_Iterator interface.
5402         * a-iteint.ads: Make package pure so it is usable with new container
5403         packages, that are categorized Remote_Types.
5404
5405 2011-08-29  Robert Dewar  <dewar@adacore.com>
5406
5407         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
5408
5409 2011-08-29  Bob Duff  <duff@adacore.com>
5410
5411         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
5412         of <>, because this is the routine that checks for dimensionality
5413         errors (for example, for a two-dimensional array, (others => <>) should
5414         be (others => (others => <>)).
5415
5416 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5417
5418         * impunit.adb: Add new run-time units.
5419         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
5420         s-stposu.ads, s-stposu.adb: Code clean up.
5421         Handle protected class-wide or task class-wide types
5422         Handle C/C++/CIL/Java types.
5423         * s-spsufi.adb, s-spsufi.ads: New files.
5424
5425 2011-08-29  Yannick Moy  <moy@adacore.com>
5426
5427         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
5428         library-level subprogram.
5429         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
5430         placement.
5431         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
5432         component.
5433         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
5434         component.
5435         * gnat_rm.texi: Update doc for Test_Case pragma.
5436
5437 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5438
5439         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
5440         convention C.
5441         (GCC_Exception_Access): New type.
5442         (Unwind_DeleteException): New imported procedure
5443         (Foreign_Exception): Import it.
5444         (GNAT_GCC_Exception): Simply have the occurrence inside.
5445         (To_GCC_Exception): New function.
5446         (To_GNAT_GCC_Exception): New function.
5447         (GNAT_GCC_Exception_Cleanup): New procedure..
5448         (Propagate_GCC_Exception): New procedure.
5449         (Reraise_GCC_Exception): New procedure.
5450         (Setup_Current_Excep): New procedure.
5451         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
5452         (Unwind_RaiseException): Ditto.
5453         (Unwind_ForcedUnwind): Ditto.
5454         (Remove): Removed.
5455         (Begin_Handler): Change type of parameter.
5456         (End_Handler): Ditto. Now delete the exception if still present.
5457         (Setup_Key): Removed.
5458         (Is_Setup_And_Not_Propagated): Removed.
5459         (Set_Setup_And_Not_Propagated): Ditto.
5460         (Clear_Setup_And_Not_Propagated): Ditto.
5461         (Save_Occurrence_And_Private): Ditto.
5462         (EID_For): Add 'not null' constraint on parameter.
5463         (Setup_Exception): Does nothing.
5464         (Propagate_Exception): Simplified.
5465         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
5466         re-raise is not expanded anymore.
5467         * s-except.ads (Foreign_Exception): New exception - placeholder for
5468         non Ada exceptions.
5469         * raise-gcc.c (__gnat_setup_current_excep): Declare
5470         (CXX_EXCEPTION_CLASS): Define (not yet used)
5471         (GNAT_EXCEPTION_CLASS): Define.
5472         (is_handled_by): Handle foreign exceptions.
5473         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
5474
5475 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5476
5477         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
5478
5479 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5480
5481         * a-synbar-posix.adb: Minor reformatting.
5482
5483 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5484
5485         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
5486         a-exetim-default.ads (Interrupt_Clocks_Supported,
5487         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5488         definitions to be compliant with AI-0171. The target systems do not
5489         support separate account for the execution time of interrupt handlers.
5490
5491 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5492
5493         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
5494         in the barrier to put first the easiest to evaluate (and the one which
5495         will be True more often). More efficient.
5496
5497 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
5498
5499         * s-atocou-x86.adb: Fix constraint in machine code insertion.
5500
5501 2011-08-29  Bob Duff  <duff@adacore.com>
5502
5503         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
5504         attributes that are now aspects, as specified by AI05-0229-1.
5505         * sem_ch13.adb (Analyze_Aspect_Specifications,
5506         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
5507         pragmas or attribute references, as appropriate.
5508
5509 2011-08-29  Robert Dewar  <dewar@adacore.com>
5510
5511         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
5512         a-synbar-posix.ads: Minor reformatting.
5513
5514 2011-08-29  Yannick Moy  <moy@adacore.com>
5515
5516         * snames.ads-tmpl: Add name Force.
5517
5518 2011-08-29  Pascal Obry  <obry@adacore.com>
5519
5520         * prj-nmsc.adb: Minor reformatting.
5521
5522 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5523
5524         * a-exetim.ads (Interrupt_Clocks_Supported,
5525         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
5526         definitions to be compliant with AI-0171.
5527
5528 2011-08-29  Robert Dewar  <dewar@adacore.com>
5529
5530         * a-ngelfu.adb: Add comments.
5531
5532 2011-08-29  Geert Bosch  <bosch@adacore.com>
5533
5534         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
5535         the closest machine number to Pi / 2.0.
5536
5537 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5538
5539         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
5540         package Ada.Synchronous_Barriers.
5541         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
5542         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
5543         default implementation using protected objects and another one
5544         a-synbar-posix using POSIX barriers as the underlying support.
5545         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
5546         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
5547         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
5548         Clean up dependencies.
5549         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
5550
5551 2011-08-29  Robert Dewar  <dewar@adacore.com>
5552
5553         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
5554         exp_dist.adb: Minor code reorganization.
5555         Minor reformatting.
5556
5557 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5558
5559         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
5560         primitive operation must support external streaming if it is not a
5561         controlling access result.
5562
5563 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5564
5565         * sinfo.ads, sem_ch7.adb: Minor reformatting.
5566
5567 2011-08-29  Bob Duff  <duff@adacore.com>
5568
5569         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
5570         restriction on allocators, as required by AI05-0013-1.
5571         * restrict.ads: Minor comment fix.
5572
5573 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5574
5575         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
5576         (To_Jmpbuf_Address): Ditto
5577         (builtin_longjmp): Ditto
5578
5579 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5580
5581         * sem_res.adb: Minor reformatting.
5582
5583 2011-08-29  Vincent Celier  <celier@adacore.com>
5584
5585         * make.adb (Gnatmake): Move special processing for VM targets after the
5586         call to Get_Target_Parameters.
5587
5588 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5589
5590         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
5591
5592 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5593
5594         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
5595         where an anonymous access discriminant of a limited designated type
5596         appears in a non-immutably limited discriminated type and issue an
5597         error message. Add local variable Desig_T and replace all occurrences
5598         of Designated_Type.
5599
5600 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
5601
5602         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
5603         implementation is compliant to RM D.15(15/2) after the modification
5604         imposed by AI05-0094-1 (binding interpretation).
5605
5606 2011-08-29  Robert Dewar  <dewar@adacore.com>
5607
5608         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
5609         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
5610
5611 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5612
5613         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
5614         the scope name, do not report a missing label as a style violation (it
5615         will be diagnosed as an illegality).
5616         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
5617         variant records: Get_Enum_Lit_From_Pos already returns a usage
5618         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
5619         on Expr in Integer_Literal case so that it can be used by
5620         Build_To_Any_Call.
5621
5622 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5623
5624         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
5625         Adjust comment.
5626         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
5627         (Build_Abort_Block_Handler): New function to build an Abort_Signal
5628         exception handler.
5629         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
5630         Build_Abort_Block_Handler to build the exception handler. Do not
5631         undefer aborts for the Abort_Signal exception handler if back-end
5632         exception mechanism.
5633         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
5634         back_end exceptions for all others and abort_signal.
5635         * s-except.ads (ZCX_By_Default): New constant.
5636         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
5637         (Raise_Exception_Always): Ditto.
5638         (Raise_From_Signal_Handler): Ditto.
5639         (Raise_With_Location_And_Msg): Ditto.
5640         (Raise_With_Msg): Ditto.
5641         (Reraise): Ditto.
5642         (Reraise_Occurence): Ditto.
5643         (Reraise_Occurrence_Always): Ditto.
5644         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
5645         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
5646
5647 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5648
5649         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
5650
5651 2011-08-29  Robert Dewar  <dewar@adacore.com>
5652
5653         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
5654         Minor code reorganization.
5655
5656 2011-08-29  Bob Duff  <duff@adacore.com>
5657
5658         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
5659         2012, not just Ada 2005.
5660
5661 2011-08-29  Vincent Celier  <celier@adacore.com>
5662
5663         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
5664         with a project file or with gprbuid, if -gnatep= is specified, the
5665         builder may need to be invoked with -x.
5666
5667 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5668
5669         * a-exexpr-gcc.adb: Minor comment fix.
5670
5671 2011-08-29  Robert Dewar  <dewar@adacore.com>
5672
5673         * sem_ch8.adb: Minor reformatting.
5674
5675 2011-08-29  Bob Duff  <duff@adacore.com>
5676
5677         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
5678         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
5679         treating "some" as unreserved in earlier Ada versions. This is now
5680         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
5681         rather than Name_Some, since Tok_Some is now recognized as reserved.
5682         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
5683         reserved word.
5684         * scans.ads: Minor comment fixes.
5685         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
5686         for other language versions.
5687         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
5688         treating "some" as unreserved in earlier Ada versions. This is now
5689         handled in Snames.Is_Keyword_Name.
5690         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
5691         Ada 2012.
5692         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
5693         unreserved in earlier Ada versions. This is now handled in
5694         Snames.Is_Keyword_Name.
5695         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
5696         words as for other language versions.
5697         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
5698         Ada 2012, not just Ada 2005.
5699
5700 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5701
5702         * sem_ch13.adb: Additional semantic checks for aspects involved in
5703         iterators.
5704
5705 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5706
5707         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
5708         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
5709         Container parameter.
5710         (Ancestor_Find): ditto.
5711
5712 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5713
5714         * par-endh.adb: Minor reformatting.
5715
5716 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5717
5718         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
5719         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
5720         (Adjust_N_CLeanups_For): Remove.
5721         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
5722         stack is reached.
5723         (Propgate_Exception): Adjust.
5724         * raise-gcc.c: Add a few static/const.
5725         (Adjust_N_Cleanups_For): Remove declaration.
5726         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
5727
5728 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5729
5730         * sem_ch8.adb: Use type of function return when rewriting as object
5731         declaration.
5732
5733 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
5734
5735         * sem_type.adb: Minor reformatting.
5736
5737 2011-08-29  Robert Dewar  <dewar@adacore.com>
5738
5739         * makeutl.adb: Minor reformatting.
5740
5741 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5742
5743         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
5744         function call of a limited type, the expansion of the renaming is
5745         complicated by the presence of various temporaries and subtypes that
5746         capture constraints of the renamed object.
5747         Rewrite node as an object declaration, whose expansion is simpler.
5748         Given that the object is limited there is no copy involved and no
5749         performance hit.
5750
5751 2011-08-29  Robert Dewar  <dewar@adacore.com>
5752
5753         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
5754         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
5755
5756 2011-08-29  Tristan Gingold  <gingold@adacore.com>
5757
5758         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
5759         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
5760         system-linux-hppa.ads, system-linux-s390.ads,
5761         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
5762         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
5763         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
5764         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
5765         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
5766         system-solaris-sparc.ads, system-lynxos-x86.ads,
5767         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
5768         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
5769         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
5770         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
5771         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
5772         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
5773         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
5774         * opt.ads: Adjust comment.
5775         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
5776         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
5777         * system.ads: Move GCC_ZCX_Support to obsolete entries.
5778
5779 2011-08-29  Emmanuel Briot  <briot@adacore.com>
5780
5781         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
5782         file name is specified on the gnatmake or gprbuild command line, and
5783         before we search for that file in the project.
5784
5785 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5786
5787         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
5788         used to determine whether a possible interpretation for an overloadable
5789         entity is declared within the current instantiation and should be
5790         included in the candidate set.
5791
5792 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
5793
5794         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
5795
5796 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5797
5798         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
5799         access subtype is access_to_subprogram, when applying checks for
5800         RM 3.10.2 (27).
5801
5802 2011-08-29  Matthew Heaney  <heaney@adacore.com>
5803
5804         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
5805         for sibling when common parent.
5806
5807 2011-08-29  Thomas Quinot  <quinot@adacore.com>
5808
5809         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
5810         "pragma_".
5811
5812 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5813
5814         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
5815         for the return type when in ASIS mode.
5816
5817 2011-08-29  Vincent Celier  <celier@adacore.com>
5818
5819         * make.adb (Gnatmake): Get the default search dirs, then the target
5820         parameters after getting the Builder switches, as the Builder switches
5821         may include --RTS= and that could change the default search dirs.
5822
5823 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5824
5825         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
5826         Make_Final_Call. Move the processing for class-wide types before the
5827         processing for derivations from [Limited_]Controlled.
5828         (Make_Final_Call): Move the processing for class-wide types before the
5829         processing for derivations from [Limited_]Controlled.
5830         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
5831         Add code to account for alignments larger than the list header. Add a
5832         comment illustrating the structure of the allocated object + padding +
5833         header.
5834         (Deallocate_Any_Controlled): Add code to account for alignments larger
5835         than the list header.
5836
5837 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
5838
5839         * sinfo.ads, sinfo.adb: New node kind
5840         N_Formal_Incomplete_Type_Definition, related flags.
5841         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
5842         Parse formal incomplete types.
5843         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
5844         sem_ch12.
5845         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
5846         Formal incomplete types do not need completion.
5847         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
5848         Validate_Incomplete_Type_Instance): New procedures to handle formal
5849         incomplete types.
5850         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
5851         that corresponds to a formal incomplete type.
5852         * sprint.adb: Handle formal incomplete type declarations.
5853         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
5854         an insertion point.
5855
5856 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
5857
5858         * a-fihema.ads, a-fihema.adb: Unit removed.
5859         * a-undesu.ads, a-undesu.adb: New unit implementing
5860         Ada.Unchecked_Deallocate_Subpool.
5861         * einfo.adb: Remove Associated_Collection from the node usage.
5862         Add Finalization_Master to the node usage.
5863         (Associated_Collection): Removed.
5864         (Finalization_Master): New routine.
5865         (Set_Associated_Collection): Removed.
5866         (Set_Finalization_Master): New routine.
5867         (Write_Field23_Name): Remove Associated_Collection from the output. Add
5868         Finalization_Master to the output.
5869         * einfo.ads: Remove attribute Associated_Collection and its uses in
5870         entities.
5871         Add new attribute Finalization_Master along with its uses in entitites.
5872         (Associated_Collection): Removed along with its pragma import.
5873         (Finalization_Master): New routine along with a pragma import.
5874         (Set_Associated_Collection): Removed along with its pragma import.
5875         (Set_Finalization_Master): New routine along with a pragma import.
5876         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
5877         Build_Finalization_Collection with Build_Finalization_Master.
5878         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
5879         before the bodies of the predefined routines. Add comment explaining
5880         this. Replace call to Build_Finalization_Collection with
5881         Build_Finalization_Master.
5882         (Freeze_Type): Replace call to Build_Finalization_Collection with
5883         Build_Finalization_Master.
5884         (Make_Finalize_Address_Body): Comment reformatting.
5885         (Make_Predefined_Primitive_Specs): Code reformatting.
5886         (Stream_Operation_OK): Update comment mentioning finalization
5887         collections. Replace RE_Finalization_Collection with
5888         RE_Finalization_Master.
5889         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5890         Associated_Collection with Finalization_Master. Replace call to
5891         Build_Finalization_Collection with Build_Finalization_Master.
5892         (Expand_Allocator_Expression): Replace call to Associated_Collection
5893         with Finalization_Master. Replace call to Set_Associated_Collection with
5894         Set_Finalization_Master. Remove the generation of
5895         Set_Finalize_Address_Ptr.
5896         (Expand_N_Allocator): Replace call to Associated_Collection with
5897         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5898         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5899         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5900         comment on usage. Replace call to Needs_BIP_Collection with
5901         Needs_BIP_Finalization_Master Remplace BIP_Collection with
5902         BIP_Finalization_Master. Update all comments which mention finalization
5903         collections. Replace Associated_Collection with
5904         Finalization_Master. Replace Build_Finalization_Collection with
5905         Build_Finalization_Master.
5906         (BIP_Formal_Suffix): Update BIP_Collection's case.
5907         (Build_Heap_Allocator): Update the related comment. Rename local
5908         variable Collect to Fin_Mas_Id and update its occurrences. Update
5909         comments which mention finalization collections. Replace
5910         Set_Associated_Collection with Set_Finalization_Master.
5911         (Expand_Call): Update the code which detects a special piece of library
5912         code for .NET/JVM.
5913         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5914         Add_Collection_Actual_To_Build_In_Place_Call with
5915         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5916         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5917         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5918         Add_Collection_Actual_To_Build_In_Place_Call with
5919         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5920         (Make_Build_In_Place_Call_In_Assignment): Replace call to
5921         Add_Collection_Actual_To_Build_In_Place_Call with
5922         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5923         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5924         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5925         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5926         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5927         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5928         Replace call to Set_Associated_Collection with Set_Finalization_Master.
5929         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5930         Replace the call to Associated_Collection with Finalization_Master.
5931         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5932         Update the way finalization master names are generated. Update the
5933         retrieval of the correct access type which will carry the pool and
5934         master attributes.
5935         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5936         (Make_Finalize_Address_Body): Abstract types do not need
5937         Finalize_Address. Code reformatting.
5938         (Make_Finalize_Address_Stmts): Update comment on usage.
5939         (Make_Set_Finalize_Address_Ptr_Call): Removed.
5940         (Process_Declarations): Update comments.
5941         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5942         Build_Finalization_Master. Update associated comment.
5943         (Make_Set_Finalize_Address_Ptr_Call): Removed.
5944         * exp_ch13.adb: Update comments which mention finalization collections.
5945         (Expand_N_Free_Statement): Replace the call to Associated_Collection
5946         with Finalization_Master.
5947         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5948         create calls to routines Allocate_Any_Controlled and
5949         Deallocate_Any_Controlled.
5950         (Find_Finalize_Address): New routine.
5951         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5952         comparison.
5953         (Requires_Cleanup_Actions): Update the comment on freeze node
5954         inspection.
5955         * exp_util.ads: Remove comment on generated code for
5956         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5957         is better to simply look in the body.
5958         * freeze.adb (Freeze_All): Update the comment of finalization
5959         collections. Replace the call to Associated_Collection with
5960         Finalization_Master. Replace the call to Build_Finalization_Collection
5961         with Build_Finalization_Master.
5962         * impunit.adb: Add a-undesu and s-stposu to the list of units.
5963         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5964         a-fihema.
5965         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5966         Ada.Finalization. Add processing for children of System.Storage_Pools.
5967         * rtsfind.ads: Remove the naming of second level children of
5968         Ada.Finalization.
5969         Remove Ada_Finalization_Heap_Management from the list of units.
5970         Remove subtype Ada_Finalization_Child.
5971         Remove the following subprogram entities:
5972         
5973            RE_Allocate
5974            RE_Deallocate
5975            RE_Finalization_Collection
5976            RE_Finalization_Collection_Ptr
5977            RE_Set_Finalize_Address_Ptr
5978         
5979         Add the naming of second level children of System.Storage_Pools.
5980         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5981         the list of units.
5982         Add subtype System_Storage_Pools_Child.
5983         Add the following subprogram entities to System.Finalization_Masters:
5984         
5985            RE_Finalization_Master
5986            RE_Finalization_Master_Ptr
5987         
5988         Add the following subprogram entities to System.Storage_Pools.Subpools:
5989         
5990            RE_Allocate_Any_Controlled
5991            RE_Deallocate_Any_Controlled
5992            RE_Root_Storage_Pool_With_Subpools
5993            RE_Root_Subpool
5994            RE_Subpool_Handle
5995         
5996         Move the following subprogram entities from
5997         Ada.Finalization.Heap_Management to System.Finalization_Masters:
5998         
5999            RE_Add_Offset_To_Address
6000            RE_Attach
6001            RE_Base_Pool
6002            RE_Detach
6003         
6004         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
6005         Set_Associated_Collection with Set_Finalization_Master.
6006         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
6007         BIP_Finalization_Master is created.
6008         * s-finmas.adb: New unit System.Finalization_Masters.
6009         * s-finmas.ads: New unit System.Finalization_Masters.
6010         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
6011         * s-stposu.ads, s-stposu.adb: New unit implementing
6012         System.Storage_Pools.Subpools.
6013
6014 2011-08-29  Bob Duff  <duff@adacore.com>
6015
6016         * tbuild.adb: Add assertion.
6017
6018 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6019
6020         * s-pooglo.adb: Minor reformatting.
6021
6022 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6023
6024         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
6025         an indexed component of a packed array whose element type is a record
6026         with a representation clause different from that of the right-hand
6027         side, generate a temporary to minimuze the number of bit-field
6028         operations generated.
6029
6030 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6031
6032         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
6033         declarations, and thus are likely insertion points for actions.
6034
6035 2011-08-29  Bob Duff  <duff@adacore.com>
6036
6037         * einfo.ads: Minor comment fix.
6038
6039 2011-08-29  Robert Dewar  <dewar@adacore.com>
6040
6041         * frontend.adb, gnat1drv.adb: Minor reformatting.
6042
6043 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6044
6045         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
6046         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
6047         space in front of the header.
6048
6049 2011-08-29  Johannes Kanig  <kanig@adacore.com>
6050
6051         * frontend.adb (Frontend): Exit after creating Standard package when
6052         -gnatd.H is present.
6053         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
6054         present.
6055
6056 2011-08-29  Robert Dewar  <dewar@adacore.com>
6057
6058         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
6059         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
6060         snames.ads-tmpl: Minor reformatting.
6061
6062 2011-08-29  Philippe Gil  <gil@adacore.com>
6063
6064         * prj.adb (Reset_Units_In_Table): New procedure.
6065         Reset units to avoid access to freed memory.
6066
6067 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6068
6069         * get_scos.adb: When reading a P statement SCO without a pragma name
6070         (from an older ALI file), ensure that the Pragma_Name component is set
6071         to Unknown_Pragma (not left uninitialized).
6072
6073 2011-08-29  Vincent Celier  <celier@adacore.com>
6074
6075         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
6076         modified to compute correctly the object path of a SAL project that is
6077         extending another library project.
6078         (Write_Path_File): New procedure.
6079         * makeutl.ads (Directories): New table moved from Buildgpr
6080         (Get_Directories): New procedure moved from Buildgpr
6081         (Write_Path_File): New procedure
6082         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
6083         paths before binding SALs, instead of Set_Ada_Paths.
6084         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
6085         Prj.
6086         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
6087         (Current_Source_Path_File_Of): New function
6088         (Set_Current_Object_Path_File_Of): New procedure
6089         (Current_Source_Object_File_Of): New function
6090         (Set_Current_Object_Path_File_Of): New procedure
6091         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
6092         (Current_Source_Path_File_Of): New function
6093         (Set_Current_Object_Path_File_Of): New procedure
6094         (Current_Source_Object_File_Of): New function
6095         (Set_Current_Object_Path_File_Of): New procedure
6096
6097 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6098
6099         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
6100         packed entity, use a bit-field assignment only if there is no change of
6101         representation.
6102
6103 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6104
6105         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
6106         Is_RTU instead of using Chars comparisons.
6107
6108 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6109
6110         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
6111         temporary object if the actual is constrained, and the discriminants
6112         read from the stream don't match.
6113
6114 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6115
6116         * sem_attr.adb, exp_attr.adb: Add handling of
6117         Attribute_System_Allocator_Alignment
6118         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
6119         Attribute_System_Allocator_Alignment.
6120         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
6121         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
6122         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
6123         get_target_system_allocator_alignment.
6124
6125 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6126
6127         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
6128         dependencies.
6129
6130 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6131
6132         * exp_ch3.adb (In_Runtime): Fix typo.
6133
6134 2011-08-29  Bob Duff  <duff@adacore.com>
6135
6136         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
6137
6138 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6139
6140         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
6141         and a separate tag assignment is generated, ensure that the tag
6142         assignment is analyzed.
6143
6144 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6145
6146         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
6147         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
6148         of statement lists that may contain local declarations.
6149         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
6150         duplicate the triggering statements needed for the expansion of this
6151         construct, when the trigger is a dispatching call to a synchronized
6152         primitive.
6153
6154 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6155
6156         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
6157         * bindgen.adb: Add comments.
6158         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
6159         in CodePeer mode.
6160
6161 2011-08-29  Robert Dewar  <dewar@adacore.com>
6162
6163         * exp_attr.adb: Minor reformatting.
6164         Minor code reorganization and commenting.
6165         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
6166         reformatting.
6167
6168 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6169
6170         * get_scos.adb: Ignore chaining indicators not currently supported
6171         by Ada.
6172
6173 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6174
6175         * system.ads: Minor editing.
6176
6177 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6178
6179         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
6180         CodePeer mode.
6181         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
6182         Attribute_Elab_Subp_Body.
6183         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
6184         * sem_util.adb: Update comments.
6185
6186 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6187
6188         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
6189         pragma name for each SCO statement corresponding to a pragma.
6190
6191 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6192
6193         * opt.ads: Minor editing.
6194
6195 2011-08-29  Yannick Moy  <moy@adacore.com>
6196
6197         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
6198         that only made sense for CodePeer mode.
6199
6200 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6201
6202         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
6203         which is no longer used.
6204         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
6205         handling of the 64-bit division check.
6206         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
6207         division available.
6208         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
6209         longer used.
6210
6211 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6212
6213         * get_scos.adb: Minor reformatting.
6214
6215 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6216
6217         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
6218         statement list is wrapped in a block, the block is explicitly analyzed
6219         in order to properly redecorate the entities and create a servicing
6220         finalizer.
6221
6222 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6223
6224         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
6225         (Set_Zero_Cost_Handling): Remove.
6226
6227 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6228
6229         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
6230
6231 2011-08-29  Geert Bosch  <bosch@adacore.com>
6232
6233         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
6234         instruction, as the latter may produce -0.0, which is not a valid VAX
6235         F float number.
6236         (Neg_G): Likewise for VAX F float.
6237
6238 2011-08-29  Robert Dewar  <dewar@adacore.com>
6239
6240         * exp_util.adb: Minor reformatting.
6241
6242 2011-08-29  Yannick Moy  <moy@adacore.com>
6243
6244         * sem_ch3.adb: Minor comment update.
6245
6246 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6247
6248         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
6249         the operand type.
6250
6251 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6252
6253         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
6254         current statement sequence on a generic instantiation or a subprogram
6255         declaration.
6256
6257 2011-08-29  Robert Dewar  <dewar@adacore.com>
6258
6259         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
6260         Minor reformatting.
6261
6262 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6263
6264         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6265         Correct the check which involves the freeze node of a controlled or
6266         access-to-controlled type.
6267
6268 2011-08-29  Geert Bosch  <bosch@adacore.com>
6269
6270         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
6271         statements.
6272         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
6273         Asm statements.
6274
6275 2011-08-29  Yannick Moy  <moy@adacore.com>
6276
6277         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
6278         for every index type and component type that is not a subtype_mark.
6279         (Process_Subtype): Set Etype of subtype.
6280
6281 2011-08-29  Robert Dewar  <dewar@adacore.com>
6282
6283         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
6284         reorganization.  Minor reformatting.
6285
6286 2011-08-29  Steve Baird  <baird@adacore.com>
6287
6288         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
6289         for CodePeer and ALFA modes.
6290
6291 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6292
6293         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
6294         that comes from an enclosing scope if it is not the renaming of an
6295         actual, to handle properly a spurious ambiguity in an instance.
6296
6297 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
6298
6299         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
6300         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
6301         use it instead of the Esize of the first parameter.
6302         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
6303         above change.
6304         <Size>: Likewise.  Call it for composite types on the RM size.
6305
6306 2011-08-29  Yannick Moy  <moy@adacore.com>
6307
6308         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
6309         * sem_util.adb (Unique_Name): Correct behaviour for names of
6310         compilation units.
6311
6312 2011-08-29  Yannick Moy  <moy@adacore.com>
6313
6314         * sem_prag.adb (Check_Precondition_Postcondition): In formal
6315         verification mode, analyze pragma expression for correctness, for
6316         pre/post on library-level subprogram, as it is not expanded later.
6317
6318 2011-08-29  Yannick Moy  <moy@adacore.com>
6319
6320         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
6321         in formal verification.
6322
6323 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6324
6325         * sem_util.adb: Minor reformatting.
6326         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
6327         there's no pragma.
6328         * par_sco.ads, par_sco.adb: Update comments.
6329
6330 2011-08-29  Yannick Moy  <moy@adacore.com>
6331
6332         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
6333         associated getter/setter.
6334         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
6335
6336 2011-08-29  Vincent Celier  <celier@adacore.com>
6337
6338         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
6339         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
6340         with declarations for Language_Kind and Dependency_Kind for Ada.
6341         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
6342         (Process_Compiler): Take into account the new attributes Dependency_Kind
6343         and Language_Kind.
6344         (Check_Configuration): Check if language kind is unit based, not if the
6345         language name is Ada.
6346         (Process_Exceptions_Unit_Based): Ditto
6347         (Add_Language): Remove default additions of language and dependency kind
6348         * prj.ads: Minor comment change
6349         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
6350
6351 2011-08-29  Johannes Kanig  <kanig@adacore.com>
6352
6353         * debug.adb: Update comments.
6354
6355 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
6356
6357         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
6358         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
6359         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
6360         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
6361         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
6362
6363 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6364
6365         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
6366         (GNATLIBCFLAGS_FOR_C): Replace
6367         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
6368         (gnatlib-shared-default, gnatlib-shared-dual-win32)
6369         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
6370         (gnatlib-sjlj, gnatlib-zcx): Likewise.
6371
6372 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
6373
6374         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
6375
6376         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
6377
6378         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
6379
6380 2011-08-05  Nicolas Roche  <roche@adacore.com>
6381
6382         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
6383         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
6384         canadian cross.
6385         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
6386
6387 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6388
6389         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
6390         subprogram bodies declared out-of-order.
6391
6392 2011-08-05  Yannick Moy  <moy@adacore.com>
6393
6394         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
6395         entities directly in package Standard, otherwise skip the standard
6396         prefix.
6397
6398 2011-08-05  Robert Dewar  <dewar@adacore.com>
6399
6400         * a-cbmutr.adb: Minor reformatting
6401         (Allocate_Node): refactor node allocation algorithm
6402
6403 2011-08-05  Robert Dewar  <dewar@adacore.com>
6404
6405         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
6406         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
6407         mode.
6408         (Analyze_Pragma, case Check_Policy): Ditto.
6409         * sem_prag.ads (Check_Disabled): New function
6410         * snames.ads-tmpl: Add Name_Disable.
6411
6412 2011-08-05  Robert Dewar  <dewar@adacore.com>
6413
6414         * gnat_rm.texi: Document implementation-defined policy DISABLE for
6415         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
6416
6417 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6418
6419         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
6420         that appears in a generic formal part and applies to a formal
6421         subprogram.
6422
6423 2011-08-05  Robert Dewar  <dewar@adacore.com>
6424
6425         * a-cbmutr.ads: Minor reformatting.
6426
6427 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6428
6429         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
6430         to check count, check sign of value instead.
6431         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
6432         (Copy_Subtree): allocate copy of source element
6433         (Equal_Subtree): compare elements, not access objects
6434
6435 2011-08-05  Vincent Celier  <celier@adacore.com>
6436
6437         * gnat_ugn.texi: Fix VMS alternative.
6438
6439 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6440
6441         * sem_ch11.adb: Add comment.
6442
6443 2011-08-05  Robert Dewar  <dewar@adacore.com>
6444
6445         * exp_util.adb: Minor comment fix.
6446
6447 2011-08-05  Robert Dewar  <dewar@adacore.com>
6448
6449         * scng.adb (Error_Unterminated_String): Improve flag position when
6450         comma present.
6451
6452 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6453
6454         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
6455         tree containers).
6456         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
6457         multiway tree containers.
6458
6459 2011-08-05  Robert Dewar  <dewar@adacore.com>
6460
6461         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
6462         * stylesw.adb: Implement -gnatyC to control comment spacing
6463         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
6464         -gnatyc/C).
6465         * usage.adb: Add line for -gnatyC.
6466
6467 2011-08-05  Robert Dewar  <dewar@adacore.com>
6468
6469         * gnat_ugn.texi: Document -gnatyC.
6470         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
6471         synonym for COMMENTS2).
6472
6473 2011-08-05  Robert Dewar  <dewar@adacore.com>
6474
6475         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
6476         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
6477         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
6478         a-comutr.ads, lib-xref.adb: Minor reformatting.
6479
6480 2011-08-05  Robert Dewar  <dewar@adacore.com>
6481
6482         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
6483         warning if there is an exception handler present.
6484
6485 2011-08-05  Pascal Obry  <obry@adacore.com>
6486
6487         * a-iteint.ads: Fix copyright year.
6488
6489 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6490
6491         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
6492         statement SCO for a USE clause or a representation clause.
6493
6494 2011-08-05  Yannick Moy  <moy@adacore.com>
6495
6496         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
6497         between body and spec for stub.
6498         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
6499         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
6500         pragma precondition or postcondition, for which the enclosing
6501         subprogram or package in the AST is not the desired one, return empty.
6502
6503 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6504
6505         * g-expect.adb: Minor reformatting.
6506
6507 2011-08-05  Bob Duff  <duff@adacore.com>
6508
6509         * a-fihema.adb: Comment out OS_Lib.
6510
6511 2011-08-05  Matthew Heaney  <heaney@adacore.com>
6512
6513         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
6514         (unbounded multiway tree containers) and a-iteint.ads.
6515         * a-comutr.ads, a-comutr.adb:
6516         This is the new Ada 2012 unit for unbounded multiway tree containers
6517         * a-cimutr.ads, a-cimutr.adb
6518         This is the new Ada 2012 unit for indefinite multiway tree containers
6519         * a-iteint.ads: New file.
6520
6521 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6522
6523         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
6524
6525 2011-08-05  Bob Duff  <duff@adacore.com>
6526
6527         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
6528         subpools.
6529         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
6530
6531 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6532
6533         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
6534         general indexing aspects of Ada2012. Called when analyzing indexed
6535         components when other interpretations fail.
6536         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
6537         in an expression context where overloading is meaningful. This excludes
6538         the occurrence in an aspect specification (efficiency only).
6539         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
6540         related to iterators can be set by an attribute specification, but
6541         cannot be queried.
6542         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
6543         Constant_Indexing and Variable_Indexing.
6544         (Check_Indexing_Functions): New procedure to perform legality checks.
6545         Additional semantic checks at end of declarations.
6546
6547 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6548
6549         * tree_io.ads: Update ASIS_Version_Number because of the change of the
6550         order of calling Tree_Write/Tree_Read routines made for aspects.
6551
6552 2011-08-05  Bob Duff  <duff@adacore.com>
6553
6554         * a-fihema.adb (Finalize): Fix race condition.
6555
6556 2011-08-05  Yannick Moy  <moy@adacore.com>
6557
6558         * sem_ch12.adb (Analyze_Package_Instantiation,
6559         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
6560         mode.
6561
6562 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6563
6564         * sem_type.adb (Specific_Type): in an instance, the type-specific
6565         operand of an equality check that involves null may have a private
6566         type. Use full view to determine legality of construct.
6567
6568 2011-08-05  Vincent Celier  <celier@adacore.com>
6569
6570         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6571         delete or close the file when the call to gnatmake was successful.
6572
6573 2011-08-05  Yannick Moy  <moy@adacore.com>
6574
6575         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
6576         Global_Discard_Names.
6577
6578 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6579
6580         * sinfo.ads: comments on use of entity field for aspect specifications.
6581
6582 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6583
6584         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
6585         node is not itself an entity but a selected component, it is a
6586         rewritten parameterless call to an en enclosing synchronized operation,
6587         and this expansion will be performed again in the instance, so there is
6588         no global information to preserve.
6589
6590 2011-08-05  Javier Miranda  <miranda@adacore.com>
6591
6592         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
6593         for renamings of predefined primitives.
6594         (In_Predef_Prims_DT): New subprogram.
6595
6596 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6597
6598         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
6599         possible interpretation of name is a reference type, add an
6600         interpretation that is the designated type of the reference
6601         discriminant of that type.
6602         * sem_res.adb (resolve): If the interpretation imposed by context is an
6603         implicit dereference, rewrite the node as the deference of the
6604         reference discriminant.
6605         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
6606         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
6607         parent type or base type.
6608         * sem_ch4.adb (Process_Indexed_Component,
6609         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
6610         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
6611         Check for implicit dereference.
6612         (List_Operand_Interps): Indicate when an implicit dereference is
6613         ambiguous.
6614         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
6615
6616 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6617
6618         * scos.ads: Update documentation of SCO table. Pragma statements can now
6619         be marked as disabled (using 'p' instead of 'P' as the statement kind).
6620         * par_sco.ads, par_sco.adb: Implement the above change.
6621         (Process_Decisions_Defer): Generate a P decision for the first parameter
6622         of a dyadic pragma Debug.
6623         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
6624         necessary.
6625         * put_scos.adb: Code simplification based on above change.
6626
6627 2011-08-05  Robert Dewar  <dewar@adacore.com>
6628
6629         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
6630         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
6631         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6632         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
6633
6634 2011-08-05  Bob Duff  <duff@adacore.com>
6635
6636         * a-stunau.ads, g-spipat.adb: Update comments.
6637
6638 2011-08-05  Bob Duff  <duff@adacore.com>
6639
6640         * a-fihema.ads: Minor comment fix.
6641         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
6642         correct.
6643         (Attach, Detach): Remove some unnecessary code.
6644         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
6645
6646 2011-08-05  Bob Duff  <duff@adacore.com>
6647
6648         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
6649         allocation for Objects component. This simplifies the code somewhat. It
6650         is also a little more efficient in the not-so-unusual case where there
6651         are no controlled objects allocated.
6652         Make Finalization_Started flag atomic.
6653         (Finalize): Avoid unnecessary detachment of items from the list.
6654         (pcol): Minor cleanup.
6655
6656 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6657
6658         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
6659         package whose name is the same as that of the generic unit, or its
6660         ultimate prefix.
6661
6662 2011-08-05  Bob Duff  <duff@adacore.com>
6663
6664         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
6665         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
6666         Minor comment fixes.
6667
6668 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
6669
6670         * make.adb (Linking_Phase): No longer need to set source search path
6671         before calling gnatlink in CodePeer mode.
6672         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
6673         gcc in CodePeer mode, since the binder generated file no longer has a
6674         'with Main'.
6675         * switch.ads, switch.adb (Is_Language_Switch): Removed.
6676         * switch-c.adb: Update comment.
6677
6678 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6679
6680         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
6681
6682 2011-08-05  Nicolas Roche  <roche@adacore.com>
6683
6684         * gnat_ugn.texi: Fix minor syntax error issue.
6685
6686 2011-08-05  Vincent Celier  <celier@adacore.com>
6687
6688         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
6689         delete or close the file when the call to gnatmake returns a non
6690         successful return code.
6691
6692 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6693
6694         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
6695         check, indicate that the copy of the original node does not come from
6696         source, to prevent an infinite recursion of the expansion.
6697
6698 2011-08-05  Johannes Kanig  <kanig@adacore.com>
6699
6700         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
6701         VC generation for subprogram bodies.
6702
6703 2011-08-05  Yannick Moy  <moy@adacore.com>
6704
6705         * einfo.ads: Typo.
6706         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
6707         the base type with the smallest allowed base type.
6708
6709 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6710
6711         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
6712         aspects.
6713
6714 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6715
6716         * sem_ch12.ads: minor comment updates.
6717
6718 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6719
6720         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
6721         instantiation and a formal package the compiler generates a package
6722         renaming declaration so that the generic name within the declaration
6723         is interpreted as a renaming of the instance. At the end of a formal
6724         package declaration, this renaming must become invisible.
6725
6726 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6727
6728         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
6729         comparison and rely on concrete entities instead.
6730
6731 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6732
6733         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
6734         and discriminants, to indicate that the type has an access discriminant
6735         that supports implicit dereference.
6736         * snames.ads-tmpl: Add names of aspects and attributes related to
6737         Ada2012 iterators: constant_indexing, default_iterator,
6738         iterator_element, implicit_dereference, variable_indexing.
6739         * aspects.ads, aspects.adb: entries for iterator-related aspects.
6740         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
6741         iterator-related aspects.
6742         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
6743
6744 2011-08-05  Sergey Rybin  <rybin@adacore.com>
6745
6746         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
6747         metrics in gnatmetric to cover new kinds of coupling mentrics.
6748
6749 2011-08-05  Steve Baird  <baird@adacore.com>
6750
6751         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
6752         of calling the user-defined main subprogram.
6753         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
6754         is set) Call_Main_Subprogram ahead of, as opposed to
6755         inside of, Main.
6756         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
6757         generation of a "with" of the user-defined main subprogram.
6758         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
6759         (which is now called from Gen_Main instead).
6760
6761 2011-08-05  Emmanuel Briot  <briot@adacore.com>
6762
6763         * projects.texi: Added reference to the Makefile package.
6764
6765 2011-08-05  Thomas Quinot  <quinot@adacore.com>
6766
6767         * exp_ch7.adb: Minor comment rewording.
6768
6769 2011-08-05  Ed Falis  <falis@adacore.com>
6770
6771         * env.c: Fix comment.
6772
6773 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6774
6775         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
6776         character comparison and rely on concrete entities instead.
6777
6778 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6779
6780         * sem_ch3.adb: (Check_Private_Overriding): better error message,
6781         suggested by AI95-0068.
6782
6783 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
6784
6785         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
6786         the two potential initialization calls. This accounts for any
6787         access-before-elaboration checks which may precede the initialization
6788         calls.
6789         (Next_Suitable_Statement): New routine. Returns the next real statement
6790         after the input node while skipping generated checks.
6791         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
6792         with comment on usage.
6793         Do not generate Elaborate_All when the trigger is a finalization call
6794         coming from a type init proc.
6795         (Check_Elab_Call): Propagate the initialization procedure context to
6796         subsequent calls to Check_A_Call.
6797         (Check_Internal_Call_Continue): Propagate the initialization procedure
6798         context to subsequent calls to Check_Elab_Call.
6799         (Is_Finalization_Procedure): New routine. Returns True if the input
6800         entity denotes a [Deep_]Finalize routine.
6801         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
6802         along with comment on usage.
6803
6804 2011-08-05  Vadim Godunko  <godunko@adacore.com>
6805
6806         * s-atocou.ads: Add list of supported platforms.
6807
6808 2011-08-05  Yannick Moy  <moy@adacore.com>
6809
6810         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
6811
6812         * opt.ads (Disable_ALI_File): new Boolean flag
6813         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
6814
6815 2011-08-05  Ed Falis  <falis@adacore.com>
6816
6817         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
6818         environ is properly defined.
6819
6820 2011-08-05  Vincent Celier  <celier@adacore.com>
6821
6822         * make.adb (Compilation_Phase): Exit immediately when all objects have
6823         been found up to date, to avoid multiple exit messages.
6824         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
6825         same project for languages with no compiler.
6826         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
6827         -eI.
6828 2011-08-05  Robert Dewar  <dewar@adacore.com>
6829
6830         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
6831         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
6832         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
6833         s-atocou-builtin.adb: Minor reformatting.
6834
6835 2011-08-05  Yannick Moy  <moy@adacore.com>
6836
6837         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
6838         if the node to wrap is a pragma check, this node and enclosed
6839         expression are not expanded, so do not apply any transformations here.
6840         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
6841         introducing transient scopes.
6842
6843 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
6844
6845         * adaint.c (__gnat_set_writable, __gnat_set_readable,
6846         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
6847         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
6848         routine is available, so we use the default implementation of these
6849         functions.
6850         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
6851         support for copying attributes on VxWorks 6.
6852
6853 2011-08-05  Yannick Moy  <moy@adacore.com>
6854
6855         * debug.adb: Remove use of -gnatd.D.
6856         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
6857         * opt.ads: Simplify variables for ALFA mode, to keep one only
6858         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
6859         to ALFA mode.
6860
6861 2011-08-05  Vincent Celier  <celier@adacore.com>
6862
6863         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
6864         Builder'Default_Switches.
6865
6866 2011-08-05  Vincent Celier  <celier@adacore.com>
6867
6868         * makeusg.adb: Add lines for --create-map-file switches.
6869
6870 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
6871
6872         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
6873         profile is incomplete and the full view is available, replace it with
6874         the full view.
6875         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
6876         incomplete, freezing the subprogram is delayed until the full view is
6877         frozen.
6878         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
6879         fixed-point multiplication operator and the predefined operator is
6880         resolved in favor of the user-defined one.
6881
6882 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6883
6884         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6885         CONST_CAST.
6886
6887 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6888
6889         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6890         whether a type lacks user-defined Read or Write operations, or has a
6891         component that lacks them.
6892         * sem_attr.adb (Check_Stream_Attribute): if restriction
6893         No_Default_Stream_Attributes is active, verify that all subcomponent
6894         types of the target have user-defined stream operations, and report
6895         error otherwise.
6896         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6897         * exp_strm.adb: Build_Elementary_Input_Call,
6898         Build_Elementary_Write_Call): remove checks for restriction
6899         No_Default_Stream_Attributes, now checked in semantics.
6900
6901 2011-08-04  Vincent Celier  <celier@adacore.com>
6902
6903         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6904         switches on the command line, look for all valid --RTS switches in the
6905         Builder switches and for each language use the first runtime name found
6906         to invoke gprconfig.
6907         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6908         command line and there is no auto-configuration.
6909         (Runtime_Name_Set_For): New function.
6910
6911 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6912
6913         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6914         elaborate initialization expression for variable Abort when processing
6915         a package body or a declaration.
6916         (Create_Finalizer): Propagate the package context when creating the
6917         exception-related variables.
6918         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6919         For_Package along with usage comment.
6920
6921 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6922
6923         * gcc-interface/Makefile.in: Clean up targets.
6924         Enable new package for atomic counters and copy-on-write implementation
6925         of unbounded strings on x86 platforms.
6926         * gcc-interface/Make-lang.in: Update dependencies.
6927
6928 2011-08-04  Robert Dewar  <dewar@adacore.com>
6929
6930         * exp_ch7.adb: Minor reformatting.
6931
6932 2011-08-04  Robert Dewar  <dewar@adacore.com>
6933
6934         * exp_strm.adb: Minor reformatting.
6935
6936 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6937
6938         * s-atocou.adb: Replace by dummy version and use on targets where atomic
6939         operations are not supported.
6940         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6941         * s-atocou-x86.adb: New file.
6942         * Makefile.rtl: Add s-atocou.o file
6943
6944 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
6945
6946         * make.adb (Compile): Move setting of CodePeer_Mode to ...
6947         (Compilation_Phase): ... here.
6948         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6949
6950 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6951
6952         * Make-generated.in: Fix minor typo in comment.
6953
6954 2011-08-04  Thomas Quinot  <quinot@adacore.com>
6955
6956         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6957         the project path.
6958
6959 2011-08-04  Robert Dewar  <dewar@adacore.com>
6960
6961         * a-coinho.adb: Minor reformatting.
6962
6963 2011-08-04  Robert Dewar  <dewar@adacore.com>
6964
6965         * a-coinho.ads: Minor reformatting.
6966
6967 2011-08-04  Vadim Godunko  <godunko@adacore.com>
6968
6969         * s-atocou.ads, s-atocou.adb: New files.
6970         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6971         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6972         direct use of GCC's atomic builtins and replace them by use of new
6973         atomic counter package.
6974
6975 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
6976
6977         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6978
6979 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
6980
6981         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6982         with a call to Get_External_Tag.
6983         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6984         subprogram usage. Remove the guard against package declarations and
6985         bodies since Build_Cleanup_Statements is no longer invoked in that
6986         context.
6987         (Build_Components): Initialize Tagged_Type_Stmts when the context
6988         contains at least one library-level tagged type.
6989         (Build_Finalizer): New local variables Has_Tagged_Types and
6990         Tagged_Type_Stmts along with associated comments on usage. Update the
6991         logic to include tagged type processing.
6992         (Create_Finalizer): Insert all library-level tagged type unregistration
6993         code before the jump block circuitry.
6994         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6995         (Expand_N_Package_Declaration): Remove the call to
6996         Build_Cleanup_Statements.
6997         (Process_Tagged_Type_Declaration): New routine. Generate a call to
6998         unregister the external tag of a tagged type.
6999         (Processing_Actions): Reimplemented to handle tagged types.
7000         (Process_Declarations): Detect the declaration of a library-level
7001         tagged type and carry out the appropriate actions.
7002         (Unregister_Tagged_Types): Removed. The machinery has been directly
7003         merged with Build_Finalizer.
7004
7005 2011-08-04  Robert Dewar  <dewar@adacore.com>
7006
7007         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
7008         gnatls.adb, exp_ch3.adb: Minor reformatting.
7009
7010 2011-08-04  Marc Sango  <sango@adacore.com>
7011
7012         * sem_attr.adb (Analyze_Attribute): Replace the message
7013         "invisible attribute of}" of the spark restriction violation in
7014         attribute reference by the simple message "invisible attribute of type".
7015         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
7016         two insertion characters: '&' and '}'.
7017
7018 2011-08-04  Vadim Godunko  <godunko@adacore.com>
7019
7020         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
7021         * a-coinho.ads, a-coinho.adb: New file.
7022         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
7023
7024 2011-08-04  Nicolas Roche  <roche@adacore.com>
7025
7026         * alfa_test.adb: Not all ali files are containing alfa information even
7027         if compiled with -gnatd.F. So suppress warning about missing ALFA
7028         information.
7029
7030 2011-08-04  Yannick Moy  <moy@adacore.com>
7031
7032         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
7033         scope.
7034         * put_alfa.adb: Check that scope name is not empty.
7035
7036 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7037
7038         * exp_ch3.adb (Stream_Operation_Ok): new predicate
7039         Needs_Elementary_Stream_Operation, to determine whether user-defined
7040         Read and Write attributes are available for the elementary components
7041         of the given type. If only the predefined attributes are available,
7042         then when restriction No_Default_Stream_Attributes is active the
7043         predefined stream attributes for the composite type cannot be created.
7044
7045 2011-08-04  Robert Dewar  <dewar@adacore.com>
7046
7047         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
7048         Put routines in alpha order
7049
7050 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
7051
7052         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
7053         * gcc-interface/Make-lang.in: Update dependencies.
7054
7055 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7056
7057         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
7058         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
7059         gnat1why).
7060
7061 2011-08-04  Robert Dewar  <dewar@adacore.com>
7062
7063         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
7064         lib-xref-alfa.adb: Minor reformatting.
7065
7066 2011-08-04  Marc Sango  <sango@adacore.com>
7067
7068         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
7069         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
7070         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
7071         mode.
7072
7073 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7074
7075         * bindgen.adb (Gen_Adainit_C): Remove.
7076         (Gen_Adafinal_C): Ditto.
7077         (Gen_Elab_Externals_C): Ditto.
7078         (Gen_Elab_Calls_C): Ditto.
7079         (Gen_Elab_Order_C): Ditto.
7080         (Gen_Elab_Defs_C): Ditto.
7081         (Gen_Finalize_Library_C): Ditto.
7082         (Gen_Finalize_Library_Defs_C): Ditto.
7083         (Gen_Main_C): Ditto.
7084         (Gen_Output_File_C): Ditto.
7085         (Gen_Restrictions_C): Ditto.
7086         (Gen_Versions_C): Ditto.
7087         (Write_Info_Ada_C): Ditto.
7088         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
7089         (Gen_Output_File): Do not force Ada_Bind_File anymore.
7090         Always call Gen_Output_File_Ada.
7091         * gnatlink.adb (Begin_Info): Now a constant.
7092         (End_Info): Ditto.
7093         (Ada_Bind_File): Remove
7094         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
7095         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
7096         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
7097         * opt.ads (Ada_Bind_File): Remove.
7098
7099 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7100
7101         * projects.texi: Document target-specific directory in default project
7102         path for gnatmake.
7103
7104 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7105
7106         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
7107         path in all cases .
7108
7109 2011-08-04  Yannick Moy  <moy@adacore.com>
7110
7111         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
7112         opt.ads, lib-xref.ads: Code clean up.
7113
7114 2011-08-04  Yannick Moy  <moy@adacore.com>
7115
7116         * gnat_rm.texi: Update description of Test_Case
7117         * gnat_ugn.texi: Typo.
7118
7119 2011-08-04  Ed Falis  <falis@adacore.com>
7120
7121         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
7122
7123 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7124
7125         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
7126         it is of type Root_Controlled. This action eliminates fields Prev and
7127         Next from type equality.
7128
7129 2011-08-04  Yannick Moy  <moy@adacore.com>
7130
7131         * lib-xref-alfa.adb: Correct typo.
7132
7133 2011-08-04  Matthew Heaney  <heaney@adacore.com>
7134
7135         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
7136         component.
7137
7138 2011-08-04  Yannick Moy  <moy@adacore.com>
7139
7140         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
7141         (Analyze_Pragma): allow static string expression for name of Test_Case,
7142         instead of simply string literals.
7143         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
7144         expressions.
7145
7146 2011-08-04  Vincent Celier  <celier@adacore.com>
7147
7148         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
7149         case suffixes to find truncated main sources.
7150
7151 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7152
7153         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
7154         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
7155         (Compute_Current_Task): Ditto.
7156
7157 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7158
7159         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
7160
7161 2011-08-04  Yannick Moy  <moy@adacore.com>
7162
7163         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
7164         library-level constant.
7165         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
7166         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
7167         used as selector of parameter association, in ALFA mode.
7168
7169 2011-08-04  Robert Dewar  <dewar@adacore.com>
7170
7171         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
7172         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
7173         reformatting.
7174
7175 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7176
7177         * make.adb (Linking_Phase): Set source search path before calling
7178         gnatlink in CodePeer mode.
7179
7180 2011-08-04  Javier Miranda  <miranda@adacore.com>
7181
7182         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
7183         Remove code which takes care of building TSDs.
7184         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
7185         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
7186         the accessibility check in VM targets.
7187         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
7188         (Building_Static_DT): Now returns false for VM targets.
7189         (Build_VM_TSDs): Removed.
7190         (Expand_Interface_Conversion): Generate missing runtime check for
7191         conversions to interface types whose target type is unknown at compile
7192         time.
7193         (Make_VM_TSD): Add missing code to disable the generation of calls to
7194         Check_TSD if the tagged type is not defined at library level, or not
7195         has a representation clause specifying its external tag, or -gnatdQ is
7196         active.
7197         * exp_disp.ads (Build_VM_TSDs): Removed.
7198         (Make_VM_TSDs): Spec relocated from exp_disp.adb
7199         * sem_disp.adb (Check_Dispatching_Operation): No code required to
7200         register primitives in the dispatch tables in VM targets.
7201         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
7202         initialization of class-wide interface objects in VM targets.
7203         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
7204         of Make_DT).
7205
7206 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
7207
7208         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
7209         when dotnet-ld cannot be found.
7210
7211 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7212
7213         * bindgen.adb: Simplify significantly generation of binder body file in
7214         CodePeer mode.
7215         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
7216         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
7217         not expanded).
7218
7219 2011-08-04  Yannick Moy  <moy@adacore.com>
7220
7221         * sem_prag.adb, sem.ads: Code cleanup.
7222
7223 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7224
7225         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
7226         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
7227         results if possible.
7228         * s-stusta.adb (Print): Adjust after changes in s-stausa.
7229         * gnat_ugn.texi: Update dynamic stack usage section.
7230
7231 2011-08-04  Steve Baird  <baird@adacore.com>
7232
7233         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
7234         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
7235         contains only a call to the user-defined main subprogram.
7236         (Gen_Main_Ada) - If CodePeer_Mode is set, then
7237         call the "wrapper" subprogram instead of directly
7238         calling the user-defined main subprogram.
7239
7240 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7241
7242         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
7243         alternatives of a case statement for controlled objects. Rename local
7244         variable A to Dead_Alt.
7245         (Expand_N_If_Statement): Check the then and else statements of an if
7246         statement for controlled objects. Check the then statements of all
7247         elsif parts of an if statement for controlled objects.
7248         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
7249         objects.
7250         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
7251         detects a loop associated with the expansion of an array object.
7252         Augment the processing of the loop statements to account for a possible
7253         wrap done by Process_Statements_For_Controlled_Objects.
7254         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
7255         statements and abortable part of an asynchronous select for controlled
7256         objects.
7257         (Expand_N_Conditional_Entry_Call): Check the else statements of a
7258         conditional entry call for controlled objects.
7259         (Expand_N_Selective_Accept): Check the alternatives of a selective
7260         accept for controlled objects.
7261         (Expand_N_Timed_Entry_Call): Check the entry call and delay
7262         alternatives of a timed entry call for controlled objects.
7263         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
7264         exception handler for controlled objects.
7265         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7266         Add formal parameter Nested_Constructs along with its associated
7267         comment.
7268         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
7269         Requires_Cleanup_Actions.
7270         (Process_Statements_For_Controlled_Objects): New routine.
7271         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
7272         routine. Inspect a node which contains a non-handled sequence of
7273         statements for controlled objects. If such an object is found, the
7274         statements are wrapped in a block.
7275
7276 2011-08-04  Bob Duff  <duff@adacore.com>
7277
7278         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
7279         need to compare with Class_Wide_Type (T2), in order to get at the
7280         original class-wide type node.
7281         * sem_type.ads (Covers): Improve the comment.
7282         * einfo.ads (Class_Wide_Type): Improve the comment.
7283         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
7284         the type of the Deref.
7285
7286 2011-08-04  Yannick Moy  <moy@adacore.com>
7287
7288         * gnat_rm.texi: Document that Test_Case pragma can only appear on
7289         separate declarations.
7290         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
7291         check identifier of pragma argument.
7292         (Chain_TC): check that no other test case associated to the same entity
7293         share the same name.
7294         (Check_Test_Case): disallow test case inside subprogram body
7295         (Analyze_Pragma): correct call to check identifier and not argument
7296         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
7297         function gets name from test case pragma.
7298
7299 2011-08-04  Yannick Moy  <moy@adacore.com>
7300
7301         * gnat_rm.texi: Document new pragma and aspect.
7302         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
7303         (No_Duplicates_Allowed): new constant array defining whether duplicates
7304         aspects of each kind can appear on the same declaration.
7305         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
7306         field, which points to a node holding the previous Spec_PPC_List.
7307         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
7308         through the indirection with Contract.
7309         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
7310         * par-prag.adb (Prag): do nothing on Test_Case pragma
7311         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
7312         be called directly.
7313         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
7314         component Ensures of Test_Case.
7315         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
7316         (Analyze_Generic_Subprogram_Declaration,
7317         Analyze_Subprogram_Instantiation,
7318         Analyze_Abstract_Subprogram_Declaration,
7319         Analyze_Subprogram_Body_Helper,
7320         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
7321         insert contract in subprogram node at point of definition
7322         * sem_ch13.adb
7323         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
7324         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
7325         corresponding pragma
7326         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
7327         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
7328         similar to the analysis of pre/post
7329         (Derive_Subprogram): insert contract in subprogram node at point of
7330         derivation.
7331         * sem_prag.adb, sem_prag.ads
7332         (Check_Arg_Is_String_Literal, Check_Identifier):
7333         new checking procedures to be called in treatment of pragmas
7334         (Check_Test_Case): new procedure to check that a Test_Case aspect or
7335         pragma is well-formed. This does not check currently that 'Result is
7336         used only in the Ensures component of a Test_Case.
7337         (Analyze_Pragma): add case for Test_Case
7338         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
7339         components of a Test_Case.
7340         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
7341         expressions in the 3rd (and 4th if present) arguments of a Test_Case
7342         pragma, treated as spec expressions.
7343         (Sig_Flags): add value -1 for Test_Case.
7344         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
7345         Get_Requires_From_Test_Case_Pragma): getters for both expression
7346         components of a Test_Case.
7347         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
7348         indirection between an entry or [generic] subprogram entity and its
7349         pre/post + test-cases.
7350         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
7351         get/set for fields of an N_Contract node.
7352         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
7353         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
7354         names and pragma for Test_Case.
7355         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
7356
7357 2011-08-04  Vincent Celier  <celier@adacore.com>
7358
7359         * gnat_ugn.texi: Improve documentation of gnatmake switch
7360         --source-info-file=.
7361
7362 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7363
7364         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
7365         type). Initialize Atyp to the appropriate type which is later checked
7366         for completion. Rewrite the assertion associated with private type
7367         completion.
7368
7369 2011-08-04  Ed Falis  <falis@adacore.com>
7370
7371         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
7372         initialize the number of CPUs.
7373
7374 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7375
7376         * sem_type.adb (Disambiguate): New subsidiary routine
7377         In_Same_Declaration_List, to implement AI05-0020: a user-defined
7378         equality on an anonymous access type whose designated type is private
7379         does not lead to an ambiguity with the universal access equality
7380         operator in the body or child units of the defining package. The same
7381         is true for a multiplication operator on a private type completed with
7382         a fixed-point-type.
7383
7384 2011-08-04  Javier Miranda  <miranda@adacore.com>
7385
7386         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
7387         (Normalize_Scalars_Config): Removed.
7388         * opt.adb
7389         (Register_Opt_Config_Switches): Remove registering config values of
7390         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
7391         (Restore_Opt_Config_Switches): Remove code which restores the values of
7392         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7393         Init_Or_Norm_Scalars.
7394         (Save_Opt_Config_Switches): Remove code which saves values of
7395         Init_Or_Norm_Scalars and Normalize_Scalars.
7396         (Set_Opt_Config_Switches): Remove code which restores config values of
7397         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
7398         Init_Or_Norm_Scalars.
7399
7400 2011-08-04  Yannick Moy  <moy@adacore.com>
7401
7402         * frontend.adb (Frontend): remove previous patch to avoid full
7403         qualification in ALFA mode.
7404         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
7405         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
7406         unique name for an entity, which could be used to identify the entity
7407         across compilation units.
7408
7409 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7410
7411         * prj-env.adb
7412         (Initialize_Default_Project_Path): Add target specific directory
7413         ($prefix/$target/lib/gnat) in front of project path in all cases
7414         (making gnatmake's behaviour consistent with gprbuild).
7415         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
7416         Pass target name from Sdefault to project subsystem.
7417         * gnatls.adb: Show new target specific default project directory.
7418
7419 2011-08-04  Johannes Kanig  <kanig@adacore.com>
7420
7421         * cstand.adb: Add Information to Identifier in Standard
7422         (Identifer_For): Set Entity to the corresponding entity
7423
7424 2011-08-04  Sergey Rybin  <rybin@adacore.com>
7425
7426         * gnat_ugn.texi: Update doc on gnatcheck.
7427
7428 2011-08-04  Yannick Moy  <moy@adacore.com>
7429
7430         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
7431         xrefs in a scope.
7432
7433 2011-08-04  Yannick Moy  <moy@adacore.com>
7434
7435         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
7436         performing expansion.
7437         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
7438         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
7439         it is not called in ALFA mode.
7440
7441 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7442
7443         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
7444         after all, so removed.
7445
7446 2011-08-04  Sergey Rybin  <rybin@adacore.com>
7447
7448         * vms_data.ads: Add missing VMS qualifiers.
7449
7450 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7451
7452         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
7453         the list of files on the command line after processing it through
7454         Complete_Mains.
7455
7456 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7457
7458         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
7459         processing for .NET/JVM. These targets can now benefit from
7460         Raise_From_Controlled_Operation and they share the same processing with
7461         standard targets.
7462         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
7463         These targets need transient scopes in order to properly finalize short
7464         lived controlled objects.
7465         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
7466          NET/JVM. These targets can now benefit from
7467         Raise_From_Controlled_Operation and they share the same processing with
7468         standard targets.
7469
7470 2011-08-04  Geert Bosch  <bosch@adacore.com>
7471
7472         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
7473
7474 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7475
7476         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
7477         Expand_Record_Aggregate, to determine whether aggregate must be
7478         expanded into assignments. This is the case if the ancestor part is
7479         private, regarless of the setting of the flag Has_Private_Ancestor.
7480
7481 2011-08-04  Ed Falis  <falis@adacore.com>
7482
7483         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
7484
7485 2011-08-04  Bob Duff  <duff@adacore.com>
7486
7487         * sinfo.ads: Fix comment.
7488
7489 2011-08-04  Steve Baird  <baird@adacore.com>
7490
7491         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
7492         choose a package name in much the same way as is
7493         done for JGNAT when VM_Target /= No_VM, except that
7494         a slightly more distinctive prefix string is used.
7495
7496 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7497
7498         * makeutl.adb (Complete_Mains): no longer accept unit names on the
7499         gnatmake command line.
7500         This behavior was never documented (and was supported only because of
7501         an early bug in the code). This case might lead to ambiguous cases
7502         (between unit names and truncated base names without suffixes).
7503
7504 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7505
7506         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
7507         Remove the external tag of a tagged type from the internal hash table.
7508         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
7509         expanded usage of the routine. Strenghten the check for Is_Master. Add
7510         processing for tagged types.
7511         (Build_Finalizer): Create all the necessary lists used in finalizer
7512         creation when the processed context is a package that may contain
7513         tagged types.
7514         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
7515         Requires_Cleanup_Actions.
7516         (Expand_N_Package_Body): Package bodies may need clean up code
7517         depending on whether they contain tagged types.
7518         (Expand_N_Package_Declaration): Package declarations may need clean up
7519         code depending on whether they contain tagged types.
7520         (Unregister_Tagged_Types): New routine. Search through a list of
7521         declarations or statements, looking for non-abstract Ada tagged types.
7522         For each such type, generate code to unregister the external tag.
7523         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
7524         Requires_Cleanup_Actions.
7525         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
7526         through a list of declarations or statements looking for non-abstract
7527         Ada tagged types or controlled objects.
7528         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
7529         Requires_Cleanup_Actions.
7530         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
7531         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
7532         RE_Unit_Table.
7533
7534 2011-08-04  Vincent Celier  <celier@adacore.com>
7535
7536         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
7537         has Ada sources, not project Project, because if the root project
7538         Project has no sources of its own, all projects will be deemed without
7539         sources.
7540
7541 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7542
7543         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
7544         of the No_Param_Proc acc-to-subp type used for initialization of
7545         __gnat_finalize_library_objects so that it's declared at library level
7546         rather than nested inside of the adainit routine.
7547
7548 2011-08-04  Javier Miranda  <miranda@adacore.com>
7549
7550         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
7551         if the tagged type has a representation clause which specifies its
7552         external tag.
7553
7554 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7555
7556         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
7557         Remove previous procedure with that name.
7558         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
7559         when appropriate.
7560         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
7561         subtype mark, the ancestor cannot have unknown discriminants.
7562         (Resolve_Record_Aggregate): if the type has invisible components
7563         because of a private ancestor, the aggregate is illegal.
7564
7565 2011-08-04  Vincent Celier  <celier@adacore.com>
7566
7567         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
7568         account switches -gnat2005, -gnat12 and -gnat2012.
7569
7570 2011-08-04  Bob Duff  <duff@adacore.com>
7571
7572         * s-tasdeb.ads: Minor comment fix.
7573
7574 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7575
7576         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
7577         CodePeer mode.
7578         * switch.ads, switch.adb (Is_Language_Switch): New function.
7579
7580 2011-08-04  Vincent Celier  <celier@adacore.com>
7581
7582         * switch-c.adb: Minor comment addition.
7583
7584 2011-08-04  Vincent Celier  <celier@adacore.com>
7585
7586         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
7587         ending with '=' is followed by a space (missing file name).
7588
7589 2011-08-04  Pascal Obry  <obry@adacore.com>
7590
7591         * g-regist.ads: Fix size of HKEY on x86_64-windows.
7592
7593 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7594
7595         * sem_ch12.adb (Analyze_Associations): New routine
7596         Check_Overloaded_Formal_Subprogram to reject a formal package when
7597         there is a named association or a box initialisation for an overloaded
7598         formal subprogram of the corresponding generic.
7599
7600 2011-08-04  Yannick Moy  <moy@adacore.com>
7601
7602         * alfa.ads (ALFA_Xref_Record): add component for type of entity
7603         * get_alfa.adb, put_alfa.adb: Read and write new component of
7604         cross-reference.
7605         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
7606
7607 2011-08-04  Pascal Obry  <obry@adacore.com>
7608
7609         * urealp.adb: Minor reformatting.
7610
7611 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7612
7613         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
7614         Handle the case when Cleanup_Protected_Object returns Empty.
7615
7616 2011-08-04  Yannick Moy  <moy@adacore.com>
7617
7618         * frontend.adb (Frontend): only qualify names in non-ALFA mode
7619
7620 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7621
7622         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
7623         call, ignore functions.
7624
7625 2011-08-04  Geert Bosch  <bosch@adacore.com>
7626
7627         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
7628         point.
7629
7630 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7631
7632         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
7633         as an index for Builder'Switches. This conforms to the documentation.
7634         * make.adb (Insert_Project_Sources): avoid duplicate code
7635
7636 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7637
7638         * makeutl.adb (Complete_Mains): if the user has passed a relative file
7639         name on the command line (for instance "../dummy"), never assume it can
7640         be a unit name.
7641
7642 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7643
7644         * bindgen.adb: Remove code the reference or create the
7645         Break_Start/__gnat_break_start procedure.
7646         * s-stalib.adb (Break_Start): Removed.
7647
7648 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7649
7650         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
7651         shared with gprbuild.
7652
7653 2011-08-04  Yannick Moy  <moy@adacore.com>
7654
7655         * par-ch4.adb (P_Primary): preferentially issue an error message about
7656         a missing parenthesis arount a conditional or case expression in Ada
7657         2012 mode, if we detect that the alignment is not correct for a
7658         statement.
7659
7660 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7661
7662         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
7663         tag-to-class-wide conversion as needing finalization actions.
7664         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
7665         a tag-to-class-wide conversion as needing finalization actions.
7666         (Is_Finalizable_Transient): The result of a tag-to-class-wide
7667         conversion does not need finalization actions.
7668         (Is_Tag_To_CW_Conversion): New routine.
7669         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
7670         whether an object is the result of a tag-to-class-wide conversion.
7671
7672 2011-08-04  Yannick Moy  <moy@adacore.com>
7673
7674         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
7675         the left-hand-side and right-hand-side of a conjunct are inserted when
7676         translating a pre- or postcondition
7677         * sem_ch6.adb: Correct typo in comment
7678
7679 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7680
7681         * gnat_rm.texi: Ravenscar does not prohibit dependence on
7682         Unchecked_Conversion and Unchecked_Deallocation.
7683
7684 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7685
7686         * make.adb: Minor reformatting.
7687
7688 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7689
7690         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
7691         sources in the project and its imported projects, but not in the whole
7692         tree.
7693
7694 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7695
7696         * make.adb: Remove debug trace.
7697
7698 2011-08-04  Vincent Celier  <celier@adacore.com>
7699
7700         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
7701         path in canonical form, to be able to compare path names on platforms
7702         such as Windows or Darwin.
7703
7704 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7705
7706         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
7707         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
7708         * scos.ads: Update documentation accordingly.
7709         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
7710         pragmas.
7711
7712 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7713
7714         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
7715         attribute only if prefix type is scalar.
7716
7717 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7718
7719         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
7720         in gnatmake for specifying mains on the command line that do not belong
7721         to the main project. These mains must currently all belong to the same
7722         project, though.
7723         (Ultimate_Extension_Of): removed, since duplicated
7724         Ultimate_Extending_Project.
7725
7726 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7727
7728         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
7729         instead.
7730         (CodePeer_Mode_String): New.
7731         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
7732         CodePeer mode.
7733         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
7734         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
7735         mode, since no useful elaboration subprogram is needed by CodePeer.
7736         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
7737         In this mode, compile binder file with -gnatC and do stop after this
7738         step.
7739
7740 2011-08-04  Vincent Celier  <celier@adacore.com>
7741
7742         * exp_ch7.adb: Minor comment fix.
7743
7744 2011-08-04  Robert Dewar  <dewar@adacore.com>
7745
7746         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
7747         exp_ch4.adb, makeutl.adb: Minor reformatting.
7748
7749 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7750
7751         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
7752         Create several new subprograms to move code out of Make. This makes the
7753         code more readable, removes code duplication, and is a preparation work
7754         for adding support for aggregate projects.
7755
7756 2011-08-04  Tristan Gingold  <gingold@adacore.com>
7757
7758         * s-po32gl.ads, s-po32gl.adb: New files.
7759         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
7760         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
7761         (Build_Finalization_Collection): Use it.
7762         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
7763         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
7764         literals.
7765         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
7766         * gcc-interface/Make-lang.in: Update dependencies.
7767
7768 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7769
7770         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
7771         the command line.
7772
7773 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7774
7775         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
7776         command line is not a file name, also check whether it could be a unit
7777         name.
7778
7779 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7780
7781         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
7782         the header of the finalization routine.
7783         If the unit has no finalizer but is a body whose spec has one, then
7784         generate the decrement of the elaboration entity only.
7785         If the unit has a finalizer and is a spec, then do not generate the
7786         decrement of the elaboration entity.
7787         (Gen_Finalize_Library_C): Likewise.
7788
7789 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
7790
7791         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
7792         (Bounds_Size_Expression): Removed.
7793         (Double_Alignment_Of): New subsidiary routine.
7794         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
7795         for a hole in the dope vector of unconstrained arrays due to different
7796         index and element alignments.
7797
7798 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7799
7800         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
7801         raise program_error because body has not been seen yet.
7802
7803 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7804
7805         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
7806         an unresolved name.
7807
7808 2011-08-04  Vincent Celier  <celier@adacore.com>
7809
7810         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
7811
7812 2011-08-04  Yannick Moy  <moy@adacore.com>
7813
7814         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
7815         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
7816
7817 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7818
7819         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
7820         instantiation in RCI.
7821
7822 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7823
7824         * make.adb: Share more code with gprbuild
7825
7826 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7827
7828         * projects.texi: Added documentation for the IDE'Gnat project file
7829         attribute.
7830
7831 2011-08-04  Nicolas Roche  <roche@adacore.com>
7832
7833         * gnat_rm.texi: Minor editing.
7834
7835 2011-08-04  Javier Miranda  <miranda@adacore.com>
7836
7837         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
7838         and the library case for VM targets.
7839         (Gen_Adainit_Ada): Likewise.
7840
7841 2011-08-04  Robert Dewar  <dewar@adacore.com>
7842
7843         * g-altive.ads: Minor comment updates.
7844         * prj-nmsc.adb: Minor reformatting.
7845
7846 2011-08-04  Javier Miranda  <miranda@adacore.com>
7847
7848         * opt.ads
7849         (Normalize_Scalars_Config): Value of the configuration switch set by
7850         pragma Normalize_Scalars when it appears in the gnat.adc file.
7851         (Normalize_Scalars): New field for record Config_Switches_Type. Used
7852         to save and restore settings of this pragma.
7853         * opt.adb
7854         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
7855         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
7856
7857 2011-08-04  Vincent Celier  <celier@adacore.com>
7858
7859         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
7860
7861 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7862
7863         * makeutl.adb: Minor reformatting.
7864
7865 2011-08-04  Olivier Hainque  <hainque@adacore.com>
7866
7867         * g-altive.ads: Update comments to reflect that only the soft
7868         binding is available today.
7869
7870 2011-08-04  Robert Dewar  <dewar@adacore.com>
7871
7872         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
7873         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
7874         * gcc-interface/Make-lang.in: Update dependencies.
7875
7876 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7877
7878         * prj-env.adb: Remove local debug traces.
7879
7880 2011-08-04  Yannick Moy  <moy@adacore.com>
7881
7882         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7883         was used instead of Hi_OK, which could cause a read of an uninitialized
7884         value later on. Detected while working on the new warning.
7885         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7886         to local variable.
7887         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7888         in more cases, in order to detect more unreferenced values.
7889         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7890         object for expression, if any.
7891
7892 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
7893
7894         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7895         the operand types instead of the Esize.
7896
7897 2011-08-04  Steve Baird  <baird@adacore.com>
7898
7899         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7900         enable CodePeer_Mode.
7901         * bindusg.adb (Display): Add help message describing -P binder switch.
7902         * gnat_ugn.texi: Document -P binder switch.
7903         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7904         user-defined main program directly.
7905         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7906         user-defined main program in the context clause of the package body.
7907
7908 2011-08-04  Yannick Moy  <moy@adacore.com>
7909
7910         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7911         duplicate of Defining_Entity
7912         (Get_Unique_Entity_For_Decl): rename function into
7913         Unique_Defining_Entity
7914         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7915         (Formal_Proof_On): remove synthesized flag
7916         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7917         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7918         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7919         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7920         Annotate (Formal_Proof)
7921
7922 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7923
7924         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7925         source files with non-standard naming schemes, in imported projects
7926
7927 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7928
7929         * makeutl.adb (Complete_Mains): when a multi-unit source file is
7930         specified on the gprbuild command line, we need to compile all units
7931         within that file, not just the first one we find
7932         Fix error message for mains that are not found.
7933
7934 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7935
7936         * sem_ch6.adb: Update comment.
7937         * sem_ch12.adb: Minor reformatting.
7938
7939 2011-08-04  Bob Duff  <duff@adacore.com>
7940
7941         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7942         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7943         race condition whose symptom is to fail to lock Parent. That, in turn,
7944         causes Parent.Awake_Count to be accessed without locking Parent, which
7945         causes another race condition whose symptom is that Parent.Awake_Count
7946         can be off by 1 (either too high or too low). The solution is to lock
7947         Parent unconditionally, and then lock Acceptor, before reading
7948         Acceptor.Terminate_Alternative.
7949
7950 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
7951
7952         * debug.adb: Update comment.
7953
7954 2011-08-04  Robert Dewar  <dewar@adacore.com>
7955
7956         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7957         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7958         exp_ch6.adb: Minor reformatting.
7959
7960 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7961
7962         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7963         checks for -gnateE.
7964
7965 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7966
7967         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7968
7969 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7970
7971         * sinfo.ads: Minor reformatting.
7972
7973 2011-08-04  Emmanuel Briot  <briot@adacore.com>
7974
7975         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7976         even if there is no location.
7977
7978 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
7979
7980         * sem_res.adb, sem_ch4.adb: move check for restriction
7981         No_Task_Hierarchy to resolve_allocator.
7982
7983 2011-08-04  Thomas Quinot  <quinot@adacore.com>
7984
7985         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7986         This flag of N_Pragma nodes is not used, remove it as well as all of
7987         the associated circuitry.
7988
7989 2011-08-04  Javier Miranda  <miranda@adacore.com>
7990
7991         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7992         runtime check on duplicated externa tags
7993         * debug.adb Document switch -gnatdQ.
7994
7995 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
7996
7997         * a-fihema.ads: Minor typo fix.
7998
7999 2011-08-04  Yannick Moy  <moy@adacore.com>
8000
8001         * sem_ch10.adb: Minor comment update.
8002
8003 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8004
8005         * einfo.adb: Update the node field usage to reflect the renaming of
8006         Return_Flag to Return_ Flag_Or_Transient_Decl.
8007         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
8008         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
8009         (Write_Field15_Name): Change Return_Flag to
8010         Return_Flag_Or_Transient_Decl.
8011         * einfo.ads: Rename node field Return_Flag to
8012         Return_Flag_Or_Transient_Decl. Update the associated comment and all
8013         occurrences in entities.
8014         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
8015         associated Inline pragma.
8016         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
8017         associated Inline pragma.
8018         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
8019         routine.
8020         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
8021         Return_Flag and Set_Return_Flag.
8022         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
8023         objects generated for controlled transients declared inside an
8024         Exception_With_Actions. Update the calls to Return_Flag.
8025         (Process_Object_Declaration): Add code to add a null guard for hook
8026         objects generated for controlled transients declared inside an
8027         Exception_With_Actions. Update related comment.
8028         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
8029         objects generated for controlled transients declared inside an
8030         Exception_With_Actions. Update the calls to Return_Flag.
8031         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
8032
8033 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8034
8035         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
8036         positional aggregate.
8037
8038 2011-08-04  Vincent Celier  <celier@adacore.com>
8039
8040         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
8041         SLOC only for pragmas.
8042
8043 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8044
8045         * projects.texi: Minor typo fix.
8046
8047 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8048
8049         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
8050         on case-sensitive file systems.
8051
8052 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8053
8054         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
8055         nested in a disabled pragma.
8056         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
8057         enclosing pragma, if any, for X decisions.
8058
8059 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8060
8061         * sem_prag.adb: Minor reformatting.
8062
8063 2011-08-04  Vincent Celier  <celier@adacore.com>
8064
8065         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
8066         allowed in no run time mode.
8067
8068 2011-08-04  Vincent Celier  <celier@adacore.com>
8069
8070         * make.adb (Check): When -gnatc is used, check for the source file
8071         inside the ALI file with a canonical case file name.
8072
8073 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8074
8075         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
8076         overriding the separator.
8077
8078 2011-08-04  Robert Dewar  <dewar@adacore.com>
8079
8080         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
8081         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
8082
8083 2011-08-04  Robert Dewar  <dewar@adacore.com>
8084
8085         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
8086
8087 2011-08-04  Yannick Moy  <moy@adacore.com>
8088
8089         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
8090         'Result only appears in postcondition of function.
8091
8092 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8093
8094         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
8095         external tag, include the value of the external tag in the exception
8096         message.
8097
8098 2011-08-04  Yannick Moy  <moy@adacore.com>
8099
8100         * sem_attr.adb (Result): modify error message for misplaced 'Result
8101
8102 2011-08-04  Sergey Rybin  <rybin@adacore.com>
8103
8104         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
8105         clear that the second argument must be an identifier.
8106
8107 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8108
8109         * exp_ch9.adb (Build_Barrier_Function): When compiling with
8110         -fpreserve-control-flow, insert an IF statement on the barrier
8111         condition to ensure that a conditional branch instruction is generated.
8112
8113 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8114
8115         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
8116         (Processing_Flags.Ignore_Missing_With): new flag.
8117
8118 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8119
8120         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
8121         Source_List_File on case-insensitive systems where the file is actually
8122         on a case-sensitive file system (NFS,...).
8123
8124 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8125
8126         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
8127         function return contains a controlled [extension] aggregate and the
8128         return statement is not part of a handled sequence of statements, wrap
8129         the return in a block. This ensures that all controlled temporaries
8130         generated during aggregate resolution will be picked up by the
8131         finalization machinery.
8132
8133 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8134
8135         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
8136         components, freeze type before resolution, to ensure that default
8137         initializations are present for all components.
8138         * sem_res.adb (Resolve_Actuals): the designated object of an
8139         accces-to-constant type is a legal actual in a call to an
8140         initialization procedure.
8141
8142 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8143
8144         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
8145         N_Unchecked_Type_Conversion to the possible containers of a renamed
8146         transient variable.
8147
8148 2011-08-04  Yannick Moy  <moy@adacore.com>
8149
8150         * par-ch13.adb (Aspect_Specifications_Present): recognize
8151         "with Identifier'Class =>" as an aspect, so that a meaningful warning
8152         is issued in Strict mode.
8153         * par.adb: Fix typos in comments.
8154
8155 2011-08-04  Yannick Moy  <moy@adacore.com>
8156
8157         * sem_attr.adb (Result): modify error message to take into account Post
8158         aspect when compiling Ada 2012 (or newer) code.
8159
8160 2011-08-04  Nicolas Roche  <roche@adacore.com>
8161
8162         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
8163         remove need for GCC exceptions.
8164
8165 2011-08-04  Vincent Celier  <celier@adacore.com>
8166
8167         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
8168         project, not the source file name.
8169         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
8170         excluded, continue looking. This excluded source will only be returned
8171         if there is no other source with the same base name that is not locally
8172         removed.
8173
8174 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8175
8176         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
8177         private and one of the operands is a real literal, use a qualified
8178         expression rather than a conversion which is not meaningful to the
8179         back-end.
8180
8181 2011-08-04  Yannick Moy  <moy@adacore.com>
8182
8183         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
8184         corresponding aspect X'Class are allowed, proceed with analysis of the
8185         aspect instead of skipping it.
8186
8187 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8188
8189         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
8190         This will allow to have an Ada implementation for the subprogram.
8191
8192 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8193
8194         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
8195         completion and aspects are present, apply them to the entity for the
8196         type which is currently the partial view, but which is the one that
8197         will be frozen.
8198         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
8199         applies to a partial view, indicate that the full view has predicates
8200         and delayed aspects.
8201         (Replace_Type_Reference): Handle properly predicates that apply to the
8202         full view of a private completion.
8203
8204 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8205
8206         * layout.adb (Layout_Type): For composite types, do not set Esize.
8207         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
8208         set Esize.
8209         (Size_Known): Look at the RM size of components instead of the Esize.
8210         (Freeze_Record_Type): Look at the RM size instead of the Esize to
8211         issue warning and activate Implicit_Packing.
8212         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
8213         if the Esize is not known.
8214         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
8215         for elementary types only.
8216         (Analyze_Record_Representation_Clause): Look at the RM size instead
8217         of the Esize to issue errors.
8218         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
8219         is not known.
8220         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
8221         obsolete block.
8222         Look at the RM size instead of the Esize for types if the latter is
8223         not known.
8224         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
8225
8226 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8227
8228         * sem_type.adb: proper handling of equality not involving anonymous
8229         access types.
8230
8231 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8232
8233         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
8234         Vis_Decls. When creating a library-level finalizer for a package spec,
8235         both the declaration and body of the finalizer are inserted either in
8236         the visible or private declarations of the package spec.
8237
8238 2011-08-04  Javier Miranda  <miranda@adacore.com>
8239
8240         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
8241         use of the full-view of a type when invoking Is_Ancestor.
8242         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
8243         the full-view of private parents is requested, then use also the
8244         full-view of the parent of the first derivation.
8245
8246 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8247
8248         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
8249         instead of the locally imported procedure.
8250         * s-taprop-mingw.adb (Enter_Task): Ditto.
8251         * s-valrea.adb (Scan_Real): Ditto.
8252         * s-imgrea.adb (Set_Image_Real): Ditto.
8253         * s-flocon.ads: Make the package pure.
8254
8255 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8256
8257         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
8258         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
8259         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
8260         New subprogram, moved here from...
8261         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
8262         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
8263         rewriting of the last argument into a procedure call statement here...
8264         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
8265         instead.
8266
8267 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8268
8269         * par_sco.adb: Minor reformatting.
8270
8271 2011-08-04  Robert Dewar  <dewar@adacore.com>
8272
8273         * erroutc.adb: Minor reformatting.
8274
8275 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8276
8277         * par_sco.adb: Comment update.
8278
8279 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8280
8281         * s-flocon.ads: New file.
8282         * g-flocon.ads: Now a renaming of s-flocon.
8283         * Makefile.rtl: Add s-flocon.o
8284
8285 2011-08-04  Javier Miranda  <miranda@adacore.com>
8286
8287         * exp_strm.adb (Build_Array_Input_Function): if the array type is
8288         constrained, do not attempt to build a subtype of it.
8289
8290 2011-08-04  Yannick Moy  <moy@adacore.com>
8291
8292         * errout.ads Change comments: remove 'R'M as an example where quotes
8293         are needed; add ALFA as another case where quotes are not needed
8294         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
8295         case where quotes are not needed.
8296         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
8297         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
8298         Remove all occurrences of 'A'L'F'A
8299
8300 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8301
8302         * sem_ch13.adb: check legality of invariant pragma.
8303
8304 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8305
8306         * bindgen.adb: Add comments.
8307
8308 2011-08-04  Yannick Moy  <moy@adacore.com>
8309
8310         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
8311         synthesized flag.
8312         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
8313         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
8314
8315 2011-08-04  Robert Dewar  <dewar@adacore.com>
8316
8317         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
8318         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
8319         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
8320
8321 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8322
8323         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
8324
8325 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8326
8327         PR ada/47880
8328         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
8329         allocated object.
8330
8331 2011-08-04  Robert Dewar  <dewar@adacore.com>
8332
8333         * einfo.ads, exp_ch4.adb: Minor reformatting.
8334
8335 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
8336
8337         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
8338
8339 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8340
8341         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
8342         type in all cases to compute list of primitive operations, because full
8343         view may be an itype that is not attached to the list of declarations.
8344
8345 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8346
8347         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
8348         library has already been finalized.
8349         (Gen_Adafinal_C): Likewise.
8350         (Gen_Adainit_Ada): Generate an early return if the library has
8351         already been elaborated.
8352         (Gen_Adainit_C): Likewise.
8353         (Gen_Output_File_Ada): Generate an elaboration flag.
8354         (Gen_Output_File_C): Likewise.
8355
8356 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8357
8358         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
8359         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
8360         built in the first place.
8361         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
8362         for CodePeer because Finalize_Address was not built to begin with.
8363         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
8364
8365 2011-08-04  Pascal Obry  <obry@adacore.com>
8366
8367         * adaint.c (__gnat_tmp_name): Use current process id to create temp
8368         filenames, this ensures unicity of filenames across processes.
8369
8370 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8371
8372         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
8373         Raise_Controlled to Raise_From_Controlled_Operation. Update the
8374         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
8375         Add False as the actual to From_Abort in the generated call to
8376         Raise_From_Controlled_Operation.
8377
8378 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
8379
8380         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
8381         so that the ali file name can be retrieved from outside of this package.
8382         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
8383         doing nothing in the general case, but used to update the object file
8384         timestamp if directly generated by the backend.
8385         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
8386         to a later time than the ali file one.
8387
8388 2011-08-04  Yannick Moy  <moy@adacore.com>
8389
8390         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
8391         entities whose body contains an Annotate pragma which forces formal
8392         proof on this body.
8393         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8394         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
8395         Mark_Non_ALFA_Subprogram to pass in a message and node.
8396         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
8397         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
8398         surrounding subprogram.
8399         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
8400         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
8401         as not in ALFA is annotated with Formal_Proof being On, then an error
8402         is issued based on the additional parameters for message and node.
8403         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
8404         * gcc-interface/Make-lang.in: Update dependencies.
8405
8406 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8407
8408         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
8409         Finalize_Address when CodePeer is enabled.
8410
8411 2011-08-04  Pascal Obry  <obry@adacore.com>
8412
8413         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
8414         the latter returns a pointer to a static buffer which is deallocated
8415         at the end of the routine.
8416
8417 2011-08-04  Yannick Moy  <moy@adacore.com>
8418
8419         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
8420         after index creation; mark unconstrained base array type generated as
8421         being in/not in ALFA as well
8422         (Make_Index): mark subtype created as in/not in ALFA
8423         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
8424         over a loop as in/not in ALFA, depending on its type and form of loop
8425         iteration.
8426
8427 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8428
8429         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
8430         directly to False on .NET and JVM.
8431
8432 2011-08-04  Yannick Moy  <moy@adacore.com>
8433
8434         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
8435         constraint that subtype must come from source code to be in ALFA, so
8436         that anonymous subtypes can be in ALFA too.
8437
8438 2011-08-04  Yannick Moy  <moy@adacore.com>
8439
8440         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
8441         reference for ALFA mode.
8442         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
8443         procedure public so as to use it from formal verification back-end.
8444
8445 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
8446
8447         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
8448         invalid checks of the Parameter, making Remove_Switch not working
8449         correctly.
8450
8451 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8452
8453         * targparm.ads: Update header: no run-time exception is needed on this
8454         file.
8455
8456 2011-08-04  Vincent Celier  <celier@adacore.com>
8457
8458         * a-fihema.adb: Use System.IO instead of GNAT.IO
8459
8460 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8461
8462         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
8463         are forbidden in Compiler_Unit mode.
8464
8465 2011-08-04  Robert Dewar  <dewar@adacore.com>
8466
8467         * sem_util.adb: Minor reformatting.
8468
8469 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8470
8471         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
8472         library-level finalizers.
8473         (Gen_Finalize_Library_C): Update the import string for library-level
8474         finalizers.
8475         (Gen_Finalize_Library_Defs_C): Update the definition name of a
8476         library-level finalizer.
8477         * exp_ch7.adb: Remove with and use clauses for Stringt.
8478         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
8479         Spec_Decl. Add local variable Body_Id. The names of library-level
8480         finalizers are now manually fully qualified and are no longer external.
8481         A single name is now capable of servicing .NET, JVM and non-VM targets.
8482         Pragma Export is no longer required to provide visibility for the name.
8483         (Create_Finalizer_String): Removed.
8484         (New_Finalizer_Name): New routine which mimics New_..._Name.
8485
8486 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8487
8488         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
8489         elaboration counter to Standard_Short_Integer.
8490         * sem_util.adb (Build_Elaboration_Entity): Likewise.
8491         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
8492         (Gen_Elab_Externals_C): Likewise.
8493
8494 2011-08-04  Ed Falis  <falis@adacore.com>
8495
8496         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
8497         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
8498         system-vxworks-mips.ads, system-vxworks-x86.ads
8499         (Always_Compatible_Rep): set to False for all VxWorks targets.
8500
8501 2011-08-04  Robert Dewar  <dewar@adacore.com>
8502
8503         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
8504         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
8505         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
8506         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
8507         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
8508         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
8509         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
8510         Minor reformatting and code reorganization.
8511
8512 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8513
8514         * projects.texi: Added doc for aggregate projects.
8515
8516 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8517
8518         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
8519         Add support for overriding the Project_Path in aggregate projects.
8520
8521 2011-08-04  Robert Dewar  <dewar@adacore.com>
8522
8523         * a-cofove.ads: Minor reformatting.
8524
8525 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8526
8527         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
8528         on the generated code.
8529         (Build_Finalize_Statements): Update the comment on the generated code.
8530         (Build_Initialize_Statements): Update the comment on the generated code.
8531         (Build_Object_Declarations): Add local variable Result. The object
8532         declarations are now built in sequence.
8533         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
8534         RE_Unit_Table.
8535
8536 2011-08-04  Robert Dewar  <dewar@adacore.com>
8537
8538         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
8539
8540 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
8541
8542         * einfo.ads (Elaboration_Entity): Document new definition and use.
8543         (Elaboration_Entity_Required): Adjust to above change.
8544         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
8545         * exp_ch12.adb: And with and use for Snames.
8546         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
8547         * exp_util.adb (Set_Elaboration_Flag): Likewise.
8548         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
8549         <Check_Unit_Name>: Deal with N_Expanded_Name.
8550         <Attribute_Elaborated>: Extend to all unit names.
8551         * sem_elab.adb: And with and use for Uintp.
8552         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
8553         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
8554         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
8555         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
8556         from Gen_Adainit_Ada.
8557         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
8558         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
8559         case, do not call System.Standard_Library.Adafinal; instead call
8560         finalize_library if needed.
8561         (Gen_Adafinal_C): Likewise.
8562         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
8563         non-main program case.
8564         (Gen_Adainit_C): Generate a couple of external declarations here.
8565         In the main program case, set SSL.Finalize_Library_Objects.
8566         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
8567         (Gen_Elab_Calls_C): Likewise.
8568         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
8569         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
8570         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
8571         objects here.
8572         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
8573         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
8574         Gen_Adafinal_Ada.
8575         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
8576         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
8577         of external declarations.  Call Gen_Finalize_Library_C.
8578
8579 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8580
8581         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
8582         Compute_Compilation_Phases): new subprogram.
8583         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
8584         The number of mains as well as the various compilation phases that
8585         need to be run are now project tree specific, since various
8586         aggregated trees might have different requirements. In particular,
8587         they do not all require bind or link phases.
8588
8589 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8590
8591         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
8592         (Project_Tree_Appdata): New type.
8593         It is now possible to associate application-specific data to a project
8594         tree. In particular, this is used in the gprbuild builder to avoid a
8595         number of global tables and htables, especially now that there can be
8596         several project trees loaded at once because of aggregate projects.
8597         (Debug_Name): new procedure.
8598         * projects.texi: Clarify syntax of "**" for Source_Dirs
8599
8600 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8601
8602         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
8603         the "roots" for a main.
8604         (Fill_From_Project): add support for aggregate projects. Main units
8605         in aggregated projects are now automatically added in the list of
8606         files to build (although this fails later on in gprbuild, because
8607         these files are not using the root proejct tree, so this needs
8608         further cleanup)
8609         * gcc-interface/Make-lang.in: Update dependencies.
8610
8611 2011-08-03  Yannick Moy  <moy@adacore.com>
8612
8613         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
8614         conditional expression in ALFA.
8615         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
8616         expressions as not in ALFA.
8617
8618 2011-08-03  Robert Dewar  <dewar@adacore.com>
8619
8620         * a-cofove.adb: Minor reformatting.
8621
8622 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8623
8624         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
8625         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
8626         gprbuild sources.
8627         These packages are more logically placed in the Queue package, since
8628         they manipulate the queue. It is also likely that they can be adapted
8629         for gnatmake, thus sharing more code.
8630         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
8631         that we could move the above.
8632
8633 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8634
8635         * errutil.adb (Finalize): clean up the list of error messages on exit.
8636         Calling this subprogram multiple times will no longer show duplicate
8637         error messages on stderr.
8638
8639 2011-08-03  Emmanuel Briot  <briot@adacore.com>
8640
8641         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
8642         Getopt_Switches when we have already define a command line
8643         configuration.
8644
8645 2011-08-03  Yannick Moy  <moy@adacore.com>
8646
8647         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
8648         in ALFA. Instead, they are considered as assertions to prove.
8649         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
8650         nodes as not in ALFA. Instead, include conditional expressions in ALFA
8651         if they have no ELSE part, or if they occur in pre- and postconditions,
8652         where the Condition cannot have side-effects in ALFA
8653         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
8654         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
8655         Instead, include type conversion between scalar types in ALFA.
8656         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
8657         if-and-only-if its type is in ALFA.
8658
8659 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8660
8661         * scos.adb, get_scos.adb, put_scos.adb
8662         New code letter for decisions: G (entry guard)
8663         * par_sco.adb
8664         (Traverse_Subprogram_Body): Rename to...
8665         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
8666         (Traverse_Protected_Body): New subprogram
8667         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
8668         protected bodies and entry bodies.
8669
8670 2011-08-03  Yannick Moy  <moy@adacore.com>
8671
8672         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
8673         entities with get/set subprograms, which is set on procedure entities
8674         generated by the compiler for a postcondition.
8675         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
8676         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
8677         entity for a declaration
8678         (Get_Unique_Entity_For_Decl): new function returning an entity which
8679         represents a declaration, so that matching spec and body have the same
8680         entity.
8681
8682 2011-08-03  Robert Dewar  <dewar@adacore.com>
8683
8684         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
8685         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
8686
8687 2011-08-03  Yannick Moy  <moy@adacore.com>
8688
8689         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
8690         library-level because retriction No_Implicit_Dynamic_Code in the
8691         front-end prevents its definition as a local subprogram
8692         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
8693         for reuse in other contexts
8694         (Traverse_Declarations_Or_Statements,
8695         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
8696         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
8697         procedures take a callback parameter to be called on all declarations
8698         * lib-xref.ads
8699         (Traverse_All_Compilation_Units): new generic function to traverse a
8700         compilation unit and call a callback parameter on all declarations
8701
8702 2011-08-03  Javier Miranda  <miranda@adacore.com>
8703
8704         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
8705         in Java since they are always enclosed in a namespace that
8706         differentiates them, and overloaded entities are supported by the VM.
8707
8708 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8709
8710         * checks.adb (Determine_Range): If a computed bound of an operation is
8711         outside the range of the base type of the expression, and overflow
8712         checks are enabled, the result is unknown and cannot be used for any
8713         subsequent constant folding.
8714         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
8715         unknown, so is the result of the comparison.
8716
8717 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8718
8719         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
8720         From_Abort. When finalization was triggered by an abort, propagate
8721         Standard'Abort_Signal rather than Program_Error.
8722         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
8723         From_Abort.
8724         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
8725         From_Abort. When finalization was triggered by an abort, propagate
8726         Standard'Abort_Signal rather than Program_Error.
8727         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
8728         From_Abort.
8729         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
8730         Abort_Id. Update the calls to Build_Object_Declarations and
8731         Build_Raise_Statement to include Abort_Id.
8732         (Build_Adjust_Statements): New local variable Abort_Id. Update the
8733         calls to Build_Object_Declarations and Build_Raise_Statement to include
8734         Abort_Id.
8735         (Build_Finalize_Statements): New local variable Abort_Id. Update the
8736         calls to Build_Object_Declarations and Build_Raise_Statement to include
8737         Abort_Id.
8738         (Build_Components): Create an entity for Abort_Id when exceptions are
8739         allowed on the target.
8740         (Build_Finalizer): New local variable Abort_Id.
8741         (Build_Initialize_Statements): New local variable Abort_Id. Update the
8742         calls to Build_Object_Declarations and Build_Raise_Statement to include
8743         Abort_Id.
8744         (Build_Object_Declarations): Add new formal Abort_Id. Create the
8745         declaration of flag Abort_Id to preserve the original abort status
8746         before finalization code is executed.
8747         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
8748         runtime routine Raise_From_Controlled_Operation.
8749         (Create_Finalizer): Update the call to Build_Raise_Statement to include
8750         Abort_Id. Update the call to Build_Object_Declarations to include
8751         Abort_Id. Update the layout of the finalizer body.
8752         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
8753         (Process_Transient_Objects): New local variable Abort_Id. Remove the
8754         clunky code to create all flags and objects related to
8755         exception propagation and replace it with a call to
8756         Build_Object_Declarations. Update the call to Build_Raise_Statement to
8757         include Abort_Id.
8758         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
8759         Add new formal Abort_Id and associated comment on its use.
8760         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
8761         on its use.
8762         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
8763         Remove the clunky code to create all flags and objects related to
8764         exception propagation and replace it with a call to
8765         Build_Object_Declarations. Update the call to Build_Raise_Statement.
8766
8767 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
8768
8769         * s-tassta.adb: Fix minor typos.
8770
8771 2011-08-03  Robert Dewar  <dewar@adacore.com>
8772
8773         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
8774         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
8775
8776 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8777
8778         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
8779         to packages. This ensures that the finalizer body will not end up
8780         inside the freeze node.
8781         (Process_Declarations): Add code to detect whether a freeze node has a
8782         nested finalization collection.
8783
8784 2011-08-03  Pascal Obry  <obry@adacore.com>
8785
8786         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
8787         (Current_Session): Return a not null access to Session_Type.
8788         (Default_Session): Likewise.
8789
8790 2011-08-03  Robert Dewar  <dewar@adacore.com>
8791
8792         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
8793         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
8794
8795 2011-08-03  Pascal Obry  <obry@adacore.com>
8796
8797         * g-awk.ads: Minor comment fix.
8798
8799 2011-08-03  Sergey Rybin  <rybin@adacore.com>
8800
8801         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8802         the tree structure related to discriminant constraints.
8803         Original_Discriminant cannot be used any more for computing the
8804         defining name for the reference to a discriminant.
8805
8806 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8807
8808         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
8809         function is not visibly tagged, this is not a dispatching call and
8810         therfore is not Tag_Indeterminate, even if the function is marked as
8811         dispatching on result.
8812
8813 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8814
8815         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
8816         (Expand_N_Free_Statement): Add a guard to protect against run-times
8817         which do not support controlled types.
8818         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
8819         against run-times which do not support controlled types.
8820         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
8821         against run-times which do not support controlled types.
8822         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
8823         against run-times which do not support controlled types.
8824         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
8825         protect against run-times which do not support controlled types.
8826
8827 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
8828
8829         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
8830         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
8831
8832 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8833
8834         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
8835         modified in the source, to prevent spurious warnings when compiling
8836         with -gnatg.
8837
8838 2011-08-03  Thomas Quinot  <quinot@adacore.com>
8839
8840         * a-except-2005.adb: Minor reformatting.
8841
8842 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8843
8844         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
8845         is a renaming declaration in the private part of a package, do not emit
8846         a warning that the with_clause could be moved because the renaming may
8847         be used in the body or in a child unit.
8848
8849 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8850
8851         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8852         Propagate the Comes_From_Source attribute from the original return
8853         object to the renaming.
8854
8855 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
8856
8857         * exp_ch7.adb (Build_Raise_Statement): Do not call
8858         Raise_From_Controlled_Operation when this routine is not present in
8859         the run-time library.
8860         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
8861         libraries (Ravenscar), tasks are non-terminating, and protected objects
8862         and tasks can only appear at library level, so we do not want
8863         finalization of protected objects nor tasks.
8864         * exp_intr.adb: Minor clarification in comment.
8865         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
8866         Gen_Output_File_C): Remove references to finalization of library-level
8867         objects when using restricted run-time libraries.
8868
8869 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
8870
8871         * sem_ch3.adb (Build_Discriminant_Constraints): Set
8872         Original_Discriminant only if the parent type is a generic formal.
8873
8874 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8875
8876         * exp_ch13.adb: Add with and use clause for Targparm;
8877         (Expand_N_Free_Statement): Prevent the generation of a custom
8878         Deallocate on .NET/JVM targets since this requires pools and address
8879         arithmetic.
8880         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
8881         .NET/JVM targets, attach the newly allocated object to the access
8882         type's finalization collection. Do not generate a call to
8883         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8884         exist in the runtime.
8885         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8886         create a custom Allocate for object that do not require initialization.
8887         Attach a newly allocated object to the access type's finalization
8888         collection on .NET/JVM.
8889         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8890         assignment of controlled types on .NET/JVM. The two hidden pointers
8891         Prev and Next and stored and later restored after the assignment takes
8892         place.
8893         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8894         kludge for .NET/JVM to recognize a particular piece of code coming from
8895         Heap_Management and change the call to Finalize into Deep_Finalize.
8896         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8897         finalization collections on .NET/JVM only for types derived from
8898         Controlled. Separate the association of storage pools with a collection
8899         and only allow it on non-.NET/JVM targets.
8900         (Make_Attach_Call): New routine.
8901         (Make_Detach_Call): New routine.
8902         (Process_Object_Declarations): Suppress the generation of
8903         build-in-place return object clean up code on .NET/JVM since it uses
8904         pools.
8905         * exp_ch7.ads (Make_Attach_Call): New routine.
8906         (Make_Detach_Call): New routine.
8907         * exp_intr.adb Add with and use clause for Targparm.
8908         (Expand_Unc_Deallocation): Detach a controlled object from a collection
8909         on .NET/JVM targets.
8910         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8911         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8912         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8913         names used in finalization.
8914
8915 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8916
8917         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8918         (Attach, Detach): Lock the current task when chaining an object onto a
8919         collection.
8920
8921 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
8922
8923         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8924         Rewritten to create the message strings when the exception is not
8925         raised by an abort during finalization.
8926         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8927         Raise_From_Controlled_Operation and update its associated comment.
8928         * a-fihema.ads, a-fihema.adb: New GNAT unit.
8929         Ada.Finalization.Heap_Management provides key functionality
8930         associated with controlled objects on the heap, their creation,
8931         finalization and reclamation. Type Finalization_Collection is
8932         effectively a wrapper which sits ontop of a storage pool and performs
8933         all necessary bookkeeping for all the objects it contains. Each
8934         access-to-controlled or access-to-class-wide type receives a collection
8935         as part of its expansion. The compiler generates buffer code and
8936         invokes Allocate / Deallocate to create and destroy allocated
8937         controlled objects.
8938         * a-finali.adb ("="): Removed.
8939         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8940         fields Prev and Next.
8941         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8942         A library unit with at least one controlled object on the library level
8943         has a special finalizer which is invoked by the binder. To signal this,
8944         ali files carry field PF.
8945         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8946         associated comment on field usage.
8947         * a-tags.adb (Get_RC_Offset): Removed.
8948         (Needs_Finalization): New routine.
8949         * a-tags.ads: Update the structure of the GNAT dispatch tables.
8950         Dispatch tables now carry field Needs_Finalization which provides
8951         runtime indication whether a type is controlled or has controlled
8952         components or both. Remove field RC_Offset.
8953         (Get_RC_Offset): Removed along with its associated pragma Export.
8954         Since tagged types with controlled components no longer carry hidden
8955         field _controller, the special mechanism to retrieve its location is no
8956         longer needed.
8957         (Needs_Finalization): New routine.
8958         * atree.ads, atree.adb (Elist24): New routine.
8959         (Set_Elist24): New routine.
8960         * atree.h: Add a define clause for Elist24.
8961         * bindgen.adb New library-level variable Lib_Final_Built.
8962         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8963         presence of a VM target, the routine generates calls to the proper
8964         library finalization routine.
8965         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8966         targets. Set the correct library finalization routine depending on
8967         whether the library has controlled objects or this is a VM compilation.
8968         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8969         to library-level finalizers of compiled units in reverse order of
8970         elaboration. It also produces exception management code and reraises a
8971         potential exception after all units have been finalized.
8972         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8973         library-level finalizers of compiled units in reverse order of
8974         elaboration.
8975         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8976         definitions of all library-level finalizers available to the compilation
8977         (Gen_Main_Ada): Directly call Adafinal which now contails all target
8978         dependent code.
8979         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8980         System.Standard_Library.Adafinal directly. If the library needs
8981         finalization actions, create the sequence of finalization calls.
8982         (Gen_Output_File_Ada): Alphabetize local variables and constants.
8983         Generate a with clause for System.Soft_Links when compiling for a VM.
8984         Remove the code which imports System.Standard_Library.Adafinal as
8985         Do_Finalize. Generate the library finalization routine.
8986         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8987         If the library needs finalization actions, create all the definitions
8988         of library- level finalizers.
8989         (Has_Finalizer): New routine. Determines whether at least one compiled
8990         unit has a library-level finalizer.
8991         Add type Qualification_Mode.
8992         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8993         * einfo.adb: New usage of field 15 as Return_Flag.
8994         Remove Finalization_Chain_Entity from the usages of field 19.
8995         Remove Associated_Final_Chain from the usages of field 23.
8996         New usage of field 23 as Associated_Collection.
8997         New usage of field 24 as Finalizer.
8998         New usage of flag 252 as Is_Processed_Transient.
8999         (Associated_Final_Chain): Removed.
9000         (Associated_Collection): New routine.
9001         (Finalization_Chain_Entity): Removed.
9002         (Finalizer): New routine.
9003         (Is_Finalizer): New routine.
9004         (Is_Processed_Transient): New routine.
9005         (Return_Flag): New routine.
9006         (Set_Associated_Final_Chain): Removed.
9007         (Set_Associated_Collection): New routine.
9008         (Set_Finalization_Chain_Entity): Removed.
9009         (Set_Finalizer): New routine.
9010         (Set_Is_Processed_Transient): New routine.
9011         (Set_Return_Flag): New routine.
9012         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
9013         displayed flags.
9014         (Write_Field8_Name): Alphabetize the output.
9015         (Write_Field11_Name): Alphabetize the output.
9016         (Write_Field12_Name): Alphabetize the output.
9017         (Write_Field13_Name): Alphabetize the output.
9018         (Write_Field14_Name): Alphabetize the output.
9019         (Write_Field15_Name): Alphabetize the output.
9020         (Write_Field16_Name): Alphabetize the output.
9021         (Write_Field17_Name): Alphabetize the output.
9022         (Write_Field18_Name): Alphabetize the output.
9023         (Write_Field19_Name): Alphabetize the output. Remove the output of
9024         Finalization_Chain_Entity.
9025         (Write_Field20_Name): Alphabetize the output.
9026         (Write_Field21_Name): Alphabetize the output.
9027         (Write_Field22_Name): Alphabetize the output.
9028         (Write_Field23_Name): Alphabetize the output. Remove the output of
9029         Associated_Final_Chain. Add output for Associated_Collection.
9030         (Write_Field24_Name): Alphabetize the output.
9031         (Write_Field25_Name): Add output for Finalizer.
9032         (Write_Field26_Name): Alphabetize the output.
9033         (Write_Field27_Name): Alphabetize the output.
9034         (Write_Field28_Name): Alphabetize the output.
9035         * einfo.ads: Add new field description for Associated_Collection and
9036         its uses in nodes.
9037         Remove Associated_Final_Chain and its uses in nodes.
9038         Remove Finalization_Chain_Entity and its uses in nodes.
9039         Add new field description for Finalizer and its uses in nodes.
9040         Add new synthesized attribute Is_Finalizer.
9041         Add new flag description for Is_Processed_Transient and its uses in
9042         nodes.
9043         Add new field description for Return_Flag and its uses in nodes.
9044         (Associated_Final_Chain): Removed along with its pragma Inline.
9045         (Associated_Collection): New routine and pragma Inline.
9046         (Finalization_Chain_Entity): Removed along with its pragma Inline.
9047         (Finalizer): New routine and pragma Inline.
9048         (Is_Finalizer): New routine and pragma Inline.
9049         (Is_Processed_Transient): New routine and pragma Inline.
9050         (Return_Flag): New routine and pragma Inline.
9051         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
9052         (Set_Associated_Collection): New routine and pragma Inline.
9053         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
9054         (Set_Finalizer): New routine and pragma Inline.
9055         (Set_Is_Processed_Transient): New routine and pragma Inline.
9056         (Set_Return_Flag): New routine and pragma Inline.
9057         * exp_aggr.adb: Alphabetize subprograms.
9058         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
9059         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
9060         associated comments. Remove local variables External_Final_List and
9061         Attach.
9062         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
9063         Ancestor. Remove the retrieval of finalization lists. Update the call to
9064         Make_Adjust_Call.
9065         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
9066         lists. Update the call to Late_Expansion.
9067         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
9068         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
9069         (Gen_Assign): Remove the retrieval of the finalization list used to
9070         build the assignment. Update the calls to Make_Init_Call and
9071         Make_Adjust_Call.
9072         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
9073         Remove the mechanism to determine attachment levels and finalization
9074         list retrieval. Remove the processing for coextensions.
9075         (Init_Controller): Removed. Controllers no longer exist.
9076         (Late_Expansion): Remove formals Flist and Obj along with their
9077         associated comments. Update the calls to Build_Record_Aggr_Code and
9078         Build_Array_Aggr_Code.
9079         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
9080         (Expand_N_Freeze_Entity): Add special processing for finalizers which
9081         appear in entry bodies, protected subprograms and task bodies.
9082         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
9083         * exp_ch3.adb (Add_Final_Chain): Removed.
9084         (Build_Array_Init_Proc): Alphabetize local variables.
9085         (Build_Assignment): Alphabetize local variables. Update the call to
9086         Maked_Adjust_Call.
9087         (Build_Class_Wide_Master): Rename local variables to better reflect
9088         their role.
9089         (Build_Discriminant_Assignments): Code reformatting.
9090         (Build_Init_Call_Thru): Code reformatting.
9091         (Build_Init_Procedure): Code reformatting. Generate a special version
9092         of Deep_Finalize which is capable of finalizing all initialized
9093         components and ignore the rest.
9094         (Build_Init_Statements): Rename local variables to better reflect their
9095         role.
9096         Reimplement the mechanism to include the creation and update of an index
9097         variable called a "counter". It is used as a bookmark for tracing
9098         initialized and non-initialized components.
9099         (Build_Initialization_Call): Remove local variable Controller_Typ.
9100         Alphabetize all local variables. Remove the initialization of the
9101         record controller and update the call to Make_Init_Call.
9102         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
9103         New local variable Counter.
9104         (Constrain_Array): Alphabetize.
9105         (Expand_Freeze_Array_Type): Create a collection instead of a
9106         finalization list.
9107         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
9108         Finalize_Address which is used in conjunction with allocated controlled
9109         objects.
9110         (Expand_N_Object_Declaration): Remove the creation of a finalization
9111         list for anonymous access types. Update the calls to Make_Init_Call and
9112         Make_Adjust_Call.
9113         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
9114         retrieval of finalization lists. Remove the expansion of the record
9115         controller. Create TSS primitive Finalize_Address used in conjunction
9116         with controlled objects on the heap. Create finalization collections
9117         for access-to-controlled record components.
9118         (Expand_Record_Controller): Removed.
9119         (Freeze_Type): Remove the freezing of record controllers. Freezing of
9120         class-wide types now requires additional processing. Create
9121         finalization collections for access-to-controlled types.
9122         (Increment_Counter): New routine.
9123         (Make_Counter): New routine.
9124         (Make_Eq_If): Remove the mention of Name_uController.
9125         (Make_Predefined_Primitive_Specs): There is no longer need to skip
9126         types coming from System.Finalization_Root.
9127         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
9128         (Predefined_Primitive_Bodies): There is no longer need to skip types
9129         coming from System.Finalization_Root.
9130         (Stream_Operation_OK): Do not generate stream routines for
9131         type Ada.Finalization.Heap_Management.Finalization_Collection.
9132         * exp_ch3.ads: Alphabetize subprograms.
9133         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
9134         Add with and use clause for Lib.
9135         (Complete_Coextension_Finalization): Removed.
9136         (Complete_Controlled_Allocation): New routine. Create a finalization
9137         collection for anonymous access-to-controlled types. Create a custom
9138         Allocate which interfaces with the back end and the machinery in
9139         Heap_Management.
9140         (Expand_Allocator_Expression): Add necessary calls to
9141         Complete_Controlled_Allocation. Remove the retrieval of finalization
9142         lists. Update the calls to Make_Adjust_Call. Generate a call to
9143         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9144         the associated collection.
9145         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
9146         Code clean up. Remove the retrieval of finalization lists and
9147         attachment levels.
9148         Update the call to Make_Init_Call. Generate a call to
9149         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
9150         the associated collection.
9151         (Get_Allocator_Final_List): Removed. Finalization lists are not
9152         available.
9153         (Suitable_Element): Remove the mention of Name_uController.
9154         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
9155         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
9156         the left hand side, carry out the assignment and adjust the left hand
9157         side.
9158         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
9159         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
9160         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
9161         BIP_Collection and BIPcollection.
9162         (Build_Heap_Allocator): New routine used to allocate the return object
9163         of a build-in-place function onto a collection.
9164         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
9165         (Expand_Call): Do not replace direct calls to Deep routines with their
9166         aliases.
9167         (Expand_N_Extended_Return_Statement): Give all variables shorter names
9168         and update their occurrences. Add a special return flag to monitor the
9169         [ab]normal execution of the function. The flag is set right before the
9170         return statement.
9171         Rewrite the mechanism used to allocate a build-in-place return object
9172         on the heap or on a storage pool.
9173         (Is_Direct_Deep_Call): New routine.
9174         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
9175         build-in-place function call instead of a final list. Build a call to
9176         Set_Finalize_Address_Ptr to decorate the associated collection.
9177         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
9178         order to name the build-in-place function call's result for later
9179         finalization. Add a collection to a build-in-place function call
9180         instead of a final list.
9181         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
9182         build-in-place function call instead of a final list. Remove the code
9183         which moves one final list and transforms it into the actual in a
9184         nested build-in-place call.
9185         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
9186         build-in-place function call instead of a final list.
9187         (Move_Final_List): Removed.
9188         (Needs_BIP_Collection): New routine.
9189         (Needs_BIP_Final_List): Removed.
9190         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
9191         enumeration type BIP_Formal_Kind.
9192         Update the related comment.
9193         (Needs_BIP_Collection): New routine.
9194         (Needs_BIP_Final_List): Removed.
9195         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
9196         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
9197         majority of subprograms in this unit. Add Name_Finalize_Address to
9198         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
9199         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
9200         statements for an array type.
9201         (Build_Adjust_Statements): Create the adjust statements for a record
9202         type.
9203         (Build_Cleanup_Statements): New routine. A procedure which given any
9204         construct containing asynchronous calls, references to _master, or is a
9205         task body, a task allocation or a protected body produces the necessary
9206         runtime calls to clean up these constructs.
9207         (Build_Exception_Handler): New routine.
9208         (Build_Final_List): Removed.
9209         (Build_Finalization_Collection): New routine. A core procedure which
9210         creates a collection to service heap allocated controlled objects
9211         associated with an access-to-controlled type.
9212         (Build_Finalize_Statements): Create the finalization statements for a
9213         record types.
9214         (Build_Finalizer): New routine. A core procedure which given any
9215         construct with declarations and/or statements detects all objects which
9216         need any type of clean up (controlled objects, protected objects) and
9217         generates all necessary code to clean up the said objects in the proper
9218         order.
9219         (Build_Finalizer_Call): New routine.
9220         (Build_Initialize_Statements): Create the initialization statements for
9221         an array type. The generated routine contains code to finalize partially
9222         initialized arrays.
9223         (Build_Object_Declarations): New routine.
9224         (Build_Raise_Statement): New routine.
9225         (Clean_Simple_Protected_Objects): Removed.
9226         (Controller_Component): Removed.
9227         (Enclosing_Function): New routine.
9228         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
9229         either declarations or statements or both.
9230         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
9231         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
9232         package.
9233         (Find_Final_List): Removed.
9234         (Global_Flist_Ref): Removed.
9235         (In_Finalization_Root): Removed.
9236         (Insert_Actions_In_Scope_Around): Determine the range of the transient
9237         scope in terms of tree nodes. Process all transient variables within
9238         that range.
9239         (Make_Adjust_Call): Rewritten. There is no longer an attach call
9240         generated after the adjust.
9241         (Make_Attach_Call): Removed.
9242         (Make_Call): New routine.
9243         (Make_Clean): Removed.
9244         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
9245         build routines.
9246         (Make_Deep_Proc): Rewritten to generate the new profile signature used
9247         in Deep routines.
9248         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
9249         build routines.
9250         (Make_Final_Call): Modified to simply create a call to either
9251         Deep_Finalize or Finalize.
9252         (Make_Finalize_Address_Body): New routine.
9253         (Make_Finalize_Address_Stmts): New routine. A function which produces
9254         TSS primitive Finalize_Address used in conjunction with heap allocated
9255         controlled objects.
9256         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
9257         (Make_Init_Call): Rewritten. There is no longer an attach call
9258         generated after initialization.
9259         (Make_Local_Deep_Finalize): New routine.
9260         (Make_Set_Finalize_Address_Ptr_Call): New routine.
9261         (Make_Transient_Block): Remove the finalization list retrieval and
9262         manipulation.
9263         (Needs_Finalization): Moved to Exp_Util.
9264         (Parent_Field_Type): New routine.
9265         (Preprocess_Components): New routine.
9266         (Process_Transient_Objects): New routine.
9267         (Wrap_HSS_In_Block): New routine.
9268         (Wrap_Transient_Declaration): Remove finalization list management and
9269         controller insertion.
9270         (Wrap_Transient_Expression): Code reformatting.
9271         (Wrap_Transient_Statement): Code reformatting.
9272         * exp_ch7.ads (Build_Final_List): Removed.
9273         (Build_Finalization_Collection): New routine.
9274         (Build_Raise_Statement): New routine.
9275         (Controller_Component): Removed.
9276         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
9277         (Find_Final_List): Removed.
9278         (In_Finalization_Root): Removed.
9279         (Is_Simple_Protected_Type): Update related comment.
9280         (Make_Adjust_Call): New parameter profile and associated comments.
9281         (Make_Attach_Call): Removed.
9282         (Make_Final_Call): New parameter profile and associated comments.
9283         (Make_Finalize_Address_Body): New routine.
9284         (Make_Init_Call): New parameter profile and associated comments.
9285         (Make_Local_Deep_Finalize): New routine.
9286         (Make_Set_Finalize_Address_Ptr_Call): New routine.
9287         (Needs_Finalization): Moved to Exp_Util.
9288         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
9289         (Expand_N_Protected_Body): Remove the handling of finalization lists.
9290         (Find_Protection_Type): Moved to Exp_Util.
9291         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
9292         (Make_DT): Update sequence of dispatch table initialization. Remove the
9293         initialization of field RC_Offset. Add initialization of field Needs_
9294         Finalization.
9295         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
9296         Reimplement how an object is first finalized, then deallocated.
9297         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
9298         Code reformatting.
9299         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
9300         Register TSS_Finalize_Address with type TSS_Names.
9301         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
9302         procedure provides the interface between an allocation / deallocation
9303         and the support machinery in Ada.Finalization.Heap_Management.
9304         (Find_Init_Call): Code reformatting.
9305         (Find_Init_Call_In_List): Code reformatting.
9306         (Find_Protection_Type): Moved from Exp_Ch9.
9307         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
9308         (Has_Controlled_Coextensions): Removed.
9309         (Has_Controlled_Objects): New routine.
9310         (In_Library_Level_Package_Body): New routine.
9311         (Insert_Action_After): New routine.
9312         (Is_Finalizable_Transient): New routine. This predicate determines
9313         whether an object declaration is one of the many variants of controlled
9314         transients.
9315         (Is_Null_Access_BIP_Func_Call): New routine.
9316         (Is_Non_BIP_Func_Call): New routine.
9317         (Is_Related_To_Func_Return): New routine.
9318         (Needs_Finalization): Moved from Exp_Ch7.
9319         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
9320         (Find_Protection_Type): Moved from Exp_Ch9.
9321         (Has_Controlled_Coextensions): Removed.
9322         (Has_Controlled_Objects): New routine.
9323         (In_Library_Level_Package_Body): New routine.
9324         (Insert_Action_After): New routine.
9325         (Is_Finalizable_Transient): New routine.
9326         (Is_Null_Access_BIP_Func_Call): New routine.
9327         (Is_Non_BIP_Func_Call): New routine.
9328         (Is_Related_To_Func_Return): New routine.
9329         (Needs_Finalization): Moved from Exp_ch7.
9330         * expander.adb (Expand): Add a case for N_Free_Statement.
9331         * freeze.adb (Freeze_All): Replace the generation of a finalization
9332         list with a collection for access-to-controlled types.
9333         (Freeze_Entity): Code reformatting.
9334         (Freeze_Record_Type): Remove the freezing of a record controller
9335         component.
9336         (Freeze_Subprogram): Code reformatting.
9337         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
9338         finalization list.
9339         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
9340         has a library-level finalizer.
9341         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
9342         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
9343         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
9344         files. Add a-fihema to the list of object files.
9345         * par-ch4.adb:
9346         Alphabetize the associations in type Is_Parameterless_Attribute.
9347         * rtsfind.ads: Ada.Finalization_List.Controller and
9348         System.Finalization_Implementation are no longer a GNAT unit.
9349         Update the range of type Ada_Finalization_Child. Remove the following
9350         recoverable entities:
9351
9352            RE_Attach_To_Final_List
9353            RE_Deep_Tag_Attach
9354            RE_Finalize_List
9355            RE_Finalize_One
9356            RE_Finalizable_Ptr_Ptr
9357            RE_Global_Final_List
9358            RE_Limited_Record_Controller
9359            RE_List_Controller
9360            RE_Move_Final_List
9361            RE_Record_Controller
9362            RE_Simple_List_Controller
9363
9364         Add the following recoverable entities:
9365
9366            RE_Add_Offset_To_Address
9367            RE_Allocate
9368            RE_Base_Pool
9369            RE_Deallocate
9370            RE_Exception_Identity
9371            RE_Finalization_Collection
9372            RE_Finalization_Collection_Ptr
9373            RE_Needs_Finalization
9374            RE_Save_Library_Occurrence
9375            RE_Set_Finalize_Address_Ptr
9376            RE_Set_Storage_Pool_Ptr
9377            RE_Storage_Count
9378         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
9379         Name_uController.
9380         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
9381         (First_Stored_Discriminant): Remove the mention of Name_uController.
9382         * sem_aux.ads: Comment reformatting.
9383         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
9384         to redecorate an already existing class-wide type.
9385         (Decorate_Tagged_Type): New parameter profile and associated comment.
9386         Create a "shadow class-wide type" for a shadow entity.
9387         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
9388         of the final chain along with the associated comment.
9389         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
9390         Full_Desig and set it to the full view of the designated type.
9391         Initialize the finalization collection to empty.
9392         (Build_Derived_Record_Type): Alphabetize local variables. Code
9393         reformatting.
9394         (Collect_Fixed_Components): Remove the mention of Name_uController.
9395         (Create_Constrained_Components): Remove the mention of Name_uController.
9396         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
9397         class-wide type of a shadow entity.
9398         (Process_Full_View): Update the machinery which marks type
9399         Limited_Controlled's entity as limited.
9400         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
9401         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
9402         list, instead make a collection build-in-place formal.
9403         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
9404         a designated type in order to establish a match between the renaming
9405         and the renamed entity.
9406         (Find_Selected_Component): Add guard to prevent spurious exceptions
9407         from being raised on .NET/JVM.
9408         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
9409         to the list of primitive that need special processing. Update arrays
9410         C_Names and D_Names.
9411         (Replace_Types): Handle class-wide types.
9412         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
9413         different parameter profile, look at the first formal.
9414         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
9415         use clauses for Exp_Util.
9416         * sem_res.adb: Remove with and use clauses for Elists.
9417         (Propagate_Coextensions): Removed.
9418         (Resolve_Allocator): Do not propagate the list of coextensions from one
9419         allocator to another.
9420         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
9421         Deaccessed_T to Desig_Typ.
9422         (Enter_Name): Remove the mention of Name_uController.
9423         (Gather_Components): Remove the mention of Name_uController.
9424         (Incomplete_Or_Private_View): New routine.
9425         (Is_Coextension_Root): Removed.
9426         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
9427         * sem_util.ads (Incomplete_Or_Private_View): New routine.
9428         (Is_Coextension_Root): Removed.
9429         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
9430         Controlled types are now derived from a null tagged record. Remove
9431         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
9432         * sinfo.adb (Coextensions): Removed.
9433         (Set_Coextensions): Removed.
9434         * sinfo.ads: Remove Coextensions from the explanation of node fields
9435         and its uses in nodes.
9436         Update the field usage of N_Allocator.
9437         (Coextensions): Removed along with its pragma Inline.
9438         (Set_Coextensions): Removed along with its pragma Inline.
9439         * snames.ads-tmpl: Remove names
9440
9441           Name_uClean
9442           Name_uController
9443           Name_uFinal_List
9444           Name_uLocal_Final_List
9445           Name_Finalization_Root
9446           Name_Next
9447           Name_Prev
9448
9449         Add names
9450
9451           Name_uFinalizer
9452           Name_Finalize_Address
9453         * s-pooglo.adb (Allocate): Add overriding indicator.
9454         (Deallocate): Add overriding indicator.
9455         (Storage_Size): Add overriding indicator.
9456         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
9457         than Finalize_Global_List.
9458         (Null_Finalize_Global_List): Removed.
9459         (Save_Library_Occurrence): New routine.
9460         * s-soflin.ads: Remove variable Finalize_Global_List along with its
9461         initialization. Add variable Finalize_Library_Objects along with its
9462         pragma Export. Add variables Library_Exception and
9463         Library_Exception_Set along with their pragma Export.
9464         (Null_Finalize_Global_List): Removed.
9465         (Save_Library_Occurrence): New routine.
9466         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
9467         rather than Finalize_Global_List.
9468         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
9469         of the constructed node.
9470
9471 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9472
9473         * link.c: Include "auto-host.h" before system headers.
9474
9475 2011-08-03  Vincent Celier  <celier@adacore.com>
9476
9477         * make.adb (Gnatmake): Add to table Library_Projs only library projects
9478         that are not extended. Do not check if a library project that is
9479         extended should be regenerated. Do not add to table Library_Paths the
9480         libraries that are in extended projects. Link only with libraries that
9481         are in libray projects that are not extended.
9482         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
9483         for a library project that is extended.
9484
9485 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9486
9487         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
9488         conforming subprogram renamings that appear to be completions if they
9489         are not fully conformant.
9490         Such renamings are homographs but not completions.
9491         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
9492         names in a subprogram renaming that appears in an instance.
9493
9494 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9495
9496         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
9497         not immutably limited, build actual subtype from expression to provide
9498         proper bounds to caller.
9499
9500 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9501
9502         * sem_ch8.adb: Minor comment correction.
9503
9504 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9505
9506         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
9507         returning a limited array, use an extended return statement.
9508
9509 2011-08-03  Vincent Celier  <celier@adacore.com>
9510
9511         * make.adb (Initialize): If --subdirs= is used, but no project file is
9512         specified, attempt to create the specify subdir if it does not already
9513         exist and use it as the object directory as if -D had been specified.
9514
9515 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9516
9517         * s-tpopsp-vms.adb: New file.
9518         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
9519         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
9520
9521 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9522
9523         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
9524         package.
9525
9526 2011-08-03  Yannick Moy  <moy@adacore.com>
9527
9528         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
9529         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
9530         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
9531         detect that an array has static bounds.
9532
9533 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9534
9535         * exp_dist.adb: Minor reformatting.
9536
9537 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9538
9539         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
9540         (ATCB_Key): Removed, not always used.
9541
9542 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9543
9544         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
9545         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
9546         most remaining global variables.
9547
9548 2011-08-03  Robert Dewar  <dewar@adacore.com>
9549
9550         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
9551         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
9552         reformatting.
9553
9554 2011-08-03  Javier Miranda  <miranda@adacore.com>
9555
9556         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
9557         that must be passed by copy in VM targets.
9558
9559 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9560
9561         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
9562         duplicates a similar htable now in the project tree.
9563
9564 2011-08-03  Claire Dross  <dross@adacore.com>
9565
9566         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
9567         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
9568         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
9569         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
9570         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
9571         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
9572         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
9573         update.
9574
9575 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9576
9577         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
9578         (ATCB_Key): Removed, not always used.
9579         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
9580         s-taprop-posix.adb.
9581         * s-tpopsp-tls.adb: New file.
9582         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
9583         x86/x64/ia64/powerpc/sparc Linux.
9584
9585 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9586
9587         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
9588         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
9589
9590 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9591
9592         * rtsfind.ads, exp_dist.adb, exp_dist.ads
9593         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
9594         Fix type selection for mapping integer types to PolyORB types.
9595
9596 2011-08-03  Bob Duff  <duff@adacore.com>
9597
9598         * sem_ch7.adb: Minor comment clarification.
9599
9600 2011-08-03  Bob Duff  <duff@adacore.com>
9601
9602         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
9603         an error analyzing a choice, skip further processing. Further
9604         processing could cause a crash or cascade errors.
9605
9606 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9607
9608         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
9609         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
9610         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
9611         prj-env.ads (Shared_Project_Tree_Data): new type
9612         An aggregate project and its aggregated trees need to share the common
9613         data structures used for lists of strings, packages,... This makes the
9614         code simpler since otherwise we have to pass the root tree (also used
9615         for the configuration file data) in addition to the current project
9616         tree. This also avoids ambiguities as to which tree should be used.
9617         And finally this saves a bit of memory.
9618         (For_Every_Project_Imported): new parameter Tree.
9619         Since aggregated projects are using a different tree, we need to let
9620         the caller know which tree to use to manipulate the returned project.
9621
9622 2011-08-03  Robert Dewar  <dewar@adacore.com>
9623
9624         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
9625         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
9626         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
9627         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
9628
9629 2011-08-03  Javier Miranda  <miranda@adacore.com>
9630
9631         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
9632         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
9633
9634 2011-08-03  Bob Duff  <duff@adacore.com>
9635
9636         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
9637         the Base_Type.
9638
9639 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
9640
9641         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
9642         g-sehash.ads: Fix typo. Update header.
9643
9644 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9645
9646         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
9647         expansion.
9648
9649 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9650
9651         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
9652         prefixes of private types along with records, since the selector may be
9653         a discriminant.
9654         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
9655         private types along with records, since the selector may be a
9656         discriminant.
9657
9658 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9659
9660         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
9661
9662 2011-08-03  Javier Miranda  <miranda@adacore.com>
9663
9664         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
9665         Tagged_Type_Expansion.
9666
9667 2011-08-03  Yannick Moy  <moy@adacore.com>
9668
9669         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
9670         violation when the argument of concatenation is the name of a
9671         constant.
9672
9673 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9674
9675         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
9676         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
9677         (Process_Declarative_Items): new parameter Child_Env.
9678
9679 2011-08-03  Yannick Moy  <moy@adacore.com>
9680
9681         * alfa.ads: Update format of ALFA section in ALI file in order to
9682         add a mapping from bodies to specs when both are present.
9683         (ALFA_Scope_Record): Add components for spec file/scope.
9684         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
9685         present.
9686         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
9687         collected, fill in the spec information when relevant.
9688         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9689         present.
9690
9691 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9692
9693         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
9694         code unit to decide whether to add internally generated subprograms.
9695
9696 2011-08-03  Javier Miranda  <miranda@adacore.com>
9697
9698         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
9699         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
9700         be handled by copy in VM targets.
9701
9702 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9703
9704         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9705         code with Makeutl.Get_Switches.
9706         * prj-tree.adb: Update comment.
9707
9708 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9709
9710         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
9711         subprogram with a limited formal that does not support external
9712         streaming.
9713
9714 2011-08-03  Yannick Moy  <moy@adacore.com>
9715
9716         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
9717         continuation line
9718         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
9719         not from current unit in two phases, because it is not possible to
9720         change the table while iterating over its content.
9721         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
9722
9723 2011-08-03  Sergey Rybin  <rybin@adacore.com>
9724
9725         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
9726         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
9727
9728 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9729
9730         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
9731         and the component type is composite, this is ambiguous for predefined
9732         concatenation, but if the node is not overloaded and the entity is a use
9733         -defined function its profile can be used to resolve that aggregate.
9734
9735 2011-08-03  Robert Dewar  <dewar@adacore.com>
9736
9737         * exp_ch4.adb: Minor code cleanup.
9738
9739 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9740
9741         * exp_dist.adb: Do not generate distribution stubs if serious errors
9742         have been diagnosed.
9743
9744 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9745
9746         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
9747         the first formal of a primitive operation, go to the base type to
9748         handle properly an access to a derived type with constrained
9749         discriminants.
9750         * sem_type.adb (Disambiguate): an immediately visible operator hides a
9751         user-defined function that is only use-visible.
9752
9753 2011-08-03  Robert Dewar  <dewar@adacore.com>
9754
9755         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
9756         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
9757         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
9758         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
9759         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
9760         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
9761         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
9762         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
9763
9764 2011-08-03  Robert Dewar  <dewar@adacore.com>
9765
9766         * repinfo.adb (List_Mechanism): Add handling of
9767         Convention_Ada_Pass_By_XXX.
9768         * sem_mech.adb (Set_Mechanism): Ditto.
9769         * sem_prag.adb (Process_Convention): Add entries for
9770         Convention_Ada_Pass_By_XXX.
9771         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
9772
9773 2011-08-03  Pascal Obry  <obry@adacore.com>
9774
9775         * makeutl.adb: Minor reformatting.
9776
9777 2011-08-03  Vincent Celier  <celier@adacore.com>
9778
9779         * fname-uf.adb
9780         (Get_File_Name) If the file cannot be found when there are no config
9781         pragmas file and May_Fail is True, return No_File instead of the file
9782         name, to be consistent.
9783
9784 2011-08-03  Pascal Obry  <obry@adacore.com>
9785
9786         * adaint.c (__gnat_is_executable_file_attr): Avoid access
9787         to null pointer.
9788
9789 2011-08-03  Javier Miranda  <miranda@adacore.com>
9790
9791         * sem_ch13.adb
9792         (Same_Representation): In VM targets the representation of arrays with
9793         aliased components differs from arrays with non-aliased components.
9794
9795 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9796
9797         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
9798         not systematically lower case attribute indexes that contain no "."
9799         Fix definition of several Naming attributes, which take
9800         a unit name as index and therefore should be case insensitive.
9801         Minor refactoring (reduce length of variable names).
9802
9803 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9804
9805         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
9806
9807 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9808
9809         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
9810         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
9811         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
9812         prj-tree.ads (Prj.Tree.Environment): new type.
9813
9814 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9815
9816         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
9817         prj-tree.adb, prj-tree.ads (Environment): new type.
9818
9819 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9820
9821         * prj-tree.ads: Remove unused variable.
9822
9823 2011-08-03  Yannick Moy  <moy@adacore.com>
9824
9825         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
9826         issuing messages related to SPARK restriction violation.
9827
9828 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9829
9830         * sem_ch6.adb: guard against error nodes in return statements.
9831
9832 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9833
9834         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
9835         a warning can only appear on a configuration file, so emit warning
9836         without further checks.
9837
9838 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
9839
9840         * s-interr.ads: add overriding keyword.
9841
9842 2011-08-03  Geert Bosch  <bosch@adacore.com>
9843
9844         * exp_attr.adb: Fix minor typo.
9845
9846 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9847
9848         * par-ch4.adb: improve error recovery.
9849
9850 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9851
9852         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
9853         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
9854         to Errout_Handling.
9855
9856 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9857
9858         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
9859         "external" as an attribute name in aggregate projects.
9860
9861 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
9862
9863         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
9864         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
9865         from 0, so we need to adjust.
9866
9867 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9868
9869         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
9870         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
9871
9872 2011-08-03  Yannick Moy  <moy@adacore.com>
9873
9874         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
9875         restriction on overloaded entity if the entity is not an operator.
9876
9877 2011-08-03  Yannick Moy  <moy@adacore.com>
9878
9879         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
9880         restrict.ads: Rename remaining Check_Formal_Restriction* into
9881         Check_SPARK_Restriction*.
9882
9883 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9884
9885         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9886         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9887         qualifier.
9888         (Project_Empty): removed
9889         (Empty_Project): new parameter Qualifier
9890         This is used to have fields specific to aggregate projects, cleaner
9891         New field to store the list of aggregated projects.
9892         (Check_Aggregate_Project): removed
9893         (Process_Aggregated_Projects, Free): new subprograms.
9894
9895 2011-08-03  Olivier Hainque  <hainque@adacore.com>
9896
9897         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9898
9899 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
9900
9901         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9902         explicit dereference of an unconstrained type, create a constrained
9903         subtype for it, as is done for function calls that return an
9904         unconstrained type.
9905
9906 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9907
9908         * g-pehage.adb (Finalize): Avoid possible double-free.
9909
9910 2011-08-03  Steve Baird  <baird@adacore.com>
9911
9912         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9913         Elab_Spec/Body attrs in CodePeer_Mode.
9914
9915 2011-08-03  Javier Miranda  <miranda@adacore.com>
9916
9917         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9918         low bound is not known at compile time but they have no others choice.
9919         Done because in this case the bounds can be obtained directly from the
9920         aggregate.
9921
9922 2011-08-03  Ed Falis  <falis@adacore.com>
9923
9924         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9925         on VxWorks SMP. Remove unusable constant ANY_CPU.
9926
9927 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9928
9929         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9930         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9931         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9932         Prj.Env.Initialize_Empty): new subprograms
9933         (Get_Env, Find_Project): remove parameter Target_Name.
9934
9935 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
9936
9937         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9938         as a condition for the delayed call to Derived_Subprograms done for the
9939         case of the rewriting of a derived type that constrains the
9940         discriminants of its parent type.
9941         Avoids redundant subprogram derivations for private subtype derivations.
9942
9943 2011-08-03  Javier Miranda  <miranda@adacore.com>
9944
9945         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9946         Build_Record_Aggr_Code.
9947         (Build_Record_Aggr_Code): Add missing support to initialize hidden
9948         discriminants in extension aggregates.
9949
9950 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9951
9952         * prj-pp.adb (Print): also output project qualifiers, since in
9953         particular "aggregate" is mandatory in an aggregate project.
9954
9955 2011-08-03  Emmanuel Briot  <briot@adacore.com>
9956
9957         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9958         (Debug_Output): new function.
9959
9960 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
9961
9962         * gnat_ugn.texi: Document -Wstack-usage.
9963         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9964
9965 2011-08-03  Thomas Quinot  <quinot@adacore.com>
9966
9967         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9968         have keyword LIMITED.
9969
9970 2011-08-03  Yannick Moy  <moy@adacore.com>
9971
9972         * alfa.adb, alfa.ads, alfa_test.adb: New files.
9973         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9974         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9975         section (does not happen in compiler, only if code directly calls
9976         Scan_ALI).
9977         * get_alfa.adb, get_alfa.ads: New files.
9978         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9979         needed.
9980         * lib-xref-alfa.adb: New file.
9981         * lib-xref.adb, lib-xref.ads
9982         (Xref_Entry): redefine information needed in cross-references for ALFA.
9983         Push ALFA treatments in separated local package.
9984         (Enclosing_Subpragram_Or_Package): treat specially subprogram
9985         identifiers. Return entity of package body instead of spec. Return
9986         Empty for a scope with no location.
9987         (Generate_Reference): adapt to new components for ALFA information.
9988         Remove the need for D references on definitions.
9989         (Is_Local_Reference): moved to ALFA local package
9990         (Output_References): extract subfunction as Extract_Source_Name
9991         (Output_Local_References): remove procedure, replaced by filtering of
9992         cross-references in package ALFA and printing in Put_ALFA.
9993         (Write_Entity_Name): remove procedure
9994         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9995         print exact name of entity as it appears in source file
9996         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9997         * put_alfa.adb, put_alfa.ads: New files.
9998         * xref_lib.adb (Search_Xref): protect read of cross-references against
9999         reading other sections of the ALI file, in gnatxref
10000         (Search): protect read of cross-references against reading other
10001         sections of the ALI file, in gnatfind.
10002         * gcc-interface/Make-lang.in: Update dependencies.
10003
10004 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10005
10006         * sem_ch3.adb: Minor reformatting.
10007
10008 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
10009
10010         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
10011         raising an exception.
10012
10013 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10014
10015         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
10016         type, always use 1 as the lower bound or string, even if lower bound of
10017         context is not static, to handle properly null strings in a non-static
10018         context.
10019
10020 2011-08-03  Bob Duff  <duff@adacore.com>
10021
10022         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
10023         always legal on the right-hand side of an assignment statement; there
10024         is always an applicable index constraint in this case. Therefore, the
10025         check for Pkind = N_Assignment_Statement is now unconditional -- it
10026         doesn't depend on whether Is_Constrained (Typ).
10027
10028 2011-08-03  Robert Dewar  <dewar@adacore.com>
10029
10030         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
10031
10032 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10033
10034         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
10035         for an itype created within a generic unit.
10036
10037 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10038
10039         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
10040         suppresses all inlining.
10041
10042 2011-08-03  Robert Dewar  <dewar@adacore.com>
10043
10044         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
10045         exp_aggr.adb: Minor reformatting.
10046
10047 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10048
10049         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
10050         tagged assignment when discriminant checks are suppressed. This is
10051         useless and extremely costly in terms of static stack usage.
10052
10053 2011-08-03  Bob Duff  <duff@adacore.com>
10054
10055         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
10056         of generics, because this leads to the wrong entity in the wrong scope,
10057         causing (e.g.) pragma Export_Procedure to get an error if the entity is
10058         an instance.
10059         (Process_Interface_Name): Follow Alias for instances of generics, to
10060         correct for the above change.
10061
10062 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10063
10064         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
10065         is an integer literal it is always safe to replace the reference. In
10066         addition, if the reference appears in the generated code for an object
10067         declaration it is necessary to copy because otherwise the reference
10068         might be to the uninitilized value of the discriminant of the object
10069         itself.
10070
10071 2011-08-03  Pascal Obry  <obry@adacore.com>
10072
10073         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
10074         ACL used, in this case we want to check for ending .exe, not .exe
10075         anywhere in the path.
10076
10077 2011-08-03  Sergey Rybin  <rybin@adacore.com>
10078
10079         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10080         the tree structure (semantic decoration of references to record
10081         discriminants).
10082
10083 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10084
10085         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
10086         choices of a named array aggregate, bail out when any choices are
10087         marked as Errors_Posted.
10088
10089 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10090
10091         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
10092         in which entity is frozen, to handle properly loop variables in
10093         iterators.
10094
10095 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10096
10097         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
10098         subtype is not static, compute the upper bound using attributes, to
10099         handle properly index types that are not integer types.
10100
10101 2011-08-03  Bob Duff  <duff@adacore.com>
10102
10103         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
10104         Update copyright notice.
10105
10106 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10107
10108         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
10109         Original_Discriminant if within an instance.
10110         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
10111
10112 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10113
10114         * einfo.ads: Minor reformatting.
10115
10116 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10117
10118         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
10119         composite type with an unfrozen subcomponent, in the profile of a
10120         primitive operation.
10121
10122 2011-08-03  Robert Dewar  <dewar@adacore.com>
10123
10124         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
10125
10126 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10127
10128         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
10129         unconstrained type with discriminants is initialized with an aggregate,
10130         use the constrained subtype of the aggregate as the type of the object,
10131         because it is immutable, and this allows the back-end to generate no
10132         code for the object declaration.
10133
10134 2011-08-03  Robert Dewar  <dewar@adacore.com>
10135
10136         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
10137         comparison operand is variable, and turns out to be zero or negative.
10138
10139 2011-08-03  Javier Miranda  <miranda@adacore.com>
10140
10141         * exp_intr.adb
10142         (Expand_Dispatching_Constructor_Call): Disable expansion of
10143         code required for native targets. Done to avoid generating
10144         references to unavailable runtime entities in VM targets.
10145         * exp_ch3.adb
10146         (Expand_N_Object_Declaration): Add missing support to handle
10147         the explicit initialization of class-wide interface objects.
10148         Fix documentation.
10149
10150 2011-08-03  Matthew Heaney  <heaney@adacore.com>
10151
10152         * a-cobove.adb (Merge): Move source onto target, instead of using
10153         Assign.
10154
10155 2011-08-03  Matthew Heaney  <heaney@adacore.com>
10156
10157         * a-cbdlli.adb (Splice): Move source items from first to last.
10158
10159 2011-08-03  Yannick Moy  <moy@adacore.com>
10160
10161         * sem_util.ads: Add comment.
10162
10163 2011-08-03  Javier Miranda  <miranda@adacore.com>
10164
10165         * exp_aggr.adb
10166         (Expand_Record_Aggregate): In VM targets disable the expansion into
10167         assignments of aggregates whose type is not known at compile time.
10168
10169 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10170
10171         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
10172         protected entries and task entries, to build the proper renaming
10173         declaration for entry formals, used in debugging.
10174         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
10175         parameters in the same way.
10176
10177 2011-08-02  Robert Dewar  <dewar@adacore.com>
10178
10179         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
10180         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
10181         code reorganization.
10182
10183 2011-08-02  Robert Dewar  <dewar@adacore.com>
10184
10185         * debug.adb: Debug flag d.P to suppress length comparison optimization
10186         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
10187         comparison of Length by comparing First/Last instead.
10188
10189 2011-08-02  Matthew Heaney  <heaney@adacore.com>
10190
10191         * a-cobove.ads: Code clean up.
10192
10193 2011-08-02  Vincent Celier  <celier@adacore.com>
10194
10195         * adaint.c (file_names_case_sensitive_cache): New static int.
10196         (__gnat_get_file_names_case_sensitive): Cache the return value in
10197         file_names_case_sensitive_cache at the first invocation, to avoid
10198         multiple calls to getenv.
10199
10200 2011-08-02  Bob Duff  <duff@adacore.com>
10201
10202         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
10203
10204 2011-08-02  Yannick Moy  <moy@adacore.com>
10205
10206         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
10207         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
10208         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
10209         indicate that we are in a precondition or postcondition. This is used in
10210         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
10211         decide whether to flag the spec or body of the current subprogram as
10212         not in ALFA.
10213
10214 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
10215
10216         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
10217         list.
10218         * a-extiin.ads: New file.
10219
10220 2011-08-02  Bob Duff  <duff@adacore.com>
10221
10222         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
10223         now raises Name_Error instead of Use_Error in certain cases. The other
10224         parts of this AI were already implemented properly.
10225
10226 2011-08-02  Vincent Celier  <celier@adacore.com>
10227
10228         * link.c: Only import "auto-host.h" when building the gnattools.
10229
10230 2011-08-02  Yannick Moy  <moy@adacore.com>
10231
10232         * sem_util.adb: Inter-unit inlining does not work for a subprogram
10233         which calls a local subprogram, so extract subprogram
10234         from Mark_Non_ALFA_Subprogram_Body.
10235
10236 2011-08-02  Javier Miranda  <miranda@adacore.com>
10237
10238         * exp_ch9.adb
10239         (Extract_Dispatching_Call): If the type of the dispatching object is an
10240         access type then return an explicit dereference in the Object out-mode
10241         parameter.
10242
10243 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10244
10245         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
10246         compatibility checks for all indexes of an array subtype, not just the
10247         first. Reset Has_Dynamic_Range_Check on the subtype before each
10248         potential check to ensure that Insert_Range_Checks will not elide any
10249         of the dynamic checks.
10250
10251 2011-08-02  Yannick Moy  <moy@adacore.com>
10252
10253         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
10254         SPARK restriction at parsing time.
10255         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
10256         directive only if the SPARK restriction is set for this unit.
10257
10258 2011-08-02  Yannick Moy  <moy@adacore.com>
10259
10260         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
10261         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
10262         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
10263         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
10264         Mark_Non_ALFA_Subprogram_Body.
10265         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
10266         inlined.
10267
10268 2011-08-02  Yannick Moy  <moy@adacore.com>
10269
10270         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
10271         might be costly.
10272
10273 2011-08-02  Robert Dewar  <dewar@adacore.com>
10274
10275         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
10276         exp_ch3.adb: Minor reformatting.
10277
10278 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10279
10280         * adaint.c (__gnat_locate_exec_on_path): only returns executable
10281         files, not any regular file.
10282         (__gnat_locate_file_with_predicate): new subprogram.
10283
10284 2011-08-02  Yannick Moy  <moy@adacore.com>
10285
10286         * sinfo.adb, sinfo.ads: Restrict the use of flags
10287         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
10288         nodes, plus N_Subtype_Declaration for the 2nd one.
10289
10290 2011-08-02  Sergey Rybin  <rybin@adacore.com>
10291
10292         * gnat_rm.texi: Ramification of pragma Eliminate documentation
10293          - fix bugs in the description of Source_Trace;
10294          - get rid of UNIT_NAME;
10295
10296 2011-08-02  Javier Miranda  <miranda@adacore.com>
10297
10298         * exp_ch9.adb
10299         (Build_Dispatching_Requeue): Adding support for VM targets
10300         since we cannot directly reference the Tag entity.
10301         * exp_sel.adb (Build_K): Adding support for VM targets.
10302         (Build_S_Assignment): Adding support for VM targets.
10303         * exp_disp.adb
10304         (Default_Prim_Op_Position): In VM targets do not restrict availability
10305         of predefined interface primitives to compiling in Ada 2005 mode.
10306         (Is_Predefined_Interface_Primitive): In VM targets this service is not
10307         restricted to compiling in Ada 2005 mode.
10308         (Make_VM_TSD): Generate code that declares and initializes the OSD
10309         record. Needed to support dispatching calls through synchronized
10310         interfaces.
10311         * exp_ch3.adb
10312         (Make_Predefined_Primitive_Specs): Enable generation of predefined
10313         primitives associated with synchronized interfaces.
10314         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10315         primitives associated with synchronized interfaces.
10316
10317 2011-08-02  Yannick Moy  <moy@adacore.com>
10318
10319         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10320         statements hidden in SPARK if preceded by the HIDE directive
10321         (Parse_Exception_Handlers): mark each exception handler in a sequence of
10322         exception handlers as hidden in SPARK if preceded by the HIDE directive
10323         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10324         if starting with the HIDE directive
10325         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10326         starting with the HIDE directive; mark the declarations in a private
10327         part as hidden in SPARK if the private part starts with the HIDE
10328         directive
10329         * restrict.adb, restrict.ads
10330         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10331         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10332         argument node belongs to a part which is hidden in SPARK
10333         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10334         parts in SPARK; protect the possibly costly call to
10335         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10336         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10337         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10338         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10339         Tok_SPARK_Hide.
10340         (Scan): recognize special comment starting with '#' and followed by
10341         SPARK keyword "hide" as a HIDE directive.
10342
10343 2011-08-02  Yannick Moy  <moy@adacore.com>
10344
10345         * types.ads, erroutc.ads: Minor reformatting.
10346
10347 2011-08-02  Vincent Celier  <celier@adacore.com>
10348
10349         * link.c: Add response file support for cross platforms.
10350
10351 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10352
10353         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10354         in an association, set parent field of copy before partial analysis.
10355         * sem_res.adb (Resolve_Slice): create reference to itype only when
10356         expansion is enabled.
10357
10358 2011-08-02  Yannick Moy  <moy@adacore.com>
10359
10360         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10361         for new flag denoting which subprogram bodies are in ALFA
10362         * restrict.adb, sem_ch7.adb: Update comment
10363         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10364         sem_ch9.adb, sem_res.adb: Add calls to
10365         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10366         * sem_ch6.adb (Analyze_Function_Return): add calls to
10367         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10368         middle of the body, and extended return.
10369         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10370         False when missing return.
10371         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10372         to True for subprograms whose spec is in ALFA. Remove later on the flag
10373         on the entity used for a subprogram body when there exists a separate
10374         declaration.
10375         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10376         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10377         False, otherwise do nothing.
10378
10379 2011-08-02  Robert Dewar  <dewar@adacore.com>
10380
10381         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10382
10383 2011-08-02  Yannick Moy  <moy@adacore.com>
10384
10385         * sem_ch4.ads: minor formatting.
10386
10387 2011-08-02  Yannick Moy  <moy@adacore.com>
10388
10389         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10390         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10391         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10392         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10393         opt.ads: cleanup of SPARK mode
10394
10395 2011-08-02  Yannick Moy  <moy@adacore.com>
10396
10397         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10398         types.
10399         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10400         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10401         * sem_ch3.adb
10402         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10403         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10404         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10405         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10406         types.
10407         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10408         non-static range.
10409         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10410         functions whose return type is not in ALFA.
10411         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
10412         specifications.
10413         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
10414         parameter's type is not in ALFA.
10415         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
10416         types are in ALFA.
10417
10418 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10419
10420         * sem_ch6 (Analyze_Expression_Function): treat the function as
10421         Inline_Always, and introduce a subprogram declaration for it when it is
10422         not a completion.
10423         * inline.adb (Add_Inlined_Body): recognize bodies that come from
10424         expression functions, so that the back-end can determine whether they
10425         can in fact be inlined.
10426         * sem_util.adb (Is_Expression_Function): predicate to determine whether
10427         a function body comes from an expression function.
10428
10429 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10430
10431         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
10432         null exclusions to test Can_Never_Be_Null on the anonymous access types
10433         of the formals rather than testing the formals themselves. Exclude this
10434         check in cases where the Old_Formal is marked as a controlling formal,
10435         to avoid issuing spurious errors for bodies completing dispatching
10436         operations (due to the flag not getting set on controlling access
10437         formals in body specs).
10438         (Find_Corresponding_Spec): When checking full and subtype conformance of
10439         subprogram bodies in instances, pass Designated and E in that order, for
10440         consistency with the expected order of the formals (New_Id followed by
10441         Old_Id).
10442
10443 2011-08-02  Robert Dewar  <dewar@adacore.com>
10444
10445         * sem_ch8.adb: Minor reformatting.
10446
10447 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10448
10449         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
10450         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
10451         primitive operations of class-wide actuals.
10452
10453 2011-08-02  Javier Miranda  <miranda@adacore.com>
10454
10455         * exp_atag.ads, exp_atag.adb
10456         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
10457         since its value is implicitly passed in argument Typ.
10458         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
10459         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
10460         Build_Common_Dispatching_Select_Statements.
10461
10462 2011-08-02  Robert Dewar  <dewar@adacore.com>
10463
10464         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
10465         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
10466         Minor reformatting.
10467
10468 2011-08-02  Robert Dewar  <dewar@adacore.com>
10469
10470         * sem_res.adb: Minor reformatting.
10471         * sem_prag.adb: Minor reformatting.
10472
10473 2011-08-02  Javier Miranda  <miranda@adacore.com>
10474
10475         * exp_atag.adb, exp_atags.ads
10476         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
10477         by the tagged type Entity. Required to use this routine in the VM
10478         targets since we do not have available the Tag entity in the VM
10479         platforms.
10480         * exp_ch6.adb
10481         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
10482         Ada.Tags has not been previously loaded.
10483         * exp_ch7.adb
10484         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
10485         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
10486         * sem_aux.adb
10487         (Enclosing_Dynamic_Scope): Add missing support to handle the full
10488         view of enclosing scopes. Required to handle enclosing scopes that
10489         are synchronized types whose full view is a task type.
10490         * exp_disp.adb
10491         (Build_VM_TSDs): Minor code improvement to avoid generating and
10492         analyzing lists with empty nodes.
10493         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
10494         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
10495         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
10496         (Make_Disp_Timed_Select_Body): Add support for VM targets.
10497         (Make_Select_Specific_Data_Table): Add support for VM targets.
10498         (Make_VM_TSD): Generate code to initialize the SSD structure of
10499         the TSD.
10500
10501 2011-08-02  Yannick Moy  <moy@adacore.com>
10502
10503         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
10504         cross-references section in ALI.
10505         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
10506         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
10507         Sub).
10508         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
10509         subprogram or package entity of a node
10510         (Is_Local_Reference_Type): new function returns True for references
10511         selected in local cross-references.
10512         (Lt): function extracted from Lt in Output_References
10513         (Write_Entity_Name): function extracted from Output_References
10514         (Generate_Definition): generate reference with type 'D' for definition
10515         of objects (object declaration and parameter specification), with
10516         appropriate locations and units, for use in local cross-references.
10517         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
10518         references of type 'I' for initialization in object definition.
10519         (Output_References): move part of function Lt and procedure
10520         Write_Entity_Name outside of the body. Ignore references of types 'D'
10521         and 'I' introduced for local cross-references.
10522         (Output_Local_References): new procedure to output the local
10523         cross-references sections.
10524         (Lref_Entity_Status): new array defining whether an entity is a local
10525         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
10526         with 'I' type when initialization expression is present.
10527         * get_scos.adb, get_scos.ads: Correct comments and typos
10528
10529 2011-08-02  Javier Miranda  <miranda@adacore.com>
10530
10531         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
10532         the JVM target.
10533         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
10534         the JVM target.
10535         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
10536         TSD support.
10537
10538 2011-08-02  Vincent Celier  <celier@adacore.com>
10539
10540         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
10541         (No_Space_Img): New function
10542         (Find_Excluded_Sources): When reading from a file, record the file name
10543         and the line number for each excluded source.
10544         (Mark_Excluded_Sources): When reporting an error, if the excluded
10545         sources were read from a file, include file name and line number in
10546         the error message.
10547
10548 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10549
10550         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
10551
10552 2011-08-02  Robert Dewar  <dewar@adacore.com>
10553
10554         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
10555
10556 2011-08-02  Javier Miranda  <miranda@adacore.com>
10557
10558         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
10559         generation of TSDs to the DOTNET compiler.
10560         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
10561         generation of TSDs to the DOTNET compiler.
10562
10563 2011-08-02  Javier Miranda  <miranda@adacore.com>
10564
10565         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
10566         record of all the tagged types declared inside library level package
10567         declarations, library level package bodies or library level subprograms.
10568         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
10569         associated with a given tagged type.
10570         (Build_VM_TSDs): New subprogram.
10571         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
10572         compilation units that are subprograms.
10573         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
10574         compilation units that are package bodies.
10575         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
10576         units that are a package declaration or a package instantiation.
10577         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
10578         reorganization to improve the error generated by the frontend when the
10579         function Ada.Tags.Secondary_Tag is not available.
10580         * rtsfind.ads (RE_Register_TSD): New runtime entity.
10581         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
10582
10583 2011-08-02  Javier Miranda  <miranda@adacore.com>
10584
10585         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
10586
10587 2011-08-02  Robert Dewar  <dewar@adacore.com>
10588
10589         * s-imenne.ads: Minor reformatting.
10590
10591 2011-08-02  Robert Dewar  <dewar@adacore.com>
10592
10593         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
10594         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
10595         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
10596
10597 2011-08-02  Robert Dewar  <dewar@adacore.com>
10598
10599         * einfo.ads (Materialize_Entity): Document this is only for renamings
10600         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
10601         required debug information in the case where we transform the object
10602         declaration into a renaming declaration.
10603         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
10604         object
10605         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
10606         Materialize_Entity.
10607
10608 2011-08-02  Robert Dewar  <dewar@adacore.com>
10609
10610         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
10611         Suppress_Init_Procs.
10612         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
10613         Suppress_Initialization/Initialization_Suppressed.
10614         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
10615         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
10616         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
10617         * sem_prag.adb: New processing for pragma Suppress_Initialization.
10618
10619 2011-08-02  Robert Dewar  <dewar@adacore.com>
10620
10621         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
10622         Minor reformatting.
10623
10624 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10625
10626         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
10627         only have inheritable classwide pre/postconditions.
10628
10629 2011-08-02  Javier Miranda  <miranda@adacore.com>
10630
10631         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
10632         * rtsfind.ads (RE_Check_TSD): New runtime entity.
10633         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
10634         checks if the external tag of a type is the same as the external tag
10635         of some other declaration.
10636
10637 2011-08-02  Thomas Quinot  <quinot@adacore.com>
10638
10639         * s-taskin.ads: Minor reformatting.
10640
10641 2011-08-02  Emmanuel Briot  <briot@adacore.com>
10642
10643         * g-comlin.adb (Display_Help): swap the order in which it prints the
10644         short help and the general usage.
10645
10646 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10647
10648         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
10649         the aspect declarations and attach them to the generic copy for
10650         subsequent analysis.
10651         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
10652         declarations of the generic tree to the new subprogram declarations.
10653         * sem_attr.adb (Check_Precondition_Postcondition): recognize
10654         conditions that apply to a subprogram instance.
10655
10656 2011-08-02  Robert Dewar  <dewar@adacore.com>
10657
10658         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
10659
10660 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10661
10662         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
10663         private type with a tagged full view is not derived in the immediate
10664         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
10665
10666 2011-08-02  Robert Dewar  <dewar@adacore.com>
10667
10668         * exp_ch4.adb: Minor reformatting.
10669
10670 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10671
10672         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
10673         Ada2012 iterator, the loop will be rewritten during expansion into a
10674         while loop with a cursor and an element declaration. Do not analyze the
10675         body in this case, because if the container is for indefinite types the
10676         actual subtype of the elements will only be determined when the cursor
10677         declaration is analyzed.
10678
10679 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10680
10681         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
10682         size/alignment related attributes in CodePeer_Mode.
10683
10684 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10685
10686         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
10687         Prepend_Element, since this can result in the operation getting the
10688         wrong slot in the full type's dispatch table if the full type has
10689         inherited operations. The incomplete type's operation will get added
10690         to the proper position in the full type's primitives
10691         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
10692         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
10693         dispatching operations, since there are cases where nonprimitive
10694         subprograms can get added to the list of incomplete dependents (such
10695         as subprograms in nested packages).
10696         * sem_ch6.adb (Process_Formals): First, remove test for being in a
10697         private part when determining whether to add a primitive with a
10698         parameter of a tagged incomplete type to the Private_Dependents list.
10699         Such primitives can also occur in the visible part, and should not have
10700         been excluded from being private dependents.
10701         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
10702         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
10703         list of a Taft-amendment incomplete type is a primitive before issuing
10704         an error that the full type must appear in the same unit. There are
10705         cases where nonprimitives can be in the list (such as subprograms in
10706         nested packages).
10707         * sem_disp.adb (Derives_From): Use correct condition for checking that
10708         a formal's type is derived from the type of the corresponding formal in
10709         the parent subprogram (the condition was completely wrong). Add
10710         checking that was missing for controlling result types being derived
10711         from the result type of the parent operation.
10712
10713 2011-08-02  Yannick Moy  <moy@adacore.com>
10714
10715         * errout.adb (First_Node): minor renaming
10716         * restrict.adb (Check_Formal_Restriction): put restriction warning on
10717         first node.
10718
10719 2011-08-02  Yannick Moy  <moy@adacore.com>
10720
10721         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
10722         before accessing operands.
10723         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
10724         decide whether an initialization expression respects SPARK rules, as
10725         the plain node is the expanded one. This allows for more valid warnings
10726         to be issued.
10727         * gnat_rm.texi: Minor update.
10728
10729 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10730
10731         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
10732         previous change.
10733
10734 2011-08-02  Robert Dewar  <dewar@adacore.com>
10735
10736         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
10737
10738 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10739
10740         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
10741         loop statements and the element renaming declaration with a block when
10742         the element type is controlled.
10743
10744 2011-08-02  Yannick Moy  <moy@adacore.com>
10745
10746         * sinfo.ads: Minor formatting.
10747
10748 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10749
10750         * sem_aggr.adb (Add_Association): if the association has a box and no
10751         expression, use the Sloc of the aggregate itself for the new
10752         association.
10753         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
10754         the Original_Node.
10755
10756 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10757
10758         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
10759         When a container is provided via a function call, generate a renaming
10760         of the function result. This avoids the creation of a transient scope
10761         and the premature finalization of the container.
10762         * exp_ch7.adb (Is_Container_Cursor): Removed.
10763         (Wrap_Transient_Declaration): Remove the supression of the finalization
10764         of the list controller when the declaration denotes a container cursor,
10765         it is not needed.
10766
10767 2011-08-02  Yannick Moy  <moy@adacore.com>
10768
10769         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
10770         node is from source, instead of the original node being from source.
10771         * sem_aggr.adb
10772         (Resolve_Array_Aggregate): refine the check for a static expression, to
10773         recognize also static ranges
10774         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
10775         Array_Type_Declaration): postpone the test for the type being a subtype
10776         mark after the type has been resolved, so that component-selection and
10777         expanded-name are discriminated.
10778         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
10779         to distinguish the case of an iteration scheme, so that an error is
10780         issed on a non-static range in SPARK except in an iteration scheme.
10781         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
10782         In_Iter_Schm = True.
10783         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
10784         user-defined operators so that they are allowed in renaming
10785         * sem_ch8.adb
10786         (Find_Selected_Component): refine the check for prefixing of operators
10787         so that they are allowed in renaming. Move the checks for restrictions
10788         on selector name after analysis discriminated between
10789         component-selection and expanded-name.
10790         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
10791         concatenation argument of string type if it is static.
10792         * sem_util.adb, sem_util.ads
10793         (Check_Later_Vs_Basic_Declarations): add a new function
10794         Is_Later_Declarative_Item to decice which declarations are allowed as
10795         later items, in the two different modes Ada 83 and SPARK. In the SPARK
10796         mode, add that renamings are considered as later items.
10797         (Enclosing_Package): new function to return the enclosing package
10798         (Enter_Name): correct the rule for homonyms in SPARK
10799         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
10800         from source (result of expansion) to avoid issuing wrong warnings.
10801
10802 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10803
10804         * errout.adb: On anything but an expression First_Node returns its
10805         argument.
10806
10807 2011-08-02  Pascal Obry  <obry@adacore.com>
10808
10809         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
10810
10811 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
10812
10813         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
10814         Set the associated loop as the related expression of internally
10815         generated cursors.
10816         * exp_ch7.adb (Is_Container_Cursor): New routine.
10817         (Wrap_Transient_Declaration): Supress the finalization of the list
10818         controller when the declaration denotes a container cursor.
10819
10820 2011-08-02  Yannick Moy  <moy@adacore.com>
10821
10822         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
10823         command line now.
10824         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
10825         expression is a simple expression. This check cannot be performed in
10826         the semantics, so just drop it.
10827         (P_Index_Or_Discriminant_Constraint): move check that the index or
10828         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
10829         semantics. Other cases were previously checked in the semantics.
10830         * par-ch4.adb (P_Name): move checks that a selector name is not
10831         character literal or an operator symbol to Find_Selected_Component in
10832         the semantics
10833         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
10834         declarations are not placed after later declarations in a separate
10835         procedure in Sem_Util (possibly not the best choice?), to be used both
10836         during parsing, for Ada 83 mode, and during semantic analysis, for
10837         SPARK mode.
10838         * par-endh.adb (Check_End): move check that end label is not missing
10839         to Process_End_Label in the semantics
10840         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
10841         the special case for SPARK restriction
10842         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
10843         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
10844         parameter Force to issue the error message even on internal node (used
10845         for generated end label). Call Check_Restriction to check when an error
10846         must be issued. In SPARK mode, issue an error message even if the
10847         restriction is not set.
10848         (Check_Restriction): new procedure with an additional out parameter to
10849         inform the caller that a message has been issued
10850         * sem_aggr.adb: Minor modification of message
10851         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
10852         instead of issuing an error message directly
10853         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
10854         declarations are not placed after later declarations, by calling
10855         Check_Later_Vs_Basic_Declarations
10856         (Analyze_Subtype_Declaration): move here the check that an index or
10857         discriminant constraint must be a subtype mark. Change the check that
10858         a subtype of String must start at one so that it works on subtype marks.
10859         * sem_ch4.adb (Analyze_Call): move here the check that a named
10860         association cannot follow a positional one in a call
10861         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
10862         instead of issuing an error message directly
10863         * sem_ch8.adb (Find_Selected_Component): move here the check that a
10864         selector name is not a character literal or an operator symbol. Move
10865         here the check that the prefix of an expanded name cannot be a
10866         subprogram or a loop statement.
10867         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
10868         procedure called from parsing and semantics to check that basic
10869         declarations are not placed after later declarations
10870         (Process_End_Label): move here the check that end label is not missing
10871
10872 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
10873
10874         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
10875         representation clause in codepeer mode, since it confuses CodePeer and
10876         does not bring useful info.
10877
10878 2011-08-02  Ed Falis  <falis@adacore.com>
10879
10880         * init.c: initialize fp hw on MILS.
10881
10882 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10883
10884         * errout.adb (First_Node): for bodies, return the node itself (small
10885         optimization). For other nodes, do not check source_unit if the node
10886         comes from Standard.
10887
10888 2011-08-02  Robert Dewar  <dewar@adacore.com>
10889
10890         * exp_ch3.adb: Minor comment additions.
10891         * sem_ch13.adb: Minor reformatting.
10892
10893 2011-08-02  Pascal Obry  <obry@adacore.com>
10894
10895         * make.adb, makeutl.adb: Removes some superfluous directory separator.
10896
10897 2011-08-02  Robert Dewar  <dewar@adacore.com>
10898
10899         * sem_attr.adb: Minor reformatting.
10900
10901 2011-08-02  Robert Dewar  <dewar@adacore.com>
10902
10903         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10904         (Has_Default_Component_Value): Removed
10905         * einfo.ads Comment updates
10906         (Has_Default_Aspect): Replaces Has_Default_Value
10907         (Has_Default_Component_Value): Removed
10908         * exp_ch13.adb
10909         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10910         * exp_ch3.adb
10911         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10912         (Get_Simple_Init_Val): Handle Default_Value aspect
10913         (Needs_Simple_Initialization): Handle Default_Value aspect
10914         * exp_ch3.ads: Needs_Simple_Initialization
10915         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10916         * par-prag.adb (Pragma_Default[_Component]Value) Removed
10917         * sem_ch13.adb
10918         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10919         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10920         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10921
10922 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10923
10924         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10925         package containing iteration primitives.
10926         exp_ch5.adb (Expand_Iterator_Loop): ditto.
10927
10928 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10929
10930         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10931         "of", pre-analyze expression in case it is a function call with
10932         finalization actions that must be placed ahead of the loop.
10933         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10934         on an Ada2012 iterator, insert them ahead of the rewritten loop.
10935
10936 2011-08-02  Geert Bosch  <bosch@adacore.com>
10937
10938         * cstand.adb (Create_Float_Types): Only consider C's long double for
10939         Long_Long_Float, in addition to double.
10940
10941 2011-08-02  Robert Dewar  <dewar@adacore.com>
10942
10943         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10944         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10945         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10946         Minor reformatting.
10947
10948 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
10949
10950         * sem_attr.adb: handle properly 'Result when it is a prefix of an
10951         indexed component.
10952
10953 2011-08-02  Javier Miranda  <miranda@adacore.com>
10954
10955         * einfo.ads, einfo.adb
10956         (Original_Access_Type): Move this attribute to Node26 since there was
10957         an undocumented use of Node21 in E_Access_Subprogram_Type entities
10958         which causes conflicts and breaks the generation of the .NET compiler.
10959         (Interface_Name): Add missing documentation on JGNAT only uses of
10960         this attribute.
10961
10962 2011-08-02  Geert Bosch  <bosch@adacore.com>
10963
10964         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10965         (Find_Back_End_Float_Type): Likewise
10966         (Create_Back_End_Float_Types): Likewise
10967         (Create_Float_Types): Likewise
10968         (Register_Float_Type): Likewise
10969         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10970         Nlist and split out type selection in new local Find_Base_Type function.
10971         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10972         Nlist
10973         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10974
10975 2011-08-02  Robert Dewar  <dewar@adacore.com>
10976
10977         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10978         alpha order).
10979         * opt.ads: Minor comment change.
10980         * sem_ch12.adb: Minor code reorganization.
10981
10982 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
10983
10984         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10985         subtype's list of rep items to the list on the full subtype in the case
10986         where the lists are the same.
10987
10988 2011-08-02  Geert Bosch  <bosch@adacore.com>
10989
10990         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10991         using the one from System.Strings, which also deallocates all strings.
10992
10993 2011-08-02  Geert Bosch  <bosch@adacore.com>
10994
10995         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10996         function.
10997         * gcc-interface/Make-lang.in: Update dependencies.
10998
10999 2011-08-02  Olivier Hainque  <hainque@adacore.com>
11000
11001         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11002         end_locus.
11003
11004 2011-08-02  Javier Miranda  <miranda@adacore.com>
11005
11006         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11007         associated with anonymous access to subprograms.
11008
11009 2011-08-02  Geert Bosch  <bosch@adacore.com>
11010
11011         * opt.ads
11012         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11013         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11014         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11015         (Add_Symbol_Definition): Move to switch-c.adb
11016         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11017         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11018         (Add_Symbol_Definition): Move to switch-c.adb.
11019         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11020         * sem_warn.adb
11021         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11022         Move to warnsw.adb.
11023         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11024         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11025         Move to warnsw.adb.
11026         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11027         (Add_Symbol_Definition): Moved from Prepcomp.
11028         * switch-c.ads: Update copyright notice. Use String_List instead of
11029         Argument_List, removing dependency on System.OS_Lib.
11030
11031 2011-08-02  Yannick Moy  <moy@adacore.com>
11032
11033         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11034         mode on initialization expression which does not respect SPARK
11035         restrictions.
11036         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11037         if the tree referenced by its argument represents an initialization
11038         expression in SPARK, suitable for initializing an object in an object
11039         declaration.
11040
11041 2011-08-02  Javier Miranda  <miranda@adacore.com>
11042
11043         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11044         internally generated access to subprogram with its associated protected
11045         subprogram type.
11046         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11047
11048 2011-08-02  Geert Bosch  <bosch@adacore.com>
11049
11050         * cstand.adb (Register_Float_Type): Print information about type to
11051         register, if the Debug_Flag_Dot_B is set.
11052         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11053         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11054         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11055         with a requested precision of more than Max_Digits digits and no more
11056         than Max_Base_Digits digits, if a range specification is present and the
11057         Predefined_Float_Types list has a suitable type to derive from.
11058         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11059         case of type completion with pragma Import
11060         * sem_prag.adb
11061         (Process_Import_Predefined_Type): Processing to complete a type
11062         with pragma Import. Currently supports floating point types only.
11063         (Set_Convention_From_Pragma): Do nothing without underlying type.
11064         (Process_Convention): Guard against absence of underlying type,
11065         which may happen when importing incomplete types.
11066         (Process_Import_Or_Interface): Handle case of importing predefined
11067         types. Tweak error message.
11068
11069 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11070
11071         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11072         functions to previous change.  Reorganize code slightly.
11073
11074 2011-08-02  Geert Bosch  <bosch@adacore.com>
11075
11076         * back_end.ads (Register_Type_Proc): New call back procedure type for
11077         allowing the back end to provide information about available types.
11078         (Register_Back_End_Types): New procedure to register back end types.
11079         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11080         available types.
11081         * cstand.adb (Back_End_Float_Types): New list for floating point types
11082         supported by the back end.
11083         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11084         (Copy_Float_Type): New procedure to make new copies of predefined types.
11085         (Register_Float_Type): New call back procedure to populate the BEFT list
11086         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11087         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11088         (Create_Float_Types): New procedure to create entities for floating
11089         point types predefined in Standard, and put these and any remaining
11090         BEFTs on the Predefined_Float_Types list.
11091         * stand.ads (Predefined_Float_Types): New list for predefined floating
11092         point types that do not have declarations in package Standard.
11093
11094 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11095
11096         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
11097         entity node for the unit containing the parameter.
11098         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11099         (Add_Inlined_Subprogram): Likewise.
11100         * gcc-interface/Make-lang.in: Update dependencies.
11101
11102 2011-08-02  Thomas Quinot  <quinot@adacore.com>
11103
11104         * s-stusta.adb (Print): Make sure Pos is always initialized to a
11105         suitable value.
11106
11107 2011-08-02  Geert Bosch  <bosch@adacore.com>
11108
11109         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11110
11111 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11112
11113         * sem_type.adb (Covers): Move trivial case to the top and reuse the
11114         computed value of Base_Type.
11115
11116 2011-08-02  Yannick Moy  <moy@adacore.com>
11117
11118         * restrict.adb (Check_Restriction): issue an error for any use of
11119         class-wide, even if the No_Dispatch restriction is not set.
11120         * sem_aggr.adb: Correct typos in comments and messages in formal mode
11121         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11122         when completing a private extension, the type named in the private part
11123         is not the same as that named in the visible part.
11124         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11125         of an inherited primitive operations of a tagged type or type extension
11126         that returns the tagged type.
11127         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11128         function which returns True for an implicit operation inherited by the
11129         derived type declaration for the argument type.
11130         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11131         order.
11132
11133 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11134
11135         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11136         Process_Bounds, to perform analysis with expansion of a range or an
11137         expression that is the iteration scheme for a loop.
11138         (Analyze_Iterator_Specification): If domain of iteration is given by a
11139         function call with a controlled result, as is the case if call returns
11140         a predefined container, ensure that finalization actions are properly
11141         generated.
11142         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11143
11144 2011-08-02  Javier Miranda  <miranda@adacore.com>
11145
11146         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11147         * gcc-interface/Make-lang.in: Update dependencies.
11148
11149 2011-08-02  Javier Miranda  <miranda@adacore.com>
11150
11151         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11152         determine if the analysis is performed using N or Original_Node (N).
11153         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11154         functionality of routine Is_Variable avoids code duplication.
11155         * checks.adb (Determine_Range): Handle temporaries generated by
11156         Remove_Side_Effects.
11157
11158 2011-08-02  Javier Miranda  <miranda@adacore.com>
11159
11160         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11161         expansion of the condition. Required since the previous analysis was
11162         done with expansion disabled (see Resolve_Quantified_Expression) and
11163         hence checks were not inserted and record comparisons have not been
11164         expanded.
11165
11166 2011-08-02  Ed Falis  <falis@adacore.com>
11167
11168         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11169         Update header.
11170
11171 2011-08-02  Bob Duff  <duff@adacore.com>
11172
11173         * opt.ads: Minor comment fix.
11174
11175 2011-08-02  Bob Duff  <duff@adacore.com>
11176
11177         * sem_ch12.adb (Analyze_Package_Instantiation,
11178         Analyze_Subprogram_Instantiation): Turn off style checking while
11179         analyzing an instance. Whatever style checks that apply to the generic
11180         unit should apply, so it makes no sense to apply them in an instance.
11181         This was causing trouble when compiling an instance of a runtime
11182         unit that violates the -gnatyO switch.
11183         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11184         one of the two case statements, causing spurious errors.
11185
11186 2011-08-02  Robert Dewar  <dewar@adacore.com>
11187
11188         * uname.adb: Minor reformatting.
11189         * gnatcmd.adb: Minor reformatting.
11190         * exp_attr.adb: Minor reformatting.
11191
11192 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11193
11194         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11195         No_Dispatching_Calls, do not look for the Assign primitive, because
11196         predefined primitives are not created in this case.
11197
11198 2011-08-02  Bob Duff  <duff@adacore.com>
11199
11200         * stylesw.ads: Minor comment fixes.
11201
11202 2011-08-02  Robert Dewar  <dewar@adacore.com>
11203
11204         * freeze.adb (Add_To_Result): New procedure.
11205
11206 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11207
11208         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11209         time, if the specific run-time routines for handling streams of strings
11210         are not available, use the default mechanism.
11211
11212 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11213
11214         * s-regpat.ads: Fix typo.
11215
11216 2011-08-02  Vincent Celier  <celier@adacore.com>
11217
11218         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11219         not null, call it to create the in memory config project file without
11220         parsing an existing default config project file.
11221
11222 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11223
11224         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11225
11226 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11227
11228         * sem_elim.adb: an abstract subprogram does not need an eliminate
11229         pragma for its descendant to be eliminable.
11230
11231 2011-08-02  Ed Falis  <falis@adacore.com>
11232
11233         * init.c: revert to handling before previous checkin for VxWorks
11234         * s-intman-vxworks.adb: delete unnecessary declarations related to
11235         using Ada interrupt facilities for handling signals.
11236         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11237         * s-intman-vxworks.ads: Import __gnat_install_handler as
11238         Initialize_Interrupts.
11239         * s-taprop-vxworks.adb: Delete Signal_Mask.
11240         (Abort_Handler): change construction of mask to unblock exception
11241         signals.
11242
11243 2011-08-02  Jerome Guitton  <guitton@adacore.com>
11244
11245         * a-except-2005.adb (Raise_From_Signal_Handler): Call
11246         Debug_Raise_Exception before propagation starts.
11247
11248 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11249
11250         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11251         to Restriction_Check_Required.
11252         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11253         * sem_res.adb (Resolve_Call): Likewise.
11254         * sem_attr.adb (Check_Stream_Attribute): Likewise.
11255
11256 2011-08-02  Bob Duff  <duff@adacore.com>
11257
11258         * stylesw.ads: Update comment.
11259         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11260         * errout.ads: Remove obsolete comment.
11261
11262 2011-08-02  Javier Miranda  <miranda@adacore.com>
11263
11264         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11265         (Set_Is_Safe_To_Reevaluate): new procedure.
11266         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11267         assignment is allowed on safe-to-reevaluate variables.
11268         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11269         temporary created to remove side effects in expressions that use
11270         the secondary stack as safe-to-reevaluate.
11271         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11272         variables that are not true constants.
11273
11274 2011-08-02  Robert Dewar  <dewar@adacore.com>
11275
11276         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11277         sem_res.adb, sem_ch6.adb: Minor reformatting.
11278
11279 2011-08-02  Jerome Guitton  <guitton@adacore.com>
11280
11281         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11282
11283 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11284
11285         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11286         not set Overridden_Operation if subprogram is an initialization
11287         procedure.
11288
11289 2011-08-02  Yannick Moy  <moy@adacore.com>
11290
11291         * par-ch6.adb: Correct obsolete name in comments
11292         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11293         which takes two message arguments (existing function takes one), with
11294         second message used for continuation.
11295         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11296         block statements that originate from a source block statement, not
11297         generated block statements
11298         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11299         symmetry with procedure case
11300         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11301         function to issue an error in formal mode if a package specification
11302         contains more than one tagged type or type extension.
11303         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11304         parameters matching formals of tagged types are objects (or ancestor
11305         type conversions of objects), not general expressions. Issue an error
11306         on view conversions that are not involving ancestor conversion of an
11307         extended type.
11308         (Resolve_Type_Conversion): in formal mode, issue an error on the
11309         operand of an ancestor type conversion which is not an object
11310         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11311         procedure so that it works also for actuals of function calls
11312         (Is_Actual_Tagged_Parameter): new function which determines if its
11313         argument is an actual parameter of a formal of tagged type in a
11314         subprogram call
11315         (Is_SPARK_Object_Reference): new function which determines if the tree
11316         referenced by its argument represents an object in SPARK
11317
11318 2011-08-02  Robert Dewar  <dewar@adacore.com>
11319
11320         * sem_ch3.adb: Minor reformatting
11321         Minor comment addition
11322         Minor error msg text change
11323
11324 2011-08-02  Javier Miranda  <miranda@adacore.com>
11325
11326         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11327         function. Used to be more precise when we generate a variable plus one
11328         assignment to remove side effects in the evaluation of the Bound
11329         expressions.
11330         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11331         of the bound expression to force its re-analysis and thus expand the
11332         associated transient scope (if required). Code cleanup replacing the
11333         previous code that declared the constant entity by an invocation to
11334         routine Force_Evaluation which centralizes this work in the frontend.
11335
11336 2011-08-02  Robert Dewar  <dewar@adacore.com>
11337
11338         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11339         (Base_Type): Now uses improved Is_Base_Type function
11340         * einfo.ads (Base_Type): Inline this function
11341
11342 2011-08-02  Robert Dewar  <dewar@adacore.com>
11343
11344         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11345         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11346
11347 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11348
11349         * gcc-interface/Make-lang.in: Update dependencies.
11350         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11351         targets.
11352
11353 2011-08-02  Yannick Moy  <moy@adacore.com>
11354
11355         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11356         non-simple expression used in delta constraint
11357         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11358         index constraint which is not a subtype mark
11359         * par.adb: With and use Restrict
11360         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11361         mode on component type which is not a subtype mark and default
11362         expression on component
11363         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11364         of string which does not have a lower index bound equal to 1
11365         (Array_Type_Declaration): issue an error in formal mode on index or
11366         component type which is not a subtype mark, and on aliased keyword on
11367         component
11368         (Derived_Type_Declaration): issue an error in formal mode on interface,
11369         limited or abstract type
11370         (Record_Type_Declaration): issue an error in formal mode on interface
11371         (Record_Type_Definition): issue an error in formal mode on tagged types
11372         and type extensions not declared in the specification of a library unit
11373         package; on null non-tagged record; on variant part
11374
11375 2011-08-02  Vincent Celier  <celier@adacore.com>
11376
11377         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11378         not declared for qualified library project when Library_Name is not
11379         declared, but Library_Dir is.
11380
11381 2011-08-02  Robert Dewar  <dewar@adacore.com>
11382
11383         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11384         pragmas (affects aspects [Component_]Default_Value
11385         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11386         component type for the resolution
11387
11388 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11389
11390         * einfo.adb (Base_Type): Tune implementation for speed.
11391
11392 2011-08-02  Robert Dewar  <dewar@adacore.com>
11393
11394         * freeze.adb: Minor reformatting.
11395
11396 2011-08-02  Thomas Quinot  <quinot@adacore.com>
11397
11398         * scos.ads: Update comments.
11399
11400 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11401
11402         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11403         base type, because the parent may be a subtype of a private type whose
11404         convention is established in a private part.
11405
11406 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
11407
11408         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11409         statement in a block when the expansion of the return expression has
11410         created a finalization chain.
11411         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11412         with the parent node.
11413         Add N_Extended_Return_Statement to handle the case where a transient
11414         object declaration appears in the Return_Object_Declarations list of
11415         an extended return statement.
11416
11417 2011-08-02  Matthew Gingell  <gingell@adacore.com>
11418
11419         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
11420         unused parameter 'name'.
11421
11422 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11423
11424         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
11425         inherited operation, check whether its alias, which is the source
11426         operastion that it renames, has been marked eliminated.
11427
11428 2011-08-02  Javier Miranda  <miranda@adacore.com>
11429
11430         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
11431         in-mode parameter whose type is an access type since it can be used to
11432         modify its designated object. Enforce code that handles as safe an
11433         access type that is not access-to-constant but it is the result of a
11434         previous removal of side-effects.
11435         (Remove_Side_Effects): Minor code reorganization of cases which require
11436         no action. Done to incorporate documentation on new cases uncovered
11437         working in this ticket: no action needed if this routine was invoked
11438         too early and the nodes are not yet decorated.
11439         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
11440         to routine Remove_Side_Effects by calls to Force_Evaluation since they
11441         were issued with actuals that are implicitly provided by
11442         Force_Evaluation.
11443
11444 2011-08-02  Robert Dewar  <dewar@adacore.com>
11445
11446         * sem_ch3.adb, sem_res.adb: Minor reformatting.
11447
11448 2011-08-02  Yannick Moy  <moy@adacore.com>
11449
11450         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
11451         to issue an error in formal mode on attribute not supported in this mode
11452         (Analyze_Attribute): issue errors on standard attributes not supported
11453         in formal mode.
11454         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
11455         comment, and issue error in formal mode on modulus which is not a power
11456         of 2.
11457         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
11458         range.
11459         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
11460         subtype mark.
11461         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
11462         operator on modular type (except 'not').
11463
11464 2011-08-02  Robert Dewar  <dewar@adacore.com>
11465
11466         * gnat_rm.texi: Minor reformatting.
11467
11468 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
11469
11470         * s-osinte-linux.ads: Minor comment update and reformatting.
11471         * i-cexten.ads: Make this unit pure, as for its parent.
11472         Will allow its usage in more contexts if needed.
11473
11474 2011-08-02  Robert Dewar  <dewar@adacore.com>
11475
11476         * s-utf_32.ads: Minor comment fix.
11477
11478 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11479
11480         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
11481         operation of a tagged synchronized type, handle the case where the
11482         controlling argument is overloaded.
11483
11484 2011-08-02  Yannick Moy  <moy@adacore.com>
11485
11486         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
11487         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
11488         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
11489         SPARK mode and formal verification mode on processing SPARK restriction
11490         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
11491         requiring consistency checking.
11492
11493 2011-08-02  Robert Dewar  <dewar@adacore.com>
11494
11495         * sem_res.adb: Minor reformatting.
11496
11497 2011-08-02  Robert Dewar  <dewar@adacore.com>
11498
11499         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11500         a-cforse.ads: Remove unneeded with of Ada.Containers
11501         Remove commented out pragma Inline's
11502         Move specifications of new subprograms to the actual specs
11503
11504 2011-08-02  Yannick Moy  <moy@adacore.com>
11505
11506         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11507         a-cforse.ads: Update comments.
11508
11509 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11510
11511         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
11512
11513 2011-08-02  Robert Dewar  <dewar@adacore.com>
11514
11515         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11516         a-cforse.ads, a-cofove.ads: Minor reformatting.
11517
11518 2011-08-02  Claire Dross  <dross@adacore.com>
11519
11520         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11521         a-cofove.ads: Add comments.
11522
11523 2011-08-02  Yannick Moy  <moy@adacore.com>
11524
11525         * gnat_rm.texi: Document formal containers.
11526
11527 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11528
11529         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
11530         are empty sections.
11531
11532 2011-08-02  Robert Dewar  <dewar@adacore.com>
11533
11534         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
11535         reformatting.
11536
11537 2011-08-02  Robert Dewar  <dewar@adacore.com>
11538
11539         * aspects.adb: New aspects Default_Value and Default_Component_Value
11540         New format of Aspect_Names table checks for omitted entries
11541         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
11542         handling of boolean aspects for derived types.
11543         New aspects Default_Value and Default_Component_Value
11544         New format of Aspect_Names table checks for omitted entries
11545         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
11546         (Has_Default_Value): New flag
11547         (Has_Default_Component_Value): New flag
11548         (Has_Default_Value): New flag
11549         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
11550         table.
11551         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
11552         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
11553         Default_Value and Default_Component_Value
11554         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
11555         New aspects Default_Value and Default_Component_Value
11556         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
11557         * sprint.adb: Print N_Aspect_Specification node when called from gdb
11558
11559 2011-08-02  Vincent Celier  <celier@adacore.com>
11560
11561         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
11562         inherit library kind.
11563
11564 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11565
11566         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
11567         Minor reformatting.
11568
11569 2011-08-02  Robert Dewar  <dewar@adacore.com>
11570
11571         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
11572
11573 2011-08-02  Yannick Moy  <moy@adacore.com>
11574
11575         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
11576
11577 2011-08-02  Robert Dewar  <dewar@adacore.com>
11578
11579         * impunit.adb: Add comment.
11580
11581 2011-08-02  Yannick Moy  <moy@adacore.com>
11582
11583         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
11584         qualification of aggregates in formal mode
11585         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
11586         another aggregate
11587         (Resolve_Aggregate): complete the test that an aggregate is adequately
11588         qualified in formal mode
11589
11590 2011-08-02  Pascal Obry  <obry@adacore.com>
11591
11592         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
11593         * mlib-prj.adb: Supress warning when compiling binder generated file.
11594         (Build_Library): Supress all warnings when compiling the binder
11595         generated file.
11596
11597 2011-08-02  Yannick Moy  <moy@adacore.com>
11598
11599         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
11600         from here...
11601         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
11602         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
11603         Add with/use clauses to make Check_Formal_Restriction visible
11604
11605 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11606
11607         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
11608         in-parameters when type of the generic formal is private in the generic
11609         spec and non-private in the body.
11610
11611 2011-08-02  Claire Dross  <dross@adacore.com>
11612
11613         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
11614         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
11615         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
11616         * impunit.adb, Makefile.rtl: Take new files into account.
11617
11618 2011-08-02  Robert Dewar  <dewar@adacore.com>
11619
11620         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
11621         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11622
11623 2011-08-02  Yannick Moy  <moy@adacore.com>
11624
11625         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
11626         formal mode
11627         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
11628         matching static array bounds, taking into account the special case of
11629         string literals
11630         * sem_ch3.adb: Typo in comment.
11631
11632 2011-08-02  Yannick Moy  <moy@adacore.com>
11633
11634         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
11635         which issues an error in formal mode if its argument node is originally
11636         from source
11637         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
11638         has a discriminant specification so that it does not include the case
11639         of derived types
11640         (Derived_Type_Declaration): move here the test that a derived type has a
11641         discriminant specification
11642         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
11643         first element of a component association before accessing its choices
11644         (presence of component association is not enough)
11645         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
11646         declaration is a library item before accessing the next element in a
11647         list, as library items are not member of lists
11648         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
11649         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
11650         Check_Formal_Restriction whenever possible.
11651
11652 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11653
11654         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
11655         reference when needed.
11656
11657 2011-08-02  Bob Duff  <duff@adacore.com>
11658
11659         * gnat_ugn.texi: Fix typo.
11660
11661 2011-08-02  Vincent Celier  <celier@adacore.com>
11662
11663         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
11664         archive file name. Do not use the full path name of archives for Open
11665         VMS.
11666
11667 2011-08-02  Robert Dewar  <dewar@adacore.com>
11668
11669         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
11670         Analyze_Aspect_Specifications
11671         * sem_ch13.adb
11672         (Analyze_Aspect_Specifications): New handling for boolean aspects
11673         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
11674         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
11675         sequence for Analyze_Aspect_Specifications
11676         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
11677         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
11678
11679 2011-08-02  Robert Dewar  <dewar@adacore.com>
11680
11681         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
11682         aspects, since these no longer exist.
11683
11684 2011-08-02  Robert Dewar  <dewar@adacore.com>
11685
11686         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
11687         semicolon, do not try to see if there are aspects following it.
11688         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
11689         aspect spec.
11690
11691 2011-08-02  Robert Dewar  <dewar@adacore.com>
11692
11693         * sem_ch8.adb, aspects.ads: Minor reformatting.
11694
11695 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
11696
11697         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
11698         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
11699         extracted from...
11700         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
11701
11702 2011-08-02  Yannick Moy  <moy@adacore.com>
11703
11704         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
11705         mode on subprogram declaration outside of package specification, unless
11706         it is followed by a pragma Import
11707         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
11708         Access_Type_Declaration): issue error in formal mode on access type
11709         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
11710         incomplete type
11711         (Analyze_Object_Declaration): issue error in formal mode on object
11712         declaration which does not respect SPARK restrictions
11713         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
11714         declaration which does not respect SPARK restrictions
11715         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
11716         error in formal mode on digits or delta constraint
11717         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
11718         decimal fixed point type
11719         (Derived_Type_Declaration): issue error in formal mode on derived type
11720         other than type extensions of tagged record types
11721         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
11722         with check on access definition
11723         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
11724         mode on protected definition.
11725         (Analyze_Task_Definition): issue error in formal mode on task definition
11726
11727 2011-08-02  Robert Dewar  <dewar@adacore.com>
11728
11729         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
11730
11731 2011-08-02  Javier Miranda  <miranda@adacore.com>
11732
11733         * sem_ch6.adb (Can_Override_Operator): New function.
11734         (Verify_Overriding_Indicator): Add missing code to check overriding
11735         indicator in operators. Fixes regression.
11736         (Check_Overriding_Indicator): Minor reformating after replacing the
11737         code that evaluates if the subprogram can override an operator by
11738         invocations to the above new function.
11739         * einfo.adb
11740         (Write_Field26_Name): Add missing code to ensure that, following
11741         the documentation in einfo.ads, this field is not shown as attribute
11742         "Static_Initialization" on non-dispatching functions.
11743
11744 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11745
11746         * sem_res.adb (Resolve_Call): A call to
11747         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
11748         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
11749         i.e., when the second parameter is of type Time_Span.
11750
11751 2011-08-02  Vincent Celier  <celier@adacore.com>
11752
11753         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
11754         with an archive instead of -L<library dir> -l<library name>.
11755
11756 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11757
11758         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
11759         mark the base types In_Use in addition to making the operations
11760         use_visible.
11761
11762 2011-08-02  Ed Falis  <falis@adacore.com>
11763
11764         * init.c: add and setup __gnat_signal_mask for the exception signals
11765         * s-inmaop-vxworks.adb: new file.
11766         * s-intman-vxworks.adb: remove unnecessary initializations and
11767         simplify remaining
11768         * s-intman-vxworks.ads: remove unnecessary variable
11769         * s-taprop-vxworks.adb: simplify signal initialization
11770
11771 2011-08-02  Robert Dewar  <dewar@adacore.com>
11772
11773         * sem_ch8.adb: Minor code reorganization, comment updates.
11774
11775 2011-08-02  Robert Dewar  <dewar@adacore.com>
11776
11777         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
11778         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
11779         here from Sem_Res.
11780         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
11781         (Matching_Static_Array_Bounds): Moved here from Sem_Res
11782
11783 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11784
11785         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
11786         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
11787         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
11788         use_type_clauses, to handle more efficiently use_type and use_all_type
11789         constructs.
11790         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
11791         Ada2012 Use_All_Type clause.
11792         (Use_Class_Wide_Operations): new procedure.
11793
11794 2011-08-02  Robert Dewar  <dewar@adacore.com>
11795
11796         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
11797         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
11798         expression to expression function.
11799
11800 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11801
11802         * sem_ch4.adb: transform simple Ada2012 membership into equality only
11803         if types are compatible.
11804
11805 2011-08-02  Yannick Moy  <moy@adacore.com>
11806
11807         * sem_res.adb (Matching_Static_Array_Bounds): new function which
11808         returns True if its argument array types have same dimension and same
11809         static bounds at each index.
11810         (Resolve_Actuals): issue an error in formal mode on actuals passed as
11811         OUT or IN OUT paramaters which are not view conversions in SPARK.
11812         (Resolve_Arithmetic_Op): issue an error in formal mode on
11813         multiplication or division with operands of fixed point types which are
11814         not qualified or explicitly converted.
11815         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
11816         Boolean or array type (except String) operands.
11817         (Resolve_Equality_Op): issue an error in formal mode on equality
11818         operators for array types other than String with non-matching static
11819         bounds.
11820         (Resolve_Logical_Op): issue an error in formal mode on logical operators
11821         for array types with non-matching static bounds. Factorize the code in
11822         Matching_Static_Array_Bounds.
11823         (Resolve_Qualified_Expression): issue an error in formal mode on
11824         qualified expressions for array types with non-matching static bounds.
11825         (Resolve_Type_Conversion): issue an error in formal mode on type
11826         conversion for array types with non-matching static bounds
11827
11828 2011-08-02  Robert Dewar  <dewar@adacore.com>
11829
11830         * par-ch10.adb: Minor code reorganization (use Nkind_In).
11831
11832 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11833
11834         * par-ch9.adb: save location of entry for proper error message.
11835
11836 2011-08-02  Javier Miranda  <miranda@adacore.com>
11837
11838         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
11839         (Use_Full_View) which permits this routine to climb through the
11840         ancestors using the full-view of private parents.
11841         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
11842         Use_Full_View to true in calls to Is_Ancestor.
11843         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
11844         true in call to Is_Ancestor.
11845         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
11846         Use_Full_View to true in call to Is_Ancestor.
11847         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
11848         call to Is_Ancestor.
11849         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
11850         Use_Full_View to true in calls to Is_Ancestor.
11851         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
11852         Make_Select_Specific_Data_Table, Register_Primitive,
11853         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
11854         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
11855         to true in call to Is_Ancestor.
11856         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
11857         Use_Full_View to true in calls to Is_Ancestor.
11858         * exp_cg.adb
11859         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
11860         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
11861
11862 2011-08-02  Robert Dewar  <dewar@adacore.com>
11863
11864         * gnat_rm.texi: Minor reformatting.
11865         * sem_prag.adb: Minor reformatting.
11866
11867 2011-08-02  Tristan Gingold  <gingold@adacore.com>
11868
11869         * vms_data.ads: Add VMS qualifier for -gnateP.
11870
11871 2011-08-02  Robert Dewar  <dewar@adacore.com>
11872
11873         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
11874         * par-ch7.adb (P_Package): Proper placement of aspects for package
11875         decl/instantiation.
11876         * par-endh.adb (Check_End): Ad Is_Sloc parameter
11877         (End_Statements): Add Is_Sloc parameterr
11878         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
11879         (Check_End): Ad Is_Sloc parameter
11880         (End_Statements): Add Is_Sloc parameterr
11881
11882 2011-08-02  Vincent Celier  <celier@adacore.com>
11883
11884         * ug_words: Add VMS qualifier equivalent to -gnateP:
11885         /SYMBOL_PREPROCESSING.
11886
11887 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
11888
11889         * gnat-style.texi: For hexadecimal numeric literals the typical
11890         grouping of digits is 4 to represent 2 bytes.
11891         A procedure spec which is split into several lines is indented two
11892         characters.
11893
11894 2011-08-02  Yannick Moy  <moy@adacore.com>
11895
11896         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11897         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11898         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11899         properly qualified
11900         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11901         choice in array aggregate
11902         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11903         mark as ancestor
11904         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11905         positional and named aggregate for record, or others in record
11906         aggregate, or multiple choice in record aggregate
11907         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11908         array operands to logical operations AND, OR and XOR do not have the
11909         same static lower and higher bounds
11910         * sem_ch5.adb, sinfo.ads: Correct typos in comments
11911
11912 2011-08-01  Robert Dewar  <dewar@adacore.com>
11913
11914         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11915         Replaces Last_Source_Node_In_Sequence.
11916         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11917         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11918         parens and blank in string (this was inconsistently implemented).
11919         * errout.ads
11920         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11921         blank in string (this was inconsistently implemented).
11922         * gnat1drv.adb
11923         (Set_Global_Switches): Set formal mode switches appropriately
11924         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11925         * par-prag.adb
11926         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11927         call Set_Error_Msg_Lang to set "spark" as language name.
11928         * par.adb: Remove unnecessary call to set formal language for errout
11929         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11930         appropriately and call Set_Error_Msg_Lang to set "spark" as language
11931         name.
11932         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11933         calls to it, moved after resolution so that types are known
11934         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11935         result of concatenation is not of type String
11936         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11937         concatenation is not properly restricted
11938         * gnat_rm.texi: Add doc on pragma Spark_95.
11939         * gcc-interface/Makefile.in: Remove obsolete target pairs for
11940         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11941         * gcc-interface/Make-lang.in: Update dependencies.
11942
11943 2011-08-01  Javier Miranda  <miranda@adacore.com>
11944
11945         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11946         condition that detects if the overridden operation must replace an
11947         existing entity.
11948
11949 2011-08-01  Javier Miranda  <miranda@adacore.com>
11950
11951         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11952         code declarations inserted by Insert_Actions in each alternative of the
11953         N_Case_Expression node.
11954
11955 2011-08-01  Robert Dewar  <dewar@adacore.com>
11956
11957         * sem_ch6.adb: Minor code reorganization.
11958         * sem_util.adb: Minor reformatting.
11959
11960 2011-08-01  Pascal Obry  <obry@adacore.com>
11961
11962         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11963         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11964
11965 2011-08-01  Yannick Moy  <moy@adacore.com>
11966
11967         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11968         literal or operator symbol which is prefixed
11969         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11970         mode on access attributes.
11971         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11972         that concatenation operands are properly restricted in formal mode
11973         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11974         Analyze_Concatenation_Operand. Issue an error in formal mode if the
11975         result of the concatenation has a type different from String.
11976         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11977         Analyze_Quantified_Expression, Analyze_Slice,
11978         Analyze_Null): issue an error in formal mode on unsupported constructs
11979         * sem_ch5.adb
11980         (Analyze_Block_Statement): only issue error on source block statement
11981         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11982         function which returns the last node in a list of nodes for which
11983         Comes_From_Source returns True, if any
11984         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11985         Last_Source_Node_In_Sequence
11986         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11987         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11988         mode on unsupported constructs
11989         * sem_ch9.adb Do not return after issuing error in formal mode, as the
11990         rest of the actions may be needed later on since the error is marked as
11991         not serious.
11992         * sinfo.ads: Typos in comments.
11993
11994 2011-08-01  Pascal Obry  <obry@adacore.com>
11995
11996         * projects.texi: Minor editing.
11997
11998 2011-08-01  Yannick Moy  <moy@adacore.com>
11999
12000         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12001         insertion character ~~
12002         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12003         (Set_Error_Msg_Lang): new procedure which fixes the language for use
12004         with insertion character ~~
12005         (Set_Msg_Text): treat insertion character ~~
12006         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12007         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12008         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12009         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12010         errors related to the formal language restriction not serious
12011         (insertion character |).
12012         * par.adb (Par): set formal language for error messages if needed
12013         * sem_ch6.adb (Check_Missing_Return): take into account possible
12014         generated statements at the end of the function
12015         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12016         enumeration value to define a new pragma SPARK_95
12017         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12018         SPARK_Version): new type and variables to store the SPARK version
12019         (none by default).
12020         (SPARK_Mode): return True when SPARK_Version is set
12021         * par-prag.adb: Correct indentation
12022         (Prag): take Pragma_SPARK_95 into account
12023         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12024         into account.
12025
12026 2011-08-01  Robert Dewar  <dewar@adacore.com>
12027
12028         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12029         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12030         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12031
12032 2011-08-01  Pascal Obry  <obry@adacore.com>
12033
12034         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12035         Target_Name to Get_Path call.
12036         (Parse_Single_Project): Likewise.
12037         (Post_Parse_Context_Clause): Likewise.
12038         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12039         Call Initialise_Project_Path with the proper Target_Name.
12040         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12041         search path.
12042         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12043         with the proper Target_Name.
12044         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12045         Part.Parse routine.
12046         (Parse_Project_And_Apply_Config): Likewise.
12047         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12048         This is fine as this part of the code is supporting only native
12049         compilation.
12050         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12051         is fine as this part of the code is supporting only native compilation.
12052
12053 2011-08-01  Yannick Moy  <moy@adacore.com>
12054
12055         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12056         of homonym, unless the homonym is one of the cases allowed in SPARK
12057         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12058         package declaration occurring after a body.
12059
12060 2011-08-01  Robert Dewar  <dewar@adacore.com>
12061
12062         * checks.adb, exp_ch4.adb: Minor reformatting.
12063
12064 2011-08-01  Javier Miranda  <miranda@adacore.com>
12065
12066         * einfo.ads (Access_Disp_Table): Fix documentation.
12067         (Dispatch_Table_Wrappers): Fix documentation.
12068
12069 2011-08-01  Pascal Obry  <obry@adacore.com>
12070
12071         * prj-env.adb, prj-env.ads: Minor reformatting.
12072
12073 2011-08-01  Yannick Moy  <moy@adacore.com>
12074
12075         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12076         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12077         procedures out of these packages.
12078         * errout.ads, errout.adb
12079         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12080         procedures in of this package
12081         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12082         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12083         on misplaced later vs initial declarations, like in Ada 83
12084         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12085         formal mode on attribute of private type whose full type declaration
12086         is not visible
12087         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12088         package declaration inside a package specification
12089         (Analyze_Full_Type_Declaration): issue error in formal mode on
12090         controlled type or discriminant type
12091         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12092         user-defined operator means that it should come from the source
12093         (New_Overloaded_Entity): issue error in formal mode on overloaded
12094         entity.
12095         * sem_ch6.ads, sem_ch13.ads: typos in comments.
12096
12097 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12098
12099         * atree.adb: Minor reformatting.
12100         * checks.adb: Minor reformatting.
12101
12102 2011-08-01  Vincent Celier  <celier@adacore.com>
12103
12104         * s-parame-vms-ia64.ads: Fix typo in comment
12105         Minor reformatting
12106         * s-parame-vms-restrict.ads: Removed, unused.
12107
12108 2011-08-01  Javier Miranda  <miranda@adacore.com>
12109
12110         * exp_ch3.adb
12111         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12112         * sem_ch3.adb
12113         (Constrain_Index): Remove side effects in the evaluation of the bounds.
12114         * sem_ch3.ads, sem_ch3.adb
12115         (Is_Constant_Bound): New extended version of the subprogram that was
12116         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12117         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12118         * sem_aux.ads (Constant_Value): Fix typo in comment.
12119         * checks.adb (Generate_Index_Checks): New implementation which, for
12120         array objects with constant bounds, generates the runtime check
12121         referencing the bounds of the array type. For other cases this routine
12122         provides its previous behavior obtaining such values from the array
12123         object.
12124         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12125         parent type.
12126         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12127         we cannot have semantic interpretations of the new node.
12128
12129 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12130
12131         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12132         expressions.
12133
12134 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12135
12136         * sem_ch8.adb: Minor code editing.
12137         * s-vxwext.adb: Remove trailing space.
12138         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12139         consistency with other files.
12140
12141 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12142
12143         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12144
12145 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12146
12147         * par-ch10.adb: reject parameterized expressions as compilation unit.
12148         * sem_ch4.adb: handle properly conditional expression with overloaded
12149         then_clause and no else_clause.
12150
12151 2011-08-01  Tristan Gingold  <gingold@adacore.com>
12152
12153         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12154         like done by System.Aux_DEC.
12155         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12156
12157 2011-08-01  Yannick Moy  <moy@adacore.com>
12158
12159         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12160         missing label at end of declaration (subprogram or package)
12161         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12162         of positional and named parameter association
12163         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12164         Error_Msg_SP which adds a prefix to the error message giving the name
12165         of the formal language analyzed
12166         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12167         access result type in subprogram, unconstrained array as result type,.
12168         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12169         procedure
12170         * sem_ch8.adb: Code clean up.
12171
12172 2011-08-01  Javier Miranda  <miranda@adacore.com>
12173
12174         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12175         * einfo.ads (Access_Disp_Table): Fix documentation.
12176         (Dispatch_Table_Wrappers): Fix documentation.
12177         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12178         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12179         to enforce the documentation of this attribute.
12180         (Set_Is_Interface): Cleanup the assertion.
12181         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12182         the Underlying_Type entity before reading attribute Access_Disp_Table.
12183         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12184         Locate the Underlying_Type before reading attribute Access_Disp_Table.
12185         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12186         the Underlying_Type entity before reading attribute Access_Disp_Table.
12187         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12188         Locate the Underlying_Type entity before reading attribute
12189         Access_Disp_Table.
12190
12191 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12192
12193         * s-poosiz.ads: Additional overriding indicators.
12194
12195 2011-08-01  Yannick Moy  <moy@adacore.com>
12196
12197         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12198         formal mode.
12199         (Analyze_Iteration_Scheme): issue error in formal mode when loop
12200         parameter specification does not include a subtype mark.
12201         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12202         formal mode on abstract subprogram.
12203         (Analyze_Subprogram_Specification): issue error in formal mode on
12204         user-defined operator.
12205         (Process_Formals): issue error in formal mode on access parameter and
12206         default expression.
12207         * sem_ch9.adb (Analyze_Abort_Statement,
12208         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12209         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12210         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12211         Analyze_Requeue, Analyze_Selective_Accept,
12212         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12213         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12214         issue error in formal mode on user-defined raise statement.
12215
12216 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12217
12218         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12219         declaration being hidden when overriding an implicit inherited
12220         subprogram.
12221         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12222         (-gnats), do not complain about a source file that contains only a
12223         pragma No_Body.
12224
12225 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12226
12227         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12228         variable if already set.
12229
12230 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12231
12232         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12233         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12234         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12235         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12236         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12237         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12238         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12239         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12240         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12241         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12242         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12243         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12244         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12245         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12246         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12247         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12248         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12249         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12250         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12251         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12252         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12253         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12254         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12255         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12256         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12257         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12258         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12259         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12260         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12261         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12262         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12263         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12264         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12265         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12266         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12267         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12268         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12269         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12270         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12271         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12272         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12273         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12274         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12275         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12276         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12277         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12278         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12279         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12280         s-osinte-mingw.ads: Update to GPLv3 run-time license.
12281         Use GNAT instead of GNARL.
12282
12283 2011-08-01  Bob Duff  <duff@adacore.com>
12284
12285         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12286         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12287         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12288         reformatting.
12289
12290 2011-08-01  Yannick Moy  <moy@adacore.com>
12291
12292         * debug.adb (d.D) reverve flag for the SPARK mode
12293         (d.E) reverve flag for SPARK generation mode
12294         (d.F) reverve flag for Why generation mode
12295         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12296         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
12297         functions which return True when the corresponding modes are set
12298         (Formal_Language): return "spark" or "alfa" when in formal verification
12299         mode.
12300         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12301         Error_Msg to prefix the error message with a tag giving the formal
12302         language
12303         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12304         message with a tag giving the formal language
12305         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12306         block statement
12307         (Analyze_Case_Statement): issue error in formal mode on case statement
12308         with a single "others" case alternative
12309         (Analyze_Exit_Statement): issue errors in formal mode on exit
12310         statements which do not respect SPARK restrictions
12311         (Analyze_Goto_Statement): issue error in formal mode on goto statement
12312         (Check_Unreachable_Code): always issue an error (not a warning) in
12313         formal mode on unreachable code (concerns both code after an infinite
12314         loop and after an unconditional jump, both not allowed in SPARK)
12315         * sem_ch6.adb (Analyze_Return_Statement): add call to
12316         Set_Return_Present for a procedure containing a return statement
12317         (already done for functions in Analyze_Function_Return)
12318         (Analyze_Function_Return): issue error in formal mode on extended
12319         return or if return is not last statement in function
12320         (Check_Missing_Return): issue error in formal mode if function does
12321         not end with return or if procedure contains a return
12322         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12323         function to detect if there is an inner scope of its parameter S which
12324         is a loop.
12325
12326 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12327
12328         * sem_ch6.ads: Minor reformatting.
12329
12330 2011-08-01  Javier Miranda  <miranda@adacore.com>
12331
12332         * sem_util.adb (Abstract_Interface_List): Complete condition when
12333         processing private type declarations to avoid reading unavailable
12334         attribute.
12335         (Is_Synchronized_Tagged_Type): Complete condition when processing
12336         private extension declaration nodes to avoid reading unavailable
12337         attribute.
12338
12339 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12340
12341         * sem_ch3.adb: Minor reformatting.
12342
12343 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12344
12345         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12346         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12347         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12348         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12349         for VMS, instead parametrize the common implementation with
12350         System.Parameters declarations.
12351
12352 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
12353
12354         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12355
12356 2011-08-01  Tristan Gingold  <gingold@adacore.com>
12357
12358         * seh_init.c: Fix SEH handler installation on win64.
12359
12360 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12361
12362         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12363         double analysis of an anonymous access to subprogram, because it can
12364         lead to improper sharing of profiles and a back-end crash.
12365
12366 2011-08-01  Robert Dewar  <dewar@adacore.com>
12367
12368         * make.adb, sem_ch4.adb: Minor reformatting.
12369         * gcc-interface/Make-lang.in: Update dependencies.
12370         * sem_util.adb, exp_ch5.adb: Minor reformatting.
12371
12372 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12373
12374         * gnat_rm.texi: Fix definition of Long_Integer.
12375
12376 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12377
12378         * exp_aggr.adb: check limit size of static aggregate unconditionally,
12379         to prevent storage exhaustion.
12380         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12381         finalized is a function body, insert the cleanup code before the final
12382         return statement, to prevent spurious warnings.
12383         * s-pooglo.ads: add overriding indicator.
12384
12385 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12386
12387         * sem_ch4.adb (Operator_Check): improve error message when both a
12388         with_clause and a use_clause are needed to make operator usage legal.
12389         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12390         determine whether a compilation unit is visible within an other,
12391         either through a with_clause in the current unit, or a with_clause in
12392         its library unit or one one of its parents.
12393
12394 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12395
12396         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12397         over an arbitrary expression of an array or container type.
12398         * lib-xref.adb: clarify comment.
12399
12400 2011-08-01  Bob Duff  <duff@adacore.com>
12401
12402         * einfo.ads: Minor reformatting.
12403         * debug.adb: Minor comment improvement.
12404
12405 2011-08-01  Javier Miranda  <miranda@adacore.com>
12406
12407         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12408         consider hidden subprograms as valid candidates.
12409
12410 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
12411
12412         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
12413
12414 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
12415
12416         * gnat_ugn.texi: Fix typo.
12417
12418 2011-08-01  Robert Dewar  <dewar@adacore.com>
12419
12420         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
12421         lib-xref.adb: Minor reformatting
12422
12423 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
12424
12425         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
12426         when to generate a call to Move_Final_List.
12427         (Has_Controlled_Parts): Remove this function.
12428
12429 2011-08-01  Geert Bosch  <bosch@adacore.com>
12430
12431         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
12432         "," in choice list.
12433
12434 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12435
12436         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
12437         explicit raise of a predefined exception as Comes_From_Source if the
12438         original N_Raise_Statement comes from source.
12439
12440 2011-08-01  Robert Dewar  <dewar@adacore.com>
12441
12442         * sinfo.ads: Add comment.
12443         * sem_ch6.adb: Minor reformatting.
12444
12445 2011-08-01  Robert Dewar  <dewar@adacore.com>
12446
12447         * freeze.adb (Freeze_Entity): Refine check for bad component size
12448         clause to avoid rejecting confirming clause when atomic/aliased present.
12449
12450 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12451
12452         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
12453         better determine whether an entity reference is a write.
12454         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
12455         subcomponent.
12456         * lib-xref.adb (Output_References): Do no suppress a read reference at
12457         the same location as an immediately preceeding modify-reference, to
12458         handle properly in-out actuals.
12459
12460 2011-08-01  Tristan Gingold  <gingold@adacore.com>
12461
12462         * env.c (__gnat_setenv) [VMS]: Refine previous change.
12463
12464 2011-08-01  Quentin Ochem  <ochem@adacore.com>
12465
12466         * i-cstrin.adb (New_String): Changed implementation, now uses only the
12467         heap to compute the result.
12468
12469 2011-08-01  Robert Dewar  <dewar@adacore.com>
12470
12471         * atree.ads: Minor reformatting.
12472
12473 2011-08-01  Emmanuel Briot  <briot@adacore.com>
12474
12475         * g-expect.adb (Get_Command_Output): Fix memory leak.
12476
12477 2011-08-01  Geert Bosch  <bosch@adacore.com>
12478
12479         * cstand.adb (P_Float_Type): New procedure to print the definition of
12480         predefined fpt types.
12481         (P_Mixed_Name): New procedure to print a name using mixed case
12482         (Print_Standard): Use P_Float_Type for printing floating point types
12483         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
12484         precision IEEE float.
12485
12486 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12487
12488         * sem_ch3.adb: Minor reformatting.
12489
12490 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12491
12492         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
12493         the completion of a generic function, insert the new body rather than
12494         rewriting the original.
12495
12496 2011-08-01  Yannick Moy  <moy@adacore.com>
12497
12498         * sinfo.ads, errout.ads: Typos in comments.
12499
12500 2011-08-01  Robert Dewar  <dewar@adacore.com>
12501
12502         * par-endh.adb: Minor reformatting.
12503
12504 2011-08-01  Robert Dewar  <dewar@adacore.com>
12505
12506         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
12507         (Pre_Post_Aspects): New subtype.
12508         * par-ch12.adb (P_Generic): New syntax for aspects in packages
12509         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
12510         * par-ch7.adb (P_Package): Remove Decl parameter
12511         (P_Package): Handle new syntax for aspects (before IS)
12512         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
12513         new aspect syntax
12514         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
12515         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
12516         (P_Package): Remove Decl parameter
12517         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
12518         aspects
12519         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
12520         specs
12521         * sem_util.ads, sem_util.adb (Static_Boolean): New function
12522         * sinfo.ads: Document new syntax for aspects in packages etc.
12523         * sprint.adb: Handle new syntax of aspects before IS in package
12524
12525 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12526
12527         * atree.ads: Minor reformatting.
12528         * sem_prag.adb: Minor reformatting.
12529
12530 2011-08-01  Robert Dewar  <dewar@adacore.com>
12531
12532         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
12533         case expr alternative.
12534
12535 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12536
12537         * sem_ch12.adb: Fix typo.
12538
12539 2011-08-01  Geert Bosch  <bosch@adacore.com>
12540
12541         * sem_prag.adb (Check_No_Link_Name): New procedure.
12542         (Process_Import_Or_Interface): Use Check_No_Link_Name.
12543         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
12544         instead of Standard_Long_Long_Float_Size global. Preparation for
12545         eventual removal of per type constants.
12546         * exp_util.ads (Get_Stream_Size): New function returning the stream
12547         size value of subtype E.
12548         * exp_util.adb (Get_Stream_Size): Implement new function.
12549         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
12550         function.
12551         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
12552         * einfo.adb:
12553         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
12554
12555 2011-08-01  Geert Bosch  <bosch@adacore.com>
12556
12557         * cstand.adb: Fix comments.
12558         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
12559         count of arguments.
12560
12561 2011-08-01  Robert Dewar  <dewar@adacore.com>
12562
12563         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
12564
12565 2011-08-01  Geert Bosch  <bosch@adacore.com>
12566
12567         * atree.ads: Fix comment.
12568
12569 2011-08-01  Robert Dewar  <dewar@adacore.com>
12570
12571         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
12572         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
12573         * par.adb: Add with for Namet.Sp.
12574         * par-tchk.adb: Minor reformatting.
12575
12576 2011-08-01  Vincent Celier  <celier@adacore.com>
12577
12578         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
12579         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
12580         of the init procedure of a SAL.
12581         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
12582         New procedure.
12583
12584 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12585
12586         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
12587         reformatting.
12588
12589 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12590
12591         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
12592
12593 2011-08-01  Thomas Quinot  <quinot@adacore.com>
12594
12595         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
12596         conformant with its spec (return True only for types that have
12597         an overriding Initialize primitive operation that prevents them from
12598         having preelaborable initialization).
12599         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
12600         initialization for controlled types in Ada 2005 or later mode.
12601
12602 2011-08-01  Robert Dewar  <dewar@adacore.com>
12603
12604         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
12605         Postcondition.
12606         (Same_Aspect): New function.
12607         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
12608         Type_Invariant, Precondition, Postcondition.
12609         * snames.ads-tmpl: Add Name_Type_Invariant.
12610
12611 2011-08-01  Robert Dewar  <dewar@adacore.com>
12612
12613         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
12614         here.
12615         (Freeze_All_Ent): Fix error in handling inherited aspects.
12616         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
12617         already analyzed, but don't skip entire processing of a declaration,
12618         that's wrong in some cases of declarations being rewritten.
12619         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
12620         Don't delay for integer, string literals
12621         Treat predicates in usual manner for delay, remove special case code,
12622         not needed.
12623         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
12624         (Build_Predicate_Function): Update saved expression in aspect
12625         (Build_Invariant_Procedure): Update saved expression in aspect
12626         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
12627         of replacement of discriminant references if the reference is simple.
12628
12629 2011-08-01  Robert Dewar  <dewar@adacore.com>
12630
12631         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
12632         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
12633         Static_Predicate and Dynamic_Predicate.
12634         (Build_Predicate_Function): Add processing for Static_Predicate
12635         and Dynamic_Predicate.
12636         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
12637         (From_Static_Predicate): New flag
12638         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
12639
12640 2011-08-01  Robert Dewar  <dewar@adacore.com>
12641
12642         * usage.adb: Documentation cleanup for Ada version modes in usage.
12643         * expander.adb: Minor reformatting.
12644
12645 2011-08-01  Robert Dewar  <dewar@adacore.com>
12646
12647         * atree.ads: Minor comment fix.
12648         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
12649         a-witeio.ads, sem_prag.adb: Minor reformatting.
12650
12651 2011-08-01  Doug Rupp  <rupp@adacore.com>
12652
12653         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
12654         pointers. Use descrip.h header file for convenience. Add some
12655         comments.
12656
12657 2011-08-01  Robert Dewar  <dewar@adacore.com>
12658
12659         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
12660         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
12661         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
12662         New procedure.
12663         (Check_Aspect_At_End_Of_Declarations): New procedure
12664         (Analye_Aspect_Specification): Minor changes for above procedures
12665         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
12666         specification node as well.
12667
12668 2011-08-01  Pascal Obry  <obry@adacore.com>
12669
12670         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
12671         Windows files. Use GetFilesAttributes() in this case to check for file
12672         existence instead of returning with an error code.
12673
12674 2011-08-01  Vincent Celier  <celier@adacore.com>
12675
12676         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
12677         High is above Source length.
12678
12679 2011-08-01  Robert Dewar  <dewar@adacore.com>
12680
12681         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
12682
12683 2011-08-01  Robert Dewar  <dewar@adacore.com>
12684
12685         * aspects.ads (Boolean_Aspects): New subtype.
12686         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
12687         for derived types in cases where the parent type and derived type have
12688         aspects.
12689         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
12690         with aspects when parent type also has aspects.
12691         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
12692         boolean expression at this point).
12693         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
12694         accordance with final decision on the Ada 2012 feature.
12695         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
12696
12697 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12698
12699         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
12700
12701 2011-08-01  Pascal Obry  <obry@adacore.com>
12702
12703         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
12704         Fix Replace_Slice when High is above current string size.
12705         (Replace_Slice): Fix DL computation when High is above current
12706         string length.
12707
12708 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
12709
12710         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
12711
12712 2011-08-01  Matthew Heaney  <heaney@adacore.com>
12713
12714         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
12715         of node.
12716
12717 2011-08-01  Pascal Obry  <obry@adacore.com>
12718
12719         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
12720         reformatting.
12721
12722 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12723
12724         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
12725         access to protected subprograms in generic bodies.
12726         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
12727         protected type, indicate that the convention of the subprogram is
12728         Convention_Protected, because it may be used in subsequent declarations
12729         within the protected declaration.
12730
12731 2011-08-01  Vincent Celier  <celier@adacore.com>
12732
12733         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
12734         and "final" procedures when the name of the library is "ada", to avoid
12735         duplicate symbols "adainit" and "adafinal" in executables.
12736
12737 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
12738
12739         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
12740         quantified expression that appears within a postcondition and uses the
12741         Ada2012 'Result attribute.
12742
12743 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12744
12745         * init.c (__gnat_error_handler): Cast reason to int.
12746         (__gnat_install_handler): Explain sa_sigaction use.
12747
12748 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12749
12750         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
12751         subprogram has copy-in copy-out parameters, try to promote the mode of
12752         the return type if it is passed in registers.
12753
12754 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12755
12756         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
12757         left operand as addressable.
12758
12759 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
12760
12761         * gcc-interface/gigi.h (build_function_stub): Remove.
12762         (build_return_expr): Likewise.
12763         (convert_vms_descriptor): Declare.
12764         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
12765         (build_function_stub): Move to...
12766         * gcc-interface/utils2.c (build_return_expr): Move to...
12767         * gcc-interface/trans.c (build_function_stub): ...here.
12768         (build_return_expr): ...here.
12769         (Subprogram_Body_to_gnu): Add local variable for language_function.
12770         Disconnect the parameter attributes cache, if any, once done with it.
12771         Call end_subprog_body only after setting the end_locus.
12772         Build the stub associated with the function, if any, at the very end.
12773         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
12774         variables and streamline control flow.
12775
12776 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
12777
12778         PR ada/49819
12779         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
12780         g-trasym-dwarf.adb.
12781
12782 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12783
12784         PR bootstrap/49794
12785         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
12786         Assign to act.sa_sigaction.
12787         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
12788         current->return_address to char * before arithmetic.
12789
12790 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12791
12792         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
12793         Correct argument types.
12794         Extract code from reason.
12795         (__gnat_install_handler): Assign to act.sa_sigaction.
12796
12797 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
12798
12799         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
12800         (GNAT1_OBJS): ...here.
12801
12802 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
12803
12804         PR ada/48711
12805         * g-socthi-mingw.adb (Fill): Fix formatting.
12806
12807         * gcc-interface/gigi.h: Move around comment.
12808
12809 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
12810
12811         PR ada/46350
12812         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
12813
12814 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
12815
12816         PR ada/48711
12817         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
12818
12819 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12820
12821         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
12822         range comparison if Pmode is SImode.
12823
12824 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
12825             Eric Botcazou  <ebotcazou@adacore.com>
12826
12827         * adadecode.c: Wrap up in extern "C" block.
12828         * adadecode.h: Likewise.
12829         * adaint.c: Likewise.  Remove 'const' keyword.
12830         * adaint.h: Likewise.
12831         * argv.c: Likewise.
12832         * atree.h: Likewise.
12833         * cio.c: Likewise.
12834         * cstreams.c: Likewise.
12835         * env.c: Likewise.
12836         * exit.c: Likewise.
12837         * fe.h: Likewise.
12838         * final.c: Likewise.
12839         * init.c: Likewise.
12840         * initialize.c: Likewise.
12841         * link.c: Likewise.
12842         * namet.h: Likewise.
12843         * nlists.h: Likewise.
12844         * raise.c: Likewise.
12845         * raise.h: Likewise.
12846         * repinfo.h: Likewise.
12847         * seh_init.c: Likewise.
12848         * targext.c: Likewise.
12849         * tracebak.c: Likewise.
12850         * uintp.h: Likewise.
12851         * urealp.h: Likewise.
12852         * xeinfo.adb: Wrap up generated C code in extern "C" block.
12853         * xsinfo.adb: Likewise.
12854         * xsnamest.adb: Likewise.
12855         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
12856         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
12857         * gcc-interface/misc.c: Likewise.
12858         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
12859         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
12860         ada/targext.o here...
12861         (GNAT_ADA_OBJS): ...and not here.
12862         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
12863         (GNATBIND_OBJS): Reorder.
12864
12865 2011-07-07  Richard Henderson  <rth@redhat.com>
12866
12867         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
12868         dwarf2out_frame_init.
12869
12870 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
12871
12872         * gcc-interface/misc.c (gnat_init): Tweak previous change.
12873
12874 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12875
12876         PR target/39150
12877         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
12878
12879 2011-07-06  Richard Guenther  <rguenther@suse.de>
12880
12881         * gcc-interface/misc.c (gnat_init): Merge calls to
12882         build_common_tree_nodes and build_common_tree_nodes_2.
12883         Re-initialize boolean_false_node.
12884
12885 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
12886             Olivier Hainque  <hainque@adacore.com>
12887             Nicolas Setton  <setton@adacore.com>
12888
12889         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12890         the type according to the ARTIFICIAL_P parameter.
12891         (create_type_decl): Likewise.
12892         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12893
12894 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
12895
12896         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12897         (gnatbind): Likewise.
12898
12899 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12900
12901         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12902
12903 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12904
12905         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12906         local variable throughout.  Remove useless call to Base_Type.
12907         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12908         Take it also into account for the volatileness of the field.  Set the
12909         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
12910
12911 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12912
12913         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12914         on a dereference built for a by-ref object if it has an address clause.
12915
12916 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12917
12918         * einfo.ads (Address_Taken): Document use for the second argument of
12919         Asm_Input and Asm_Output attributes.
12920         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12921         argument is an entity name, then set Address_Taken on it.
12922         <Attribute_Asm_Output>: Likewise.
12923         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12924         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12925         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12926         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12927
12928 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
12929
12930         PR middle-end/46500
12931         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12932
12933 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
12934
12935         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12936         (ada/utils.o): Update dependencies.
12937         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12938         ../../../libcpp/libcpp.a.
12939         * gcc-interface/utils.c: Include common/common-target.h.
12940         (process_attributes): Use targetm_common.have_named_sections.
12941
12942 2011-06-07  Richard Guenther  <rguenther@suse.de>
12943
12944         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12945         set_sizetype.
12946
12947 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12948
12949         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12950         TREE_THIS_NOTRAP flag.
12951
12952 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12953
12954         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12955         Fix thinko.
12956
12957 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12958
12959         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12960         constants whose full view has discriminants specially.
12961
12962 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
12963
12964         * gcc-interface/utils.c: Include diagnostic.h.
12965         (gnat_write_global_declarations): Output debug information for all
12966         global type declarations before finalizing the compilation unit.
12967         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12968
12969 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
12970
12971         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12972
12973 2011-05-25  Kai Tietz  <ktietz@redhat.com>
12974
12975         * adaint.c (__gnat_to_canonical_file_list_next): Use array
12976         initialization instead of const/none-const pointer assignment.
12977
12978 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
12979
12980         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12981         $(EXTRA_GNAT1_OBJS).
12982         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12983         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12984         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12985         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12986         libcommon-target.a instead of prefix.o.
12987
12988 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
12989
12990         PR ada/49097
12991         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12992
12993 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
12994
12995         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12996         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12997         instead of version.o.
12998
12999 2011-05-18  Kai Tietz  <ktietz@redhat.com>
13000
13001         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13002         boolean_false_node instead of integer_zero_node.
13003         (convert_with_check): Likewise.
13004         * gcc-interface/decl.c (choices_to_gnu): Likewise.
13005
13006 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
13007
13008         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13009         type of the parameter is an unconstrained array, convert the actual to
13010         the type of the formal in the In Out and Out cases as well.
13011
13012 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
13013
13014         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13015         call build_function_type_array or build_varargs_function_type_array
13016         instead.
13017         (create_subprog_type): Don't call build_function_type; call
13018         build_function_type_vec instead.
13019
13020 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
13021
13022         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13023         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13024         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13025
13026 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
13027
13028         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13029
13030         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13031         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13032
13033 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
13034
13035         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13036
13037 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
13038
13039         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13040         instead of accessing TYPE_ARG_TYPES directly.
13041         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13042
13043 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13044
13045         PR ada/48844
13046         * gcc-interface/gigi.h (get_variant_part): Declare.
13047         * gcc-interface/decl.c (get_variant_part): Make global.
13048         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13049         types have the same constant size, are record types and T1 has a
13050         variant part while T2 doesn't.
13051
13052 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
13053
13054         * gcc-interface/utils.c (begin_subprog_body): Do not call
13055         get_pending_sizes.
13056         (end_subprog_body): Likewise.
13057
13058 2011-05-04  Richard Guenther  <rguenther@suse.de>
13059
13060         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13061         int_const_binop.
13062         (pos_to_constructor): Likewise.
13063
13064 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
13065             Eric Botcazou  <ebotcazou@adacore.com>
13066
13067         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13068         of build_function_type.  Adjust calls to...
13069         (build_raise_check): ...this.  Do not take a void_tree parameter.
13070         Call build_function_type_list instead of build_function_type.
13071         Fix head comment and swap couple of conditional blocks.
13072
13073 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
13074
13075         * gnatvsn.ads (Library_Version): Bump to 4.7.
13076         (Current_Year): Bump to 2011.
13077
13078 2011-04-29  Michael Matz  <matz@suse.de>
13079
13080         * gcc-interface/misc.c (gnat_handle_option): Set
13081         warn_maybe_uninitialized.
13082
13083 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
13084
13085         * gnat_ugn.texi (Complexity Metrics Control): Update link to
13086         the Watson/McCabe paper.
13087
13088 2011-04-23  Jim Meyering  <meyering@redhat.com>
13089
13090         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13091
13092 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
13093
13094         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13095         onto the new type.
13096
13097 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
13098
13099         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13100         parameter.
13101         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
13102         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13103         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13104         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13105         <all>: Do not set flags on the reused DECL node coming from an alias.
13106         Set DECL_IGNORED_P on the DECL node built for subprograms if they
13107         don't need debug info here...
13108         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13109         (gigi): Adjust calls to create_subprog_decl.
13110         (build_raise_check): Likewise.
13111         (establish_gnat_vms_condition_handler): Likewise.
13112         (Compilation_Unit_to_gnu): Likewise.
13113         (gnat_to_gnu): Likewise.
13114
13115 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
13116
13117         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13118         (NO_REORDER_ADAFLAGS): New variable.
13119         (EXTRA_GNATTOOLS): Always define.
13120         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13121         Clean up and adjust list of files compiled with special options.
13122         * gcc-interface/Make-lang.in: Likewise.
13123         (ada/decl.o): Cosmetical change.
13124         (ada/misc.o): Remove dependency on $(PLUGIN_H).
13125
13126 2011-04-20  Jim Meyering  <meyering@redhat.com>
13127
13128         * initialize.c (__gnat_initialize): Remove useless if-before-free.
13129
13130 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
13131
13132         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13133         $(CFLAGS) on the link line.
13134
13135 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
13136
13137         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13138         padded type built for the return type if it is unconstrained.
13139
13140 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
13141
13142         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13143
13144 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
13145
13146         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13147         before calling TREE_CHAIN.
13148         * gcc-interface/misc.c (gnat_init_ts): New function.
13149         (LANG_HOOKS_INIT_TS): Define.
13150
13151 2011-04-12  Martin Jambor  <mjambor@suse.cz>
13152
13153         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13154         instead of cgraph_node.
13155
13156 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
13157
13158         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13159         alignment on fields of the RETURN type built for the Copy-In Copy-Out
13160         mechanism.
13161
13162 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
13163
13164         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13165         of aggregate types that contain a placeholder.
13166
13167 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
13168
13169         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13170         TYPE_ARG_TYPES.
13171         (handle_type_generic_attribute): Likewise.
13172
13173 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
13174
13175         PR ada/47163
13176         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13177
13178 2011-04-04  Kai Tietz  <ktietz@redhat.com>
13179
13180         PR ada/47163
13181         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13182         to flag value.
13183
13184 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13185
13186         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13187         type case, do not strip a padding type around the array type.
13188
13189 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13190
13191         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13192         types.
13193
13194 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13195
13196         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13197         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13198         code for -feliminate-unused-debug-types.
13199         (gnat_post_options): Likewise.
13200
13201 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13202
13203         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13204         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13205         distinct copy.
13206
13207 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13208
13209         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13210         DECL_ARTIFICIAL flag on enumeration types.
13211
13212 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13213
13214         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13215         fat pointer types artificial unconditionally.
13216         <E_Array_Subtype>: Attach the base array type as a parallel type if it
13217         isn't artificial.
13218
13219 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13220
13221         * gcc-interface/gigi.h (get_dummy_type): Declare.
13222         (build_dummy_unc_pointer_types): Likewise.
13223         (finish_fat_pointer_type): Likewise.
13224         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13225         fat pointer type has been built, complete it in place.
13226         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13227         and thin pointers.  Remove useless variable.
13228         (finish_fat_pointer_type): Make global and move to...
13229         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13230         (get_dummy_type): New function.
13231         (build_dummy_unc_pointer_types): Likewise.
13232         (gnat_pushdecl): Propage the name to the anonymous variants only.
13233         (update_pointer_to): Only adjust the pointer types in the unconstrained
13234         array case.
13235
13236 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13237
13238         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13239         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13240         if this is a Taft amendment type and the full declaration is available.
13241         * gcc-interface/trans.c (process_type): Likewise.
13242         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13243         (process_freeze_entity): Likewise.
13244         * gcc-interface/utils.c (dummy_global): New static variable.
13245         (gnat_write_global_declarations): If there are types declared as used
13246         at the global level, insert them in the global hash table.
13247
13248 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13249
13250         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13251         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13252         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13253         copy.
13254         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
13255         flag of the type accordingly.
13256         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13257
13258 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
13259
13260         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13261         finalizing types when updating the pointers to the designated type.
13262         <all>: Finalize the deferred types even if we didn't defer processing
13263         of incomplete types in this invocation.
13264
13265 2011-04-01  Olivier Hainque  <hainque@adacore.com>
13266             Nicolas Setton  <setton@adacore.com>
13267             Eric Botcazou  <ebotcazou@adacore.com>
13268
13269         * gcc-interface/misc.c (gnat_descriptive_type): New function.
13270         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13271
13272 2011-03-28  Kai Tietz  <ktietz@redhat.com>
13273
13274         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13275         Windows targets.
13276         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13277         * system-mingw.ads (System): Change ZCX_By_Default default to True.
13278
13279         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13280
13281 2011-03-28  Tristan Gingold  <gingold@adacore.com>
13282
13283         PR ada/44431
13284         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13285         Use ada output of gnatbind.
13286         (ada/b_gnatb.adb): Ditto.
13287         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13288         (ada.mostlyclean, ada.stage1)
13289         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13290         (ada.stagefeedback): Adjust.
13291         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13292         Use ada output of gnatbind.
13293         (b_gnatm.adb): Ditto.
13294         (b_gnatl.o, b_gnatm.o): New rules.
13295
13296 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
13297
13298         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13299         for the padded type built to support a specified size or alignment.
13300
13301 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
13302
13303         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13304         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13305         unconditionally to the end of the unit when the designated type is
13306         limited_with'ed.
13307         <all>: Rename local variable.  Attempt to un-defer types only and do it
13308         for limited_with'ed types as well.
13309         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
13310         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13311         consistently and remove redundant call to finalize_from_with_types.
13312
13313 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
13314
13315         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13316         subprograms without a previous spec declared in the same unit.
13317         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13318         subprograms at the end of the unit instead of at the beginning.
13319         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13320         isn't public for the special handling of non-inline functions nested
13321         inside inline external functions.
13322
13323 2011-03-25  Jeff Law  <law@redhat.com>
13324
13325         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13326
13327 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
13328
13329         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13330         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13331         to compute Set_Size_Depends_On_Discriminant.
13332         (Layout_Type): Call it on array types in back-end layout mode.
13333         * sem_util.adb (Requires_Transient_Scope): Return true for array
13334         types only if the size depends on the value of discriminants.
13335         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13336         type if the RHS is a call to a function that returns an unconstrained
13337         type with default discriminant.
13338
13339 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
13340
13341         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13342         non-conversion to the nominal result type at the end.
13343
13344 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
13345
13346         * gcc-interface/trans.c (create_temporary): New function taken from...
13347         (create_init_temporary): ...here.  Call it.
13348         (call_to_gnu): Create the temporary for the return value early, if any.
13349         Create it for a function with copy-in/copy-out parameters if there is
13350         no target; in other cases of copy-in/copy-out, use another temporary.
13351         Push the new binding level lazily.  Add and rename local variables.
13352
13353 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
13354
13355         * gcc-interface/decl.c (validate_size): Improve comments and tweak
13356         error message.
13357         (set_rm_size): Likewise.
13358
13359 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
13360
13361         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13362         for the padded type built in order to support a specified alignment.
13363         Fix incorrect formatting.
13364
13365 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
13366
13367         PR bootstrap/48216
13368         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13369
13370 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
13371
13372         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13373         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13374         to the end of the list.  Adjust recursive call.  Rename local variable.
13375         If REORDER is true, reorder components of the record type.
13376         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13377         components_to_record and adjust the parameter list.
13378
13379 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
13380
13381         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13382         disabled, use the variable for bounds of loop iteration scheme.
13383
13384 2011-03-21  Kai Tietz  <ktietz@redhat.com>
13385
13386         PR target/12171
13387         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13388
13389 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
13390
13391         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13392         out whether the expression is read-only.  Short-circuit placeholder
13393         case and rename a couple of local variables.
13394
13395 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
13396
13397         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13398         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13399         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13400         (convert): Deal with conversions from a smaller form type specially.
13401
13402 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
13403
13404         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13405         its argument, except for the special -I- switch.
13406
13407 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
13408
13409         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13410         "Ada Issues".
13411
13412 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
13413
13414         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
13415
13416 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
13417
13418         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
13419         GNAT_FORMAL.
13420         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
13421         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
13422         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
13423         Do not generate the check directly, instead instantiate the template
13424         check present in the descriptor.
13425         (make_descriptor_field): Move around.
13426         (build_vms_descriptor32): Build a template check in the POINTER field.
13427         (build_vms_descriptor): Remove useless suffixes.
13428         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
13429
13430 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
13431
13432         PR bootstrap/47467
13433         * targext.c: Include target files if IN_RTS is defined.
13434
13435 2011-01-26  Richard Guenther  <rguenther@suse.de>
13436
13437         PR bootstrap/47467
13438         * targext.c: Include config.h.
13439         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
13440         dependency.
13441
13442 2011-01-04  Pascal Obry  <obry@adacore.com>
13443             Eric Botcazou  <ebotcazou@adacore.com>
13444
13445         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
13446
13447 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13448
13449         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
13450         end-of-case on the end label and its associated gotos, if any.
13451
13452 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13453
13454         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
13455         expressions of the parameter cache within the statement group of
13456         the CICO mechanism.
13457
13458 2011-01-04  Olivier Hainque  <hainque@adacore.com>
13459             Eric Botcazou  <ebotcazou@adacore.com>
13460
13461         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
13462         (set_end_locus_from_node): New function.
13463         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
13464         make and the function end_locus.
13465         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
13466         for the elaboration subprogram.
13467         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
13468         set the end_locus of the expression as well.
13469
13470 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
13471
13472         PR ada/47131
13473         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
13474         variables that are referenced in exception handlers volatile.
13475
13476
13477 \f
13478 Copyright (C) 2011 Free Software Foundation, Inc.
13479
13480 Copying and distribution of this file, with or without modification,
13481 are permitted in any medium without royalty provided the copyright
13482 notice and this notice are preserved.
13483
13484         * gnat_rm.texi: Ramification of pragma Eliminate documentation
13485          - fix bugs in the description of Source_Trace;
13486          - get rid of UNIT_NAME;
13487
13488 2011-08-02  Javier Miranda  <miranda@adacore.com>
13489
13490         * exp_ch9.adb
13491         (Build_Dispatching_Requeue): Adding support for VM targets
13492         since we cannot directly reference the Tag entity.
13493         * exp_sel.adb (Build_K): Adding support for VM targets.
13494         (Build_S_Assignment): Adding support for VM targets.
13495         * exp_disp.adb
13496         (Default_Prim_Op_Position): In VM targets do not restrict availability
13497         of predefined interface primitives to compiling in Ada 2005 mode.
13498         (Is_Predefined_Interface_Primitive): In VM targets this service is not
13499         restricted to compiling in Ada 2005 mode.
13500         (Make_VM_TSD): Generate code that declares and initializes the OSD
13501         record. Needed to support dispatching calls through synchronized
13502         interfaces.
13503         * exp_ch3.adb
13504         (Make_Predefined_Primitive_Specs): Enable generation of predefined
13505         primitives associated with synchronized interfaces.
13506         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
13507         primitives associated with synchronized interfaces.
13508
13509 2011-08-02  Yannick Moy  <moy@adacore.com>
13510
13511         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
13512         statements hidden in SPARK if preceded by the HIDE directive
13513         (Parse_Exception_Handlers): mark each exception handler in a sequence of
13514         exception handlers as hidden in SPARK if preceded by the HIDE directive
13515         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
13516         if starting with the HIDE directive
13517         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
13518         starting with the HIDE directive; mark the declarations in a private
13519         part as hidden in SPARK if the private part starts with the HIDE
13520         directive
13521         * restrict.adb, restrict.ads
13522         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
13523         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
13524         argument node belongs to a part which is hidden in SPARK
13525         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
13526         parts in SPARK; protect the possibly costly call to
13527         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
13528         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
13529         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
13530         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
13531         Tok_SPARK_Hide.
13532         (Scan): recognize special comment starting with '#' and followed by
13533         SPARK keyword "hide" as a HIDE directive.
13534
13535 2011-08-02  Yannick Moy  <moy@adacore.com>
13536
13537         * types.ads, erroutc.ads: Minor reformatting.
13538
13539 2011-08-02  Vincent Celier  <celier@adacore.com>
13540
13541         * link.c: Add response file support for cross platforms.
13542
13543 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13544
13545         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
13546         in an association, set parent field of copy before partial analysis.
13547         * sem_res.adb (Resolve_Slice): create reference to itype only when
13548         expansion is enabled.
13549
13550 2011-08-02  Yannick Moy  <moy@adacore.com>
13551
13552         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
13553         for new flag denoting which subprogram bodies are in ALFA
13554         * restrict.adb, sem_ch7.adb: Update comment
13555         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
13556         sem_ch9.adb, sem_res.adb: Add calls to
13557         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
13558         * sem_ch6.adb (Analyze_Function_Return): add calls to
13559         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
13560         middle of the body, and extended return.
13561         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
13562         False when missing return.
13563         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
13564         to True for subprograms whose spec is in ALFA. Remove later on the flag
13565         on the entity used for a subprogram body when there exists a separate
13566         declaration.
13567         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
13568         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
13569         False, otherwise do nothing.
13570
13571 2011-08-02  Robert Dewar  <dewar@adacore.com>
13572
13573         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13574
13575 2011-08-02  Yannick Moy  <moy@adacore.com>
13576
13577         * sem_ch4.ads: minor formatting.
13578
13579 2011-08-02  Yannick Moy  <moy@adacore.com>
13580
13581         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
13582         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
13583         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
13584         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
13585         opt.ads: cleanup of SPARK mode
13586
13587 2011-08-02  Yannick Moy  <moy@adacore.com>
13588
13589         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
13590         types.
13591         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
13592         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
13593         * sem_ch3.adb
13594         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
13595         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
13596         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
13597         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
13598         types.
13599         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
13600         non-static range.
13601         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
13602         functions whose return type is not in ALFA.
13603         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
13604         specifications.
13605         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
13606         parameter's type is not in ALFA.
13607         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
13608         types are in ALFA.
13609
13610 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13611
13612         * sem_ch6 (Analyze_Expression_Function): treat the function as
13613         Inline_Always, and introduce a subprogram declaration for it when it is
13614         not a completion.
13615         * inline.adb (Add_Inlined_Body): recognize bodies that come from
13616         expression functions, so that the back-end can determine whether they
13617         can in fact be inlined.
13618         * sem_util.adb (Is_Expression_Function): predicate to determine whether
13619         a function body comes from an expression function.
13620
13621 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13622
13623         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
13624         null exclusions to test Can_Never_Be_Null on the anonymous access types
13625         of the formals rather than testing the formals themselves. Exclude this
13626         check in cases where the Old_Formal is marked as a controlling formal,
13627         to avoid issuing spurious errors for bodies completing dispatching
13628         operations (due to the flag not getting set on controlling access
13629         formals in body specs).
13630         (Find_Corresponding_Spec): When checking full and subtype conformance of
13631         subprogram bodies in instances, pass Designated and E in that order, for
13632         consistency with the expected order of the formals (New_Id followed by
13633         Old_Id).
13634
13635 2011-08-02  Robert Dewar  <dewar@adacore.com>
13636
13637         * sem_ch8.adb: Minor reformatting.
13638
13639 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13640
13641         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
13642         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
13643         primitive operations of class-wide actuals.
13644
13645 2011-08-02  Javier Miranda  <miranda@adacore.com>
13646
13647         * exp_atag.ads, exp_atag.adb
13648         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
13649         since its value is implicitly passed in argument Typ.
13650         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
13651         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
13652         Build_Common_Dispatching_Select_Statements.
13653
13654 2011-08-02  Robert Dewar  <dewar@adacore.com>
13655
13656         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
13657         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
13658         Minor reformatting.
13659
13660 2011-08-02  Robert Dewar  <dewar@adacore.com>
13661
13662         * sem_res.adb: Minor reformatting.
13663         * sem_prag.adb: Minor reformatting.
13664
13665 2011-08-02  Javier Miranda  <miranda@adacore.com>
13666
13667         * exp_atag.adb, exp_atags.ads
13668         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
13669         by the tagged type Entity. Required to use this routine in the VM
13670         targets since we do not have available the Tag entity in the VM
13671         platforms.
13672         * exp_ch6.adb
13673         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
13674         Ada.Tags has not been previously loaded.
13675         * exp_ch7.adb
13676         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
13677         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
13678         * sem_aux.adb
13679         (Enclosing_Dynamic_Scope): Add missing support to handle the full
13680         view of enclosing scopes. Required to handle enclosing scopes that
13681         are synchronized types whose full view is a task type.
13682         * exp_disp.adb
13683         (Build_VM_TSDs): Minor code improvement to avoid generating and
13684         analyzing lists with empty nodes.
13685         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
13686         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
13687         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
13688         (Make_Disp_Timed_Select_Body): Add support for VM targets.
13689         (Make_Select_Specific_Data_Table): Add support for VM targets.
13690         (Make_VM_TSD): Generate code to initialize the SSD structure of
13691         the TSD.
13692
13693 2011-08-02  Yannick Moy  <moy@adacore.com>
13694
13695         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
13696         cross-references section in ALI.
13697         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
13698         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
13699         Sub).
13700         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
13701         subprogram or package entity of a node
13702         (Is_Local_Reference_Type): new function returns True for references
13703         selected in local cross-references.
13704         (Lt): function extracted from Lt in Output_References
13705         (Write_Entity_Name): function extracted from Output_References
13706         (Generate_Definition): generate reference with type 'D' for definition
13707         of objects (object declaration and parameter specification), with
13708         appropriate locations and units, for use in local cross-references.
13709         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
13710         references of type 'I' for initialization in object definition.
13711         (Output_References): move part of function Lt and procedure
13712         Write_Entity_Name outside of the body. Ignore references of types 'D'
13713         and 'I' introduced for local cross-references.
13714         (Output_Local_References): new procedure to output the local
13715         cross-references sections.
13716         (Lref_Entity_Status): new array defining whether an entity is a local
13717         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
13718         with 'I' type when initialization expression is present.
13719         * get_scos.adb, get_scos.ads: Correct comments and typos
13720
13721 2011-08-02  Javier Miranda  <miranda@adacore.com>
13722
13723         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
13724         the JVM target.
13725         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
13726         the JVM target.
13727         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
13728         TSD support.
13729
13730 2011-08-02  Vincent Celier  <celier@adacore.com>
13731
13732         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
13733         (No_Space_Img): New function
13734         (Find_Excluded_Sources): When reading from a file, record the file name
13735         and the line number for each excluded source.
13736         (Mark_Excluded_Sources): When reporting an error, if the excluded
13737         sources were read from a file, include file name and line number in
13738         the error message.
13739
13740 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13741
13742         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
13743
13744 2011-08-02  Robert Dewar  <dewar@adacore.com>
13745
13746         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
13747
13748 2011-08-02  Javier Miranda  <miranda@adacore.com>
13749
13750         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
13751         generation of TSDs to the DOTNET compiler.
13752         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
13753         generation of TSDs to the DOTNET compiler.
13754
13755 2011-08-02  Javier Miranda  <miranda@adacore.com>
13756
13757         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
13758         record of all the tagged types declared inside library level package
13759         declarations, library level package bodies or library level subprograms.
13760         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
13761         associated with a given tagged type.
13762         (Build_VM_TSDs): New subprogram.
13763         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
13764         compilation units that are subprograms.
13765         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
13766         compilation units that are package bodies.
13767         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
13768         units that are a package declaration or a package instantiation.
13769         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
13770         reorganization to improve the error generated by the frontend when the
13771         function Ada.Tags.Secondary_Tag is not available.
13772         * rtsfind.ads (RE_Register_TSD): New runtime entity.
13773         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
13774
13775 2011-08-02  Javier Miranda  <miranda@adacore.com>
13776
13777         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
13778
13779 2011-08-02  Robert Dewar  <dewar@adacore.com>
13780
13781         * s-imenne.ads: Minor reformatting.
13782
13783 2011-08-02  Robert Dewar  <dewar@adacore.com>
13784
13785         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
13786         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
13787         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
13788
13789 2011-08-02  Robert Dewar  <dewar@adacore.com>
13790
13791         * einfo.ads (Materialize_Entity): Document this is only for renamings
13792         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
13793         required debug information in the case where we transform the object
13794         declaration into a renaming declaration.
13795         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
13796         object
13797         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
13798         Materialize_Entity.
13799
13800 2011-08-02  Robert Dewar  <dewar@adacore.com>
13801
13802         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
13803         Suppress_Init_Procs.
13804         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
13805         Suppress_Initialization/Initialization_Suppressed.
13806         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
13807         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
13808         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
13809         * sem_prag.adb: New processing for pragma Suppress_Initialization.
13810
13811 2011-08-02  Robert Dewar  <dewar@adacore.com>
13812
13813         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
13814         Minor reformatting.
13815
13816 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13817
13818         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
13819         only have inheritable classwide pre/postconditions.
13820
13821 2011-08-02  Javier Miranda  <miranda@adacore.com>
13822
13823         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
13824         * rtsfind.ads (RE_Check_TSD): New runtime entity.
13825         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
13826         checks if the external tag of a type is the same as the external tag
13827         of some other declaration.
13828
13829 2011-08-02  Thomas Quinot  <quinot@adacore.com>
13830
13831         * s-taskin.ads: Minor reformatting.
13832
13833 2011-08-02  Emmanuel Briot  <briot@adacore.com>
13834
13835         * g-comlin.adb (Display_Help): swap the order in which it prints the
13836         short help and the general usage.
13837
13838 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13839
13840         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
13841         the aspect declarations and attach them to the generic copy for
13842         subsequent analysis.
13843         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
13844         declarations of the generic tree to the new subprogram declarations.
13845         * sem_attr.adb (Check_Precondition_Postcondition): recognize
13846         conditions that apply to a subprogram instance.
13847
13848 2011-08-02  Robert Dewar  <dewar@adacore.com>
13849
13850         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
13851
13852 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13853
13854         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
13855         private type with a tagged full view is not derived in the immediate
13856         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
13857
13858 2011-08-02  Robert Dewar  <dewar@adacore.com>
13859
13860         * exp_ch4.adb: Minor reformatting.
13861
13862 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13863
13864         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
13865         Ada2012 iterator, the loop will be rewritten during expansion into a
13866         while loop with a cursor and an element declaration. Do not analyze the
13867         body in this case, because if the container is for indefinite types the
13868         actual subtype of the elements will only be determined when the cursor
13869         declaration is analyzed.
13870
13871 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13872
13873         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
13874         size/alignment related attributes in CodePeer_Mode.
13875
13876 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
13877
13878         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
13879         Prepend_Element, since this can result in the operation getting the
13880         wrong slot in the full type's dispatch table if the full type has
13881         inherited operations. The incomplete type's operation will get added
13882         to the proper position in the full type's primitives
13883         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13884         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13885         dispatching operations, since there are cases where nonprimitive
13886         subprograms can get added to the list of incomplete dependents (such
13887         as subprograms in nested packages).
13888         * sem_ch6.adb (Process_Formals): First, remove test for being in a
13889         private part when determining whether to add a primitive with a
13890         parameter of a tagged incomplete type to the Private_Dependents list.
13891         Such primitives can also occur in the visible part, and should not have
13892         been excluded from being private dependents.
13893         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13894         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13895         list of a Taft-amendment incomplete type is a primitive before issuing
13896         an error that the full type must appear in the same unit. There are
13897         cases where nonprimitives can be in the list (such as subprograms in
13898         nested packages).
13899         * sem_disp.adb (Derives_From): Use correct condition for checking that
13900         a formal's type is derived from the type of the corresponding formal in
13901         the parent subprogram (the condition was completely wrong). Add
13902         checking that was missing for controlling result types being derived
13903         from the result type of the parent operation.
13904
13905 2011-08-02  Yannick Moy  <moy@adacore.com>
13906
13907         * errout.adb (First_Node): minor renaming
13908         * restrict.adb (Check_Formal_Restriction): put restriction warning on
13909         first node.
13910
13911 2011-08-02  Yannick Moy  <moy@adacore.com>
13912
13913         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13914         before accessing operands.
13915         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13916         decide whether an initialization expression respects SPARK rules, as
13917         the plain node is the expanded one. This allows for more valid warnings
13918         to be issued.
13919         * gnat_rm.texi: Minor update.
13920
13921 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
13922
13923         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13924         previous change.
13925
13926 2011-08-02  Robert Dewar  <dewar@adacore.com>
13927
13928         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13929
13930 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13931
13932         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13933         loop statements and the element renaming declaration with a block when
13934         the element type is controlled.
13935
13936 2011-08-02  Yannick Moy  <moy@adacore.com>
13937
13938         * sinfo.ads: Minor formatting.
13939
13940 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13941
13942         * sem_aggr.adb (Add_Association): if the association has a box and no
13943         expression, use the Sloc of the aggregate itself for the new
13944         association.
13945         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13946         the Original_Node.
13947
13948 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
13949
13950         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13951         When a container is provided via a function call, generate a renaming
13952         of the function result. This avoids the creation of a transient scope
13953         and the premature finalization of the container.
13954         * exp_ch7.adb (Is_Container_Cursor): Removed.
13955         (Wrap_Transient_Declaration): Remove the supression of the finalization
13956         of the list controller when the declaration denotes a container cursor,
13957         it is not needed.
13958
13959 2011-08-02  Yannick Moy  <moy@adacore.com>
13960
13961         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13962         node is from source, instead of the original node being from source.
13963         * sem_aggr.adb
13964         (Resolve_Array_Aggregate): refine the check for a static expression, to
13965         recognize also static ranges
13966         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13967         Array_Type_Declaration): postpone the test for the type being a subtype
13968         mark after the type has been resolved, so that component-selection and
13969         expanded-name are discriminated.
13970         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13971         to distinguish the case of an iteration scheme, so that an error is
13972         issed on a non-static range in SPARK except in an iteration scheme.
13973         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13974         In_Iter_Schm = True.
13975         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13976         user-defined operators so that they are allowed in renaming
13977         * sem_ch8.adb
13978         (Find_Selected_Component): refine the check for prefixing of operators
13979         so that they are allowed in renaming. Move the checks for restrictions
13980         on selector name after analysis discriminated between
13981         component-selection and expanded-name.
13982         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13983         concatenation argument of string type if it is static.
13984         * sem_util.adb, sem_util.ads
13985         (Check_Later_Vs_Basic_Declarations): add a new function
13986         Is_Later_Declarative_Item to decice which declarations are allowed as
13987         later items, in the two different modes Ada 83 and SPARK. In the SPARK
13988         mode, add that renamings are considered as later items.
13989         (Enclosing_Package): new function to return the enclosing package
13990         (Enter_Name): correct the rule for homonyms in SPARK
13991         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13992         from source (result of expansion) to avoid issuing wrong warnings.
13993
13994 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13995
13996         * errout.adb: On anything but an expression First_Node returns its
13997         argument.
13998
13999 2011-08-02  Pascal Obry  <obry@adacore.com>
14000
14001         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
14002
14003 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14004
14005         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
14006         Set the associated loop as the related expression of internally
14007         generated cursors.
14008         * exp_ch7.adb (Is_Container_Cursor): New routine.
14009         (Wrap_Transient_Declaration): Supress the finalization of the list
14010         controller when the declaration denotes a container cursor.
14011
14012 2011-08-02  Yannick Moy  <moy@adacore.com>
14013
14014         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
14015         command line now.
14016         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
14017         expression is a simple expression. This check cannot be performed in
14018         the semantics, so just drop it.
14019         (P_Index_Or_Discriminant_Constraint): move check that the index or
14020         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
14021         semantics. Other cases were previously checked in the semantics.
14022         * par-ch4.adb (P_Name): move checks that a selector name is not
14023         character literal or an operator symbol to Find_Selected_Component in
14024         the semantics
14025         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
14026         declarations are not placed after later declarations in a separate
14027         procedure in Sem_Util (possibly not the best choice?), to be used both
14028         during parsing, for Ada 83 mode, and during semantic analysis, for
14029         SPARK mode.
14030         * par-endh.adb (Check_End): move check that end label is not missing
14031         to Process_End_Label in the semantics
14032         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
14033         the special case for SPARK restriction
14034         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
14035         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
14036         parameter Force to issue the error message even on internal node (used
14037         for generated end label). Call Check_Restriction to check when an error
14038         must be issued. In SPARK mode, issue an error message even if the
14039         restriction is not set.
14040         (Check_Restriction): new procedure with an additional out parameter to
14041         inform the caller that a message has been issued
14042         * sem_aggr.adb: Minor modification of message
14043         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
14044         instead of issuing an error message directly
14045         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
14046         declarations are not placed after later declarations, by calling
14047         Check_Later_Vs_Basic_Declarations
14048         (Analyze_Subtype_Declaration): move here the check that an index or
14049         discriminant constraint must be a subtype mark. Change the check that
14050         a subtype of String must start at one so that it works on subtype marks.
14051         * sem_ch4.adb (Analyze_Call): move here the check that a named
14052         association cannot follow a positional one in a call
14053         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
14054         instead of issuing an error message directly
14055         * sem_ch8.adb (Find_Selected_Component): move here the check that a
14056         selector name is not a character literal or an operator symbol. Move
14057         here the check that the prefix of an expanded name cannot be a
14058         subprogram or a loop statement.
14059         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
14060         procedure called from parsing and semantics to check that basic
14061         declarations are not placed after later declarations
14062         (Process_End_Label): move here the check that end label is not missing
14063
14064 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14065
14066         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
14067         representation clause in codepeer mode, since it confuses CodePeer and
14068         does not bring useful info.
14069
14070 2011-08-02  Ed Falis  <falis@adacore.com>
14071
14072         * init.c: initialize fp hw on MILS.
14073
14074 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14075
14076         * errout.adb (First_Node): for bodies, return the node itself (small
14077         optimization). For other nodes, do not check source_unit if the node
14078         comes from Standard.
14079
14080 2011-08-02  Robert Dewar  <dewar@adacore.com>
14081
14082         * exp_ch3.adb: Minor comment additions.
14083         * sem_ch13.adb: Minor reformatting.
14084
14085 2011-08-02  Pascal Obry  <obry@adacore.com>
14086
14087         * make.adb, makeutl.adb: Removes some superfluous directory separator.
14088
14089 2011-08-02  Robert Dewar  <dewar@adacore.com>
14090
14091         * sem_attr.adb: Minor reformatting.
14092
14093 2011-08-02  Robert Dewar  <dewar@adacore.com>
14094
14095         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
14096         (Has_Default_Component_Value): Removed
14097         * einfo.ads Comment updates
14098         (Has_Default_Aspect): Replaces Has_Default_Value
14099         (Has_Default_Component_Value): Removed
14100         * exp_ch13.adb
14101         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
14102         * exp_ch3.adb
14103         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
14104         (Get_Simple_Init_Val): Handle Default_Value aspect
14105         (Needs_Simple_Initialization): Handle Default_Value aspect
14106         * exp_ch3.ads: Needs_Simple_Initialization
14107         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
14108         * par-prag.adb (Pragma_Default[_Component]Value) Removed
14109         * sem_ch13.adb
14110         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
14111         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
14112         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
14113
14114 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14115
14116         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
14117         package containing iteration primitives.
14118         exp_ch5.adb (Expand_Iterator_Loop): ditto.
14119
14120 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14121
14122         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
14123         "of", pre-analyze expression in case it is a function call with
14124         finalization actions that must be placed ahead of the loop.
14125         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
14126         on an Ada2012 iterator, insert them ahead of the rewritten loop.
14127
14128 2011-08-02  Geert Bosch  <bosch@adacore.com>
14129
14130         * cstand.adb (Create_Float_Types): Only consider C's long double for
14131         Long_Long_Float, in addition to double.
14132
14133 2011-08-02  Robert Dewar  <dewar@adacore.com>
14134
14135         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
14136         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
14137         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
14138         Minor reformatting.
14139
14140 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14141
14142         * sem_attr.adb: handle properly 'Result when it is a prefix of an
14143         indexed component.
14144
14145 2011-08-02  Javier Miranda  <miranda@adacore.com>
14146
14147         * einfo.ads, einfo.adb
14148         (Original_Access_Type): Move this attribute to Node26 since there was
14149         an undocumented use of Node21 in E_Access_Subprogram_Type entities
14150         which causes conflicts and breaks the generation of the .NET compiler.
14151         (Interface_Name): Add missing documentation on JGNAT only uses of
14152         this attribute.
14153
14154 2011-08-02  Geert Bosch  <bosch@adacore.com>
14155
14156         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
14157         (Find_Back_End_Float_Type): Likewise
14158         (Create_Back_End_Float_Types): Likewise
14159         (Create_Float_Types): Likewise
14160         (Register_Float_Type): Likewise
14161         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
14162         Nlist and split out type selection in new local Find_Base_Type function.
14163         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
14164         Nlist
14165         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
14166
14167 2011-08-02  Robert Dewar  <dewar@adacore.com>
14168
14169         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
14170         alpha order).
14171         * opt.ads: Minor comment change.
14172         * sem_ch12.adb: Minor code reorganization.
14173
14174 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
14175
14176         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
14177         subtype's list of rep items to the list on the full subtype in the case
14178         where the lists are the same.
14179
14180 2011-08-02  Geert Bosch  <bosch@adacore.com>
14181
14182         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
14183         using the one from System.Strings, which also deallocates all strings.
14184
14185 2011-08-02  Geert Bosch  <bosch@adacore.com>
14186
14187         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
14188         function.
14189         * gcc-interface/Make-lang.in: Update dependencies.
14190
14191 2011-08-02  Olivier Hainque  <hainque@adacore.com>
14192
14193         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
14194         end_locus.
14195
14196 2011-08-02  Javier Miranda  <miranda@adacore.com>
14197
14198         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
14199         associated with anonymous access to subprograms.
14200
14201 2011-08-02  Geert Bosch  <bosch@adacore.com>
14202
14203         * opt.ads
14204         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
14205         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
14206         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
14207         (Add_Symbol_Definition): Move to switch-c.adb
14208         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
14209         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
14210         (Add_Symbol_Definition): Move to switch-c.adb.
14211         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
14212         * sem_warn.adb
14213         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14214         Move to warnsw.adb.
14215         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
14216         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
14217         Move to warnsw.adb.
14218         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
14219         (Add_Symbol_Definition): Moved from Prepcomp.
14220         * switch-c.ads: Update copyright notice. Use String_List instead of
14221         Argument_List, removing dependency on System.OS_Lib.
14222
14223 2011-08-02  Yannick Moy  <moy@adacore.com>
14224
14225         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
14226         mode on initialization expression which does not respect SPARK
14227         restrictions.
14228         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
14229         if the tree referenced by its argument represents an initialization
14230         expression in SPARK, suitable for initializing an object in an object
14231         declaration.
14232
14233 2011-08-02  Javier Miranda  <miranda@adacore.com>
14234
14235         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
14236         internally generated access to subprogram with its associated protected
14237         subprogram type.
14238         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
14239
14240 2011-08-02  Geert Bosch  <bosch@adacore.com>
14241
14242         * cstand.adb (Register_Float_Type): Print information about type to
14243         register, if the Debug_Flag_Dot_B is set.
14244         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
14245         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
14246         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
14247         with a requested precision of more than Max_Digits digits and no more
14248         than Max_Base_Digits digits, if a range specification is present and the
14249         Predefined_Float_Types list has a suitable type to derive from.
14250         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
14251         case of type completion with pragma Import
14252         * sem_prag.adb
14253         (Process_Import_Predefined_Type): Processing to complete a type
14254         with pragma Import. Currently supports floating point types only.
14255         (Set_Convention_From_Pragma): Do nothing without underlying type.
14256         (Process_Convention): Guard against absence of underlying type,
14257         which may happen when importing incomplete types.
14258         (Process_Import_Or_Interface): Handle case of importing predefined
14259         types. Tweak error message.
14260
14261 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14262
14263         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
14264         functions to previous change.  Reorganize code slightly.
14265
14266 2011-08-02  Geert Bosch  <bosch@adacore.com>
14267
14268         * back_end.ads (Register_Type_Proc): New call back procedure type for
14269         allowing the back end to provide information about available types.
14270         (Register_Back_End_Types): New procedure to register back end types.
14271         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
14272         available types.
14273         * cstand.adb (Back_End_Float_Types): New list for floating point types
14274         supported by the back end.
14275         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
14276         (Copy_Float_Type): New procedure to make new copies of predefined types.
14277         (Register_Float_Type): New call back procedure to populate the BEFT list
14278         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
14279         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
14280         (Create_Float_Types): New procedure to create entities for floating
14281         point types predefined in Standard, and put these and any remaining
14282         BEFTs on the Predefined_Float_Types list.
14283         * stand.ads (Predefined_Float_Types): New list for predefined floating
14284         point types that do not have declarations in package Standard.
14285
14286 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14287
14288         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
14289         entity node for the unit containing the parameter.
14290         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
14291         (Add_Inlined_Subprogram): Likewise.
14292         * gcc-interface/Make-lang.in: Update dependencies.
14293
14294 2011-08-02  Thomas Quinot  <quinot@adacore.com>
14295
14296         * s-stusta.adb (Print): Make sure Pos is always initialized to a
14297         suitable value.
14298
14299 2011-08-02  Geert Bosch  <bosch@adacore.com>
14300
14301         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
14302
14303 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14304
14305         * sem_type.adb (Covers): Move trivial case to the top and reuse the
14306         computed value of Base_Type.
14307
14308 2011-08-02  Yannick Moy  <moy@adacore.com>
14309
14310         * restrict.adb (Check_Restriction): issue an error for any use of
14311         class-wide, even if the No_Dispatch restriction is not set.
14312         * sem_aggr.adb: Correct typos in comments and messages in formal mode
14313         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
14314         when completing a private extension, the type named in the private part
14315         is not the same as that named in the visible part.
14316         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
14317         of an inherited primitive operations of a tagged type or type extension
14318         that returns the tagged type.
14319         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
14320         function which returns True for an implicit operation inherited by the
14321         derived type declaration for the argument type.
14322         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
14323         order.
14324
14325 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14326
14327         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
14328         Process_Bounds, to perform analysis with expansion of a range or an
14329         expression that is the iteration scheme for a loop.
14330         (Analyze_Iterator_Specification): If domain of iteration is given by a
14331         function call with a controlled result, as is the case if call returns
14332         a predefined container, ensure that finalization actions are properly
14333         generated.
14334         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
14335
14336 2011-08-02  Javier Miranda  <miranda@adacore.com>
14337
14338         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
14339         * gcc-interface/Make-lang.in: Update dependencies.
14340
14341 2011-08-02  Javier Miranda  <miranda@adacore.com>
14342
14343         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
14344         determine if the analysis is performed using N or Original_Node (N).
14345         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
14346         functionality of routine Is_Variable avoids code duplication.
14347         * checks.adb (Determine_Range): Handle temporaries generated by
14348         Remove_Side_Effects.
14349
14350 2011-08-02  Javier Miranda  <miranda@adacore.com>
14351
14352         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
14353         expansion of the condition. Required since the previous analysis was
14354         done with expansion disabled (see Resolve_Quantified_Expression) and
14355         hence checks were not inserted and record comparisons have not been
14356         expanded.
14357
14358 2011-08-02  Ed Falis  <falis@adacore.com>
14359
14360         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
14361         Update header.
14362
14363 2011-08-02  Bob Duff  <duff@adacore.com>
14364
14365         * opt.ads: Minor comment fix.
14366
14367 2011-08-02  Bob Duff  <duff@adacore.com>
14368
14369         * sem_ch12.adb (Analyze_Package_Instantiation,
14370         Analyze_Subprogram_Instantiation): Turn off style checking while
14371         analyzing an instance. Whatever style checks that apply to the generic
14372         unit should apply, so it makes no sense to apply them in an instance.
14373         This was causing trouble when compiling an instance of a runtime
14374         unit that violates the -gnatyO switch.
14375         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
14376         one of the two case statements, causing spurious errors.
14377
14378 2011-08-02  Robert Dewar  <dewar@adacore.com>
14379
14380         * uname.adb: Minor reformatting.
14381         * gnatcmd.adb: Minor reformatting.
14382         * exp_attr.adb: Minor reformatting.
14383
14384 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14385
14386         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
14387         No_Dispatching_Calls, do not look for the Assign primitive, because
14388         predefined primitives are not created in this case.
14389
14390 2011-08-02  Bob Duff  <duff@adacore.com>
14391
14392         * stylesw.ads: Minor comment fixes.
14393
14394 2011-08-02  Robert Dewar  <dewar@adacore.com>
14395
14396         * freeze.adb (Add_To_Result): New procedure.
14397
14398 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14399
14400         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
14401         time, if the specific run-time routines for handling streams of strings
14402         are not available, use the default mechanism.
14403
14404 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14405
14406         * s-regpat.ads: Fix typo.
14407
14408 2011-08-02  Vincent Celier  <celier@adacore.com>
14409
14410         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
14411         not null, call it to create the in memory config project file without
14412         parsing an existing default config project file.
14413
14414 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14415
14416         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
14417
14418 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14419
14420         * sem_elim.adb: an abstract subprogram does not need an eliminate
14421         pragma for its descendant to be eliminable.
14422
14423 2011-08-02  Ed Falis  <falis@adacore.com>
14424
14425         * init.c: revert to handling before previous checkin for VxWorks
14426         * s-intman-vxworks.adb: delete unnecessary declarations related to
14427         using Ada interrupt facilities for handling signals.
14428         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
14429         * s-intman-vxworks.ads: Import __gnat_install_handler as
14430         Initialize_Interrupts.
14431         * s-taprop-vxworks.adb: Delete Signal_Mask.
14432         (Abort_Handler): change construction of mask to unblock exception
14433         signals.
14434
14435 2011-08-02  Jerome Guitton  <guitton@adacore.com>
14436
14437         * a-except-2005.adb (Raise_From_Signal_Handler): Call
14438         Debug_Raise_Exception before propagation starts.
14439
14440 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14441
14442         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
14443         to Restriction_Check_Required.
14444         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
14445         * sem_res.adb (Resolve_Call): Likewise.
14446         * sem_attr.adb (Check_Stream_Attribute): Likewise.
14447
14448 2011-08-02  Bob Duff  <duff@adacore.com>
14449
14450         * stylesw.ads: Update comment.
14451         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
14452         * errout.ads: Remove obsolete comment.
14453
14454 2011-08-02  Javier Miranda  <miranda@adacore.com>
14455
14456         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
14457         (Set_Is_Safe_To_Reevaluate): new procedure.
14458         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
14459         assignment is allowed on safe-to-reevaluate variables.
14460         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
14461         temporary created to remove side effects in expressions that use
14462         the secondary stack as safe-to-reevaluate.
14463         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
14464         variables that are not true constants.
14465
14466 2011-08-02  Robert Dewar  <dewar@adacore.com>
14467
14468         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
14469         sem_res.adb, sem_ch6.adb: Minor reformatting.
14470
14471 2011-08-02  Jerome Guitton  <guitton@adacore.com>
14472
14473         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
14474
14475 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14476
14477         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
14478         not set Overridden_Operation if subprogram is an initialization
14479         procedure.
14480
14481 2011-08-02  Yannick Moy  <moy@adacore.com>
14482
14483         * par-ch6.adb: Correct obsolete name in comments
14484         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
14485         which takes two message arguments (existing function takes one), with
14486         second message used for continuation.
14487         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
14488         block statements that originate from a source block statement, not
14489         generated block statements
14490         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
14491         symmetry with procedure case
14492         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
14493         function to issue an error in formal mode if a package specification
14494         contains more than one tagged type or type extension.
14495         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
14496         parameters matching formals of tagged types are objects (or ancestor
14497         type conversions of objects), not general expressions. Issue an error
14498         on view conversions that are not involving ancestor conversion of an
14499         extended type.
14500         (Resolve_Type_Conversion): in formal mode, issue an error on the
14501         operand of an ancestor type conversion which is not an object
14502         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
14503         procedure so that it works also for actuals of function calls
14504         (Is_Actual_Tagged_Parameter): new function which determines if its
14505         argument is an actual parameter of a formal of tagged type in a
14506         subprogram call
14507         (Is_SPARK_Object_Reference): new function which determines if the tree
14508         referenced by its argument represents an object in SPARK
14509
14510 2011-08-02  Robert Dewar  <dewar@adacore.com>
14511
14512         * sem_ch3.adb: Minor reformatting
14513         Minor comment addition
14514         Minor error msg text change
14515
14516 2011-08-02  Javier Miranda  <miranda@adacore.com>
14517
14518         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
14519         function. Used to be more precise when we generate a variable plus one
14520         assignment to remove side effects in the evaluation of the Bound
14521         expressions.
14522         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
14523         of the bound expression to force its re-analysis and thus expand the
14524         associated transient scope (if required). Code cleanup replacing the
14525         previous code that declared the constant entity by an invocation to
14526         routine Force_Evaluation which centralizes this work in the frontend.
14527
14528 2011-08-02  Robert Dewar  <dewar@adacore.com>
14529
14530         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
14531         (Base_Type): Now uses improved Is_Base_Type function
14532         * einfo.ads (Base_Type): Inline this function
14533
14534 2011-08-02  Robert Dewar  <dewar@adacore.com>
14535
14536         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
14537         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
14538
14539 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14540
14541         * gcc-interface/Make-lang.in: Update dependencies.
14542         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
14543         targets.
14544
14545 2011-08-02  Yannick Moy  <moy@adacore.com>
14546
14547         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
14548         non-simple expression used in delta constraint
14549         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
14550         index constraint which is not a subtype mark
14551         * par.adb: With and use Restrict
14552         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
14553         mode on component type which is not a subtype mark and default
14554         expression on component
14555         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
14556         of string which does not have a lower index bound equal to 1
14557         (Array_Type_Declaration): issue an error in formal mode on index or
14558         component type which is not a subtype mark, and on aliased keyword on
14559         component
14560         (Derived_Type_Declaration): issue an error in formal mode on interface,
14561         limited or abstract type
14562         (Record_Type_Declaration): issue an error in formal mode on interface
14563         (Record_Type_Definition): issue an error in formal mode on tagged types
14564         and type extensions not declared in the specification of a library unit
14565         package; on null non-tagged record; on variant part
14566
14567 2011-08-02  Vincent Celier  <celier@adacore.com>
14568
14569         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
14570         not declared for qualified library project when Library_Name is not
14571         declared, but Library_Dir is.
14572
14573 2011-08-02  Robert Dewar  <dewar@adacore.com>
14574
14575         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
14576         pragmas (affects aspects [Component_]Default_Value
14577         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
14578         component type for the resolution
14579
14580 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14581
14582         * einfo.adb (Base_Type): Tune implementation for speed.
14583
14584 2011-08-02  Robert Dewar  <dewar@adacore.com>
14585
14586         * freeze.adb: Minor reformatting.
14587
14588 2011-08-02  Thomas Quinot  <quinot@adacore.com>
14589
14590         * scos.ads: Update comments.
14591
14592 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14593
14594         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
14595         base type, because the parent may be a subtype of a private type whose
14596         convention is established in a private part.
14597
14598 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
14599
14600         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
14601         statement in a block when the expansion of the return expression has
14602         created a finalization chain.
14603         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
14604         with the parent node.
14605         Add N_Extended_Return_Statement to handle the case where a transient
14606         object declaration appears in the Return_Object_Declarations list of
14607         an extended return statement.
14608
14609 2011-08-02  Matthew Gingell  <gingell@adacore.com>
14610
14611         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
14612         unused parameter 'name'.
14613
14614 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14615
14616         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
14617         inherited operation, check whether its alias, which is the source
14618         operastion that it renames, has been marked eliminated.
14619
14620 2011-08-02  Javier Miranda  <miranda@adacore.com>
14621
14622         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
14623         in-mode parameter whose type is an access type since it can be used to
14624         modify its designated object. Enforce code that handles as safe an
14625         access type that is not access-to-constant but it is the result of a
14626         previous removal of side-effects.
14627         (Remove_Side_Effects): Minor code reorganization of cases which require
14628         no action. Done to incorporate documentation on new cases uncovered
14629         working in this ticket: no action needed if this routine was invoked
14630         too early and the nodes are not yet decorated.
14631         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
14632         to routine Remove_Side_Effects by calls to Force_Evaluation since they
14633         were issued with actuals that are implicitly provided by
14634         Force_Evaluation.
14635
14636 2011-08-02  Robert Dewar  <dewar@adacore.com>
14637
14638         * sem_ch3.adb, sem_res.adb: Minor reformatting.
14639
14640 2011-08-02  Yannick Moy  <moy@adacore.com>
14641
14642         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
14643         to issue an error in formal mode on attribute not supported in this mode
14644         (Analyze_Attribute): issue errors on standard attributes not supported
14645         in formal mode.
14646         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
14647         comment, and issue error in formal mode on modulus which is not a power
14648         of 2.
14649         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
14650         range.
14651         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
14652         subtype mark.
14653         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
14654         operator on modular type (except 'not').
14655
14656 2011-08-02  Robert Dewar  <dewar@adacore.com>
14657
14658         * gnat_rm.texi: Minor reformatting.
14659
14660 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
14661
14662         * s-osinte-linux.ads: Minor comment update and reformatting.
14663         * i-cexten.ads: Make this unit pure, as for its parent.
14664         Will allow its usage in more contexts if needed.
14665
14666 2011-08-02  Robert Dewar  <dewar@adacore.com>
14667
14668         * s-utf_32.ads: Minor comment fix.
14669
14670 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14671
14672         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
14673         operation of a tagged synchronized type, handle the case where the
14674         controlling argument is overloaded.
14675
14676 2011-08-02  Yannick Moy  <moy@adacore.com>
14677
14678         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
14679         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
14680         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
14681         SPARK mode and formal verification mode on processing SPARK restriction
14682         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
14683         requiring consistency checking.
14684
14685 2011-08-02  Robert Dewar  <dewar@adacore.com>
14686
14687         * sem_res.adb: Minor reformatting.
14688
14689 2011-08-02  Robert Dewar  <dewar@adacore.com>
14690
14691         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14692         a-cforse.ads: Remove unneeded with of Ada.Containers
14693         Remove commented out pragma Inline's
14694         Move specifications of new subprograms to the actual specs
14695
14696 2011-08-02  Yannick Moy  <moy@adacore.com>
14697
14698         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14699         a-cforse.ads: Update comments.
14700
14701 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14702
14703         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
14704
14705 2011-08-02  Robert Dewar  <dewar@adacore.com>
14706
14707         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
14708         a-cforse.ads, a-cofove.ads: Minor reformatting.
14709
14710 2011-08-02  Claire Dross  <dross@adacore.com>
14711
14712         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
14713         a-cofove.ads: Add comments.
14714
14715 2011-08-02  Yannick Moy  <moy@adacore.com>
14716
14717         * gnat_rm.texi: Document formal containers.
14718
14719 2011-08-02  Emmanuel Briot  <briot@adacore.com>
14720
14721         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
14722         are empty sections.
14723
14724 2011-08-02  Robert Dewar  <dewar@adacore.com>
14725
14726         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
14727         reformatting.
14728
14729 2011-08-02  Robert Dewar  <dewar@adacore.com>
14730
14731         * aspects.adb: New aspects Default_Value and Default_Component_Value
14732         New format of Aspect_Names table checks for omitted entries
14733         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
14734         handling of boolean aspects for derived types.
14735         New aspects Default_Value and Default_Component_Value
14736         New format of Aspect_Names table checks for omitted entries
14737         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
14738         (Has_Default_Value): New flag
14739         (Has_Default_Component_Value): New flag
14740         (Has_Default_Value): New flag
14741         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
14742         table.
14743         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
14744         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
14745         Default_Value and Default_Component_Value
14746         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
14747         New aspects Default_Value and Default_Component_Value
14748         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
14749         * sprint.adb: Print N_Aspect_Specification node when called from gdb
14750
14751 2011-08-02  Vincent Celier  <celier@adacore.com>
14752
14753         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
14754         inherit library kind.
14755
14756 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14757
14758         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
14759         Minor reformatting.
14760
14761 2011-08-02  Robert Dewar  <dewar@adacore.com>
14762
14763         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
14764
14765 2011-08-02  Yannick Moy  <moy@adacore.com>
14766
14767         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
14768
14769 2011-08-02  Robert Dewar  <dewar@adacore.com>
14770
14771         * impunit.adb: Add comment.
14772
14773 2011-08-02  Yannick Moy  <moy@adacore.com>
14774
14775         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
14776         qualification of aggregates in formal mode
14777         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
14778         another aggregate
14779         (Resolve_Aggregate): complete the test that an aggregate is adequately
14780         qualified in formal mode
14781
14782 2011-08-02  Pascal Obry  <obry@adacore.com>
14783
14784         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
14785         * mlib-prj.adb: Supress warning when compiling binder generated file.
14786         (Build_Library): Supress all warnings when compiling the binder
14787         generated file.
14788
14789 2011-08-02  Yannick Moy  <moy@adacore.com>
14790
14791         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
14792         from here...
14793         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
14794         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
14795         Add with/use clauses to make Check_Formal_Restriction visible
14796
14797 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14798
14799         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
14800         in-parameters when type of the generic formal is private in the generic
14801         spec and non-private in the body.
14802
14803 2011-08-02  Claire Dross  <dross@adacore.com>
14804
14805         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
14806         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
14807         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
14808         * impunit.adb, Makefile.rtl: Take new files into account.
14809
14810 2011-08-02  Robert Dewar  <dewar@adacore.com>
14811
14812         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
14813         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
14814
14815 2011-08-02  Yannick Moy  <moy@adacore.com>
14816
14817         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
14818         formal mode
14819         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
14820         matching static array bounds, taking into account the special case of
14821         string literals
14822         * sem_ch3.adb: Typo in comment.
14823
14824 2011-08-02  Yannick Moy  <moy@adacore.com>
14825
14826         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
14827         which issues an error in formal mode if its argument node is originally
14828         from source
14829         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
14830         has a discriminant specification so that it does not include the case
14831         of derived types
14832         (Derived_Type_Declaration): move here the test that a derived type has a
14833         discriminant specification
14834         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
14835         first element of a component association before accessing its choices
14836         (presence of component association is not enough)
14837         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
14838         declaration is a library item before accessing the next element in a
14839         list, as library items are not member of lists
14840         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
14841         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
14842         Check_Formal_Restriction whenever possible.
14843
14844 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14845
14846         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
14847         reference when needed.
14848
14849 2011-08-02  Bob Duff  <duff@adacore.com>
14850
14851         * gnat_ugn.texi: Fix typo.
14852
14853 2011-08-02  Vincent Celier  <celier@adacore.com>
14854
14855         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
14856         archive file name. Do not use the full path name of archives for Open
14857         VMS.
14858
14859 2011-08-02  Robert Dewar  <dewar@adacore.com>
14860
14861         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
14862         Analyze_Aspect_Specifications
14863         * sem_ch13.adb
14864         (Analyze_Aspect_Specifications): New handling for boolean aspects
14865         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
14866         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
14867         sequence for Analyze_Aspect_Specifications
14868         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
14869         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
14870
14871 2011-08-02  Robert Dewar  <dewar@adacore.com>
14872
14873         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
14874         aspects, since these no longer exist.
14875
14876 2011-08-02  Robert Dewar  <dewar@adacore.com>
14877
14878         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
14879         semicolon, do not try to see if there are aspects following it.
14880         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
14881         aspect spec.
14882
14883 2011-08-02  Robert Dewar  <dewar@adacore.com>
14884
14885         * sem_ch8.adb, aspects.ads: Minor reformatting.
14886
14887 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
14888
14889         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14890         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14891         extracted from...
14892         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
14893
14894 2011-08-02  Yannick Moy  <moy@adacore.com>
14895
14896         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14897         mode on subprogram declaration outside of package specification, unless
14898         it is followed by a pragma Import
14899         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14900         Access_Type_Declaration): issue error in formal mode on access type
14901         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14902         incomplete type
14903         (Analyze_Object_Declaration): issue error in formal mode on object
14904         declaration which does not respect SPARK restrictions
14905         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14906         declaration which does not respect SPARK restrictions
14907         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14908         error in formal mode on digits or delta constraint
14909         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14910         decimal fixed point type
14911         (Derived_Type_Declaration): issue error in formal mode on derived type
14912         other than type extensions of tagged record types
14913         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14914         with check on access definition
14915         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14916         mode on protected definition.
14917         (Analyze_Task_Definition): issue error in formal mode on task definition
14918
14919 2011-08-02  Robert Dewar  <dewar@adacore.com>
14920
14921         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14922
14923 2011-08-02  Javier Miranda  <miranda@adacore.com>
14924
14925         * sem_ch6.adb (Can_Override_Operator): New function.
14926         (Verify_Overriding_Indicator): Add missing code to check overriding
14927         indicator in operators. Fixes regression.
14928         (Check_Overriding_Indicator): Minor reformating after replacing the
14929         code that evaluates if the subprogram can override an operator by
14930         invocations to the above new function.
14931         * einfo.adb
14932         (Write_Field26_Name): Add missing code to ensure that, following
14933         the documentation in einfo.ads, this field is not shown as attribute
14934         "Static_Initialization" on non-dispatching functions.
14935
14936 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
14937
14938         * sem_res.adb (Resolve_Call): A call to
14939         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14940         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14941         i.e., when the second parameter is of type Time_Span.
14942
14943 2011-08-02  Vincent Celier  <celier@adacore.com>
14944
14945         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14946         with an archive instead of -L<library dir> -l<library name>.
14947
14948 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14949
14950         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14951         mark the base types In_Use in addition to making the operations
14952         use_visible.
14953
14954 2011-08-02  Ed Falis  <falis@adacore.com>
14955
14956         * init.c: add and setup __gnat_signal_mask for the exception signals
14957         * s-inmaop-vxworks.adb: new file.
14958         * s-intman-vxworks.adb: remove unnecessary initializations and
14959         simplify remaining
14960         * s-intman-vxworks.ads: remove unnecessary variable
14961         * s-taprop-vxworks.adb: simplify signal initialization
14962
14963 2011-08-02  Robert Dewar  <dewar@adacore.com>
14964
14965         * sem_ch8.adb: Minor code reorganization, comment updates.
14966
14967 2011-08-02  Robert Dewar  <dewar@adacore.com>
14968
14969         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14970         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14971         here from Sem_Res.
14972         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14973         (Matching_Static_Array_Bounds): Moved here from Sem_Res
14974
14975 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14976
14977         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14978         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14979         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14980         use_type_clauses, to handle more efficiently use_type and use_all_type
14981         constructs.
14982         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14983         Ada2012 Use_All_Type clause.
14984         (Use_Class_Wide_Operations): new procedure.
14985
14986 2011-08-02  Robert Dewar  <dewar@adacore.com>
14987
14988         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14989         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14990         expression to expression function.
14991
14992 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
14993
14994         * sem_ch4.adb: transform simple Ada2012 membership into equality only
14995         if types are compatible.
14996
14997 2011-08-02  Yannick Moy  <moy@adacore.com>
14998
14999         * sem_res.adb (Matching_Static_Array_Bounds): new function which
15000         returns True if its argument array types have same dimension and same
15001         static bounds at each index.
15002         (Resolve_Actuals): issue an error in formal mode on actuals passed as
15003         OUT or IN OUT paramaters which are not view conversions in SPARK.
15004         (Resolve_Arithmetic_Op): issue an error in formal mode on
15005         multiplication or division with operands of fixed point types which are
15006         not qualified or explicitly converted.
15007         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
15008         Boolean or array type (except String) operands.
15009         (Resolve_Equality_Op): issue an error in formal mode on equality
15010         operators for array types other than String with non-matching static
15011         bounds.
15012         (Resolve_Logical_Op): issue an error in formal mode on logical operators
15013         for array types with non-matching static bounds. Factorize the code in
15014         Matching_Static_Array_Bounds.
15015         (Resolve_Qualified_Expression): issue an error in formal mode on
15016         qualified expressions for array types with non-matching static bounds.
15017         (Resolve_Type_Conversion): issue an error in formal mode on type
15018         conversion for array types with non-matching static bounds
15019
15020 2011-08-02  Robert Dewar  <dewar@adacore.com>
15021
15022         * par-ch10.adb: Minor code reorganization (use Nkind_In).
15023
15024 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15025
15026         * par-ch9.adb: save location of entry for proper error message.
15027
15028 2011-08-02  Javier Miranda  <miranda@adacore.com>
15029
15030         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
15031         (Use_Full_View) which permits this routine to climb through the
15032         ancestors using the full-view of private parents.
15033         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
15034         Use_Full_View to true in calls to Is_Ancestor.
15035         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
15036         true in call to Is_Ancestor.
15037         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
15038         Use_Full_View to true in call to Is_Ancestor.
15039         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
15040         call to Is_Ancestor.
15041         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
15042         Use_Full_View to true in calls to Is_Ancestor.
15043         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
15044         Make_Select_Specific_Data_Table, Register_Primitive,
15045         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
15046         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
15047         to true in call to Is_Ancestor.
15048         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
15049         Use_Full_View to true in calls to Is_Ancestor.
15050         * exp_cg.adb
15051         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
15052         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
15053
15054 2011-08-02  Robert Dewar  <dewar@adacore.com>
15055
15056         * gnat_rm.texi: Minor reformatting.
15057         * sem_prag.adb: Minor reformatting.
15058
15059 2011-08-02  Tristan Gingold  <gingold@adacore.com>
15060
15061         * vms_data.ads: Add VMS qualifier for -gnateP.
15062
15063 2011-08-02  Robert Dewar  <dewar@adacore.com>
15064
15065         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
15066         * par-ch7.adb (P_Package): Proper placement of aspects for package
15067         decl/instantiation.
15068         * par-endh.adb (Check_End): Ad Is_Sloc parameter
15069         (End_Statements): Add Is_Sloc parameterr
15070         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
15071         (Check_End): Ad Is_Sloc parameter
15072         (End_Statements): Add Is_Sloc parameterr
15073
15074 2011-08-02  Vincent Celier  <celier@adacore.com>
15075
15076         * ug_words: Add VMS qualifier equivalent to -gnateP:
15077         /SYMBOL_PREPROCESSING.
15078
15079 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
15080
15081         * gnat-style.texi: For hexadecimal numeric literals the typical
15082         grouping of digits is 4 to represent 2 bytes.
15083         A procedure spec which is split into several lines is indented two
15084         characters.
15085
15086 2011-08-02  Yannick Moy  <moy@adacore.com>
15087
15088         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
15089         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
15090         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
15091         properly qualified
15092         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
15093         choice in array aggregate
15094         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
15095         mark as ancestor
15096         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
15097         positional and named aggregate for record, or others in record
15098         aggregate, or multiple choice in record aggregate
15099         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
15100         array operands to logical operations AND, OR and XOR do not have the
15101         same static lower and higher bounds
15102         * sem_ch5.adb, sinfo.ads: Correct typos in comments
15103
15104 2011-08-01  Robert Dewar  <dewar@adacore.com>
15105
15106         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
15107         Replaces Last_Source_Node_In_Sequence.
15108         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
15109         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
15110         parens and blank in string (this was inconsistently implemented).
15111         * errout.ads
15112         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
15113         blank in string (this was inconsistently implemented).
15114         * gnat1drv.adb
15115         (Set_Global_Switches): Set formal mode switches appropriately
15116         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
15117         * par-prag.adb
15118         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
15119         call Set_Error_Msg_Lang to set "spark" as language name.
15120         * par.adb: Remove unnecessary call to set formal language for errout
15121         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
15122         appropriately and call Set_Error_Msg_Lang to set "spark" as language
15123         name.
15124         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
15125         calls to it, moved after resolution so that types are known
15126         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
15127         result of concatenation is not of type String
15128         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
15129         concatenation is not properly restricted
15130         * gnat_rm.texi: Add doc on pragma Spark_95.
15131         * gcc-interface/Makefile.in: Remove obsolete target pairs for
15132         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
15133         * gcc-interface/Make-lang.in: Update dependencies.
15134
15135 2011-08-01  Javier Miranda  <miranda@adacore.com>
15136
15137         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
15138         condition that detects if the overridden operation must replace an
15139         existing entity.
15140
15141 2011-08-01  Javier Miranda  <miranda@adacore.com>
15142
15143         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
15144         code declarations inserted by Insert_Actions in each alternative of the
15145         N_Case_Expression node.
15146
15147 2011-08-01  Robert Dewar  <dewar@adacore.com>
15148
15149         * sem_ch6.adb: Minor code reorganization.
15150         * sem_util.adb: Minor reformatting.
15151
15152 2011-08-01  Pascal Obry  <obry@adacore.com>
15153
15154         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
15155         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
15156
15157 2011-08-01  Yannick Moy  <moy@adacore.com>
15158
15159         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
15160         literal or operator symbol which is prefixed
15161         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
15162         mode on access attributes.
15163         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
15164         that concatenation operands are properly restricted in formal mode
15165         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
15166         Analyze_Concatenation_Operand. Issue an error in formal mode if the
15167         result of the concatenation has a type different from String.
15168         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
15169         Analyze_Quantified_Expression, Analyze_Slice,
15170         Analyze_Null): issue an error in formal mode on unsupported constructs
15171         * sem_ch5.adb
15172         (Analyze_Block_Statement): only issue error on source block statement
15173         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
15174         function which returns the last node in a list of nodes for which
15175         Comes_From_Source returns True, if any
15176         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
15177         Last_Source_Node_In_Sequence
15178         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
15179         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
15180         mode on unsupported constructs
15181         * sem_ch9.adb Do not return after issuing error in formal mode, as the
15182         rest of the actions may be needed later on since the error is marked as
15183         not serious.
15184         * sinfo.ads: Typos in comments.
15185
15186 2011-08-01  Pascal Obry  <obry@adacore.com>
15187
15188         * projects.texi: Minor editing.
15189
15190 2011-08-01  Yannick Moy  <moy@adacore.com>
15191
15192         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
15193         insertion character ~~
15194         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
15195         (Set_Error_Msg_Lang): new procedure which fixes the language for use
15196         with insertion character ~~
15197         (Set_Msg_Text): treat insertion character ~~
15198         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
15199         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
15200         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
15201         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
15202         errors related to the formal language restriction not serious
15203         (insertion character |).
15204         * par.adb (Par): set formal language for error messages if needed
15205         * sem_ch6.adb (Check_Missing_Return): take into account possible
15206         generated statements at the end of the function
15207         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
15208         enumeration value to define a new pragma SPARK_95
15209         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
15210         SPARK_Version): new type and variables to store the SPARK version
15211         (none by default).
15212         (SPARK_Mode): return True when SPARK_Version is set
15213         * par-prag.adb: Correct indentation
15214         (Prag): take Pragma_SPARK_95 into account
15215         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
15216         into account.
15217
15218 2011-08-01  Robert Dewar  <dewar@adacore.com>
15219
15220         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
15221         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
15222         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
15223
15224 2011-08-01  Pascal Obry  <obry@adacore.com>
15225
15226         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
15227         Target_Name to Get_Path call.
15228         (Parse_Single_Project): Likewise.
15229         (Post_Parse_Context_Clause): Likewise.
15230         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
15231         Call Initialise_Project_Path with the proper Target_Name.
15232         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
15233         search path.
15234         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
15235         with the proper Target_Name.
15236         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
15237         Part.Parse routine.
15238         (Parse_Project_And_Apply_Config): Likewise.
15239         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
15240         This is fine as this part of the code is supporting only native
15241         compilation.
15242         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
15243         is fine as this part of the code is supporting only native compilation.
15244
15245 2011-08-01  Yannick Moy  <moy@adacore.com>
15246
15247         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
15248         of homonym, unless the homonym is one of the cases allowed in SPARK
15249         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
15250         package declaration occurring after a body.
15251
15252 2011-08-01  Robert Dewar  <dewar@adacore.com>
15253
15254         * checks.adb, exp_ch4.adb: Minor reformatting.
15255
15256 2011-08-01  Javier Miranda  <miranda@adacore.com>
15257
15258         * einfo.ads (Access_Disp_Table): Fix documentation.
15259         (Dispatch_Table_Wrappers): Fix documentation.
15260
15261 2011-08-01  Pascal Obry  <obry@adacore.com>
15262
15263         * prj-env.adb, prj-env.ads: Minor reformatting.
15264
15265 2011-08-01  Yannick Moy  <moy@adacore.com>
15266
15267         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
15268         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15269         procedures out of these packages.
15270         * errout.ads, errout.adb
15271         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
15272         procedures in of this package
15273         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
15274         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
15275         on misplaced later vs initial declarations, like in Ada 83
15276         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
15277         formal mode on attribute of private type whose full type declaration
15278         is not visible
15279         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
15280         package declaration inside a package specification
15281         (Analyze_Full_Type_Declaration): issue error in formal mode on
15282         controlled type or discriminant type
15283         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
15284         user-defined operator means that it should come from the source
15285         (New_Overloaded_Entity): issue error in formal mode on overloaded
15286         entity.
15287         * sem_ch6.ads, sem_ch13.ads: typos in comments.
15288
15289 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15290
15291         * atree.adb: Minor reformatting.
15292         * checks.adb: Minor reformatting.
15293
15294 2011-08-01  Vincent Celier  <celier@adacore.com>
15295
15296         * s-parame-vms-ia64.ads: Fix typo in comment
15297         Minor reformatting
15298         * s-parame-vms-restrict.ads: Removed, unused.
15299
15300 2011-08-01  Javier Miranda  <miranda@adacore.com>
15301
15302         * exp_ch3.adb
15303         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
15304         * sem_ch3.adb
15305         (Constrain_Index): Remove side effects in the evaluation of the bounds.
15306         * sem_ch3.ads, sem_ch3.adb
15307         (Is_Constant_Bound): New extended version of the subprogram that was
15308         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
15309         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
15310         * sem_aux.ads (Constant_Value): Fix typo in comment.
15311         * checks.adb (Generate_Index_Checks): New implementation which, for
15312         array objects with constant bounds, generates the runtime check
15313         referencing the bounds of the array type. For other cases this routine
15314         provides its previous behavior obtaining such values from the array
15315         object.
15316         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
15317         parent type.
15318         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
15319         we cannot have semantic interpretations of the new node.
15320
15321 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15322
15323         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
15324         expressions.
15325
15326 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15327
15328         * sem_ch8.adb: Minor code editing.
15329         * s-vxwext.adb: Remove trailing space.
15330         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
15331         consistency with other files.
15332
15333 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15334
15335         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
15336
15337 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15338
15339         * par-ch10.adb: reject parameterized expressions as compilation unit.
15340         * sem_ch4.adb: handle properly conditional expression with overloaded
15341         then_clause and no else_clause.
15342
15343 2011-08-01  Tristan Gingold  <gingold@adacore.com>
15344
15345         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
15346         like done by System.Aux_DEC.
15347         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
15348
15349 2011-08-01  Yannick Moy  <moy@adacore.com>
15350
15351         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
15352         missing label at end of declaration (subprogram or package)
15353         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
15354         of positional and named parameter association
15355         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
15356         Error_Msg_SP which adds a prefix to the error message giving the name
15357         of the formal language analyzed
15358         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
15359         access result type in subprogram, unconstrained array as result type,.
15360         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
15361         procedure
15362         * sem_ch8.adb: Code clean up.
15363
15364 2011-08-01  Javier Miranda  <miranda@adacore.com>
15365
15366         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
15367         * einfo.ads (Access_Disp_Table): Fix documentation.
15368         (Dispatch_Table_Wrappers): Fix documentation.
15369         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
15370         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
15371         to enforce the documentation of this attribute.
15372         (Set_Is_Interface): Cleanup the assertion.
15373         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
15374         the Underlying_Type entity before reading attribute Access_Disp_Table.
15375         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
15376         Locate the Underlying_Type before reading attribute Access_Disp_Table.
15377         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
15378         the Underlying_Type entity before reading attribute Access_Disp_Table.
15379         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
15380         Locate the Underlying_Type entity before reading attribute
15381         Access_Disp_Table.
15382
15383 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15384
15385         * s-poosiz.ads: Additional overriding indicators.
15386
15387 2011-08-01  Yannick Moy  <moy@adacore.com>
15388
15389         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
15390         formal mode.
15391         (Analyze_Iteration_Scheme): issue error in formal mode when loop
15392         parameter specification does not include a subtype mark.
15393         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
15394         formal mode on abstract subprogram.
15395         (Analyze_Subprogram_Specification): issue error in formal mode on
15396         user-defined operator.
15397         (Process_Formals): issue error in formal mode on access parameter and
15398         default expression.
15399         * sem_ch9.adb (Analyze_Abort_Statement,
15400         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
15401         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
15402         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
15403         Analyze_Requeue, Analyze_Selective_Accept,
15404         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
15405         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
15406         issue error in formal mode on user-defined raise statement.
15407
15408 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15409
15410         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
15411         declaration being hidden when overriding an implicit inherited
15412         subprogram.
15413         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
15414         (-gnats), do not complain about a source file that contains only a
15415         pragma No_Body.
15416
15417 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15418
15419         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
15420         variable if already set.
15421
15422 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15423
15424         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
15425         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
15426         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
15427         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
15428         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
15429         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
15430         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
15431         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
15432         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
15433         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
15434         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
15435         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
15436         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
15437         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
15438         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
15439         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
15440         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
15441         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
15442         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
15443         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
15444         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
15445         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
15446         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
15447         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
15448         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
15449         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
15450         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
15451         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
15452         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
15453         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
15454         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
15455         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
15456         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
15457         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
15458         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
15459         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
15460         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
15461         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
15462         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
15463         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
15464         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
15465         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
15466         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
15467         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
15468         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
15469         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
15470         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
15471         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
15472         s-osinte-mingw.ads: Update to GPLv3 run-time license.
15473         Use GNAT instead of GNARL.
15474
15475 2011-08-01  Bob Duff  <duff@adacore.com>
15476
15477         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
15478         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
15479         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
15480         reformatting.
15481
15482 2011-08-01  Yannick Moy  <moy@adacore.com>
15483
15484         * debug.adb (d.D) reverve flag for the SPARK mode
15485         (d.E) reverve flag for SPARK generation mode
15486         (d.F) reverve flag for Why generation mode
15487         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
15488         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
15489         functions which return True when the corresponding modes are set
15490         (Formal_Language): return "spark" or "alfa" when in formal verification
15491         mode.
15492         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
15493         Error_Msg to prefix the error message with a tag giving the formal
15494         language
15495         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
15496         message with a tag giving the formal language
15497         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
15498         block statement
15499         (Analyze_Case_Statement): issue error in formal mode on case statement
15500         with a single "others" case alternative
15501         (Analyze_Exit_Statement): issue errors in formal mode on exit
15502         statements which do not respect SPARK restrictions
15503         (Analyze_Goto_Statement): issue error in formal mode on goto statement
15504         (Check_Unreachable_Code): always issue an error (not a warning) in
15505         formal mode on unreachable code (concerns both code after an infinite
15506         loop and after an unconditional jump, both not allowed in SPARK)
15507         * sem_ch6.adb (Analyze_Return_Statement): add call to
15508         Set_Return_Present for a procedure containing a return statement
15509         (already done for functions in Analyze_Function_Return)
15510         (Analyze_Function_Return): issue error in formal mode on extended
15511         return or if return is not last statement in function
15512         (Check_Missing_Return): issue error in formal mode if function does
15513         not end with return or if procedure contains a return
15514         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
15515         function to detect if there is an inner scope of its parameter S which
15516         is a loop.
15517
15518 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15519
15520         * sem_ch6.ads: Minor reformatting.
15521
15522 2011-08-01  Javier Miranda  <miranda@adacore.com>
15523
15524         * sem_util.adb (Abstract_Interface_List): Complete condition when
15525         processing private type declarations to avoid reading unavailable
15526         attribute.
15527         (Is_Synchronized_Tagged_Type): Complete condition when processing
15528         private extension declaration nodes to avoid reading unavailable
15529         attribute.
15530
15531 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15532
15533         * sem_ch3.adb: Minor reformatting.
15534
15535 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15536
15537         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
15538         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
15539         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
15540         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
15541         for VMS, instead parametrize the common implementation with
15542         System.Parameters declarations.
15543
15544 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
15545
15546         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
15547
15548 2011-08-01  Tristan Gingold  <gingold@adacore.com>
15549
15550         * seh_init.c: Fix SEH handler installation on win64.
15551
15552 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15553
15554         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
15555         double analysis of an anonymous access to subprogram, because it can
15556         lead to improper sharing of profiles and a back-end crash.
15557
15558 2011-08-01  Robert Dewar  <dewar@adacore.com>
15559
15560         * make.adb, sem_ch4.adb: Minor reformatting.
15561         * gcc-interface/Make-lang.in: Update dependencies.
15562         * sem_util.adb, exp_ch5.adb: Minor reformatting.
15563
15564 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15565
15566         * gnat_rm.texi: Fix definition of Long_Integer.
15567
15568 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15569
15570         * exp_aggr.adb: check limit size of static aggregate unconditionally,
15571         to prevent storage exhaustion.
15572         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
15573         finalized is a function body, insert the cleanup code before the final
15574         return statement, to prevent spurious warnings.
15575         * s-pooglo.ads: add overriding indicator.
15576
15577 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15578
15579         * sem_ch4.adb (Operator_Check): improve error message when both a
15580         with_clause and a use_clause are needed to make operator usage legal.
15581         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
15582         determine whether a compilation unit is visible within an other,
15583         either through a with_clause in the current unit, or a with_clause in
15584         its library unit or one one of its parents.
15585
15586 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15587
15588         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
15589         over an arbitrary expression of an array or container type.
15590         * lib-xref.adb: clarify comment.
15591
15592 2011-08-01  Bob Duff  <duff@adacore.com>
15593
15594         * einfo.ads: Minor reformatting.
15595         * debug.adb: Minor comment improvement.
15596
15597 2011-08-01  Javier Miranda  <miranda@adacore.com>
15598
15599         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
15600         consider hidden subprograms as valid candidates.
15601
15602 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
15603
15604         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
15605
15606 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
15607
15608         * gnat_ugn.texi: Fix typo.
15609
15610 2011-08-01  Robert Dewar  <dewar@adacore.com>
15611
15612         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
15613         lib-xref.adb: Minor reformatting
15614
15615 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
15616
15617         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
15618         when to generate a call to Move_Final_List.
15619         (Has_Controlled_Parts): Remove this function.
15620
15621 2011-08-01  Geert Bosch  <bosch@adacore.com>
15622
15623         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
15624         "," in choice list.
15625
15626 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15627
15628         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
15629         explicit raise of a predefined exception as Comes_From_Source if the
15630         original N_Raise_Statement comes from source.
15631
15632 2011-08-01  Robert Dewar  <dewar@adacore.com>
15633
15634         * sinfo.ads: Add comment.
15635         * sem_ch6.adb: Minor reformatting.
15636
15637 2011-08-01  Robert Dewar  <dewar@adacore.com>
15638
15639         * freeze.adb (Freeze_Entity): Refine check for bad component size
15640         clause to avoid rejecting confirming clause when atomic/aliased present.
15641
15642 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15643
15644         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
15645         better determine whether an entity reference is a write.
15646         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
15647         subcomponent.
15648         * lib-xref.adb (Output_References): Do no suppress a read reference at
15649         the same location as an immediately preceeding modify-reference, to
15650         handle properly in-out actuals.
15651
15652 2011-08-01  Tristan Gingold  <gingold@adacore.com>
15653
15654         * env.c (__gnat_setenv) [VMS]: Refine previous change.
15655
15656 2011-08-01  Quentin Ochem  <ochem@adacore.com>
15657
15658         * i-cstrin.adb (New_String): Changed implementation, now uses only the
15659         heap to compute the result.
15660
15661 2011-08-01  Robert Dewar  <dewar@adacore.com>
15662
15663         * atree.ads: Minor reformatting.
15664
15665 2011-08-01  Emmanuel Briot  <briot@adacore.com>
15666
15667         * g-expect.adb (Get_Command_Output): Fix memory leak.
15668
15669 2011-08-01  Geert Bosch  <bosch@adacore.com>
15670
15671         * cstand.adb (P_Float_Type): New procedure to print the definition of
15672         predefined fpt types.
15673         (P_Mixed_Name): New procedure to print a name using mixed case
15674         (Print_Standard): Use P_Float_Type for printing floating point types
15675         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
15676         precision IEEE float.
15677
15678 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15679
15680         * sem_ch3.adb: Minor reformatting.
15681
15682 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15683
15684         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
15685         the completion of a generic function, insert the new body rather than
15686         rewriting the original.
15687
15688 2011-08-01  Yannick Moy  <moy@adacore.com>
15689
15690         * sinfo.ads, errout.ads: Typos in comments.
15691
15692 2011-08-01  Robert Dewar  <dewar@adacore.com>
15693
15694         * par-endh.adb: Minor reformatting.
15695
15696 2011-08-01  Robert Dewar  <dewar@adacore.com>
15697
15698         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
15699         (Pre_Post_Aspects): New subtype.
15700         * par-ch12.adb (P_Generic): New syntax for aspects in packages
15701         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
15702         * par-ch7.adb (P_Package): Remove Decl parameter
15703         (P_Package): Handle new syntax for aspects (before IS)
15704         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
15705         new aspect syntax
15706         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
15707         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
15708         (P_Package): Remove Decl parameter
15709         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
15710         aspects
15711         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
15712         specs
15713         * sem_util.ads, sem_util.adb (Static_Boolean): New function
15714         * sinfo.ads: Document new syntax for aspects in packages etc.
15715         * sprint.adb: Handle new syntax of aspects before IS in package
15716
15717 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15718
15719         * atree.ads: Minor reformatting.
15720         * sem_prag.adb: Minor reformatting.
15721
15722 2011-08-01  Robert Dewar  <dewar@adacore.com>
15723
15724         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
15725         case expr alternative.
15726
15727 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15728
15729         * sem_ch12.adb: Fix typo.
15730
15731 2011-08-01  Geert Bosch  <bosch@adacore.com>
15732
15733         * sem_prag.adb (Check_No_Link_Name): New procedure.
15734         (Process_Import_Or_Interface): Use Check_No_Link_Name.
15735         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
15736         instead of Standard_Long_Long_Float_Size global. Preparation for
15737         eventual removal of per type constants.
15738         * exp_util.ads (Get_Stream_Size): New function returning the stream
15739         size value of subtype E.
15740         * exp_util.adb (Get_Stream_Size): Implement new function.
15741         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
15742         function.
15743         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
15744         * einfo.adb:
15745         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
15746
15747 2011-08-01  Geert Bosch  <bosch@adacore.com>
15748
15749         * cstand.adb: Fix comments.
15750         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
15751         count of arguments.
15752
15753 2011-08-01  Robert Dewar  <dewar@adacore.com>
15754
15755         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
15756
15757 2011-08-01  Geert Bosch  <bosch@adacore.com>
15758
15759         * atree.ads: Fix comment.
15760
15761 2011-08-01  Robert Dewar  <dewar@adacore.com>
15762
15763         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
15764         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
15765         * par.adb: Add with for Namet.Sp.
15766         * par-tchk.adb: Minor reformatting.
15767
15768 2011-08-01  Vincent Celier  <celier@adacore.com>
15769
15770         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
15771         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
15772         of the init procedure of a SAL.
15773         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
15774         New procedure.
15775
15776 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15777
15778         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
15779         reformatting.
15780
15781 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15782
15783         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
15784
15785 2011-08-01  Thomas Quinot  <quinot@adacore.com>
15786
15787         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
15788         conformant with its spec (return True only for types that have
15789         an overriding Initialize primitive operation that prevents them from
15790         having preelaborable initialization).
15791         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
15792         initialization for controlled types in Ada 2005 or later mode.
15793
15794 2011-08-01  Robert Dewar  <dewar@adacore.com>
15795
15796         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
15797         Postcondition.
15798         (Same_Aspect): New function.
15799         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
15800         Type_Invariant, Precondition, Postcondition.
15801         * snames.ads-tmpl: Add Name_Type_Invariant.
15802
15803 2011-08-01  Robert Dewar  <dewar@adacore.com>
15804
15805         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
15806         here.
15807         (Freeze_All_Ent): Fix error in handling inherited aspects.
15808         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
15809         already analyzed, but don't skip entire processing of a declaration,
15810         that's wrong in some cases of declarations being rewritten.
15811         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
15812         Don't delay for integer, string literals
15813         Treat predicates in usual manner for delay, remove special case code,
15814         not needed.
15815         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
15816         (Build_Predicate_Function): Update saved expression in aspect
15817         (Build_Invariant_Procedure): Update saved expression in aspect
15818         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
15819         of replacement of discriminant references if the reference is simple.
15820
15821 2011-08-01  Robert Dewar  <dewar@adacore.com>
15822
15823         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
15824         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
15825         Static_Predicate and Dynamic_Predicate.
15826         (Build_Predicate_Function): Add processing for Static_Predicate
15827         and Dynamic_Predicate.
15828         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
15829         (From_Static_Predicate): New flag
15830         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
15831
15832 2011-08-01  Robert Dewar  <dewar@adacore.com>
15833
15834         * usage.adb: Documentation cleanup for Ada version modes in usage.
15835         * expander.adb: Minor reformatting.
15836
15837 2011-08-01  Robert Dewar  <dewar@adacore.com>
15838
15839         * atree.ads: Minor comment fix.
15840         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
15841         a-witeio.ads, sem_prag.adb: Minor reformatting.
15842
15843 2011-08-01  Doug Rupp  <rupp@adacore.com>
15844
15845         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
15846         pointers. Use descrip.h header file for convenience. Add some
15847         comments.
15848
15849 2011-08-01  Robert Dewar  <dewar@adacore.com>
15850
15851         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
15852         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
15853         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
15854         New procedure.
15855         (Check_Aspect_At_End_Of_Declarations): New procedure
15856         (Analye_Aspect_Specification): Minor changes for above procedures
15857         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
15858         specification node as well.
15859
15860 2011-08-01  Pascal Obry  <obry@adacore.com>
15861
15862         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
15863         Windows files. Use GetFilesAttributes() in this case to check for file
15864         existence instead of returning with an error code.
15865
15866 2011-08-01  Vincent Celier  <celier@adacore.com>
15867
15868         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
15869         High is above Source length.
15870
15871 2011-08-01  Robert Dewar  <dewar@adacore.com>
15872
15873         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
15874
15875 2011-08-01  Robert Dewar  <dewar@adacore.com>
15876
15877         * aspects.ads (Boolean_Aspects): New subtype.
15878         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
15879         for derived types in cases where the parent type and derived type have
15880         aspects.
15881         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15882         with aspects when parent type also has aspects.
15883         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15884         boolean expression at this point).
15885         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15886         accordance with final decision on the Ada 2012 feature.
15887         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15888
15889 2011-08-01  Matthew Heaney  <heaney@adacore.com>
15890
15891         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15892
15893 2011-08-01  Pascal Obry  <obry@adacore.com>
15894
15895         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15896         Fix Replace_Slice when High is above current string size.
15897         (Replace_Slice): Fix DL computation when High is above current
15898         string length.
15899
15900 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
15901
15902         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15903
15904 2011-08-01  Matthew Heaney  <heaney@adacore.com>
15905
15906         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15907         of node.
15908
15909 2011-08-01  Pascal Obry  <obry@adacore.com>
15910
15911         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15912         reformatting.
15913
15914 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15915
15916         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15917         access to protected subprograms in generic bodies.
15918         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15919         protected type, indicate that the convention of the subprogram is
15920         Convention_Protected, because it may be used in subsequent declarations
15921         within the protected declaration.
15922
15923 2011-08-01  Vincent Celier  <celier@adacore.com>
15924
15925         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15926         and "final" procedures when the name of the library is "ada", to avoid
15927         duplicate symbols "adainit" and "adafinal" in executables.
15928
15929 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
15930
15931         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15932         quantified expression that appears within a postcondition and uses the
15933         Ada2012 'Result attribute.
15934
15935 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15936
15937         * init.c (__gnat_error_handler): Cast reason to int.
15938         (__gnat_install_handler): Explain sa_sigaction use.
15939
15940 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15941
15942         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15943         subprogram has copy-in copy-out parameters, try to promote the mode of
15944         the return type if it is passed in registers.
15945
15946 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15947
15948         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15949         left operand as addressable.
15950
15951 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
15952
15953         * gcc-interface/gigi.h (build_function_stub): Remove.
15954         (build_return_expr): Likewise.
15955         (convert_vms_descriptor): Declare.
15956         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15957         (build_function_stub): Move to...
15958         * gcc-interface/utils2.c (build_return_expr): Move to...
15959         * gcc-interface/trans.c (build_function_stub): ...here.
15960         (build_return_expr): ...here.
15961         (Subprogram_Body_to_gnu): Add local variable for language_function.
15962         Disconnect the parameter attributes cache, if any, once done with it.
15963         Call end_subprog_body only after setting the end_locus.
15964         Build the stub associated with the function, if any, at the very end.
15965         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15966         variables and streamline control flow.
15967
15968 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
15969
15970         PR ada/49819
15971         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15972         g-trasym-dwarf.adb.
15973
15974 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15975
15976         PR bootstrap/49794
15977         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15978         Assign to act.sa_sigaction.
15979         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15980         current->return_address to char * before arithmetic.
15981
15982 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15983
15984         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15985         Correct argument types.
15986         Extract code from reason.
15987         (__gnat_install_handler): Assign to act.sa_sigaction.
15988
15989 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
15990
15991         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15992         (GNAT1_OBJS): ...here.
15993
15994 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
15995
15996         PR ada/48711
15997         * g-socthi-mingw.adb (Fill): Fix formatting.
15998
15999         * gcc-interface/gigi.h: Move around comment.
16000
16001 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
16002
16003         PR ada/46350
16004         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
16005
16006 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
16007
16008         PR ada/48711
16009         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
16010
16011 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
16012
16013         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
16014         range comparison if Pmode is SImode.
16015
16016 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
16017             Eric Botcazou  <ebotcazou@adacore.com>
16018
16019         * adadecode.c: Wrap up in extern "C" block.
16020         * adadecode.h: Likewise.
16021         * adaint.c: Likewise.  Remove 'const' keyword.
16022         * adaint.h: Likewise.
16023         * argv.c: Likewise.
16024         * atree.h: Likewise.
16025         * cio.c: Likewise.
16026         * cstreams.c: Likewise.
16027         * env.c: Likewise.
16028         * exit.c: Likewise.
16029         * fe.h: Likewise.
16030         * final.c: Likewise.
16031         * init.c: Likewise.
16032         * initialize.c: Likewise.
16033         * link.c: Likewise.
16034         * namet.h: Likewise.
16035         * nlists.h: Likewise.
16036         * raise.c: Likewise.
16037         * raise.h: Likewise.
16038         * repinfo.h: Likewise.
16039         * seh_init.c: Likewise.
16040         * targext.c: Likewise.
16041         * tracebak.c: Likewise.
16042         * uintp.h: Likewise.
16043         * urealp.h: Likewise.
16044         * xeinfo.adb: Wrap up generated C code in extern "C" block.
16045         * xsinfo.adb: Likewise.
16046         * xsnamest.adb: Likewise.
16047         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
16048         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
16049         * gcc-interface/misc.c: Likewise.
16050         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
16051         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
16052         ada/targext.o here...
16053         (GNAT_ADA_OBJS): ...and not here.
16054         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
16055         (GNATBIND_OBJS): Reorder.
16056
16057 2011-07-07  Richard Henderson  <rth@redhat.com>
16058
16059         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
16060         dwarf2out_frame_init.
16061
16062 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
16063
16064         * gcc-interface/misc.c (gnat_init): Tweak previous change.
16065
16066 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16067
16068         PR target/39150
16069         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
16070
16071 2011-07-06  Richard Guenther  <rguenther@suse.de>
16072
16073         * gcc-interface/misc.c (gnat_init): Merge calls to
16074         build_common_tree_nodes and build_common_tree_nodes_2.
16075         Re-initialize boolean_false_node.
16076
16077 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
16078             Olivier Hainque  <hainque@adacore.com>
16079             Nicolas Setton  <setton@adacore.com>
16080
16081         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
16082         the type according to the ARTIFICIAL_P parameter.
16083         (create_type_decl): Likewise.
16084         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
16085
16086 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
16087
16088         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
16089         (gnatbind): Likewise.
16090
16091 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16092
16093         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
16094
16095 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
16096
16097         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
16098         local variable throughout.  Remove useless call to Base_Type.
16099         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
16100         Take it also into account for the volatileness of the field.  Set the
16101         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
16102
16103 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
16104
16105         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
16106         on a dereference built for a by-ref object if it has an address clause.
16107
16108 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
16109
16110         * einfo.ads (Address_Taken): Document use for the second argument of
16111         Asm_Input and Asm_Output attributes.
16112         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
16113         argument is an entity name, then set Address_Taken on it.
16114         <Attribute_Asm_Output>: Likewise.
16115         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
16116         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
16117         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
16118         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
16119
16120 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
16121
16122         PR middle-end/46500
16123         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
16124
16125 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
16126
16127         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
16128         (ada/utils.o): Update dependencies.
16129         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
16130         ../../../libcpp/libcpp.a.
16131         * gcc-interface/utils.c: Include common/common-target.h.
16132         (process_attributes): Use targetm_common.have_named_sections.
16133
16134 2011-06-07  Richard Guenther  <rguenther@suse.de>
16135
16136         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
16137         set_sizetype.
16138
16139 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16140
16141         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
16142         TREE_THIS_NOTRAP flag.
16143
16144 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16145
16146         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
16147         Fix thinko.
16148
16149 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16150
16151         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
16152         constants whose full view has discriminants specially.
16153
16154 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16155
16156         * gcc-interface/utils.c: Include diagnostic.h.
16157         (gnat_write_global_declarations): Output debug information for all
16158         global type declarations before finalizing the compilation unit.
16159         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
16160
16161 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
16162
16163         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
16164
16165 2011-05-25  Kai Tietz  <ktietz@redhat.com>
16166
16167         * adaint.c (__gnat_to_canonical_file_list_next): Use array
16168         initialization instead of const/none-const pointer assignment.
16169
16170 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
16171
16172         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
16173         $(EXTRA_GNAT1_OBJS).
16174         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
16175         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
16176         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
16177         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
16178         libcommon-target.a instead of prefix.o.
16179
16180 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
16181
16182         PR ada/49097
16183         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
16184
16185 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
16186
16187         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
16188         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
16189         instead of version.o.
16190
16191 2011-05-18  Kai Tietz  <ktietz@redhat.com>
16192
16193         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
16194         boolean_false_node instead of integer_zero_node.
16195         (convert_with_check): Likewise.
16196         * gcc-interface/decl.c (choices_to_gnu): Likewise.
16197
16198 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
16199
16200         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
16201         type of the parameter is an unconstrained array, convert the actual to
16202         the type of the formal in the In Out and Out cases as well.
16203
16204 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
16205
16206         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
16207         call build_function_type_array or build_varargs_function_type_array
16208         instead.
16209         (create_subprog_type): Don't call build_function_type; call
16210         build_function_type_vec instead.
16211
16212 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
16213
16214         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
16215         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
16216         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
16217
16218 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
16219
16220         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
16221
16222         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
16223         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
16224
16225 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
16226
16227         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
16228
16229 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
16230
16231         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
16232         instead of accessing TYPE_ARG_TYPES directly.
16233         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
16234
16235 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
16236
16237         PR ada/48844
16238         * gcc-interface/gigi.h (get_variant_part): Declare.
16239         * gcc-interface/decl.c (get_variant_part): Make global.
16240         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
16241         types have the same constant size, are record types and T1 has a
16242         variant part while T2 doesn't.
16243
16244 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
16245
16246         * gcc-interface/utils.c (begin_subprog_body): Do not call
16247         get_pending_sizes.
16248         (end_subprog_body): Likewise.
16249
16250 2011-05-04  Richard Guenther  <rguenther@suse.de>
16251
16252         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
16253         int_const_binop.
16254         (pos_to_constructor): Likewise.
16255
16256 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
16257             Eric Botcazou  <ebotcazou@adacore.com>
16258
16259         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
16260         of build_function_type.  Adjust calls to...
16261         (build_raise_check): ...this.  Do not take a void_tree parameter.
16262         Call build_function_type_list instead of build_function_type.
16263         Fix head comment and swap couple of conditional blocks.
16264
16265 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
16266
16267         * gnatvsn.ads (Library_Version): Bump to 4.7.
16268         (Current_Year): Bump to 2011.
16269
16270 2011-04-29  Michael Matz  <matz@suse.de>
16271
16272         * gcc-interface/misc.c (gnat_handle_option): Set
16273         warn_maybe_uninitialized.
16274
16275 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
16276
16277         * gnat_ugn.texi (Complexity Metrics Control): Update link to
16278         the Watson/McCabe paper.
16279
16280 2011-04-23  Jim Meyering  <meyering@redhat.com>
16281
16282         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
16283
16284 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
16285
16286         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
16287         onto the new type.
16288
16289 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
16290
16291         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
16292         parameter.
16293         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
16294         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
16295         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
16296         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
16297         <all>: Do not set flags on the reused DECL node coming from an alias.
16298         Set DECL_IGNORED_P on the DECL node built for subprograms if they
16299         don't need debug info here...
16300         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
16301         (gigi): Adjust calls to create_subprog_decl.
16302         (build_raise_check): Likewise.
16303         (establish_gnat_vms_condition_handler): Likewise.
16304         (Compilation_Unit_to_gnu): Likewise.
16305         (gnat_to_gnu): Likewise.
16306
16307 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
16308
16309         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
16310         (NO_REORDER_ADAFLAGS): New variable.
16311         (EXTRA_GNATTOOLS): Always define.
16312         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
16313         Clean up and adjust list of files compiled with special options.
16314         * gcc-interface/Make-lang.in: Likewise.
16315         (ada/decl.o): Cosmetical change.
16316         (ada/misc.o): Remove dependency on $(PLUGIN_H).
16317
16318 2011-04-20  Jim Meyering  <meyering@redhat.com>
16319
16320         * initialize.c (__gnat_initialize): Remove useless if-before-free.
16321
16322 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
16323
16324         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
16325         $(CFLAGS) on the link line.
16326
16327 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
16328
16329         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
16330         padded type built for the return type if it is unconstrained.
16331
16332 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
16333
16334         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
16335
16336 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
16337
16338         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
16339         before calling TREE_CHAIN.
16340         * gcc-interface/misc.c (gnat_init_ts): New function.
16341         (LANG_HOOKS_INIT_TS): Define.
16342
16343 2011-04-12  Martin Jambor  <mjambor@suse.cz>
16344
16345         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
16346         instead of cgraph_node.
16347
16348 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
16349
16350         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
16351         alignment on fields of the RETURN type built for the Copy-In Copy-Out
16352         mechanism.
16353
16354 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
16355
16356         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
16357         of aggregate types that contain a placeholder.
16358
16359 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
16360
16361         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
16362         TYPE_ARG_TYPES.
16363         (handle_type_generic_attribute): Likewise.
16364
16365 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
16366
16367         PR ada/47163
16368         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
16369
16370 2011-04-04  Kai Tietz  <ktietz@redhat.com>
16371
16372         PR ada/47163
16373         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
16374         to flag value.
16375
16376 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16377
16378         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
16379         type case, do not strip a padding type around the array type.
16380
16381 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16382
16383         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
16384         types.
16385
16386 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16387
16388         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
16389         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
16390         code for -feliminate-unused-debug-types.
16391         (gnat_post_options): Likewise.
16392
16393 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16394
16395         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16396         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
16397         distinct copy.
16398
16399 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16400
16401         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
16402         DECL_ARTIFICIAL flag on enumeration types.
16403
16404 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16405
16406         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
16407         fat pointer types artificial unconditionally.
16408         <E_Array_Subtype>: Attach the base array type as a parallel type if it
16409         isn't artificial.
16410
16411 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16412
16413         * gcc-interface/gigi.h (get_dummy_type): Declare.
16414         (build_dummy_unc_pointer_types): Likewise.
16415         (finish_fat_pointer_type): Likewise.
16416         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
16417         fat pointer type has been built, complete it in place.
16418         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
16419         and thin pointers.  Remove useless variable.
16420         (finish_fat_pointer_type): Make global and move to...
16421         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
16422         (get_dummy_type): New function.
16423         (build_dummy_unc_pointer_types): Likewise.
16424         (gnat_pushdecl): Propage the name to the anonymous variants only.
16425         (update_pointer_to): Only adjust the pointer types in the unconstrained
16426         array case.
16427
16428 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16429
16430         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
16431         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
16432         if this is a Taft amendment type and the full declaration is available.
16433         * gcc-interface/trans.c (process_type): Likewise.
16434         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
16435         (process_freeze_entity): Likewise.
16436         * gcc-interface/utils.c (dummy_global): New static variable.
16437         (gnat_write_global_declarations): If there are types declared as used
16438         at the global level, insert them in the global hash table.
16439
16440 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16441
16442         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
16443         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
16444         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
16445         copy.
16446         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
16447         flag of the type accordingly.
16448         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
16449
16450 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
16451
16452         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16453         finalizing types when updating the pointers to the designated type.
16454         <all>: Finalize the deferred types even if we didn't defer processing
16455         of incomplete types in this invocation.
16456
16457 2011-04-01  Olivier Hainque  <hainque@adacore.com>
16458             Nicolas Setton  <setton@adacore.com>
16459             Eric Botcazou  <ebotcazou@adacore.com>
16460
16461         * gcc-interface/misc.c (gnat_descriptive_type): New function.
16462         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
16463
16464 2011-03-28  Kai Tietz  <ktietz@redhat.com>
16465
16466         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
16467         Windows targets.
16468         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
16469         * system-mingw.ads (System): Change ZCX_By_Default default to True.
16470
16471         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
16472
16473 2011-03-28  Tristan Gingold  <gingold@adacore.com>
16474
16475         PR ada/44431
16476         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
16477         Use ada output of gnatbind.
16478         (ada/b_gnatb.adb): Ditto.
16479         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
16480         (ada.mostlyclean, ada.stage1)
16481         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
16482         (ada.stagefeedback): Adjust.
16483         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
16484         Use ada output of gnatbind.
16485         (b_gnatm.adb): Ditto.
16486         (b_gnatl.o, b_gnatm.o): New rules.
16487
16488 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
16489
16490         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16491         for the padded type built to support a specified size or alignment.
16492
16493 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
16494
16495         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
16496         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
16497         unconditionally to the end of the unit when the designated type is
16498         limited_with'ed.
16499         <all>: Rename local variable.  Attempt to un-defer types only and do it
16500         for limited_with'ed types as well.
16501         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
16502         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
16503         consistently and remove redundant call to finalize_from_with_types.
16504
16505 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
16506
16507         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
16508         subprograms without a previous spec declared in the same unit.
16509         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
16510         subprograms at the end of the unit instead of at the beginning.
16511         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
16512         isn't public for the special handling of non-inline functions nested
16513         inside inline external functions.
16514
16515 2011-03-25  Jeff Law  <law@redhat.com>
16516
16517         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
16518
16519 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
16520
16521         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
16522         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
16523         to compute Set_Size_Depends_On_Discriminant.
16524         (Layout_Type): Call it on array types in back-end layout mode.
16525         * sem_util.adb (Requires_Transient_Scope): Return true for array
16526         types only if the size depends on the value of discriminants.
16527         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
16528         type if the RHS is a call to a function that returns an unconstrained
16529         type with default discriminant.
16530
16531 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
16532
16533         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
16534         non-conversion to the nominal result type at the end.
16535
16536 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16537
16538         * gcc-interface/trans.c (create_temporary): New function taken from...
16539         (create_init_temporary): ...here.  Call it.
16540         (call_to_gnu): Create the temporary for the return value early, if any.
16541         Create it for a function with copy-in/copy-out parameters if there is
16542         no target; in other cases of copy-in/copy-out, use another temporary.
16543         Push the new binding level lazily.  Add and rename local variables.
16544
16545 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16546
16547         * gcc-interface/decl.c (validate_size): Improve comments and tweak
16548         error message.
16549         (set_rm_size): Likewise.
16550
16551 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
16552
16553         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
16554         for the padded type built in order to support a specified alignment.
16555         Fix incorrect formatting.
16556
16557 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16558
16559         PR bootstrap/48216
16560         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
16561
16562 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16563
16564         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
16565         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
16566         to the end of the list.  Adjust recursive call.  Rename local variable.
16567         If REORDER is true, reorder components of the record type.
16568         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
16569         components_to_record and adjust the parameter list.
16570
16571 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
16572
16573         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
16574         disabled, use the variable for bounds of loop iteration scheme.
16575
16576 2011-03-21  Kai Tietz  <ktietz@redhat.com>
16577
16578         PR target/12171
16579         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
16580
16581 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
16582
16583         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
16584         out whether the expression is read-only.  Short-circuit placeholder
16585         case and rename a couple of local variables.
16586
16587 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
16588
16589         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
16590         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
16591         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
16592         (convert): Deal with conversions from a smaller form type specially.
16593
16594 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
16595
16596         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
16597         its argument, except for the special -I- switch.
16598
16599 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
16600
16601         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
16602         "Ada Issues".
16603
16604 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
16605
16606         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
16607
16608 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
16609
16610         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
16611         GNAT_FORMAL.
16612         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
16613         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
16614         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
16615         Do not generate the check directly, instead instantiate the template
16616         check present in the descriptor.
16617         (make_descriptor_field): Move around.
16618         (build_vms_descriptor32): Build a template check in the POINTER field.
16619         (build_vms_descriptor): Remove useless suffixes.
16620         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
16621
16622 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
16623
16624         PR bootstrap/47467
16625         * targext.c: Include target files if IN_RTS is defined.
16626
16627 2011-01-26  Richard Guenther  <rguenther@suse.de>
16628
16629         PR bootstrap/47467
16630         * targext.c: Include config.h.
16631         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
16632         dependency.
16633
16634 2011-01-04  Pascal Obry  <obry@adacore.com>
16635             Eric Botcazou  <ebotcazou@adacore.com>
16636
16637         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
16638
16639 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16640
16641         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
16642         end-of-case on the end label and its associated gotos, if any.
16643
16644 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16645
16646         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
16647         expressions of the parameter cache within the statement group of
16648         the CICO mechanism.
16649
16650 2011-01-04  Olivier Hainque  <hainque@adacore.com>
16651             Eric Botcazou  <ebotcazou@adacore.com>
16652
16653         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
16654         (set_end_locus_from_node): New function.
16655         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
16656         make and the function end_locus.
16657         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
16658         for the elaboration subprogram.
16659         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
16660         set the end_locus of the expression as well.
16661
16662 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
16663
16664         PR ada/47131
16665         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
16666         variables that are referenced in exception handlers volatile.
16667
16668
16669 \f
16670 Copyright (C) 2011 Free Software Foundation, Inc.
16671
16672 Copying and distribution of this file, with or without modification,
16673 are permitted in any medium without royalty provided the copyright
16674 notice and this notice are preserved.