[multiple changes]
[platform/upstream/gcc.git] / gcc / ada / ChangeLog
1 2011-12-21  Pascal Obry  <obry@adacore.com>
2
3         * prj-attr.adb, snames.ads-tmpl: Add Library_Standalone,
4         Library_Fully_Standalone_Options and
5         Library_Fully_Standalone_Supported attributes.
6         * prj-nmsc.adb (Check_Library): Update check to take into
7         account fully standalone libraries. Such shared libraries can
8         only depend on static libraries.
9         (Check_Stand_Alone_Library): Add support for fully standalone libraries.
10         (Process_Project_Level_Simple_Attributes): Store value for
11         configuration attribute Library_Fully_Standalone_Supported.
12         * prj.ads, makeutl.adb (Standalone): New enumeration type.
13         (Project_Data): Standalone_Library now of type Standlone.
14         (Project_Configuration): Add Lib_Fully_Standalone_Supported
15         field.
16         (Default_Project_Config): Initialize new Lib_Fully_Standalone_Supported
17         field.
18         * clean.adb (Clean_Project): Adjust to new type for Standalone.
19         * make.adb (Library_Phase): Adjust to new type for Standalone.
20         (Gnatmake): Likewise.
21         * mlib-prj.adb (Build_Library): Adjust to new type for
22         Standalone.
23
24 2011-12-21  Thomas Quinot  <quinot@adacore.com>
25
26         * gnatls.adb (Gnatls): Call Set_Standard_Error at startup, and then
27         Set_Standard_Output just before producing normal (non-diagnostic)
28         output.
29         * gnatcmd.adb (Gnatcmd): Call Set_Standard_Error at initialization
30         (and again after parsing project files).
31
32 2011-12-21  Vincent Celier  <celier@adacore.com>
33
34         * prj-conf.adb (Do_Autoconf): When the object directory does
35         not exist, create auto.cgpr in the directory where temporary
36         files are created.
37
38 2011-12-20  Ed Schonberg  <schonberg@adacore.com>
39
40         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  Further
41         refinements on the placement of a freeze node for a package
42         instantiation, when the generic appears within a previous
43         instantiation in the same unit.If the current instance is within
44         the one that contains the generic, the freeze node for the
45         current one must appear in the current declarative part. Ditto
46         if the current instance is within another package instance. In
47         these cases the freeze node of the previous instance is is not
48         relevant. New predicate Enclosing_Body simplifies the process.
49         (Freeze_Subprogram_Body): Rename Enclosing_Body to
50         Enclosing_Package_Body, to prevent confusion with subprogram of
51         same name elsewhere.
52         (Install_Body): Recognize enclosing subprogram bodies to determine
53         whether freeze_node belongs in current declarative list.
54
55 2011-12-20  Robert Dewar  <dewar@adacore.com>
56
57         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Allow
58         attribute definition clause for renaming if generated internally
59         and generate duplicate clause to apply to renamed object.
60         (Rep_Item_Too_Late): Only diagnose source level entities
61         * prj-nmsc.adb: Minor reformatting.
62         * gcc-interface/Make-lang.in: Update dependencies.
63
64 2011-12-20  Bob Duff  <duff@adacore.com>
65
66         * opt.ads (List_Inherited_Aspects): Default to False
67         (i.e. -gnatw.L is the default).
68         * usage.adb: Document new default for -gnatw.L.
69         * gnat_ugn.texi: Document -gnatw.l and -gnatw.L switches.
70         * warnsw.adb (Set_Warning_Switch): Do not include
71         List_Inherited_Aspects in -gnatwa.
72
73 2011-12-20  Ed Schonberg  <schonberg@adacore.com>
74
75         * checks.adb (Apply_Type_Conversion_Checks): For a discrete type
76         with predicates, indicate unconditionally that a range check
77         is needed.
78         * exp_ch4.adb (Expand_N_In): When the membership test is rewritten
79         to incorporate a call to a predicate function, analyze expression
80         with checks suppressed, to prevent infinite recursion.
81
82 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
83
84         * exp_ch11.adb (Find_Local_Handler): Guard the
85         search over individual exception choices in case the list of
86         handlers contains other (possibly illegal) constructs.
87
88 2011-12-20  Gary Dismukes  <dismukes@adacore.com>
89
90         * sem_ch8.adb (Find_Type): Test taggedness
91         of the Available_Type when checking for an illegal use of an
92         incomplete type, when the incomplete view is a limited view of
93         a type. Remove redundant Is_Tagged test.
94
95 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
96
97         * exp_util.adb: Add with and use clause for Aspects.
98         (Is_Finalizable_Transient): Objects which denote Ada containers
99         in the context of iterators are not considered transients. Such
100         object must live for as long as the loop is around.
101         (Is_Iterated_Container): New routine.
102
103 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
104
105         * exp_imgv.adb (Expand_Width_Attribute): Add a
106         type conversion from the enumeration subtype to its base subtype.
107
108 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
109
110         * sem_ch4.adb (Operator_Check): Update the call to
111         Is_Dimensioned_Type.
112         * sem_dim.adb: Remove with and use clause for Namet.Sp. Reorganize
113         all type declarations and datastructures involved. Propagate
114         all changes involving data structures and types throughout
115         the pakage. Alphabetize all subprograms. Add ??? comments.
116         (AD_Hash): Removed.
117         (Analyze_Aspect_Dimension): Rewritten. This
118         routine now does all its checks in one pass rather than
119         two. Refactor code. The error message are now in a more GNAT-ish style.
120         (Create_Rational_From_Expr): This is now a function.
121         (Get_Dimensions): Removed.
122         (Get_Dimensions_String_Id): Removed.
123         (Dimensions_Of): New rouitne.
124         (Exists): New routines.
125         (Is_Invalid): New routine.
126         (Permits_Dimensions): Removed.
127         (Present): Removed.
128         (Set_Symbol): New routine.
129         (System_Of): New routine.
130         * sem_dim.ads: Rewrite the top level description of the
131         package. Alphabetize subprograms. Add various comments on
132         subprogram usage. Add ??? comments.
133         (Is_Dimensioned_Type):
134         Renamed to Has_Dimension_System.
135         * sem_res.adb (Resolve_Op_Expon): Update the call to Is_Dimensioned_Type
136
137 2011-12-20  Ed Schonberg  <schonberg@adacore.com>
138
139         * sem_ch13.adb (Check_Indexing_Functions): The return type of an
140         indexing function can be the default element type, and does not
141         need to be a reference type.
142         * sem_ch4.adb (Try_Container_Indexing): Ditto.
143
144 2011-12-20  Robert Dewar  <dewar@adacore.com>
145
146         * a-cdlili.ads, sem_cat.adb, sem_ch10.adb: Minor reformatting.
147
148 2011-12-20  Bob Duff  <duff@adacore.com>
149
150         * s-taprop-mingw.adb (Yield): Do_Yield is no longer Unreferenced.
151
152 2011-12-20  Vincent Pucci  <pucci@adacore.com>
153
154         * impunit.adb: s-dimkio, s-dimmks and s-dmotpr defined as GNAT
155         Defined Additions to System.
156         * Makefile.rtl: s-dimkio, s-dimmks and s-dmotpr added.
157         * s-dimkio.ads, s-dimmks.ads, s-dmotpr.ads: New files.
158
159 2011-12-20  Gary Dismukes  <dismukes@adacore.com>
160
161         * sem_ch4.adb (Traverse_Homonyms): Allow a homonym to match when
162         within an instance, even if the homonym is marked Is_Hidden at
163         this point.
164
165 2011-12-20  Robert Dewar  <dewar@adacore.com>
166
167         * sem_ch3.adb, sem_ch5.adb, s-diinio.adb, s-diinio.ads, sem_dim.adb,
168         sem_dim.ads, sem_res.adb, s-stposu.adb, s-stposu.ads, sem_ch4.adb,
169         s-diflio.adb, s-diflio.ads, exp_disp.adb, s-llflex.ads: Minor
170         reformatting.
171         * aspects.ads: Dimension[_Aspects] are GNAT defined.
172
173 2011-12-20  Robert Dewar  <dewar@adacore.com>
174
175         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
176         renaming case.
177
178 2011-12-20  Thomas Quinot  <quinot@adacore.com>
179
180         * sem_cat.adb, sem_ch10.adb (Analyze_With_Clause): For a WITH clause on
181         a child unit that is an illegal instantiation, mark the WITH clause in
182         error.
183         (Install_Siblings, Validate_Categorization_Dependency): Guard
184         against WITH clause marked as in error.
185
186 2011-12-20  Hristian Kirtchev  <kirtchev@adacore.com>
187
188         * sem_res.adb (Resolve_Allocator): Warning on allocation
189         of tasks on a subpool and rewrite the allocator into a raise
190         Program_Error statement.
191         * s-stposu.ads, s-stposu.adb: Code reformatting.
192         (Create_Subpool): Remove formal parameter Storage_Size.
193         (Default_Subpool_For_Pool): Add the default implementation of this
194         routine.
195         (Set_Pool_Of_Subpool): Rename formal parameter Pool to To. Update
196         all the uses of the parameter.
197
198 2011-12-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
199
200         * gcc-interface/Makefile.in (%86 linux%):
201         (LIBGNAT_TARGET_PAIRS_32): Split off from LIBGNAT_TARGET_PAIRS.
202         (LIBGNAT_TARGET_PAIRS_64): New.
203         (LIBGNAT_TARGET_PAIRS): Add either depending on multilib.
204
205 2011-12-18  Eric Botcazou  <ebotcazou@adacore.com>
206
207         * gcc-interface/decl.c (gnat_to_gnu_param): Add comment about double
208         reference and DECL_POINTS_TO_READONLY_P.
209         * gcc-interface/trans.c (Identifier_to_gnu) <by_ref>: Always set the
210         TREE_READONLY flag on the first dereference of a double dereference.
211
212 2011-12-15  Arnaud Charlet  <charlet@adacore.com>
213
214         * a-numaux-vms.ads, s-asthan-vms-ia64.adb, s-auxdec-vms-ia64.adb,
215         s-memory-vms_64.adb, s-memory-vms_64.ads, s-osinte-vms-ia64.adb,
216         s-osinte-vms-ia64.ads, s-tasdeb-vms.adb: New files.
217
218 2011-12-15  Vincent Pucci  <pucci@adacore.com>
219
220         * aspects.adb, aspects.ads Aspect_Dimension and
221         Aspect_Dimension_System added
222         * exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_String
223         case added
224         * gcc-interface/Make-lang.in: s-llflex, sem_dim added.
225         * impunit.adb :s-diflio and s-diinio defined as GNAT Defined
226         Additions to System.
227         * Makefile.rtl: s-diflio, s-diinio and s-llflex added
228         * par-prag.adb, sem_prag.adb: Pragma_Dimension removed
229         * rtsfind.ads: Expon_LLF added
230         * sem_aggr.adb (Resolve_Aggregate): handles aggregate for
231         Aspect_Dimension case
232         * sem_attr.adb (Resolve_Attribute): analyze dimension for
233         attribute
234         * sem_ch10.adb (Analyze_With_Clause): Avoid the warning messages
235         due to the use of a GNAT library for Dimension packages
236         * sem_ch13.adb (Analyze_Aspect_Specifications):
237         Aspect_Dimension and Aspect_Dimension_System cases added
238         (Check_Aspect_At_Freeze_Point): Aspect_Dimension and
239         Aspect_Dimension_System cases added
240         * sem_ch2.adb (Analyze_Identifier): analyze dimension for
241         identifier
242         * sem_ch3.adb (Analyze_Component_Declaration): analyze dimension
243         for component declaration (Analyze_Object_Declaration): analyze
244         dimension for object declaration (Analyze_Subtype_Declaration):
245         analyze dimension for subtype declaration
246         * sem_ch4.adb (Operator_Check): checks exponent is a rational
247         for dimensioned operand for a N_Op_Expon
248         * sem_ch5.adb (Analyze_Assignment): analyze dimension for
249         assignment (Analyze_Statements): removal of dimensions in all
250         statements
251         * sem_ch6.adb (Analyze_Return_Statement): analyze dimension for
252         return statement
253         * sem_ch8.adb (Analyze_Object_Renaming): analyze dimension for
254         object renaming
255         * sem_dim.adb, sem_dim.ads (Analyze_Aspect_Dimension):
256         analyze the expression for aspect dimension and store the
257         values in a Htable.
258         (Analyze_Aspect_Dimension_System): analyze
259         the expression for aspect dimension system and store the new
260         system in a Table.
261         (Analyze_Dimension): propagates dimension
262         (Expand_Put_Call_With_Dimension_String): add the dimension
263         string as a suffix of the numeric value in the output
264         (Has_Dimension): return True if the node has a dimension
265         (Remove_Dimension_In_Declaration): removal of dimension in the
266         expression of the declaration.
267         (Remove_Dimension_In_Statement): removal of dimension in statement
268         * sem_res.adb (Resolve): analyze dimension if the node
269         has already been analyzed.
270         (Resolve_Arithmetic_Op): analyze
271         dimension for arithmetic op.
272         (Resolve_Call): analyze dimension for function call.
273         (Resolve_Comparison_Op): analyze dimension for comparison op.
274         (Resolve_Equality_Op): analyze dimension for equality op.
275         (Resolve_Indexed_Component): analyze dimension for indexed component.
276         (Resolve_Op_Expon): analyze dimension for op expon.
277         (Resolve_Selected_Component): analyze dimension
278         for selected component.
279         (Resolve_Slice): analyze dimension for slice.
280         (Resolve_Unary_Op): analyze dimension for unary op
281         (Resolve_Type_Conversion): analyze dimension for type conversion
282         (Resolve_Unchecked_Type_Conversion): analyze dimension for
283         unchecked type conversion
284         * snames.ads-tmpl Name_Dimension, Name_Dimension_System,
285         Name_Dim_Float_IO, Name_Dim_Integer_IO,
286         Name_Generic_Elementary_Functions, Name_Sqrt added.
287         Pragma_Dimension removed
288         * s-diflio.adb, s-diflio.ads New GNAT library generic package
289         for dimensioned float type IO
290         * s-diinio.adb, s-diinio.ads New GNAT library generic package
291         for dimensioned integer type IO
292         * s-llflex.ads (Expon_LLF): exponentiation routine for long long
293         floats operand and exponent
294
295 2011-12-15  Robert Dewar  <dewar@adacore.com>
296
297         * sem_aggr.adb: Minor comment addition.
298
299 2011-12-15  Bob Duff  <duff@adacore.com>
300
301         * s-tasren.adb (Task_Count): Do not call Yield; E'Count is not a
302         task dispatching point.
303         * s-taprop-mingw.adb (Yield): Do not yield if Do_Yield is False.
304
305 2011-12-15  Robert Dewar  <dewar@adacore.com>
306
307         * sigtramp-ppcvxw.c, sigtramp.h: Fix header.
308
309 2011-12-15  Javier Miranda  <miranda@adacore.com>
310
311         * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
312         applied to a class-wide type under VM targets generate code which
313         invokes the function Get_Alignment to retrieve the value of the
314         alignment from the TSD.
315         * rtsfind.ads (RE_Get_Alignment): New entity.
316
317 2011-12-15  Robert Dewar  <dewar@adacore.com>
318
319         * g-comlin.adb: Fix header.
320
321 2011-12-15  Tristan Gingold  <gingold@adacore.com>
322
323         * gnatls.adb: Fix typo.
324
325 2011-12-15  Ed Falis  <falis@adacore.com>
326
327         * s-tpopsp-vxworks.adb: Update comment.
328
329 2011-12-15  Ed Schonberg  <schonberg@adacore.com>
330
331         * sem_aggr.adb (Resolve_Array_Aggregate, Resolve_Aggr_Expr); If
332         the component type has predicates, generate corresponding check.
333         (Resolve_Record_Aggregate, Resolve_Aggr_Expr): Ditto.
334
335 2011-12-13  Cesar Strauss  <cestrauss@gmail.com>
336             Eric Botcazou  <ebotcazou@adacore.com>
337
338         PR ada/49084
339         * types.h (Byte): Change typedef to 'unsigned char'.
340         * atree.h (struct Flag_Word): Use Byte for 'convention' field.
341
342 2011-12-12  Robert Dewar  <dewar@adacore.com>
343
344         * s-taprop-mingw.adb: Minor reformatting.
345
346 2011-12-12  Nicolas Roche  <roche@adacore.com>
347
348         * gcc-interface/Make-lang.in: Update dependencies.
349         Add gnattools4 target when building tools in canadian mode
350
351 2011-12-12  Javier Miranda  <miranda@adacore.com>
352
353         * exp_disp.adb (Make_VM_TSD): Complete previous patch.
354
355 2011-12-12  Bob Duff  <duff@adacore.com>
356
357         * s-tpobop.adb: Use named notation.
358         * g-bytswa.ads, s-taprop.ads: Minor comment fix.
359
360 2011-12-12  Arnaud Charlet  <charlet@adacore.com>
361
362         * make.adb: Minor comment update.
363
364 2011-12-12  Robert Dewar  <dewar@adacore.com>
365
366         * freeze.adb, s-taprop-mingw.adb, exp_disp.adb, sem_ch13.adb: Minor
367         reformatting.
368
369 2011-12-12  Robert Dewar  <dewar@adacore.com>
370
371         * sem_ch6.adb, gnatls.adb: Minor reformatting.
372
373 2011-12-12  Ed Schonberg  <schonberg@adacore.com>
374
375         * freeze.adb (Freeze_Entity): If a type declared in a generic
376         context has predicates, generate a freeze node for it.
377         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression
378         has not been analyzed yet, entity has not been frozen, so analyze
379         it now.
380
381 2011-12-12  Javier Miranda  <miranda@adacore.com>
382
383         * exp_disp.adb (Make_VM_TSD): Generate code to store the value of
384         'alignment in the TSD.
385
386 2011-12-12  Bob Duff  <duff@adacore.com>
387
388         * s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D
389         mode.
390
391 2011-12-12  Hristian Kirtchev  <kirtchev@adacore.com>
392
393         * exp_ch4.adb (Expand_N_Allocator): Update the master of an
394         anonymous access-to-controlled type to utilize the heterogeneous
395         master associated with the current unit.
396
397 2011-12-12  Ed Schonberg  <schonberg@adacore.com>
398
399         * sem_ch6.adb (Analyze_Expression_Function): If the function
400         is not a completion, pre-analyze the expression now to prevent
401         spurious visibility on later entities. The body is inserted at
402         the end of the current declaration list or package to prevent
403         early freezing, but the visibility is established at the point
404         of definition.
405
406 2011-12-12  Bob Duff  <duff@adacore.com>
407
408         * sem.adb, sem.ads: Add debugging routines.
409
410 2011-12-12  Tristan Gingold  <gingold@adacore.com>
411
412         * gnatls.adb: (gnatls): Also add the objects dir in search list.
413
414 2011-12-12  Robert Dewar  <dewar@adacore.com>
415
416         * exp_atag.adb, exp_atag.ads, exp_util.adb, exp_attr.adb,
417         sem_ch13.adb: Minor reformatting.
418
419 2011-12-12  Gary Dismukes  <dismukes@adacore.com>
420
421         * sem_ch7.adb (Uninstall_Declarations): Don't
422         apply check for incomplete types used as a result type for an
423         access-to-function type when compiling for Ada 2012 or later.
424         * sem_ch6.adb (Analyze_Subprogram_Declaration):
425         Specialize error message for interface subprograms that are
426         not declared abstract nor null (functions can't be declared as
427         null). Also, remove "(Ada 2005)" from message.
428
429 2011-12-12  Robert Dewar  <dewar@adacore.com>
430
431         * sem_prag.adb (GNAT_Pragma): Check comes from source.
432
433 2011-12-12  Robert Dewar  <dewar@adacore.com>
434
435         * gnatls.adb: Minor reformatting.
436
437 2011-12-12  Javier Miranda  <miranda@adacore.com>
438
439         * a-tags.ads (Alignment): New TSD field.
440         (Max_Predef_Prims): Value lowered to 15 (or 9 in case of
441         configurable runtime) Update documentation of predefined
442         primitives since Alignment has been removed.
443         * exp_disp.ads Update documentation of slots of dispatching
444         primitives.
445         * exp_disp.adb (Default_Prim_Op_Position): Update slot
446         values since alignment is no longer a predefined primitive.
447         (Is_Predefined_Dispatch_Operation): Remove _alignment.
448         (Is_Predefined_Internal_Operation): Remove _alignment.
449         (Make_DT): Update static test on the value stored in a-tags.ads
450         for Max_Predef_Prims; store the value of 'alignment in the TSD.
451         * exp_atag.ads, exp_atag.adb (Build_Get_Alignment): New subprogram
452         that retrieves the alignment from the TSD
453         * exp_util.adb (Build_Allocated_Deallocate_Proc): For deallocation
454         of class-wide types obtain the value of alignment from the TSD.
455         * exp_attr.adb (Expand_N_Attribute_Reference): For 'alignment
456         applied to a class-wide type invoke Build_Get_Alignment to
457         generate code which retrieves the value of the alignment from
458         the TSD.
459         * rtsfind.ads (RE_Alignment): New Ada.Tags entity
460         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): For tagged
461         types if the value of the alignment is bigger than the Maximum
462         alignment then set the value of the alignment to the Maximum
463         alignment and report a warning.
464         * exp_ch3.adb (Make_Predefined_Primitive_Specs): Do not generate
465         spec of _alignment.
466         (Predefined_Primitive_Bodies): Do not generate body of _alignment.
467
468 2011-12-12  Gary Dismukes  <dismukes@adacore.com>
469
470         * freeze.adb (Freeze_Expression): Allow freezing of static
471         scalar subtypes that are prefixes of an attribute, even if not
472         yet marked static. Such attributes will get marked as static
473         later in Eval_Attribute (as called from Resolve_Attribute).
474         * sem_attr.adb (Eval_Attribute): Remove wrong code that does an
475         early return for attribute prefixes that are unfrozen source-level
476         types. This code was incorrectly bypassing folding of unfrozen
477         static subtype attributes in default expressions (the executable
478         example in the now-deleted comment was in fact illegal).
479
480 2011-12-12  Robert Dewar  <dewar@adacore.com>
481
482         * a-coinve.adb, sem_res.adb, prj-nmsc.adb, a-cobove.adb, a-convec.adb,
483         gnatls.adb, sem_ch13.adb, prj-env.adb, prj-env.ads: Minor reformatting.
484
485 2011-12-12  Tristan Gingold  <gingold@adacore.com>
486
487         * gsocket.h: Adjust previous patch.
488
489 2011-12-12  Thomas Quinot  <quinot@adacore.com>
490
491         * exp_disp.adb: Minor reformatting.
492
493 2011-12-12  Tristan Gingold  <gingold@adacore.com>
494
495         * gnatls.adb (Search_RTS): New procedure.
496         (Scan_Ls_Arg): Move code that search the RTS.
497         (Gnatls): search the RTS later.
498         * prj-env.ads, prj-env.adb (Get_Runtime_Path): New function.
499
500 2011-12-12  Ed Falis  <falis@adacore.com>
501
502         * sysdep.c: Fix treatment of VxWorks task options so that run-times
503         built with __SPE__ get option VX_SPE_TASK while others get VX_FP_TASK.
504
505 2011-12-12  Bob Duff  <duff@adacore.com>
506
507         * sem_type.adb, sem_type.ads, sem_ch4.adb, treepr.adb, treepr.ads:
508         Minor cleanup and fiddling with debug printouts.
509
510 2011-12-12  Vincent Celier  <celier@adacore.com>
511
512         * prj-nmsc.adb (Get_Directories): For a non extending project,
513         always get a declared object and/or exec directory if it already
514         exists, even when there are no sources, but do not create them.
515
516 2011-12-12  Bob Duff  <duff@adacore.com>
517
518         * sem_res.adb (Resolve): Deal with the case where an abstract
519         operator is called with operands of type universal_integer.
520
521 2011-12-12  Thomas Quinot  <quinot@adacore.com>
522
523         * par_sco.adb: Minor fix to dominance marker referencing WHILE
524         decision.
525
526 2011-12-12  Tristan Gingold  <gingold@adacore.com>
527
528         * mlib-tgt-specific-xi.adb: (Get_Target_Prefix): Simplify code.
529
530 2011-12-12  Thomas Quinot  <quinot@adacore.com>
531
532         * par_sco.adb: Adjust dominant marker for branches of CASE
533         statements.
534
535 2011-12-12  Thomas Quinot  <quinot@adacore.com>
536
537         * gsocket.h, s-oscons-tmplt.c: Ensure we do not include any system
538         header file prior to redefining FD_SETSIZE.
539
540 2011-12-12  Ed Schonberg  <schonberg@adacore.com>
541
542         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): In
543         a generic context the aspect expressions may not have been
544         preanalyzed if there was no previous freeze point, so the
545         expressions must be preanalyzed now, and there is no conformance
546         to check for visibility changes.
547
548 2011-12-12  Matthew Heaney  <heaney@adacore.com>
549
550         * a-convec.adb, a-coinve.adb, a-cobove.adb (Iterator): Use
551         subtype Index_Type'Base for Index component (Finalize): Remove
552         unnecessary access check (First, Last): Cursor return value
553         depends on iterator index value (Iterate): Use start position as
554         iterator index value (Next, Previous): Forward to corresponding
555         cursor-based operation.
556         * a-cborma.adb (Iterate): Properly initialize iterator object (with 0
557         as node index).
558
559 2011-12-12  Robert Dewar  <dewar@adacore.com>
560
561         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting.
562
563 2011-12-12  Steve Baird  <baird@adacore.com>
564
565         * sem_ch3.adb (Check_Completion): Improve a comment.
566
567 2011-12-12  Tristan Gingold  <gingold@adacore.com>
568
569         * cstand.adb: Minor comment fix.
570
571 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
572
573         * gcc-interface/utils2.c (gnat_build_constructor): Test the TREE_STATIC
574         flag of elements to compute that of the constructor.
575
576 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
577
578         * gcc-interface/decl.c (gnat_to_gnu_param): Set the restrict qualifier
579         on references built for parameters which aren't specifically by-ref.
580
581 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
582
583         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If there is an
584         alignment set on a renaming, assert that the renamed object is aligned
585         enough as to make it possible to honor it.
586
587 2011-12-11  Eric Botcazou  <ebotcazou@adacore.com>
588
589         * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
590
591 2011-12-06  Dave Korn  <dave.korn.cygwin@gmail.com>
592
593         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
594         Correctly detect cygwin, which no longer has the '32' suffix, and use
595         appropriate implementations of the sockets and memory packages.
596         * sysdep.c (WIN_SETMODE): New define to choose the correct spelling of
597         setmode/_setmode for MinGW and Cygwin, respectively.
598         (__gnat_set_binary_mode [windows targets]): Use the above, and enable
599         the windows version for Cygwin as well as MinGW.
600         (__gnat_set_text_mode [windows targets]): Likewise.
601         (__gnat_ttyname [windows targets]): Provide a Cygwin implementation
602         in addition to the MinGW version.
603         (__gnat_is_windows_xp): Make available to Cygwin as well as MinGW.
604         (__gnat_get_stack_bounds): Likewise.
605
606 2011-12-05  Bob Duff  <duff@adacore.com>
607
608         * sem_ch4.adb: Minor comment fix.
609
610 2011-12-05  Robert Dewar  <dewar@adacore.com>
611
612         * gnat_ugn.texi: Add documentation for -gnatw.e.
613
614 2011-12-05  Bob Duff  <duff@adacore.com>
615
616         * treepr.adb (pn): Print something useful for
617         Elmt_Ids. Add Write_Eol to 'when others' case, so the output
618         will be seen immediately in gdb.
619
620 2011-12-05  Ed Schonberg  <schonberg@adacore.com>
621
622         * lib-writ.adb (Output_Main_Program_Line): A generic subprogram
623         is never a main program.
624
625 2011-12-05  Thomas Quinot  <quinot@adacore.com>
626
627         * par_sco.adb: Various minor adjustments to dominance markers
628         generation.
629
630 2011-12-05  Ed Schonberg  <schonberg@adacore.com>
631
632         * sem_ch6.adb (Analyze_Expression_Function): If the function is
633         a completion, generate a body reference for its defining entity,
634         before rewriting the node as a body.
635         * sem_util.adb (Defining_Entity): Add entry for expression
636         function.
637
638 2011-12-05  Bob Duff  <duff@adacore.com>
639
640         * sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
641         to the Comes_From_Source check, to deal properly with the case
642         of indirect inheritance of "=".
643
644 2011-12-05  Thomas Quinot  <quinot@adacore.com>
645
646         PR ada/51307
647         * s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
648         not a macro.
649
650 2011-12-05  Thomas Quinot  <quinot@adacore.com>
651
652         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
653         information in SCOs.
654
655 2011-12-02  Eric Botcazou  <ebotcazou@adacore.com>
656             Thomas Quinot <quinot@adacore.com>
657
658         * gcc-interface/Makefile.in (INCLUDES): Remove $(srcdir)/config.
659         (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) except for VxWorks.
660         Add thread.c to LIBGNAT_SRCS so that a symlink is created in ada/rts,
661         which allows the file to be installed in adainclude.
662         * gcc-interface/Make-lang.in: Update dependencies.
663
664 2011-12-02  Javier Miranda  <miranda@adacore.com>
665
666         * sem_ch3.adb (Constrain_Access): Undo previous
667         patch for this routine. Required since the RM rule 3.7.1(7/3)
668         applies to all access types.
669
670 2011-12-02  Bob Duff  <duff@adacore.com>
671
672         * sem_ch6.adb: Minor comment fix.
673
674 2011-12-02  Joel Sherrill <joel.sherrill@oarcorp.com>
675
676         * s-tpopsp-rtems.adb: Use ATCB_Key rather than RTEMS_Ada_Self variable
677         for consistency with other ports.
678         * s-osinte-rtems.adb: Add body for dummy implementation of
679         pthread_rwlockattr_setkind_np().
680         * s-osinte-rtems.ads: Add missing clock and rwlock bindings.
681         * terminals.c: Add __rtems__ conditionals to account for differences
682         in termios implementation.
683
684 2011-12-02  Robert Dewar  <dewar@adacore.com>
685
686         * sem_ch3.adb, sem_attr.adb, a-comutr.adb, a-cbmutr.adb,
687         a-cbmutr.ads: Minor reformatting.
688
689 2011-12-02  Hristian Kirtchev  <kirtchev@adacore.com>
690
691         * exp_dbug.adb: Comment reformatting.
692         (Get_External_Name): Use Reset_Buffers to reset the contents of
693         Name_Buffer and Homonym_Numbers.
694         (Qualify_All_Entity_Names): Reset the contents of Name_Buffer and
695         Homonym_Numbers before creating a new qualified name for a particular
696         entity.
697         (Reset_Buffers): New routine.
698
699 2011-12-02  Matthew Heaney  <heaney@adacore.com>
700
701         * a-cbmutr.ads (No_Node): Moved declaration from body to spec
702         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
703         from Root_Iterator.
704         (Child_Iterator): Derives from Root_Iterator.
705         (Finalize): Implemented as an override operation for Root_Iterator.
706         (First): Return value depends on Subtree component.
707         (Last): Component was renamed from Parent to Subtree.
708         (Next): Checks parameter value, and uses simplified loop.
709         (Iterate): Forwards to Iterate_Subtree.
710         (Iterate_Children): Component was renamed from Parent to Subtree.
711         (Iterate_Subtree): Checks parameter value
712
713 2011-12-02  Robert Dewar  <dewar@adacore.com>
714
715         * usage.adb: Add lines for -gnatw.n and -gnatw.N
716         (atomic sync info msgs).
717
718 2011-12-02  Steve Baird  <baird@adacore.com>
719
720         * sem_ch3.adb (Check_Completion): An Ada 2012
721         generic formal type doesn't require a completion.
722
723 2011-12-02  Eric Botcazou  <ebotcazou@adacore.com>
724
725         * sem_util.adb (Set_Debug_Info_Needed): Also set the flag on the
726         packed array type if it is to be set on the array type used to
727         represent it.
728
729 2011-12-02  Robert Dewar  <dewar@adacore.com>
730
731         * gnat_rm.texi: Eliminate confusing use of type name.
732
733 2011-12-02  Thomas Quinot  <quinot@adacore.com>
734
735         * sem_ch10.adb (Analyze_Compilation_Unit): For a library subprogram
736         body that acts as spec, do not create a shallow copy of the context
737         clause for the synthetized spec (instead, use the same list as
738         in the body).
739
740 2011-12-02  Bob Duff  <duff@adacore.com>
741
742         * gnat_ugn.texi: Clarify usage of -p binder switch.
743
744 2011-12-02  Javier Miranda  <miranda@adacore.com>
745
746         * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb
747         (Effectively_Has_Constrained_Partial_View): Moved to sem_aux
748         (In_Generic_Body): Moved to sem_aux.
749         (Unit_Declaration_Node): Moved to sem_aux.
750         * einfo.ads (Effectively_Has_Constrained_Partial_View): Complete
751         documentation.
752         * exp_attr.adb, live.adb, sem_ch10.adb, checks.adb, sem.adb,
753         rtsfind.adb, sem_attr.adb, sem_elab.adb, exp_ch4.adb, sem_ch4.adb,
754         exp_ch13.adb: Add with-clause on Sem_Aux.
755
756 2011-12-02  Yannick Moy  <moy@adacore.com>
757
758         * sem_util.adb (Unique_Name): Reach through Unique_Entity to
759         get the name of the entity.
760         (Unique_Entity): Correct case for subprogram stubs.
761
762 2011-12-02  Yannick Moy  <moy@adacore.com>
763
764         * sem_ch3.adb (Check_Initialization): Do not emit warning on
765         initialization of limited type object in Alfa mode.
766
767 2011-12-02  Robert Dewar  <dewar@adacore.com>
768
769         * sinfo.ads: Minor reformatting.
770         * gnat_ugn.texi: Fix confusion in use of term "type name".
771
772 2011-12-02  Robert Dewar  <dewar@adacore.com>
773
774         * sem_ch6.adb: Minor change in error message.
775
776 2011-12-02  Robert Dewar  <dewar@adacore.com>
777
778         * sem_ch9.adb, prj-part.adb, vms_data.ads, sem_ch8.adb: Minor
779         reformatting.
780
781 2011-12-02  Javier Miranda  <miranda@adacore.com>
782
783         * sem_ch3.adb (Constrain_Access): Enable on Ada 2005 mode the
784         static check of the rule of general access types whose designated
785         type has discriminants.
786         * sem_util.ads, sem_util.adb
787         (Effectively_Has_Constrained_Partial_View): New subprogram.
788         (In_Generic_Body): New subprogram.
789         * einfo.ads (Has_Constrained_Partial_View): Adding documentation.
790         * sem_prag.adb (Inside_Generic_Body): Removed. Replaced by new
791         subprogram In_Generic_Body.
792         * exp_attr.adb, checks.adb, sem_attr.adb, exp_ch4.adb,
793         sem_ch4.adb: In addition, this patch replaces the occurrences of
794         Has_Constrained_Partial_View by
795         Effectively_Has_Constrained_Partial_View.
796
797 2011-12-02  Matthew Heaney  <heaney@adacore.com>
798
799         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Rename
800         Position component.
801         (Finalize): Remove unnecessary access check.
802         (First): Forward to First_Child.
803         (Last): Forward to Last_Child.
804         (Iterate): Check preconditions for parent node parameter.
805         (Next): Forward to Next_Sibling.
806         (Previous): Forward to Previous_Sibling.
807
808 2011-12-02  Robert Dewar  <dewar@adacore.com>
809
810         * a-coinve.adb, a-coorma.adb, freeze.adb, a-coorse.adb, a-comutr.adb,
811         a-coormu.adb, a-convec.adb: Minor reformatting.
812
813 2011-12-02  Matthew Heaney  <heaney@adacore.com>
814
815         * a-coormu.ads, a-ciormu.ads: Declare iterator factory function.
816         * a-ciormu.adb, a-ciormu.adb (Iterator): Declare concrete
817         Iterator type.
818         (Finalize): Decrement busy counter.
819         (First, Last): Cursor return value depends on iterator node value.
820         (Iterate): Use start position as iterator node value.
821         (Next, Previous): Forward to corresponding cursor-based operation.
822
823 2011-12-02  Robert Dewar  <dewar@adacore.com>
824
825         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb,
826         a-cbhase.adb, a-cdlili.adb, a-cihama.adb, a-ciorse.adb, a-cidlli.adb,
827         a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-cborse.adb,
828         a-ciorma.adb, a-cobove.adb: Minor reformatting.
829
830 2011-12-01  Jakub Jelinek  <jakub@redhat.com>
831
832         PR bootstrap/51201
833         * gcc-interface/Make-lang.in: Initialize RTS_DIR with = instead of :=.
834
835 2011-11-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
836
837         * s-taprop-tru64.adb (Create_Task): Use Unrestricted_Access.
838
839 2011-11-23  Thomas Quinot  <quinot@adacore.com>
840
841         * thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
842         only on platforms where this is required, as determined by
843         s-oscons.h.
844
845 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
846
847         * sem_ch9.adb: No check on entry index if error on index.
848
849 2011-11-23  Gary Dismukes  <dismukes@adacore.com>
850
851         * sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
852         return statements nested inside an extended_return_statement.
853         * gcc-interface/Make-lang.in: Update dependencies.
854         * gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
855
856 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
857
858         * freeze.adb (Freeze_All_Ent): An incomplete type is not
859         frozen by a subprogram body that does not come from source.
860
861 2011-11-23  Pascal Obry  <obry@adacore.com>
862
863         * s-oscons-tmplt.c: Add PTY_Library constant. It contains
864         the library for pseudo terminal support.
865         * g-exptty.ads: Add pseudo-terminal library into a Linker_Options
866         pragma.
867
868 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
869
870         * sem_ch9.adb: No check on entry family index if generic.
871
872 2011-11-23  Thomas Quinot  <quinot@adacore.com>
873
874         * sem_ch9.adb, s-taprop.ads, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
875         s-taprop-posix.adb, s-taprop-rtx.adb, s-taprop-solaris.adb,
876         s-taprop-tru64.adb, s-taprop-vxworks.adb: Move dependency on
877         System.OS_Constants from shared spec of
878         System.Tasking.Primitive_Operations to the specific body variants
879         that really require this dependency.
880
881 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
882
883         * sem_ch8.adb (Analyze_Subprogram_Renaming_Declaration):
884         If the declaration has aspects, analyze them so they can be
885         properly rejected.
886
887 2011-11-23  Hristian Kirtchev  <kirtchev@adacore.com>
888
889         * a-comutr.adb, a-coorma.adb, a-coorse.adb, a-convec.adb, a-cihase.adb,
890         a-cimutr.adb, a-coinve.adb, a-ciorma.adb, a-ciorse.adb, a-cobove.adb,
891         a-cohama.adb, a-cihama.adb, a-cidlli.adb, a-cdlili.adb, a-cbhama.adb,
892         a-cbhase.adb, a-cbmutr.adb, a-cborma.adb, a-cborse.adb, a-cbdlli.adb:
893         Add with and use clause for Ada.Finalization. Type
894         Iterator and Child_Iterator are now derived from Limited_Controlled.
895         (Finalize): New routine.
896         (Iterate): Add a renaming of counter Busy and
897         increment it. Update the return aggregate.
898         (Iterate_Children): Add a renaming of
899         counter Busy and increment it. Update the return aggregate.
900         (Iterate_Subtree): Add a renaming of counter Busy and increment
901         it. Update the return aggregate.
902         * a-cdlili.ads, a-cidlli.ads: Type List_Access is now a general access
903         type.
904         * a-cihama.ads: Type Map_Access is now a general access type.
905         * a-comutr.ads, a-cimutr.ads: Use type Natural for the two locks
906         associated with the tree.
907         * a-cohama.ads: Type Map_Access is now a general access type.
908         * a-coinve.ads, a-convec.ads: Type Vector_Access is now a general
909         access type.
910         * exp_ch5.adb (Expand_Iterator_Loop): Do not create a block
911         to wrap the loop as this is done at an earlier step, during
912         analysis. The declarations of the iterator and the cursor use
913         the usual Insert_Action mechanism when added into the tree.
914         * sem_ch5.adb (Analyze_Loop_Statement): Remove local constant
915         Loop_Statement and replace all respective uses by N. Add local
916         constant Loc. Preanalyze the loop iterator to discover whether
917         it is a container iterator and if it is, wrap the loop in a
918         block. This ensures that any controlled temporaries produced
919         by the iteration scheme share the same lifetime of the loop.
920         (Is_Container_Iterator): New routine.
921         (Is_Wrapped_In_Block): New routine.
922         (Pre_Analyze_Range): Move spec and body to the library level.
923
924 2011-11-23  Sergey Rybin  <rybin@adacore.com frybin>
925
926         * gnat_ugn.texi, vms_data.ads: Add documentation for new gnatpp option
927         that controls casing of type and subtype names.
928
929 2011-11-23  Yannick Moy  <moy@adacore.com>
930
931         * sem_ch3.adb: Minor addition of comments.
932
933 2011-11-23  Thomas Quinot  <quinot@adacore.com>
934
935         * prj-part.adb (Extension_Withs): New global variable,
936         contains the head of the list of WITH clauses from the EXTENDS
937         ALL projects for which virtual packages are being created.
938         (Look_For_Virtual_Projects_For): When recursing through
939         an EXTENDS ALL, add the WITH clauses of the extending
940         project to Extension_Withs.  When adding a project to the
941         Virtual_Hash, record the associated Extension_Withs list.
942         (Create_Virtual_Extending_Project): Add a copy of the appropriate
943         Extension_Withs to the virtual project.
944
945 2011-11-23  Thomas Quinot  <quinot@adacore.com>
946
947         * mlib-tgt-specific-vxworks.adb: Minor reformatting.
948
949 2011-11-23  Thomas Quinot  <quinot@adacore.com>
950
951         * Make-generated.in (Sdefault.Target_Name): Set to
952         $(target_noncanonical) instead of $(target) for consistency.
953
954 2011-11-23  Matthew Heaney  <heaney@adacore.com>
955
956         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Iterator): Declared
957         Iterator type as limited (First, Last): Cursor return value
958         depends on iterator node value (Iterate): Use start position as
959         iterator node value (Next, Previous): Forward to corresponding
960         cursor-based operation.
961
962 2011-11-23  Matthew Heaney  <heaney@adacore.com>
963
964         * a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
965         Renamed from Ordered_Set_Iterator_Interfaces.
966         * a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
967         Iterator type as limited (First, Last): Cursor return value
968         depends on iterator node value (Iterate): Use start position as
969         iterator node value (Next, Previous): Forward to corresponding
970         cursor-based operation.
971         * a-cohase.ads, a-cohase.adb: Implemented forward iterator.
972         * a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
973         node component (First, Next): Forward call to corresponding
974         cursor-based operation (Iterate): Representation of iterator no
975         longer has node component
976
977 2011-11-23  Hristian Kirtchev  <kirtchev@adacore.com>
978
979         * exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
980         dereference has a proper type before the side effect removal
981         mechanism kicks in.
982         * sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
983         where the base type of the subtype is a private itype created
984         to act as the partial view of a constrained record type. This
985         scenario manifests with equivalent class-wide types for records
986         with unknown discriminants.
987
988 2011-11-23  Jerome Guitton  <guitton@adacore.com>
989
990         * s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
991
992 2011-11-23  Thomas Quinot  <quinot@adacore.com>
993
994         * s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
995         reformatting/reorganization.
996
997 2011-11-23  Thomas Quinot  <quinot@adacore.com>
998
999         * g-htable.ads: Remove old comments.
1000
1001 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1002
1003         * exp_imgv.adb: Minor reformatting.
1004
1005 2011-11-23  Robert Dewar  <dewar@adacore.com>
1006
1007         * sem_ch9.adb (Analyze_Entry_Declaration): Check for entry
1008         family bounds out of range.
1009
1010 2011-11-23  Matthew Heaney  <heaney@adacore.com>
1011
1012         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Iterator): Declare
1013         type as limited, and remove node component.
1014         (First, Next): Forward call to corresponding cursor-based operation.
1015         (Iterate): Representation of iterator no longer has node component.
1016
1017 2011-11-23  Yannick Moy  <moy@adacore.com>
1018
1019         * exp_util.adb: Revert previous change to remove side-effects in Alfa
1020         mode, which is not the correct thing to do for renamings.
1021
1022 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1023
1024         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb,
1025         s-osinte-vxworks.ads, s-osinte-aix.ads, s-osinte-lynxos.ads,
1026         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, a-exetim-posix.adb,
1027         s-osinte-irix.ads, s-osinte-solaris.ads, s-oscons-tmplt.c,
1028         s-taprop-irix.adb, s-osinte-hpux-dce.ads, Makefile.rtl,
1029         s-osinte-tru64.ads, s-osinte-darwin.ads, s-taprop.ads,
1030         s-osinte-freebsd.ads, s-osinte-lynxos-3.ads, s-taprop-hpux-dce.adb,
1031         s-taprop-posix.adb: Remove hard-coded clock ids;
1032         instead, generate them in System.OS_Constants.
1033         (System.OS_Constants.CLOCK_RT_Ada): New constant denoting the
1034         id of the clock providing Ada.Real_Time.Monotonic_Clock.
1035         * thread.c: New file.
1036         (__gnat_pthread_condattr_setup): New function. For platforms where
1037         CLOCK_RT_Ada is not CLOCK_REALTIME, set appropriate condition
1038         variable attribute.
1039
1040 2011-11-23  Yannick Moy  <moy@adacore.com>
1041
1042         * sem_ch3.adb: Restore the use of Expander_Active instead of
1043         Full_Expander_Active, so that the evaluation is forced in Alfa
1044         mode too. Otherwise, we end up with an unexpected insertion in a
1045         place where it is not supposed to happen, on default parameters
1046         of a call.
1047
1048 2011-11-23  Thomas Quinot  <quinot@adacore.com>
1049
1050         * prj-pp.adb, prj-pp.ads: Minor new addition: wrapper procedure "wpr"
1051         for Pretty_Print, for use from within gdb.
1052
1053 2011-11-23  Ed Schonberg  <schonberg@adacore.com>
1054
1055         * exp_ch5.adb (Expand_Iterator_Loop): Wrap the expanded loop
1056         and the cursor declarations in a block, so that the loop variable
1057         is local to the construct.
1058
1059 2011-11-23  Matthew Heaney  <heaney@adacore.com>
1060
1061         * a-coorma.ads, a-ciorma.ads, a-cborma.ads (Iterate): Returns
1062         type Reversible_Iterator'Class.
1063         * a-coorma.adb, a-ciorma.adb, a-cborma.adb (Iterator):
1064         Declare type as limited.
1065         (First, Last): Return value depends on iterator's start node value.
1066         (Next, Previous): Call corresponding Cursor-based operation.
1067         (Iterate): Indicate whether complete or partial iteration
1068
1069 2011-11-23  Robert Dewar  <dewar@adacore.com>
1070
1071         * errout.adb: Minor reformattin (Finalize): Take templates into
1072         account for warning suppression.
1073         * errout.ads (Set_Specific_Warning_Off): Add Used parameter.
1074         * erroutc.adb: Minor reformatting (Finalize): Take generic
1075         templates into account for warning suppress.
1076         * erroutc.ads (Set_Specific_Warning_Off): Add Used parameter.
1077         * sem_prag.adb: Minor reformatting (Analyze_Pragma,
1078         case Warnings): Provide Used parameter in call to
1079         Set_Specific_Warnings_Off (to deal with generic template case).
1080
1081 2011-11-23  Pascal Obry  <obry@adacore.com>
1082
1083         * sem_prag.adb (Process_Convention): Better error message for
1084         stdcall convention on dispatching calls.
1085
1086 2011-11-23  Gary Dismukes  <dismukes@adacore.com>
1087
1088         * sem_ch4.adb, sem_ch13.adb: Minor reformatting.
1089
1090 2011-11-23  Javier Miranda  <miranda@adacore.com>
1091
1092         * exp_ch6.adb (Expand_Simple_Function_Return): Add missing
1093         implicit type conversion when the returned object is allocated
1094         in the secondary stack and the type of the returned object is
1095         an interface. Done to force generation of displacement of the
1096         "this" pointer.
1097
1098 2011-11-23  Pascal Obry  <obry@adacore.com>
1099
1100         * impunit.adb: Add g-exptty and g-tty units.
1101
1102 2011-11-23  Robert Dewar  <dewar@adacore.com>
1103
1104         * exp_imgv.adb: Minor code reorganization (use Make_Temporary).
1105
1106 2011-11-23  Robert Dewar  <dewar@adacore.com>
1107
1108         * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor
1109         reformatting.
1110
1111 2011-11-23  Yannick Moy  <moy@adacore.com>
1112
1113         * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on
1114         line of precondition/ postcondition/invariant.
1115
1116 2011-11-23  Pascal Obry  <obry@adacore.com>
1117
1118         * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb,
1119         terminals.c: New files.
1120         Makefile.rtl: Add these new files.
1121         * gnat_rm.texi: Add documentation for GNAT.Expect.TTY.
1122         * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o
1123         * gcc-interface/Make-lang.in: Update dependencies.
1124
1125 2011-11-21  Robert Dewar  <dewar@adacore.com>
1126
1127         * exp_imgv.adb (Expand_Width_Attribute): Handle case of Discard_Names.
1128         * sem_attr.adb (Eval_Attribute, case Width): Ditto.
1129
1130 2011-11-21  Thomas Quinot  <quinot@adacore.com>
1131
1132         * sinfo.ads: Minor reformatting.
1133
1134 2011-11-21  Yannick Moy  <moy@adacore.com>
1135
1136         * exp_util.adb: Minor reformatting. Update comments.
1137
1138 2011-11-21  Robert Dewar  <dewar@adacore.com>
1139
1140         * exp_prag.adb, exp_util.adb, sinfo.ads, sem_res.adb, s-stposu.adb,
1141         sem_attr.adb, s-stposu.ads, s-taprop-solaris.adb, s-taprop-irix.adb,
1142         sem_ch6.adb: Minor reformatting.
1143
1144 2011-11-21  Arnaud Charlet  <charlet@adacore.com>
1145
1146         * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use
1147         Unrestricted_Access to deal with fact that we properly detect the
1148         error if Access is used.
1149         * gcc-interface/Make-lang.in: Update dependencies.
1150
1151 2011-11-21  Yannick Moy  <moy@adacore.com>
1152
1153         * exp_prag.adb (Expand_Pragma_Check): Place error on first character
1154         of expression.
1155         * sem_res.adb (Resolve_Short_Circuit): Place error on first
1156         character of expression.
1157
1158 2011-11-21  Yannick Moy  <moy@adacore.com>
1159
1160         * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode.
1161
1162 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1163
1164         * exp_attr.adb (Expand_N_Attribute_Reference, case
1165         Max_Size_In_Storage_Elements): Account for the size of the
1166         hidden list header which precedes controlled objects allocated
1167         on the heap.
1168         * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime
1169         tables.
1170         * sinfo.adb (Header_Size_Added): New routine.
1171         (Set_Header_Size_Added): New routine.
1172         * sinfo.ads: Add flag Controlled_Header_Added along with
1173         associated comment.
1174         (Header_Size_Added): New inlined routine.
1175         (Set_Header_Size_Added): New inlined routine.
1176         * s-stposu.adb (Allocate_Any_Controlled): Use
1177         Header_Size_With_Padding to calculate the proper
1178         size of the header.
1179         (Deallocate_Any_Controlled): Use
1180         Header_Size_With_Padding to calculate the proper size
1181         of the header.  (Header_Size_With_Padding): New routine.
1182         (Nearest_Multiple_Rounded_Up): Removed along with its uses.
1183         * s-stposu.ads (Header_Size_With_Padding): New routine.
1184
1185 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1186
1187         * aspects.adb: Aspect specifications are allowed on renaming
1188         declarations
1189         * par-ch6.adb (P_Subprogram): Parse aspect specifications in a
1190         subprogram renaming declaration
1191
1192 2011-11-21  Tristan Gingold  <gingold@adacore.com>
1193
1194         * env.c: Remove unused declaration.
1195
1196 2011-11-21  Pascal Obry  <obry@adacore.com>
1197
1198         * s-os_lib.ads: Minor style fix.
1199
1200 2011-11-21  Pascal Obry  <obry@adacore.com>
1201
1202         * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and
1203         identical, do nothing on Windows XP.
1204
1205 2011-11-21  Yannick Moy  <moy@adacore.com>
1206
1207         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
1208         Use Full_Expander_Active instead of Expander_Active to control
1209         the forced evaluation of expressions for the sake of generating
1210         checks.
1211
1212 2011-11-21  Thomas Quinot  <quinot@adacore.com>
1213
1214         * init.c: On FreeBSD, stack checking failures may raise SIGBUS.
1215
1216 2011-11-21  Tristan Gingold  <gingold@adacore.com>
1217
1218         * sysdep.c (mode_read_text, mode_write_text, mode_append_text,
1219         mode_read_binary, mode_write_binary, mode_append_binary,
1220         mode_read_text_plus, mode_write_text_plus, mode_append_text_plus,
1221         mode_read_binary_plus, mode_write_binary_plus,
1222         mode_append_binary_plus): Remove unused declarations.
1223
1224 2011-11-21  Yannick Moy  <moy@adacore.com>
1225
1226         * gnat_rm.texi: Minor rewording.
1227
1228 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1229
1230         * exp_imgv.adb (Expand_Width_Attribute): Emit
1231         an error message rather than a warning when pragma Discard_Names
1232         prevents the computation of 'Width. Do not emit an error through
1233         the use of RE_Null.
1234
1235 2011-11-21  Javier Miranda  <miranda@adacore.com>
1236
1237         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add
1238         implicit type conversion when the type of the allocator is an
1239         interface. Done to force generation of displacement of the "this"
1240         pointer when required.
1241
1242 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1243
1244         * sinfo.ads, sinfo.adb: Corresponding_Spec applies to expression
1245         functions, and is set when the expression is a completion of a
1246         previous declaration.
1247         * sem_ch6.adb (Analyze_Expression_Function): To determine properly
1248         whether an expression function completes a previous declaration,
1249         use Find_Corresponding_Spec, as when analyzing a subprogram body.
1250
1251 2011-11-21  Steve Baird  <baird@adacore.com>
1252
1253         * sem_util.adb (Deepest_Type_Access_Level): Improve comment.
1254         (Type_Access_Level): Improve comment.
1255
1256 2011-11-21  Eric Botcazou  <ebotcazou@adacore.com>
1257
1258         * gcc-interface/Makefile.in (INCLUDES_FOR_SUBDIR): Add $(fsrcdir) by
1259         means of -iquote unconditionally.
1260
1261 2011-11-21  Robert Dewar  <dewar@adacore.com>
1262
1263         * sem_ch3.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1264         reformatting.
1265
1266 2011-11-21  Arnaud Charlet  <charlet@adacore.com>
1267
1268         * s-taprop-posix.adb (Create_Task): Use Unrestricted_Access
1269         to deal with fact that we properly detect the error if Access
1270         is used.
1271
1272 2011-11-21  Steve Baird  <baird@adacore.com>
1273
1274         * sem_util.ads: Update comment describing function
1275         Deepest_Access_Level.
1276         * sem_util.adb (Deepest_Type_Access_Level): Return Int'Last for a
1277         generic formal type.
1278         (Type_Access_Level): Return library level
1279         for a generic formal type.
1280         * sem_attr.adb (Resolve_Attribute): Replace two Type_Access_Level
1281         calls with calls to Deepest_Type_Access_Level.
1282         * sem_ch3.adb (Analyze_Component_Declaration): replace a
1283         Type_Access_Level call with a call to Deepest_Type_Access_Level.
1284         * sem_res.adb (Resolve_Allocator.Check_Allocator_Discrim_Accessibility):
1285         Replace three Type_Access_Level calls with calls to
1286         Deepest_Type_Access_Level.
1287         (Resolve_Allocator): Replace a Type_Access_Level call with a call to
1288         Deepest_Type_Access_Level.
1289         (Valid_Conversion.Valid_Array_Conversion): Replace a
1290         Type_Access_Level call with a call to Deepest_Type_Access_Level.
1291
1292 2011-11-21  Robert Dewar  <dewar@adacore.com>
1293
1294         * sem_ch3.adb, s-taprop-vms.adb, opt.ads: Minor reformatting.
1295
1296 2011-11-21  Robert Dewar  <dewar@adacore.com>
1297
1298         * sinput.ads: Minor comment fix.
1299
1300 2011-11-21  Robert Dewar  <dewar@adacore.com>
1301
1302         * exp_attr.adb (Expand_N_Attribute_Reference, case First_Bit,
1303         Last_Bit, Position): Handle 2005 case.
1304
1305 2011-11-21  Robert Dewar  <dewar@adacore.com>
1306
1307         * s-atocou-builtin.adb (Decrement): Use Unrestricted_Access
1308         to deal with fact that we properly detect the error if Access
1309         is used.
1310         (Increment): Same fix.
1311         * s-taprop-linux.adb (Create_Task): Use Unrestricted_Access
1312         to deal with fact that we properly detect the error if Access
1313         is used.
1314         * sem_util.adb (Is_Volatile_Object): Properly record that A.B is
1315         volatile if the B component is volatile. This affects the check
1316         for passing such a by reference volatile actual to a non-volatile
1317         formal (which should be illegal)
1318
1319 2011-11-21  Robert Dewar  <dewar@adacore.com>
1320
1321         * freeze.adb (Freeze_Enumeration_Type): Make sure to set both
1322         size and alignment for foreign convention enumeration types.
1323         * layout.adb (Set_Elem_Alignment): Redo setting of alignment
1324         when size is set.
1325
1326 2011-11-21  Yannick Moy  <moy@adacore.com>
1327
1328         * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,
1329         Apply_Discriminant_Check, Apply_Divide_Check,
1330         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks,
1331         Build_Discriminant_Checks, Insert_Range_Checks, Selected_Length_Checks,
1332         Selected_Range_Checks): Replace reference to Expander_Active
1333         with reference to Full_Expander_Active, so that expansion of
1334         checks is not performed in Alfa mode
1335
1336 2011-11-21  Tristan Gingold  <gingold@adacore.com>
1337
1338         * s-taprop-vms.adb (Create_Task): Use Unrestricted_Access to deal with
1339         fact that we properly detect the error if Access is used.
1340
1341 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1342
1343         * par-ch4.adb (P_Quantified_Expression): Add an Ada 2012 check.
1344
1345 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1346
1347         * exp_imgv.adb: Add with and use clause for Errout.
1348         (Expand_Width_Attribute): Emit a warning when in
1349         configurable run-time mode to provide a better diagnostic message.
1350
1351 2011-11-21  Hristian Kirtchev  <kirtchev@adacore.com>
1352
1353         * s-finmas.adb (Finalize): Add comment concerning double finalization.
1354
1355 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1356
1357         * sem_ch3.adb (Access_Definition): If the access definition
1358         is itself the return type of an access to function definition
1359         which is ultimately the return type of an access to subprogram
1360         declaration, its scope is the enclosing scope of the ultimate
1361         access to subprogram.
1362
1363 2011-11-21  Steve Baird  <baird@adacore.com>
1364
1365         * sem_res.adb (Valid_Conversion): If a conversion was legal
1366         in the body of a generic, then the corresponding conversion is
1367         legal in the expanded body of an instance of the generic.
1368
1369 2011-11-21  Robert Dewar  <dewar@adacore.com>
1370
1371         * sem_ch3.adb: Minor reformatting.
1372
1373 2011-11-21  Robert Dewar  <dewar@adacore.com>
1374
1375         * s-utf_32.adb (Is_UTF_32_Line_Terminator): Recognize NEL as
1376         line terminator.
1377         * sinput.ads: Add section on Handling of Source Line Terminators.
1378         * types.ads (Line_Terminator): Adjust comments.
1379
1380 2011-11-21  Robert Dewar  <dewar@adacore.com>
1381
1382         * frontend.adb (Frontend): Capture restrictions from config files
1383         * lib-load.adb (Load_Unit): Save/set/restore restriction pragma
1384         information
1385         * lib-xref.adb (Generate_Reference): Fix handling of obsolescent
1386         references. This was noticed during debugging, but it is not
1387         known if it causes real bugs.
1388         * restrict.ads, restrict.adb: New routines to save/set/restore
1389         non-partition-wide restrictions.
1390         * s-rident.ads: Comment changes for new handling of
1391         No_Elaboration_Code
1392         * sem.adb (Sem): Save/Set/Restore non-partition-wide restrictions
1393         * sem_ch10.adb (Analyze_Compilation_Unit): Remove incomplete
1394         attempt to save/restore non-partition-wide restrictions (now
1395         this work is all done in Sem).
1396         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1397         Special handling for restriction No_Elaboration_Code.
1398
1399 2011-11-21  Robert Dewar  <dewar@adacore.com>
1400
1401         * gnat_ugn.texi: Document new handling of restrictions pragmas.
1402
1403 2011-11-21  Pascal Obry  <obry@adacore.com>
1404
1405         * s-taprop-linux.adb (Initialize_Lock): Do not allocate a cond
1406         attribute as not needed.
1407
1408 2011-11-21  Robert Dewar  <dewar@adacore.com>
1409
1410         * sem_prag.adb: Minor reformatting.
1411
1412 2011-11-21  Pascal Obry  <obry@adacore.com>
1413
1414         * gnat_rm.texi: Document restriction for stdcall convention on
1415         dispatching calls.
1416
1417 2011-11-21  Pascal Obry  <obry@adacore.com>
1418
1419         * sem_prag.adb (Process_Convention): A dispatching call cannot
1420         have a stdcall calling convention.
1421
1422 2011-11-21  Pascal Obry  <obry@adacore.com>
1423
1424         * s-taprop-linux.adb (Initialize_Lock): Do not allocate a
1425         mutex attribute as not needed.
1426         (Initialize_TCB): Likewise.
1427         (Initialize): Likewise.
1428
1429 2011-11-21  Robert Dewar  <dewar@adacore.com>
1430
1431         * sem_ch6.adb (Is_Public_Subprogram_For): New procedure
1432         (Process_PPCs): Invariants only apply to public subprograms.
1433
1434 2011-11-21  Robert Dewar  <dewar@adacore.com>
1435
1436         * sem_util.adb, sem_util.ads, sem_attr.adb, restrict.adb,
1437         restrict.ads: Fix for No_Implicit_Aliasing in the renames case.
1438
1439 2011-11-21  Robert Dewar  <dewar@adacore.com>
1440
1441         * a-finali.ads: Use pragma Pure_12 for this unit
1442         * aspects.adb: Add aspect Pure_12
1443         * aspects.ads: Add aspect Pure_12
1444         * opt.ads: Add note on Pure_12
1445         * par-prag.adb: Add dummy entry for Pure_12
1446         * sem_prag.adb: Implement Pure_12 pragma
1447         * snames.ads-tmpl: Add Entry for Pure_12
1448
1449 2011-11-21  Sergey Rybin  <rybin@adacore.com frybin>
1450
1451         * vms_data.ads: Add qualifiers for new gnatpp options
1452         '--call_threshold' and '--par_threshold".
1453         * gnat_ugn.texi: Add description for new gnatpp options
1454         '--call_threshold' and '--par_threshold".
1455
1456 2011-11-21  Robert Dewar  <dewar@adacore.com>
1457
1458         * lib.ads: Minor reformatting.
1459
1460 2011-11-21  Robert Dewar  <dewar@adacore.com>
1461
1462         * lib-load.ads: Add comment.
1463
1464 2011-11-21  Gary Dismukes  <dismukes@adacore.com>
1465
1466         * sem_elab.adb: Minor reformatting
1467
1468 2011-11-21  Robert Dewar  <dewar@adacore.com>
1469
1470         * exp_ch6.adb: Minor reformatting.
1471
1472 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1473
1474         * sem_ch12.adb (Check_Formal_Package_Instance): If a formal
1475         subprogram of the formal package is covered by an others
1476         association with a box initialization, no check is needed
1477         against the actual in the instantiation of the formal package.
1478
1479 2011-11-21  Robert Dewar  <dewar@adacore.com>
1480
1481         * sem_elab.adb (Check_Internal_Call_Continue): Suppress junk
1482         elab warning from within precondition/postcondition etc.
1483
1484 2011-11-21  Ed Schonberg  <schonberg@adacore.com>
1485
1486         * exp_ch6.adb (Expand_Actuals): In Ada 2012, a function call
1487         with out parameters may generate assignments to force constraint
1488         checks. These checks must be properly placed in the code after the
1489         declaration or statement that contains the call.
1490
1491 2011-11-21  Fedor Rybin  <frybin@adacore.com>
1492
1493         * gnat_ugn.texi: Adding info on current gnattest limitations an
1494         support of -X option.
1495
1496 2011-11-21  Robert Dewar  <dewar@adacore.com>
1497
1498         * a-cfdlli.adb, a-cbdlli.adb: Minor reformatting.
1499
1500 2011-11-20  Robert Dewar  <dewar@adacore.com>
1501
1502         * exp_ch6.adb, exp_util.adb: Minor reformatting
1503
1504 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1505
1506         * sinfo.ads (Reference): Document that it is OK to set
1507         Is_Known_Non_Null on a temporary initialized to a N_Reference
1508         node.
1509
1510 2011-11-20  Matthew Heaney  <heaney@adacore.com>
1511
1512         * a-cbdlli.adb, a-cfdlli.adb (Move): Set Last component to 0
1513         for Source list.
1514
1515 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1516
1517         * exp_ch6.adb (Make_Build_In_Place_Call_In_Assignment):
1518         Declare NEW_EXPR local variable and attach the
1519         temporary to it.  Set Is_Known_Non_Null on the temporary.
1520         (Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
1521         * exp_util.adb (Remove_Side_Effects): Set Is_Known_Non_Null on
1522         the temporary created to hold the 'Reference of the expression,
1523         if any.
1524         * checks.adb (Install_Null_Excluding_Check): Bail out for the
1525         Get_Current_Excep.all.all idiom generated by the expander.
1526
1527 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1528
1529         * gcc-interface/trans.c (struct language_function): Add GNAT_RET.
1530         (f_gnat_ret): New macro.
1531         (struct nrv_data): Add GNAT_RET.
1532         (finalize_nrv_unc_r): New helper function.
1533         (finalize_nrv): Add GNAT_RET parameter.  Copy it into DATA.  If the
1534         function returns unconstrained, use finalize_nrv_unc_r as callback.
1535         (return_value_ok_for_nrv_p): Test the alignment of RET_OBJ only if
1536         RET_OBJ is non-null.
1537         (Subprogram_Body_to_gnu): Pass GNAT_RET to finalize_nrv.
1538         (gnat_to_gnu) <N_Return_Statement>: In the return-unconstrained case,
1539         if optimization is enabled, record candidates for the Named Return
1540         Value optimization.
1541
1542 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1543
1544         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Add comment.
1545         (gnat_to_gnu) <N_Return_Statement>: Add 'else' to avoid doing a useless
1546         test.  Tweak default case.
1547         <N_Goto_Statement>: Use better formatting.
1548         * gcc-interface/utils2.c (maybe_wrap_malloc): Use INIT_EXPR instead of
1549         MODIFY_EXPR to initialize the storage.
1550         (build_allocator): Likewise.
1551
1552 2011-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1553
1554         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Adjust
1555         call to components_to_record.
1556         (components_to_record): Add FIRST_FREE_POS parameter.  For the variant
1557         part, reuse enclosing union even if there is a representation clause
1558         on the Unchecked_Union.  If there is a variant part, compute the new
1559         first free position, if any.  Adjust call to self.  Use a single field
1560         directly only if it hasn't got a representation clause or is placed at
1561         offset zero.  Create the variant part at offset 0 if all the fields
1562         down to this level have a rep clause.  Do not chain the variant part
1563         immediately and adjust downstream.
1564         Do not test ALL_REP before moving the fields without rep clause to the
1565         previous level.  Call create_rep_part to create the REP part and force
1566         a minimum size on it if necessary.  Do not chain it immediately.
1567         Create a fake REP part if there are fields without rep clause that need
1568         to be laid out starting from FIRST_FREE_POS.
1569         At the end, chain the REP part and then the variant part.
1570         (create_rep_part): New function.
1571         (get_rep_part): Minor tweak.
1572         * gcc-interface/utils.c (tree_code_for_record_type): Minor tweak.
1573
1574 2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
1575
1576         PR target/50678
1577         * init.c (__gnat_error_handler) [Darwin]: Move workaround to the
1578         bug filed as radar #10302855 from __gnat_error_handler to...
1579         (__gnat_adjust_context_for_raise) [Darwin]: ...here.  New function.
1580         (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
1581
1582 2011-11-18  Tristan Gingold  <gingold@adacore.com>
1583             Iain Sandoe  <iains@gcc.gnu.org>
1584
1585         PR target/49992
1586         * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
1587         * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing.
1588
1589 2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
1590
1591         * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
1592         s-oscons.ads.
1593         (OSCONS_CPP, OSCONS_EXTRACT): New.
1594         (./bldtools/oscons/xoscons): New target.
1595         ($(RTSDIR)/s-oscons.ads): Likewise.
1596         (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
1597         * gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
1598         * Make-generated.in: Remove machinery to generate xoscons and
1599         ada/s-oscons.ads.
1600
1601 2011-11-10  Eric Botcazou  <ebotcazou@adacore.com>
1602
1603         * fe.h (Serious_Errors_Detected): New macro.
1604         * gcc-interface/gigi.h (build_atomic_load): Declare.
1605         (build_atomic_store): Likewise.
1606         * gcc-interface/trans.c (atomic_sync_required_p): New predicate.
1607         (call_to_gnu): Add ATOMIC_SYNC parameter.  Use local variable.
1608         Build an atomic load for an In or In Out parameter if needed.
1609         Build an atomic store for the assignment of an Out parameter if needed.
1610         Build an atomic store to the target if ATOMIC_SYNC is true.
1611         (present_in_lhs_or_actual_p): New predicate.
1612         (gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
1613         <N_Explicit_Dereference>: Likewise.
1614         <N_Indexed_Component>: Likewise.
1615         <N_Selected_Component>: Likewise.
1616         <N_Assignment_Statement>: Adjust call to call_to_gnu.
1617         Build an atomic store to the LHS if needed.
1618         <N_Function_Call>:  Adjust call to call_to_gnu.
1619         * gcc-interface/utils2.c: Include toplev.h.
1620         (resolve_atomic_size): New static function.
1621         (build_atomic_load): New function.
1622         (build_atomic_store): Likewise.
1623         * gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
1624
1625 2011-11-07  Olivier Hainque  <hainque@adacore.com>
1626
1627         * sigtramp-ppcvxw.c: Add general comments.
1628         (CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
1629         rules for r2 to r13, plus CTR and XER.
1630         (CFA_REG): New, register number used to hold the local CFA.
1631         (CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
1632         Make that 15, not 14, with documentation.
1633         (TCR): Undef before definition, preventing conflict with reg number in
1634         VxWorks headers.
1635
1636 2011-11-07  Robert Dewar  <dewar@adacore.com>
1637
1638         * exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
1639         aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
1640         * gcc-interface/Make-lang.in: Update dependencies.
1641
1642 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1643
1644         * exp_ch6.adb: A tagged type is a legal actual for an aliased
1645         formal.
1646
1647 2011-11-07  Pascal Obry  <obry@adacore.com>
1648
1649         * g-socket.adb, g-socket.ads: Minor reformatting.
1650
1651 2011-11-07  Robert Dewar  <dewar@adacore.com>
1652
1653         * sem_res.adb (Resolve_Actuals): Minor error message improvement.
1654
1655 2011-11-07  Robert Dewar  <dewar@adacore.com>
1656
1657         * gnat_ugn.texi: Add discussion of default mode handling of
1658         source representation with no -gnatW option given, in particular
1659         noting that NEL (next line) is not recognized in this context.
1660
1661 2011-11-07  Yannick Moy  <moy@adacore.com>
1662
1663         * sem_util.adb (Note_Possible_Modification): In Alfa mode,
1664         generate a reference for a modification even when the modification
1665         does not come from source.
1666
1667 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1668
1669         * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
1670         use the indexing attributes rather than the Element function,
1671         to obtain variable references.
1672         * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
1673         Find_Aspect rather than iterating over representation
1674         items. Improve error message.
1675         * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
1676         of Reference functions.
1677
1678 2011-11-07  Yannick Moy  <moy@adacore.com>
1679
1680         * sem_util.adb (Unique_Entity): For a parameter on a subprogram
1681         body that has a corresponding parameter on the subprogram
1682         declaration, define the unique entity as being the declaration
1683         one.
1684
1685 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1686
1687         * sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
1688         return type of a function is the class-wide type of an incomplete
1689         type T, T can be a Taft-amendment type and does not have to be
1690         completed in the current private part.
1691
1692 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1693
1694         * aspects.ads (Inherited_Aspect): Map that indicates type aspects
1695         that are inherited by default, and apply to the class-wide type
1696         as well.
1697         * aspects.adb (Find_Aspect): If the entity is class-wide and the
1698         aspect is inherited, use the aspect of the specific type.
1699
1700 2011-11-07  Hristian Kirtchev  <kirtchev@adacore.com>
1701
1702         * exp_alfa.adb: Remove with and use clause for
1703         Exp_Ch8. Add with and use clause for Exp_Util.
1704         Remove local constant Disable_Processing_Of_Renamings.
1705         (Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
1706         object renamings has been reenabled.
1707         (Expand_Possible_Renaming):
1708         The expansion of identifier and expanded names has been
1709         reenabled. Perform the substitutions only for entities that
1710         denote an object.
1711         * exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
1712         * exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
1713         (Remove_Side_Effects): Alphabetize local variables. Add a guard
1714         to avoid the infinite expansion of an expression in Alfa mode. Add
1715         processing for function calls in Alfa mode.
1716         * exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.
1717
1718 2011-11-07  Ed Schonberg  <schonberg@adacore.com>
1719
1720         * freeze.adb (Freeze_Entity): If the entity is an access to
1721         subprogram whose designated type is itself a subprogram type,
1722         its own return type must be decorated with size information.
1723
1724 2011-11-04  Arnaud Charlet  <charlet@adacore.com>
1725
1726         * gcc-interface/Make-lang.in: Update dependencies.
1727
1728 2011-11-04  Robert Dewar  <dewar@adacore.com>
1729
1730         * sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
1731         Avoid junk semicolon after argument of machine code Asm operand.
1732
1733 2011-11-04  Robert Dewar  <dewar@adacore.com>
1734
1735         * exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
1736         CodePeer mode or if restriction No_Exception_Handlers is present.
1737         * exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
1738         nodes in CodePeer mode or if restriction No_Exception_Handlers
1739         is present.
1740
1741 2011-11-04  Robert Dewar  <dewar@adacore.com>
1742
1743         * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
1744
1745 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1746
1747         * sem_ch6.adb (Analyze_Subprogram_Specification): The
1748         specification is legal if it is a function that returns an
1749         abstract type, if it comes from an attribute renaming of a stream
1750         attribute of an abstract type.
1751
1752 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1753
1754         * exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
1755         components, check whether recursively check whether the prefix
1756         denotes an unaligned object.
1757
1758 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1759
1760         * sem_prag.adb (Analyze_Pragma, case Debug): The argument of
1761         the pragma is legal if it is an expanded name that denotes a
1762         procedure that be can called without parameters.
1763
1764 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1765
1766         * gnat_ugn.texi (Performance Considerations) <Vectorization
1767         of loops>: New sub-section.  <Other Optimization Switches>:
1768         Minor tweak.
1769
1770 2011-11-04  Robert Dewar  <dewar@adacore.com>
1771
1772         * gnat_rm.texi: Minor reformatting.
1773
1774 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1775
1776         * a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
1777         when Target and Source denote same non-empty object
1778         * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto
1779
1780 2011-11-04  Robert Dewar  <dewar@adacore.com>
1781
1782         * exp_attr.adb: Minor reformatting.
1783
1784 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1785
1786         * exp_ch5.adb (Expand_Assign_Record): Do not generate a
1787         discriminant assignment within an initialization proc if the
1788         record is an unchecked union, as it can only come from the
1789         initialization of an unchecked union component.
1790
1791 2011-11-04  Robert Dewar  <dewar@adacore.com>
1792
1793         * gnat_ugn.texi: Minor reformatting.
1794
1795 2011-11-04  Robert Dewar  <dewar@adacore.com>
1796
1797         * par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
1798         warning message.
1799
1800 2011-11-04  Robert Dewar  <dewar@adacore.com>
1801
1802         * exp_ch4.adb: Minor code reorganization (remove junk obsolete
1803         var Save_Space).
1804
1805 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1806
1807         * exp_alfa.adb: Add local constant
1808         Disable_Processing_Of_Renamings;
1809         (Expand_Alfa_N_Object_Renaming_Declaration): Disable
1810         the name evaluation of object renamings for now.
1811         (Expand_Potential_Renaming): Do not perform the substitution
1812         for now.
1813         * exp_util.adb (Remove_Side_Effects): Remove processing for
1814         functions with side effects in Alfa mode.
1815
1816 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1817
1818         * bindgen.adb (Gen_Elab_Calls): In the case
1819         of the AAMP target, set elaboration entities to 1 rather than
1820         incrementing.
1821
1822 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1823
1824         * sem_ch10.adb (Install_Limited_With_Unit): To establish the
1825         proper entities on the ancestors of a child unit that appear
1826         in a limited_with clause, follow the unit links because the
1827         units are not analyzed and scope information is incomplete.
1828
1829 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1830
1831         * exp_ch4.adb (Expand_N_Selected_Component): Refine code
1832         setting the Atomic_Sync_Required flag to detect one more case.
1833         * exp_util.adb (Activate_Atomic_Synchronization): Refine code
1834         setting the Atomic_Sync_Required flag to exclude more cases,
1835         depending on the parent of the node to be examined.
1836
1837 2011-11-04  Bob Duff  <duff@adacore.com>
1838
1839         * g-excact.adb: Minor: use named notation.
1840
1841 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1842
1843         * sem_ch5.adb: Improve error messages for illegal iterators.
1844
1845 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1846
1847         * exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
1848         Sem_Util.
1849         (Expand_Alfa): Alphabetize cases on first choice. Add
1850         processing for object renaming declarations, identifiers and
1851         expanded names.
1852         (Expand_Alfa_N_In): Remove useless return.
1853         (Expand_Alfa_N_Object_Renaming_Declaration): New routine.
1854         (Expand_Potential_Renaming): New routine.
1855         * exp_ch8.adb (Evaluate_Name): Moved to the top level.
1856         (Expand_N_Object_Declaration): Alphabetize local variables. Move
1857         Evaluate_Name out to the top level.
1858         * exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
1859         * exp_util.adb (Remove_Side_Effects): Add processing for
1860         functions with side effects in Alfa mode.
1861
1862 2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>
1863
1864         * gnat_rm.texi: Add entries for
1865         restrictions No_Relative_Delay, No_Requeue_Statements and
1866         No_Stream_Optimizations.
1867
1868 2011-11-04  Ed Schonberg  <schonberg@adacore.com>
1869
1870         * sem_ch4.adb: Set type of entity in prefixed call, for
1871         completeness in a generic context.
1872
1873 2011-11-04  Yannick Moy  <moy@adacore.com>
1874
1875         * sem_prag.adb: Minor refactoring (renaming of a parameter).
1876
1877 2011-11-04  Robert Dewar  <dewar@adacore.com>
1878
1879         * atree.ads: Minor reformatting.
1880
1881 2011-11-04  Robert Dewar  <dewar@adacore.com>
1882
1883         * checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
1884         and -gnatd.e here
1885         * exp_ch2.adb (Expand_Entity_Reference): Use
1886         Activate_Atomic_Synchronization
1887         * exp_ch4.adb (Expand_N_Explicit_Dereference): Use
1888         Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
1889         Activate_Atomic_Synchronization (Expand_N_Selected_Component):
1890         Use Activate_Atomic_Synchronization
1891         * exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
1892         procedure.
1893         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
1894         N_Selected_Component node
1895
1896 2011-11-04  Robert Dewar  <dewar@adacore.com>
1897
1898         * sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.
1899
1900 2011-11-04  Yannick Moy  <moy@adacore.com>
1901
1902         * atree.adb, atree.ads (Set_Original_Node): New set procedure.
1903         * sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
1904         In ASIS mode, no splitting of aspects between conjuncts.
1905         (Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
1906         expressions refer to the original aspect expressions through
1907         the Original_Node link. This is used in semantic analysis for
1908         ASIS mode, so that the original expression also gets analyzed.
1909         * sem_prag.adb (Preanalyze_TC_Args,
1910         Check_Precondition_Postcondition,
1911         Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
1912         generated from a source aspect, also analyze the original aspect
1913         expression.
1914         (Check_Expr_Is_Static_Expression): New procedure
1915         similar to existing procedure Check_Arg_Is_Static_Expression,
1916         except called on expression inside pragma.
1917
1918 2011-11-04  Tristan Gingold  <gingold@adacore.com>
1919
1920         * prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
1921         Find_Project.Try_Path_Name.
1922         (Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.
1923
1924 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
1925
1926         * s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.
1927
1928 2011-11-04  Pascal Obry  <obry@adacore.com>
1929
1930         * projects.texi: Add short description for qualifiers aggregate
1931         and aggregate library.
1932
1933 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1934
1935         * Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
1936         * a-cgaaso.adb: Replaced implementation with instantiation
1937         of Generic_Sort.
1938         * a-cogeso.ad[sb] This is the new Ada 2012 unit
1939         Ada.Containers.Generic_Sort
1940
1941 2011-11-04  Robert Dewar  <dewar@adacore.com>
1942
1943         * exp_ch2.adb (Expand_Entity_Reference): Do not set
1944         Atomic_Sync_Required for the case of a prefix of an attribute.
1945         * exp_ch4.adb (Expand_N_Explicit_Dereference): May require
1946         atomic synchronization
1947         (Expand_N_Indexed_Component): Ditto.
1948         (Expand_B_Selected_Component): Ditto.
1949         * sem_prag.adb (Process_Suppress_Unsuppress):
1950         Disable/Enable_Atomic_Synchronization can now occur for array
1951         types with pragma Atomic_Components.
1952         * sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now occur on
1953         N_Explicit_Dereference nodes and on N_Indexed_Component nodes.
1954
1955 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
1956
1957         * gnat_ugn.texi: Editorial corrections for gnattest section.
1958
1959 2011-11-04  Robert Dewar  <dewar@adacore.com>
1960
1961         * sem_prag.adb: Minor reformatting.
1962         * gnat_rm.texi: Update documentation for pragma Warnings (Off,
1963         "***") usage.
1964         * exp_ch2.adb (Expand_Entity_Reference): Only set
1965         Atomic_Sync_Required on entities that are variables. Doesn't
1966         make any sense on anything else.
1967
1968 2011-11-04  Robert Dewar  <dewar@adacore.com>
1969
1970         * exp_ch2.adb (Expand_Entity_Reference): Extend handling of
1971         atomic sync to type case.
1972         * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can
1973         apply to types.
1974
1975 2011-11-04  Robert Dewar  <dewar@adacore.com>
1976
1977         * sem_warn.adb (Warn_On_Useless_Assignment): More accurate test
1978         for call vs assign.
1979         * gcc-interface/Make-lang.in: Update dependencies.
1980
1981 2011-11-04  Robert Dewar  <dewar@adacore.com>
1982
1983         * sem_prag.adb: Detect more cases of Long_Float inconsistencies at
1984         compile time.
1985
1986 2011-11-04  Matthew Heaney  <heaney@adacore.com>
1987
1988         * Makefile.rtl, impunit.adb: Added a-sfecin.ads,
1989         * a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb], a-sbhcin.ad[sb],
1990         a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb], a-sulcin.ad[sb]
1991         * a-sfecin.ads, a-sfhcin.ads, a-sflcin.ads, a-sbecin.ad[sb],
1992         a-sbhcin.ad[sb], a-sblcin.ad[sb], a-suecin.ad[sb], a-suhcin.ad[sb],
1993         a-sulcin.ad[sb]: New files.
1994
1995 2011-11-04  Geert Bosch  <bosch@adacore.com>
1996
1997         * i-forbla-unimplemented.ads, s-gecola.adb, s-gecola.ads,
1998         s-gerebl.adb, s-gerebl.ads, i-forbla.adb, i-forbla.ads,
1999         i-forlap.ads, i-forbla-darwin.adb, s-gecobl.adb, s-gecobl.ads,
2000         s-gerela.adb, s-gerela.ads: Remove partial interface to BLAS/LAPACK.
2001         * gcc-interface/Makefile.in: Remove libgnala and related objects.
2002
2003 2011-11-04  Matthew Heaney  <heaney@adacore.com>
2004
2005         * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb],
2006         a-coorma.ad[sb], a-ciorma.ad[sb], a-coormu.ad[sb], a-ciormu.ad[sb],
2007         a-cohama.ad[sb], a-cihama.ad[sb], a-cohase.ad[sb], a-cihase.ad[sb],
2008         a-convec.ad[sb], a-coinve.ad[sb] (Assign, Copy): New operations
2009         added to package.
2010
2011 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
2012
2013         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not assert
2014         that the type of the parameters isn't dummy in type_annotate_only mode.
2015
2016 2011-11-04  Robert Dewar  <dewar@adacore.com>
2017
2018         * sem_ch12.adb: Minor reformatting
2019
2020 2011-11-04  Gary Dismukes  <dismukes@adacore.com>
2021
2022         * bindgen.adb (Gen_Elab_Calls): In the case of the AAMP target,
2023         initialize elaboration entities to zero when specs are processed.
2024
2025 2011-10-28  Iain Sandoe  <iains@gcc.gnu.org>
2026             Eric Botcazou  <ebotcazou@adacore.com>
2027
2028         PR target/50678
2029         * init.c (__gnat_error_handler) [Darwin]: Apply a work-around to the
2030         bug filed as radar #10302855 (inconsistent unwind data for sigtramp).
2031
2032 2011-10-28  Eric Botcazou  <ebotcazou@adacore.com>
2033
2034         PR ada/50842
2035         * gcc-interface/Makefile.in (SYMDEPS): Delete.
2036         (LIBICONV): New variable.
2037         (LIBICONV_DEP): Likewise.
2038         (LIBS): Add $(LIBICONV).
2039         (LIBDEPS): Add $(LIBICONV_DEP).
2040         (EXTRA_GNATTOOLS_OBJS): Merge into...
2041         (TOOLS_LIBS): ...this.  Add $(LIBICONV).
2042
2043 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
2044
2045         * gcc-interface/decl.c (elaborate_expression_1): Add EXPR_PUBLIC_P local
2046         variable.  Always create the elaboration variable, if any, as constant.
2047
2048 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
2049
2050         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to
2051         make a packable type for fields of union types as well.
2052         <is_type>: Use RECORD_OR_UNION_TYPE_P predicate.
2053         (gnat_to_gnu_component_type): Try to make a packable type for fields
2054         of union types as well.
2055         (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate.
2056         (maybe_pad_type): Try to make a packable type for fields of union types
2057         as well.
2058         (gnat_to_gnu_field): Likewise.
2059         (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate.
2060         (set_rm_size): Likewise.
2061         (rm_size): Likewise.
2062         * gcc-interface/misc.c (gnat_type_max_size): Likewise.
2063         * gcc-interface/trans.c (add_decl_expr): Likewise.
2064         * gcc-interface/utils.c (finish_record_type): Likewise.
2065         * gcc-interface/utils2.c (build_simple_component_ref): Likewise.
2066
2067 2011-10-26  Eric Botcazou  <ebotcazou@adacore.com>
2068
2069         * gcc-interface/decl.c (gnat_to_gnu_field): Always check components
2070         declared as atomic.  Move around conditionally executed code.
2071
2072 2011-10-24  Robert Dewar  <dewar@adacore.com>
2073
2074         * sem.adb (Initialize): Fix bug that blew up if called a second time.
2075
2076 2011-10-24  Robert Dewar  <dewar@adacore.com>
2077
2078         * tb-alvxw.c, tracebak.c, expect.c, initflt.c, tb-alvms.c,
2079         tb-ivms.c, tb-gcc.c: Update headers to GPL 3.
2080
2081 2011-10-24  Robert Dewar  <dewar@adacore.com>
2082
2083         * sem_prag.adb (Analyze_Pragma, case Debug): Give proper pragma
2084         name in error msg.
2085
2086 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
2087
2088         * gnat_rm.texi: Add an entry for restriction No_Finalization.
2089
2090 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
2091
2092         * sem_ch12.adb (Insert_Freeze_Node_For_Instance):  If the
2093         current instance is within the one that contains the generic,
2094         the freeze node for the current one must appear in the current
2095         declarative part. Ditto if the current instance is within another
2096         package instance. In both of these cases the freeze node of the
2097         previous instance is not relevant.
2098
2099 2011-10-24  Gary Dismukes  <dismukes@adacore.com>
2100
2101         * switch-m.adb (Normalize_Compiler_Switches): Add recognition
2102         of AAMP-specific switches -univ and -aamp_target.
2103
2104 2011-10-24  Robert Dewar  <dewar@adacore.com>
2105
2106         * a-tienau.adb (Put): Deal properly with limited line length.
2107
2108 2011-10-24  Robert Dewar  <dewar@adacore.com>
2109
2110         * sem_warn.adb, sem_ch12.adb: Minor reformatting.
2111
2112 2011-10-24  Tristan Gingold  <gingold@adacore.com>
2113
2114         * gcc-interface/Makefile.in: Use GNU ld switches to generate map files
2115         on AIX.
2116
2117 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
2118
2119         * sem_ch12.adb (Earlier): make available globally. If both
2120         nodes have the same sloc, the freeze node that does not come
2121         from source is the later one.
2122         (True_Parent): Make available globally.
2123         (Previous_Instance): Subsidiary of
2124         Insert_Freeze_Node_For_Instance, to check whether the generic
2125         parent of the current instance is declared within a previous
2126         instance in the same unit or declarative  part, in which case the
2127         freeze nodes of both instances must appear in order to prevent
2128         elaboration problems in gigi.
2129         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): A stub is a
2130         freeze point, and the freeze node of a preceding instantiation
2131         must be inserted before it.
2132
2133 2011-10-24  Robert Dewar  <dewar@adacore.com>
2134
2135         * checks.ads, checks.adb: Add handling of Synchronization_Check
2136         * debug.adb: Add doc for -gnatd.d and -gnatd.e (disable/enable
2137         atomic sync).
2138         * exp_ch2.adb (Expand_Entity_Reference): Set Atomic_Sync_Required
2139         flag Minor code reorganization.
2140         * opt.ads (Warn_On_Atomic_Synchronization): New switch.
2141         * par-prag.adb: Add dummy entries for pragma
2142         Disable/Enable_Atomic_Synchronization.
2143         * sem_prag.adb (Process_Suppress_Unsuppress): Handle
2144         case of Atomic_Synchronization specially (not suppressed
2145         by All_Checks, cannot be set from Source).
2146         (Pragma Disable/Enable_Atomic_Synchronization): Add processing.
2147         * sinfo.ads, sinfo.adb: Add Atomic_Sync_Required flag
2148         * snames.ads-tmpl: Add entry for Atomic_Synchronization Add
2149         entry for pragma Disable/Enable_Atomic_Synchronization
2150         * switch-c.adb: The -gnatp switch does not disable
2151         Atomic_Synchronization Add -gnatep switch to disable
2152         Atomic_Synchronization.
2153         * types.ads: Add entry for Synchronization_Check
2154         * usage.adb: Add line for -gnated switch
2155         * warnsw.adb: Settings for Warn_On_Atomic_Synchronization
2156
2157 2011-10-24  Geert Bosch  <bosch@adacore.com>
2158
2159         * s-gearop.adb (Back_Substitute): Avoid overflow if matrix bounds start
2160         at Integer'First.
2161
2162 2011-10-24  Robert Dewar  <dewar@adacore.com>
2163
2164         * sem_ch12.adb, s-gearop.adb: Minor reformatting.
2165
2166 2011-10-24  Robert Dewar  <dewar@adacore.com>
2167
2168         * warnsw.adb: Add some missing warnings to Set_GNAT_Mode_Warnings.
2169         * warnsw.ads: Add comments to Set_GNAT_Mode_Warnings.
2170
2171 2011-10-24  Emmanuel Briot  <briot@adacore.com>
2172
2173         * prj-proc.adb (Process_Expression_Variable_Decl): No special
2174         handling for Project_Path unless it is an attribute.
2175
2176 2011-10-24  Javier Miranda  <miranda@adacore.com>
2177
2178         * sem_ch12.adb (Check_Hidden_Primitives): New subprogram.
2179         (Install_Hidden_Primitives): New subprogram.
2180         (Restore_Hidden_Primitives): New subprogram.
2181         (Analyze_Formal_Package_Declaration,
2182         Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation):
2183         Invoke Check_Hidden_Primitives after every call to
2184         Analyze_Associations, and invoke Restore_Hidden_Primitives to
2185         restore their visibility after processing the instantiation.
2186         (Instantiate_Package_Body): Install visible primitives before
2187         analyzing the instantiation and uninstall them to restore their
2188         visibility when the instantiation has been analyzed.
2189         * sem_util.ads, sem_util.adb (Add_Suffix): New subprogram
2190         (Remove_Suffix): New subprogram
2191         * sem_ch3.adb (Derive_Subprogram): When handling
2192         a derived subprogram for the instantiation of a formal derived
2193         tagged type, inherit the dispatching attributes from the actual
2194         subprogram (not from the parent type).
2195
2196 2011-10-24  Vasiliy Fofanov  <fofanov@adacore.com>
2197
2198         * gnat_ugn.texi: Document explicit use of XDECGNAT library.
2199
2200 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
2201
2202         * exp_ch3.adb (Build_Assignment): Add local constant N_Loc and
2203         update its uses.
2204         (Build_Discriminant_Assignments): Add local variable D_Loc and update
2205         its uses.
2206         (Build_Init_Statements): Add local variables Comp_Loc, Decl_Loc and
2207         Var_Loc and update their uses.
2208         (Build_Record_Init_Proc): Code reformatting.
2209         (Increment_Counter): Add formal parameter Loc.
2210         (Make_Counter): Add formal parameter Loc.
2211
2212 2011-10-24  Eric Botcazou  <ebotcazou@adacore.com>
2213
2214         * sem_disp.adb (Covers_Some_Interface): Fix typo.
2215
2216 2011-10-24  Matthew Heaney  <heaney@adacore.com>
2217
2218         * a-cuprqu.adb, a-cbprqu.adb (Dequeue_Only_High_Priority): Fix sense
2219         of predicate.
2220
2221 2011-10-24  Yannick Moy  <moy@adacore.com>
2222
2223         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Test_Case):
2224         Translate arguments in positional notation into pragma argument
2225         association arguments for the generated pragma.
2226
2227 2011-10-24  Arnaud Charlet  <charlet@adacore.com>
2228
2229         * exp_ch5.adb: Fix minor typo.
2230
2231 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
2232
2233         * sem_ch3.adb (Is_Visible_Component): Refine predicate for
2234         the case of a component reference in an instance body, when the
2235         enclosing type is private.
2236
2237 2011-10-24  Sergey Rybin  <rybin@adacore.com frybin>
2238
2239         * gnat_ugn.texi: For gnatelim, move the note about using the GNAT
2240         driver for getting the project support into gnatelim section.
2241
2242 2011-10-24  Robert Dewar  <dewar@adacore.com>
2243
2244         * gnat_rm.texi: Minor correction to documentation on address clause.
2245
2246 2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>
2247
2248         * s-finmas.adb (Attach): Synchronize and call the unprotected version.
2249         (Attach_Unprotected): New routine.
2250         (Delete_Finalize_Address): Removed.
2251         (Delete_Finalize_Address_Unprotected): New routine.
2252         (Detach): Synchronize and call the unprotected version.
2253         (Detach_Unprotected): Remove locking.
2254         (Finalize): Add various comment on synchronization. Lock the critical
2255         region and call the unprotected versions of routines.
2256         (Finalize_Address): Removed.
2257         (Finalize_Address_Unprotected): New routine.
2258         (Set_Finalize_Address): Synchronize and call
2259         the unprotected version.
2260         (Set_Finalize_Address_Unprotected): New routine.
2261         (Set_Heterogeneous_Finalize_Address): Removed.
2262         (Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
2263         (Set_Is_Heterogeneous): Add comment on synchronization and
2264         locking.
2265         * s-finmas.ads: Flag Finalization_Started is no longer atomic
2266         because synchronization uses task locking / unlocking.
2267         (Attach): Add comment on usage.
2268         (Attach_Unprotected): New routine.
2269         (Delete_Finalize_Address): Renamed to
2270         Delete_Finalize_Address_Unprotected.
2271         (Detach): Add comment on usage.
2272         (Detach_Unprotected): New routine.
2273         (Finalize_Address): Renamed to Finalize_Address_Unprotected.
2274         (Set_Finalize_Address): Add comment on usage.
2275         (Set_Finalize_Address_Unprotected): New routine.
2276         (Set_Heterogeneous_Finalize_Address): Renamed to
2277         Set_Heterogeneous_Finalize_Address_Unprotected.
2278         * s-stposu.adb (Allocate_Any_Controlled): Add local variable
2279         Allocation_Locked. Add various comments on synchronization. Lock
2280         the critical region and call the unprotected version of
2281         routines.
2282         (Deallocate_Any_Controlled): Add various comments on
2283         synchronization. Lock the critical region and call the unprotected
2284         version of routines.
2285
2286 2011-10-24  Ed Schonberg  <schonberg@adacore.com>
2287
2288         * sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
2289         are universal and must carry the corresponding type.
2290         * sem_eval.adb (Check_Non_Static_Context): If the type of the
2291         expression is universal real, as may be the case for a fixed point
2292         expression with constant operands in the context of a conversion,
2293         there is nothing to check.
2294         * s-finmas.adb: Minor reformatting
2295
2296 2011-10-23  Eric Botcazou  <ebotcazou@adacore.com>
2297
2298         * gcc-interface/decl.c (create_concat_name): Add explicit cast.
2299
2300 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2301
2302         * gcc-interface/Make-lang.in (GNATLIBFLAGS, GNATLIBCFLAGS, THREAD_KIND,
2303         TRACE): Reintroduce.
2304         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o,
2305         ada/initialize.o, ada/raise.o): Reintroduce explicit compilation rules.
2306
2307 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2308
2309         * gcc-interface/trans.c (lhs_or_actual_p): New predicate.
2310         (unchecked_conversion_nop): Use it.
2311         (gnat_to_gnu): Likewise.
2312
2313 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
2314
2315         * back_end.adb (Call_Back_End): Pass the maximum logical line number
2316         instead of the maximum physical line number to gigi.
2317         * gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
2318
2319 2011-10-16  Tom Tromey  <tromey@redhat.com>
2320             Dodji Seketeli  <dodji@redhat.com>
2321
2322         * gcc-interface/trans.c (gigi, Sloc_to_locus): Adjust to use the new
2323         public ordinary map interface.
2324
2325 2011-10-16  Tristan Gingold  <gingold@adacore.com>
2326
2327         * link.c (_AIX): Add support for GNU ld.
2328
2329 2011-10-16  Fedor Rybin  <frybin@adacore.com>
2330
2331         * gnat_ugn.texi: Fixing gnattest example names in the doc.
2332         Adding explanation to additional tests usage.
2333
2334 2011-10-16  Robert Dewar  <dewar@adacore.com>
2335
2336         * exp_ch6.adb, sem_ch6.adb: Minor reformatting.
2337
2338 2011-10-16  Eric Botcazou  <ebotcazou@adacore.com>
2339
2340         * a-convec.adb: Fix minor inconsistencies.
2341
2342 2011-10-16  Matthew Heaney  <heaney@adacore.com>
2343
2344         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (package
2345         Implementation): Specify pragma Implementation_Defined.
2346
2347 2011-10-15  Nicolas Roche  <roche@adacore.com>
2348
2349         * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
2350         either rtp-smp or ravenscar-cert-rtp runtimes.
2351
2352 2011-10-15  Bob Duff  <duff@adacore.com>
2353
2354         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2355         Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
2356         is available.
2357         (Expand_N_Extended_Return_Statement): Do not create a renaming of the
2358         build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
2359         available.
2360         (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
2361         pool only if RE_Root_Storage_Pool_Ptr is available.
2362         (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
2363         pool actual unless RE_Root_Storage_Pool_Ptr is available.
2364         * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
2365         formal only if RE_Root_Storage_Pool_Ptr is available.
2366
2367 2011-10-15  Matthew Heaney  <heaney@adacore.com>
2368
2369         * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
2370         type): Specify Priority aspect for protected type.
2371
2372 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
2373
2374         * exp_disp.adb (Check_Premature_Freezing): If an untagged type
2375         is a generic actual, it is a subtype of a type that was frozen
2376         by the instantiation, and even if not marked frozen it does not
2377         affect the construction of the dispatch table.
2378
2379 2011-10-14  Robert Dewar  <dewar@adacore.com>
2380
2381         * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
2382         reformatting.
2383         * s-rident.ads: Add missing Compiler_Unit pragma.
2384
2385 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
2386
2387         * sem_res.adb: Minor reformatting.
2388
2389 2011-10-14  Hristian Kirtchev  <kirtchev@adacore.com>
2390
2391         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2392         Code and comment reformatting. Use BIP_Task_Master
2393         when creating a _master.
2394         (BIP_Formal_Suffix): Code reformatting. Correct the case for
2395         BIP_Task_Master.
2396         (Make_Build_In_Place_Call_In_Object_Declaration): Use
2397         BIP_Task_Master when creating a reference to the enclosing
2398         function's _master formal.
2399         (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
2400         to the _master.
2401         * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
2402         (Needs_BIP_Finalization_Master): Alphabetized.
2403         * sem_ch6.adb (Create_Extra_Formals): Update the usage of
2404         BIP_Task_Master.
2405
2406 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
2407
2408         * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
2409         reject an aliased keyword on the object declaration of an extended
2410         return statement. In older versions of the language indicate
2411         that this is illegal in the standard.
2412
2413 2011-10-14  Pascal Obry  <obry@adacore.com>
2414
2415         * sem_util.adb, sem_ch4.adb: Minor reformatting.
2416
2417 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
2418
2419         * sem_ch13.adb: Recognize properly procedure calls that are
2420         transformed into code statements.
2421
2422 2011-10-14  Vincent Celier  <celier@adacore.com>
2423
2424         * projects.texi: Minor fix in project example.
2425
2426 2011-10-14  Ed Schonberg  <schonberg@adacore.com>
2427
2428         * sem_util.adb: Return objects are aliased if their type is
2429         immutably limited as per AI05-0053.
2430
2431 2011-10-14  Gary Dismukes  <dismukes@adacore.com>
2432
2433         * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
2434         expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
2435         Short_Circuit_And_Or expansion code (moved to sem_res).
2436         * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
2437         "and" and "or" operators as short-circuit "and then" and "or
2438         else", when pragma Short_Circuit_And_Or is active.
2439
2440 2011-10-13  Robert Dewar  <dewar@adacore.com>
2441
2442         * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
2443         sem_ch6.adb, exp_ch3.adb: Minor reformatting.
2444
2445 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
2446
2447         * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
2448
2449 2011-10-13  Jerome Guitton  <guitton@adacore.com>
2450
2451         * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
2452
2453 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2454
2455         * a-convec.ads (Cursor): Minor reformatting.
2456         * a-convec.adb (Next): Fix minor inconsistencies.
2457         (Previous): Likewise.
2458
2459 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2460
2461         * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
2462         New predicate to determine whether some operations on an array
2463         type are available when the full view of its component may differ
2464         from the view of the point of the array declaration.
2465         * sem_ch4.adb (Find_Equality_Types): Use
2466         Available_Full_View_Of_Component.
2467         * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
2468
2469 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2470
2471         * sem_ch9.adb: Analyze aspects while discriminants of protected
2472         type are visible.
2473
2474 2011-10-13  Geert Bosch  <bosch@adacore.com>
2475
2476         * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
2477         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
2478         longer depend on an external library.
2479         * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
2480         a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
2481         Update dependencies.
2482         * gcc-interface/Make-lang.in: Update dependencies. 
2483
2484 2011-10-13  Cyrille Comar  <comar@adacore.com>
2485
2486         * gnat_ugn.texi: Minor editing.
2487
2488 2011-10-13  Vincent Celier  <celier@adacore.com>
2489
2490         * projects.texi: Add documentation on packages and attributes
2491         that are inherited from a project being extended into the
2492         extended project.
2493
2494 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
2495
2496         * exp_ch3.adb (Build_Master): Rewritten.
2497         (Expand_N_Full_Type_Declaration): Reformat the declarative
2498         region. Update the call to Build_Master_Renaming.
2499         (Expand_Previous_Access_Type): Rewritten.
2500         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
2501         Add local constant Result_Subt and update related usage.
2502         (Expand_N_Extended_Return_Statement): Add local constant
2503         Result_Subt and update related usage.
2504         * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
2505         new context detection mechanism.
2506         (Build_Class_Wide_Master):
2507         Use Insert_Action to add the renaming into the tree.
2508         (Build_Master_Entity): Rewritten to use the new context detection
2509         mechanism.
2510         (Build_Master_Renaming): Add formal parameter Ins_Nod
2511         and related usage. Use Insert_Action to add the renaming into the
2512         tree.
2513         (Find_Enclosing_Context): New subsidiary routine. Rather
2514         than relying on enclosing scopes, this routine looks at the
2515         tree structure to figure out the proper context for a _master
2516         or a _chain. This approach eliminates the issues with transient
2517         scopes which have not been converted into blocks.
2518         * exp_ch9.ads (Build_Master_Entity): Change parameter profile
2519         to better reflect the new usage. Update the related comment.
2520         (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
2521         the comment on usage.
2522         * sem_ch3.adb (Access_Definition): Update the calls to
2523         Build_Master_Entity and Build_Master_Renaming.
2524         * sem_ch6.adb (Create_Extra_Formals): Add local variable
2525         Full_Subt. Code reformatting.
2526         * sem_util.adb (Is_Iterator): Alphabetized.
2527         (Is_LHS): Alphabetized.
2528         (Is_Limited_Class_Wide_Type): New routine.
2529         * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
2530
2531 2011-10-13  Geert Bosch  <bosch@adacore.com>
2532
2533         * a-ngrear.adb (Solve): Make generic and move to
2534         System.Generic_Array_Operations.
2535         * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2536         New generic solvers to  compute a vector resp. matrix Y such
2537         that A * Y = X, approximately.
2538         * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
2539         Implement using Forward_Eliminate and Back_Substitute
2540         * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
2541         on BLAS and LAPACK.
2542         * a-ngcoar.ads ("abs"): Fix return type to be real.
2543
2544 2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2545
2546         PR ada/50589
2547         * s-linux-alpha.ads: Do not "with" Interfaces.C.
2548         * s-linux-sparc.ads: Likewise.
2549
2550 2011-10-13  Geert Bosch  <bosch@adacore.com>
2551
2552         * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
2553         returning a Real.
2554         * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
2555         and use formal.
2556         * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
2557         new profile.
2558
2559 2011-10-13  Geert Bosch  <bosch@adacore.com>
2560
2561         * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
2562         move to System.Generic_Array_Operations.
2563
2564 2011-10-13  Geert Bosch  <bosch@adacore.com>
2565
2566         * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2567         * s-gearop.ads (L2_Norm): Change profile to be suitable for
2568         Complex_Vector
2569         * s-gearop.adb (L2_Norm): Reimplement using direct definition,
2570         not inner product
2571
2572 2011-10-13  Robert Dewar  <dewar@adacore.com>
2573
2574         * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
2575         prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
2576         sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
2577         par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
2578         par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
2579         exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
2580
2581 2011-10-13  Geert Bosch  <bosch@adacore.com>
2582
2583         * s-gearop.adb: Minor comment additions.
2584
2585 2011-10-13  Fedor Rybin  <frybin@adacore.com>
2586
2587         * gnat_ugn.texi: Add gnattest section.
2588
2589 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2590
2591         * freeze.adb: Do not create body of renaming if declaration has
2592         errors.
2593
2594 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2595
2596         * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
2597         further, to the ppc+kernel case only.
2598
2599 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
2600
2601         * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
2602         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
2603         Do not create a pool formal on .NET/JVM.
2604         (Expand_N_Extended_Return_Statement): Alphabetize local
2605         variables. Do not create a renaming of the build-in-place pool
2606         parameter on .NET/JVM.  (Make_Build_In_Place_Call_In_Allocator):
2607         Add the user-defined pool only on non-VM targets.
2608         (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
2609         local variables.  Do not add a pool actual on .NET/JVM.
2610         * sem_ch6.adb: Add with and use clause for Targparm.
2611         (Create_Extra_Formals): Add build-in-place pool formal only on
2612         non-VM targets.
2613         * rtsfind.ads: Alphabetize entries.
2614
2615 2011-10-13  Sergey Rybin  <rybin@adacore.com>
2616
2617         * gnat_ugn.texi: Minor correction.
2618
2619 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2620
2621         * sem_ch8.adb: Minor error message improvement.
2622
2623 2011-10-13  Robert Dewar  <dewar@adacore.com>
2624
2625         * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
2626
2627 2011-10-13  Gary Dismukes  <dismukes@adacore.com>
2628
2629         * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
2630         of a for loop for an enumeration type with an enumeration rep
2631         clause, which involves moving the original loop parameter into
2632         a nested block, the loop parameter's entity must be removed from
2633         the entity list of the loop scope.
2634
2635 2011-10-13  Bob Duff  <duff@adacore.com>
2636
2637         * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
2638         that gets passed in the same cases where BIP_Alloc_Form is passed
2639         (caller-unknown-size results). BIP_Storage_Pool is used when
2640         BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
2641         to the user-defined storage pool is passed at the call site,
2642         and this pool is used in callee to allocate the result.
2643         * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
2644         version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
2645         the additional BIP_Storage_Pool actual.
2646         (Expand_N_Extended_Return_Statement): Allocate the function
2647         result using the user-defined storage pool, if BIP_Alloc_Form =
2648         User_Storage_Pool.
2649         * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
2650         * exp_ch4.adb: Don't overwrite storage pool set by
2651         Expand_N_Extended_Return_Statement.
2652         * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
2653         for use in build-in-place function calls within allocators
2654         where the access type has a user-defined storage pool.
2655
2656 2011-10-13  Sergey Rybin  <rybin@adacore.com>
2657
2658         * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
2659         literal casing.
2660
2661 2011-10-13  Nicolas Roche  <roche@adacore.com>
2662
2663         * gnatlink.adb: Ensure that -mrtp is passed when runtime name ends
2664         with 'rtp'.
2665
2666 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2667
2668         * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): Take into
2669         account that an unchecked union type can be limited.
2670
2671 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2672
2673         * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
2674         the use of the signal trampoline for PPC in the sjlj case as well.
2675         Add legitimate casts, preventing compile time warnings on the
2676         (sighandler *) profile.
2677
2678 2011-10-13  Yannick Moy  <moy@adacore.com>
2679
2680         * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic analysis
2681         in Alfa mode.
2682
2683 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2684
2685         * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
2686         expressions are legal limited return values if each one of their
2687         dependent expressions are legal.
2688
2689 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2690
2691         * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
2692         if the prefix of the call is a qualified expression, rewrite as
2693         a code statement.
2694         * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
2695         code statement is legal if it is a rewriting of a procedure call.
2696
2697 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2698
2699         * exp_aggr.adb (Flatten): If a component association has a box,
2700         assume that aggregate is not static.
2701         (Safe_Aggregate): If a component association in a non-limited
2702         aggregate has a box, assume that it cannot be expanded in place.
2703
2704 2011-10-13  Vincent Celier  <celier@adacore.com>
2705
2706         * prj-conf.adb (Get_Or_Create_Configuration_File): Call
2707         Process_Project_Tree_Phase_1 with Packages_To_Check.
2708         (Process_Project_And_Apply_Config): Ditto
2709         * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
2710         Remove default for argument Packages_To_Check.
2711         * prj-proc.adb (Recursive_Process): New argument
2712         Packages_To_Check.
2713         (Process): Ditto.
2714         (Process_Project_Tree_Phase_1): Ditto.
2715         (Recursive_Project.Process_Aggregated_Projects): Call
2716         Prj.Part.Parse and Process_Project_Tree_Phase_1 with
2717         Packages_To_Check.
2718         * prj-proc.ads (Process): New argument Packages_To_Check
2719         (Process_Project_Tree_Phase_1): Ditto
2720
2721 2011-10-13  Arnaud Charlet  <charlet@adacore.com>
2722
2723         * gcc-interface/Makefile.in: Fix typo.
2724
2725 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2726
2727         * sem_ch12.adb (Analyze_Formal_{Floating_Type,
2728         Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
2729         Use sloc of defining identifier of farmal type declaration,
2730         as sloc of generated internal entity, to prevent misplaced
2731         references in ali.
2732
2733 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2734
2735         * sem_intr.adb (Check_Intrinsic_Operator): Check that type
2736         is fully defined before checking that it is a numeric type.
2737
2738 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2739
2740         * sem_aggr.adb (Resolve_Record_Aggregate): If a component
2741         association for component X has a box, then X is covered in the
2742         aggregate even if there is not default value for X in the type
2743         declaration, and X has to be default-initialized.
2744
2745 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2746
2747         * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case 'Value): Mark
2748         literals as referenced only if reference is in current source unit.
2749
2750 2011-10-13  Matthew Heaney  <heaney@adacore.com>
2751
2752         * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
2753
2754 2011-10-13  Olivier Hainque  <hainque@adacore.com>
2755
2756         * sigtramp.h: New file.  Prototype and spec of the signal
2757         trampoline to be called by an established handler to provide
2758         dwarf call frame info before the real signal processing code.
2759         * sigtramp-ppcvxw.c: New file.  Implementation of the signal
2760         trampoline for ppc-vxworks.
2761         * init.c (vxworks section): Use it for ppc.
2762
2763 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2764
2765         * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
2766         (Check_Future_Identifier): New subprogram,
2767         factors duplicated code from Par.Ch2.P_Identifier and
2768         Par.Ch3.P_Defining_Identifier.
2769
2770 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2771
2772         * s-taprop-posix.adb (Initialize): Always raise Storage_Error
2773         if we fail to initialize CV attributes or CV.
2774
2775 2011-10-13  Thomas Quinot  <quinot@adacore.com>
2776
2777         * s-tasren.adb (Timed_Selective_Wait, case
2778         Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
2779         we know abortion is already deferred.
2780
2781 2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>
2782
2783         * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
2784         (Build_Master_Renaming (function)): Removed.
2785         (Build_Master_Renaming (procedure)): Moved to exp_ch9.
2786         (Expand_Full_Type_Declaration): Alphabetize
2787         variables. Reformatting of code and comments. Rewrite the
2788         section on processing of anonymous access-to-task types in
2789         record components.
2790         * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
2791         (Build_Master_Renaming): Moved to exp_ch9.
2792         * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
2793         (Build_Master_Entity): Add formal parameter
2794         Use_Current. Reformatting of code and comments.
2795         (Build_Master_Renaming): Moved from exp_ch3.
2796         * exp_ch9.ads (Build_Class_Wide_Master): Moved from
2797         exp_ch3. Update comment on usage.
2798         (Build_Master_Entity):
2799         Add formal parameter Use_Current. Update comment on usage.
2800         (Build_Master_Renaming): Moved from exp_ch3.
2801         * sem_ch3.adb (Access_Definition): Remove redundant code to
2802         create a _master and a renaming.
2803
2804 2011-10-13  Ed Schonberg  <schonberg@adacore.com>
2805
2806         * lib-xref.adb: Do no emit reference to overridden operation,
2807         if it is internally generated.
2808
2809 2011-10-13  Vincent Celier  <celier@adacore.com>
2810
2811         * bindgen.adb: Remove any processing related to g-trasym
2812         * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
2813         * mlib-prj.adb: Remove any processing related to g-trasym.
2814
2815 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2816
2817         * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
2818         * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
2819         (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
2820         (ADA_FLAGS_TO_PASS): Likewise.
2821         (COMMON_FLAGS_TO_PASS): New.
2822         (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
2823         native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
2824         (gnatlib): Use COMMON_FLAGS_TO_PASS.
2825         (ada.install-common): Likewise.
2826         (install-gnatlib): Likewise.
2827         (install-gnatlib-obj): Likewise.
2828         (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
2829         (gnat-cross): Delete.
2830         (gnatboot): Likewise.
2831         (gnatboot2): Likewise.
2832         (gnatboot3): Likewise.
2833         (gnatstage1): Likewise.
2834         (gnatstage2): Likewise.
2835         * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
2836         (MOST_ADAFLAGS): Likewise.
2837         (LOOSE_CFLAGS): Likewise.
2838         (gnat-cross): Likewise.
2839         (GNATLIBFLAGS): Add -W -Wall.
2840         (GNATLIBCFLAGS_FOR_C): Likewise.
2841         * gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
2842         * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
2843
2844 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2845
2846         * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
2847         (push_range_check_info): Likewise.
2848         (gnat_to_gnu) <N_Code_Statement>: Likewise.
2849         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
2850         (gnat_invariant_expr): Likewise.
2851         * gcc-interface/utils.c (compute_related_constant): Likewise.
2852         (max_size): Fix handling of SAVE_EXPR.
2853         (remove_conversions): Fix formatting.
2854
2855 2011-10-12  Eric Botcazou  <ebotcazou@adacore.com>
2856
2857         * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
2858         (DECL_INDUCTION_VAR): New macro.
2859         (SET_DECL_INDUCTION_VAR): Likewise.
2860         * gcc-interface/gigi.h (convert_to_index_type): Declare.
2861         (gnat_invariant_expr): Likewise.
2862         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
2863         parameter, set DECL_LOOP_PARM_P on it.
2864         * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
2865         is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
2866         * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
2867         (struct range_check_info_d): New type.
2868         (struct loop_info_d): Likewise.
2869         (gnu_loop_stack): New stack.
2870         (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
2871         built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
2872         is set, do not test DECL_RENAMED_OBJECT.
2873         (push_range_check_info): New function.
2874         (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
2875         the label.  Reference the label and the iteration variable from it.
2876         Build the special induction variable in the unsigned version of the
2877         size type, if it is larger than the base type.  And attach it to the
2878         iteration variable if the latter isn't by-ref.  In the iteration scheme
2879         case, initialize the invariant conditions in front of the loop if
2880         deemed profitable.  Use gnu_loop_stack.
2881         (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
2882         <N_Raise_Constraint_Error>: Always process the reason.  In the range
2883         check and related cases, and if loop unswitching is enabled, compute
2884         invariant conditions and push this information onto the stack.
2885         Do not translate again the condition if it has been already translated.
2886         * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
2887         DECL_LOOP_PARM_P isn't set.
2888         (convert_to_index_type): New function.
2889         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
2890         to convert the index from the base index type to sizetype.
2891         (gnat_invariant_expr): New function.
2892
2893 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2894
2895         * gcc-interface/utils.c (def_builtin_1): Delete old interface with
2896         two parallel arrays to hold standard builtin declarations, and
2897         replace it with a function based interface that can support
2898         creating builtins on the fly in the future.
2899         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
2900         (gnat_to_gnu): Ditto.
2901
2902 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
2903
2904         PR lto/50492
2905         * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
2906         * gcc-interface/utils.c (global_context): New variable.
2907         (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
2908         that are either public external or at top level.  Use "No" macro.
2909         (end_subprog_body): Call decl_function_context.
2910         (rest_of_subprog_body_compilation): Likewise.
2911
2912 2011-10-07  Eric Botcazou  <ebotcazou@adacore.com>
2913
2914         * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
2915         (rest_of_subprog_body_compilation): Likewise.
2916         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
2917         test for useless conversions by means of gnat_useless_type_conversion.
2918         * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
2919         (language_function): Add named_ret_val and other_ret_val.
2920         (f_named_ret_val): New macro.
2921         (f_other_ret_val): Likewise.
2922         (gigi): Call rest_of_subprog_body_compilation.
2923         (struct nrv_data): New structure.
2924         (is_nrv_p): New predicate.
2925         (prune_nrv_r): New helper function.
2926         (prune_nrv_in_block): New function.
2927         (finalize_nrv_r): New helper function.
2928         (finalize_nrv): New function.
2929         (return_value_ok_for_nrv_p): New predicate.
2930         (build_return_expr): If optimization is enabled, record candidates for
2931         the Named Return Value optimization.
2932         (build_function_stub): Call rest_of_subprog_body_compilation.
2933         (Subprogram_Body_to_gnu): If optimization is enabled and there are
2934         candidates, finalize the Named Return Value optimization.
2935         Call rest_of_subprog_body_compilation.
2936         (call_to_gnu): At the end, if a return value is needed, simplify the
2937         result before wrapping it up in a COMPOUND_EXPR.
2938         * gcc-interface/utils.c (end_subprog_body): Split into...
2939         (rest_of_subprog_body_compilation): ...this.  New function.
2940         (gnat_useless_type_conversion): Likewise.
2941
2942 2011-10-06  Thomas Quinot  <quinot@adacore.com>
2943
2944         * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
2945         exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
2946         g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
2947         par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
2948         sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2949         sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
2950         s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
2951         * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2952
2953 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
2954
2955         * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
2956         references.
2957
2958 2011-10-06  Matthew Heaney  <heaney@adacore.com>
2959
2960         * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
2961         (Dequeue_Only_High_Priority): Protected procedure now implemented.
2962
2963 2011-10-06  Vincent Celier  <celier@adacore.com>
2964
2965         * g-trasym.adb: Replace old implementation with the default
2966         implementation that returns list of addresses as "0x...".
2967         * g-trasym.ads: Update the list of platforms with the full
2968         capability.  Indicate that there is a default implementation
2969         for other platforms.
2970         * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
2971         * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
2972         is now a default implementation for all platforms without the full
2973         capability.
2974
2975 2011-10-06  Robert Dewar  <dewar@adacore.com>
2976
2977         * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
2978         a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
2979         a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
2980         reorganization (use conditional expressions).
2981
2982 2011-10-06  Robert Dewar  <dewar@adacore.com>
2983
2984         * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
2985         floating divide by zero.
2986
2987 2011-10-06  Ed Schonberg  <schonberg@adacore.com>
2988
2989         * sem_ch6.adb: Limited interfaces that are not immutably limited
2990         are OK in return statements.
2991
2992 2011-09-30  Iain Sandoe  <iains@gcc.gnu.org>
2993
2994         * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
2995         change to powerpc section.
2996
2997 2011-09-29  Iain Sandoe  <iains@gcc.gnu.org>
2998
2999         * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
3000         across the port.
3001
3002 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3003
3004         * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
3005         a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
3006         a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
3007         indefinite sets.
3008         * a-coorma.ads: Minor reformmating.
3009         * einfo.ads: Improve the comment describing the
3010         Directly_Designated_Type function.
3011         * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
3012         ordered maps.
3013         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
3014         dependencies.
3015
3016 2011-09-27  Robert Dewar  <dewar@adacore.com>
3017
3018         * a-comutr.ads: Minor reformatting.
3019
3020 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3021
3022         * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
3023         iterators to multiway trees.
3024
3025 2011-09-27  Yannick Moy  <moy@adacore.com>
3026
3027         * debug.adb (d.D): New option for strict Alfa mode.
3028         * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
3029         permissions as strictly as possible.
3030         * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
3031         Alfa mode, now, interpret ranges of base types like GNAT does; in
3032         strict mode, simply change the range of the implicit base Itype.
3033         * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
3034
3035 2011-09-27  Robert Dewar  <dewar@adacore.com>
3036
3037         * exp_ch9.adb: Minor comment fixes.
3038
3039 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3040
3041         * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
3042         trees.
3043
3044 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
3045
3046         * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
3047         instead of Directly_Designated_Type in the indirect array case.
3048
3049 2011-09-27  Robert Dewar  <dewar@adacore.com>
3050
3051         * exp_util.adb, exp_aggr.adb: Minor reformatting.
3052
3053 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3054
3055         * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
3056         on subtype declarations.
3057         * exp_aggr.adb: Minor comment update.
3058
3059 2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>
3060
3061         * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
3062         test in the N_Explicit_Dereference case.  Fold double logical
3063         negation in the special loop case and conditionalize it on
3064         Variable_Ref being true.
3065
3066 2011-09-27  Ed Schonberg  <schonberg@adacore.com>
3067
3068         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
3069         single protected object and the selector is a discriminant or an
3070         entry family, this is a non-overloaded candidate interpretation,
3071         and possible primitive operations of the type must not be
3072         examined.
3073
3074 2011-09-27  Arnaud Charlet  <charlet@adacore.com>
3075
3076         * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
3077
3078 2011-09-27  Pascal Obry  <obry@adacore.com>
3079
3080         * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
3081         s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
3082         Add dummy definitions for pthread_rwlock_t
3083         and pthread_rwlockattr_t on all POSIX platforms.
3084         * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
3085         reference.
3086         (Finalize_Lock): Likewise.
3087         (Write_Lock): Likewise.
3088         (Unlock): Likewise.
3089
3090 2011-09-27  Tristan Gingold  <gingold@adacore.com>
3091
3092         * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
3093         windows 64.
3094
3095 2011-09-27  Pascal Obry  <obry@adacore.com>
3096
3097         * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
3098         s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
3099         s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
3100         s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
3101         s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
3102         s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
3103         s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
3104         s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
3105         s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
3106         s-taprop-posix.adb: Revert previous changes.
3107         (Lock): Now a record containing the two possible lock
3108         (mutex and read/write) defined in OS_Interface.
3109         * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
3110         'R' locking policy.
3111         (Initialize_Protection): Likewise.
3112         (Lock): Likewise.
3113         (Lock_Read_Only): Likewise.
3114         (Unlock): Likewise.
3115
3116 2011-09-27  Pascal Obry  <obry@adacore.com>
3117
3118         * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
3119         OS_Interface.pthread_rwlock_t.
3120
3121 2011-09-27  Robert Dewar  <dewar@adacore.com>
3122
3123         * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
3124         a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
3125         sem_ch5.adb, sem_util.adb: Minor reformatting.
3126
3127 2011-09-27  Pascal Obry  <obry@adacore.com>
3128
3129         * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
3130         (Finalize_Lock)[RW_Lock]: Likewise.
3131         (Write_Lock)[RW_Lock]: Likewise.
3132         (Unlock)[RW_Lock]: Likewise.
3133         (Read_Lock): Define L as RW_Lock (instead of Lock).
3134         * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
3135         routine for r/w lock.
3136         (Finalize_Lock)[RW_Lock]: Likewise.
3137         (Write_Lock)[RW_Lock]: Likewise.
3138         (Unlock)[RW_Lock]: Likewise.
3139         (Read_Lock): Define L as RW_Lock (instead of Lock).
3140
3141         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3142         s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
3143         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3144         (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
3145         routine for standard lock.
3146         (Finalize_Lock)[RW_Lock]: Likewise.
3147         (Write_Lock)[RW_Lock]: Likewise.
3148         (Unlock)[RW_Lock]: Likewise.
3149         (Read_Lock): Define L as RW_Lock (instead of Lock).
3150         * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
3151         in the record definition.
3152         * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
3153         lock for 'R' locking policy.
3154         (Initialize_Protection): Likewise.
3155         (Lock): Likewise.
3156         (Lock_Read_Only): Likewise.
3157         (Unlock): Likewise.
3158         * s-taspri-posix.ads (RW_Lock): New type defined as
3159         OS_Interface.pthread_rwlock_t.
3160
3161         * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
3162         s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
3163         s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
3164         s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
3165
3166 2011-09-27  Pascal Obry  <obry@adacore.com>
3167
3168         * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
3169
3170 2011-09-27  Pascal Obry  <obry@adacore.com>
3171
3172         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3173         s-osinte-hpux.ads, s-osinte-irix.ads,
3174         s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
3175         pthread_mutex_t.
3176         (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
3177         * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
3178         pthread_rwlockattr_init, pthread_rwlockattr_destroy,
3179         pthread_rwlockattr_setkind_np, pthread_rwlock_init,
3180         pthread_rwlock_destroy, pthread_rwlock_rdlock,
3181         pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
3182
3183 2011-09-27  Pascal Obry  <obry@adacore.com>
3184
3185         * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
3186         (RE_Id): Add RE_Lock_Read_Only.
3187         (RE_Unit_Table): Likewise.
3188         * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
3189         to lift restriction on first character. Handle now the
3190         Name_Concurrent_Readers_Locking where policy character is set to
3191         'R'.
3192         * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
3193         constant.
3194         * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
3195         read only lock for function in protected object.
3196         * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
3197         this routine is now used.
3198
3199 2011-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3200
3201         * s-atocou-x86.adb (Decrement): Use %;.
3202         (Increment): Likewise.
3203
3204 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3205
3206         * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
3207         dereference of the pointer to the storage area.  Remove useless type
3208         conversions and factor out common code.
3209
3210 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3211
3212         * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
3213         variable and use it throughout.
3214         <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
3215         <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
3216         first step.  Also convert to the unpadded type as a last step.
3217
3218 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3219
3220         * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
3221         DECL_CHAIN in comment.
3222         * gcc-interface/trans.c (gigi): Likewise.
3223         (Attribute_to_gnu): Likewise.
3224         (build_function_stub): Likewise.
3225         (gnat_to_gnu): Likewise.
3226         * gcc-interface/utils.c (create_subprog_decl): Likewise.
3227         (convert_vms_descriptor64): Likewise.
3228         (convert_vms_descriptor32): Likewise.
3229
3230 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3231
3232         * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
3233         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
3234         issues.  Use COMPLETE_TYPE_P in assertion.  Also set TREE_READONLY if
3235         the type of the record is TYPE_READONLY.
3236
3237 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3238             Robert Dewar  <dewar@adacore.com>
3239
3240         * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
3241         OUT formal parameter which is of an null-exclusion access subtype.
3242
3243 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3244
3245         * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
3246         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
3247         (gnat_to_gnu_param): Likewise.
3248         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
3249         maybe_unconstrained_array instead of doing the work manually.
3250         (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
3251         * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
3252         is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
3253         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
3254         (gnat_stabilize_reference): Likewise.
3255
3256 2011-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3257
3258         * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
3259         (SET_TYPE_NULL_BOUNDS): Likewise.
3260         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
3261         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
3262         * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
3263         pointer types.
3264         * gcc-interface/utils.c (create_var_decl_1): If the object is external,
3265         check that the initializer is a valid constant expression for use in
3266         initializing a static variable.  Add missing guard.
3267         (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
3268         (convert_to_fat_pointer): In the null fat pointer case, build a valid
3269         pointer for the bounds.
3270         * gcc-interface/utils2.c (compare_fat_pointers): New function.
3271         (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
3272
3273 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3274
3275         * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
3276         * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
3277         the by-ref case.  Do not set TREE_READONLY on a renamed object.  Set
3278         TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
3279         (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
3280         to the indirect case.
3281         * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
3282         the TREE_THIS_NOTRAP flag.
3283
3284 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3285
3286         * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
3287         iteration scheme, always generate the do-while form if optimization
3288         is enabled.  Use more straightforward test at the end.
3289
3290 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3291
3292         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
3293         XNEW instead of xmalloc.  Do not build useless pointer type.
3294         <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
3295         * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
3296         * gcc-interface/utils2.c (build_unary_op): Remove local variable.
3297
3298 2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3299
3300         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
3301         the alignment if this doesn't prevent BLKmode access to the object.
3302
3303 2011-09-24  Iain Sandoe  <iains@gcc.gnu.org>
3304
3305         * gcc-interface/Makefile.in (darwin): Do not issue the
3306         '-flat_namespace' linker flag during Ada build.
3307         * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
3308         default shared library options.
3309
3310 2011-09-19  Alexandre Oliva  <aoliva@redhat.com>
3311
3312         * gcc-interface/decl.c (annotate_value): Look up expression for
3313         insertion in the cache at the end.
3314
3315 2011-09-19  Arnaud Charlet  <charlet@adacore.com>
3316
3317         * gcc-interface/Make-lang.in: Update dependencies.
3318
3319 2011-09-19  Steve Baird  <baird@adacore.com>
3320
3321         * snames.ads-tmpl: Move declaration of Name_Annotate into range of
3322         configuration pragma names so that Is_Configuration_Pragma_Name
3323         will return True for Name_Annotate.  Make corresponding change in
3324         Pragma_Id enumeration type.  This is needed to allow an Annotate
3325         pragma to occur in a configuration pragma file (typically,
3326         a gnat.adc file).
3327         * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
3328         * gnat_rm.texi: Note that pragma Annotate may be used as a
3329         configuration pragma.
3330
3331 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
3332
3333         * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
3334         a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
3335
3336 2011-09-19  Yannick Moy  <moy@adacore.com>
3337
3338         * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
3339         for expansion of set membership.
3340         (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
3341         * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
3342         visible for use in Alfa expansion.
3343         * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
3344         variable in Alfa mode.
3345
3346 2011-09-19  Thomas Quinot  <quinot@adacore.com>
3347
3348         * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
3349
3350 2011-09-19  Thomas Quinot  <quinot@adacore.com>
3351
3352         * exp_ch9.adb: Minor reformatting.
3353
3354 2011-09-19  Hristian Kirtchev  <kirtchev@adacore.com>
3355
3356         * freeze.adb (Build_Renamed_Body): Generic subprograms
3357         instantiations cannot be poperly inlined by the compiler, do
3358         not set the Body_To_Inline attribute in such cases.
3359         * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
3360         inlining-related flags from the generic subprogram declaration.
3361
3362 2011-09-19  Thomas Quinot  <quinot@adacore.com>
3363
3364         * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
3365         (Build_Stub_Type): Remove, instead copy components from
3366         System.Partition_Interface.RACW_Stub_Type.
3367         (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
3368         (Copy_Component_List): New subprogram.
3369
3370 2011-09-19  Yannick Moy  <moy@adacore.com>
3371
3372         * lib-xref.adb (Generate_Reference): Ignore references to
3373         constants in Standard.
3374
3375 2011-09-19  Robert Dewar  <dewar@adacore.com>
3376
3377         * err_vars.ads, errout.ads: Minor reformatting.
3378
3379 2011-09-19  Robert Dewar  <dewar@adacore.com>
3380
3381         * aspects.ads (Impl_Defined_Aspects): New array
3382         * lib-writ.adb (No_Dependences): New name for No_Dependence
3383         * restrict.adb (No_Dependences): New name for No_Dependence
3384         (Check_Restriction_No_Specification_Of_Aspect): New
3385         procedure.
3386         (Set_Restriction_No_Specification_Of_Aspect): New procedure
3387         (Restricted_Profile_Result): New variable
3388         (No_Specification_Of_Aspects): New variable
3389         (No_Specification_Of_Aspect_Warning): New variable
3390         * restrict.ads (No_Dependences): New name for No_Dependence
3391         (Check_Restriction_No_Specification_Of_Aspect): New procedure
3392         (Set_Restriction_No_Specification_Of_Aspect): New procedure
3393         * s-rident.ads: Add restriction
3394         No_Implementation_Aspect_Specifications, this is also added to
3395         the No_Implementation_Extensions profile.
3396         * sem_ch13.adb (Analyze_Aspect_Specifications): Check
3397         No_Implementation_Defined_Aspects
3398         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3399         * sem_prag.adb (Analyze_Aspect_Specifications): Check
3400         No_Implementation_Aspects
3401         (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
3402         * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
3403
3404 2011-09-19  Yannick Moy  <moy@adacore.com>
3405
3406         * lib-xref.adb (Generate_Reference): Take into account multiple
3407         renamings for Alfa refs.
3408
3409 2011-09-19  Thomas Quinot  <quinot@adacore.com>
3410
3411         * g-socthi-mingw.adb: Minor reformatting.
3412
3413 2011-09-19  Yannick Moy  <moy@adacore.com>
3414
3415         * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
3416         expansion to False in mode Alfa
3417
3418 2011-09-19  Pascal Obry  <obry@adacore.com>
3419
3420         * mingw32.h: Remove obsolete code needed for old versions
3421         of MingW.
3422
3423 2011-09-19  Robert Dewar  <dewar@adacore.com>
3424
3425         * errout.ads: Minor reformatting.
3426
3427 2011-09-19  Ed Schonberg  <schonberg@adacore.com>
3428
3429         * sem_ch6.adb (Analyze_Expression_Function): When the expression
3430         function is transformed into a declaration and a body, insert
3431         body at the end of the declarative part, to prevent premature
3432         freeze actions, and preserve original specification in the
3433         subprogram declaration.
3434
3435 2011-09-19  Vincent Celier  <celier@adacore.com>
3436
3437         * projects.texi: Minor editing.
3438
3439 2011-09-19  Robert Dewar  <dewar@adacore.com>
3440
3441         * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
3442         exp_aggr.adb: Minor reformatting.
3443
3444 2011-09-19  Yannick Moy  <moy@adacore.com>
3445
3446         * lib-xref.adb (Generate_Reference): Change entity referenced
3447         to underlying object if any, or else reference to the HEAP.
3448
3449 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
3450
3451         * gcc-interface/Make-lang.in: Update dependencies.
3452
3453 2011-09-15  Robert Dewar  <dewar@adacore.com>
3454
3455         * tree_io.ads: Minor reformatting.
3456         * a-intnam.ads: Fix bad header.
3457
3458 2011-09-15  Thomas Quinot  <quinot@adacore.com>
3459
3460         * a-exexpr-gcc.adb: Minor reformatting.
3461
3462 2011-09-15  Yannick Moy  <moy@adacore.com>
3463
3464         * sem_ch6.adb: Propagate information that an expression function comes
3465         from source (otherwise references to this entity are not stored).
3466
3467 2011-09-15  Robert Dewar  <dewar@adacore.com>
3468
3469         * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
3470         a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
3471         a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
3472
3473 2011-09-15  Ed Schonberg  <schonberg@adacore.com>
3474
3475         * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
3476         if the expression function is not a completion, create a
3477         new specification for the generated declaration, and keep the
3478         original specification in the generated body. Shorter code also
3479         ensures that proper warnings are generated for unused formals
3480         in all cases.
3481
3482 2011-09-15  Sergey Rybin  <rybin@adacore.com>
3483
3484         * tree_io.ads: Update ASIS_Version_Number because of the changes
3485         in the tree structures for expression functions.
3486
3487 2011-09-15  Arnaud Charlet  <charlet@adacore.com>
3488
3489         * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
3490         s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
3491         s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
3492         (CLOCK_REALTIME): Fix wrong value on some OSes.
3493         * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
3494
3495 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3496
3497         * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
3498         to unconstrained array case, deal with each branch of a COND_EXPR.
3499         * gcc-interface/utils2.c (build_allocator): Deal with each branch of
3500         a COND_EXPR in the initializer, if present.
3501
3502 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3503
3504         * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
3505         of an addressable type.
3506         * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
3507         Deal with those cases for which creating a temporary is mandatory.
3508
3509 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3510
3511         * gcc-interface/trans.c (call_to_gnu): Use local variable.  Make sure
3512         this is a real formal parameter before testing whether it is by ref.
3513
3514 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3515
3516         * gcc-interface/gigi.h (build_call_0_expr): Delete.
3517         (build_call_1_expr): Likewise.
3518         (build_call_2_expr): Likewise.
3519         (build_call_n_expr): New prototype.
3520         * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
3521         * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
3522         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
3523         (Exception_Handler_to_gnu_zcx): Likewise.
3524         (gnat_to_gnu): Likewise.
3525         (build_binary_op_trapv): Likewise.
3526         * gcc-interface/utils2.c (build_call_0_expr): Delete.
3527         (build_call_1_expr): Likewise.
3528         (build_call_2_expr): Likewise.
3529         (build_call_n_expr): New function.
3530         (build_call_raise): Use build_call_n_expr.
3531         (build_call_raise_range): Likewise.
3532         (build_call_raise_column): Likewise.
3533         (build_call_alloc_dealloc_proc): Likewise.
3534         (maybe_wrap_malloc): Likewise.
3535         (maybe_wrap_free): Likewise.
3536
3537 2011-09-11  Eric Botcazou  <ebotcazou@adacore.com>
3538
3539         * gcc-interface/trans.c (build_return_expr): Use void_type_node for
3540         MODIFY_EXPR.
3541         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
3542         the result type is null if ENABLE_CHECKING.  Set operation_type at the
3543         end unconditionally if not set in the previous cases.
3544         Use build2 and void_type_node for MODIFY_EXPR.
3545         (build_allocator): Use NULL_TREE for MODIFY_EXPR.
3546
3547 2011-09-08  Eric Botcazou  <ebotcazou@adacore.com>
3548
3549         * gcc-interface/utils.c (unchecked_convert): Use a field of the right
3550         precision when converting to or from an integral type whose precision
3551         is not equal to its size.
3552
3553 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
3554
3555         * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
3556
3557 2011-09-07  Iain Sandoe  <iains@gcc.gnu.org>
3558
3559         * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
3560         implementation.
3561         * system-darwin-ppc64.ads: New file.
3562
3563 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3564
3565         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
3566         reference to "-lm".
3567
3568 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3569
3570         * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
3571         size switches to the link phase for shared libs.
3572
3573 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
3574
3575         * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
3576         LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
3577
3578 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3579
3580         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
3581         (gnattools, regnattools, cross-gnattools, canadian-gnattools,
3582         gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
3583         New targets.
3584         (TOOLS_FLAGS_TO_PASS): New.
3585         (../stamp-tools): Reintroduce, to avoid merge conflicts.
3586
3587 2011-09-06  Robert Dewar  <dewar@adacore.com>
3588
3589         * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
3590         name for Is_RM_Defined_Unit. Also several fixes to this unit.
3591
3592 2011-09-06  Robert Dewar  <dewar@adacore.com>
3593
3594         * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
3595         * s-rident.ads: New restriction No_Implementation_Units
3596         (this restriction is also part of the profile
3597         No_Implementation_Extensions)
3598         * sem_ch10.adb (Analyze_With_Clause): Add check for
3599         No_Implementation_Units restriction.
3600
3601 2011-09-06  Jerome Guitton  <guitton@adacore.com>
3602
3603         * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
3604         on vThreads.
3605
3606 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3607
3608         * s-solita.adb: Minor reformatting.
3609
3610 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3611
3612         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
3613         is a rewriting of an expression function does not freeze previous
3614         entities.
3615
3616 2011-09-06  Robert Dewar  <dewar@adacore.com>
3617
3618         * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
3619
3620 2011-09-06  Tristan Gingold  <gingold@adacore.com>
3621
3622         * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
3623         powerpc-wrs-vxworksae.
3624
3625 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3626
3627         * s-os_lib.ads (Spawn): Minor documentation clarification,
3628         Success is True for a zero exit status.
3629
3630 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3631
3632         * sem_ch5.adb: Add message for common iterator error.
3633
3634 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3635
3636         * exp_ch3.adb (Build_Initialization_Call): If the target is a
3637         selected component discriminated by a current instance, replace
3638         the constraint with a reference to the target object, regardless
3639         of whether the context is an init_proc.
3640
3641 2011-09-06  Robert Dewar  <dewar@adacore.com>
3642
3643         * exp_attr.adb: Descriptor_Size is never static.
3644
3645 2011-09-06  Robert Dewar  <dewar@adacore.com>
3646
3647         * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
3648
3649 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3650
3651         * gnat_rm.texi: Clarify that attribute Descriptor_Size is
3652         non-static.
3653
3654 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3655
3656         * sem_res.adb (Resolve): An expression that is the body of an
3657         expression function does not freeze.
3658
3659 2011-09-06  Matthew Heaney  <heaney@adacore.com>
3660
3661         * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
3662         a-cuprqu.adb: Changed copyright notice to indicate current
3663         year only.
3664
3665 2011-09-06  Vincent Celier  <celier@adacore.com>
3666
3667         * prj.adb: Minor spelling error fix in comment
3668         * sem_res.adb: Minor reformatting
3669
3670 2011-09-06  Pascal Obry  <obry@adacore.com>
3671
3672         * sysdep.c (winflush_nt): Removed as not needed anymore.
3673         (winflush_95): Likewise.
3674         (winflush_init): Likewise.
3675         (winflush_function): Likewise.
3676         (getc_immediate_common): Remove call to winflush_function.
3677
3678 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3679
3680         * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
3681         processing for Descriptor_Size.
3682         * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
3683         to account for its broader usage.
3684         * sem_attr.adb (Analyze_Attribute): Change the error detection
3685         circuitry for Descriptor_Size as the attribute is now applicable
3686         to all types.
3687
3688 2011-09-06  Robert Dewar  <dewar@adacore.com>
3689
3690         * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
3691
3692 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3693
3694         * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
3695         in a parameter association must not set the Referenced flag on
3696         the formal.
3697         * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
3698
3699 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3700
3701         * gnat_rm.texi: Add a section on attribute Descriptor_Size
3702
3703 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3704
3705         * gcc-interface/Makefile.in (common-tools, gnatmake-re,
3706         gnatlink-re): Speed up by using -j0.
3707
3708 2011-09-06  Yannick Moy  <moy@adacore.com>
3709
3710         * sem_ch13.adb (Analyze_Aspect_Specifications): Call
3711         Set_Corresponding_Aspect when creating pragma from aspect.
3712         (Add_Predicates): Use new field Corresponding_Aspect.
3713         * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
3714         name when present, for the purpose of issuing error messages;
3715         remove local procedure Error_Pragma_Arg_Alternate_Name.
3716         * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
3717         N_Pragma node.
3718         (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
3719         N_Pragma node.
3720
3721 2011-09-06  Robert Dewar  <dewar@adacore.com>
3722
3723         * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
3724
3725 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3726
3727         * exp_ch6.adb (Build_Heap_Allocator): Add new
3728         local variable Desig_Typ. Code and comment reformatting. Add
3729         machinery to ensure that the allocation uses a fat pointer when
3730         the type of the return object is a constrained array and the
3731         function return type is an unconstrained array.
3732
3733 2011-09-06  Vincent Celier  <celier@adacore.com>
3734
3735         * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
3736         parameters in subprograms.
3737
3738 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3739
3740         * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
3741
3742 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3743
3744         * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
3745         (System.Tasking.Primitive_Operations.Specific.Delete): Remove
3746         subprogram.
3747         (System.Tasking.Primitive_Operations.Specific.Set): If argument
3748         is null, destroy task specific data, to make API consistent with
3749         other platforms, and thus compatible with the shared version
3750         of s-tpoaal.adb.
3751         (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
3752         Document the above assumption.
3753
3754 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3755
3756         * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
3757         variable for type of return value when return type is
3758         unconstrained and context is an assignment.
3759
3760 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3761
3762         * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
3763         class-wide operation if expansion is not enabled.
3764
3765 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3766
3767         * checks.adb (Apply_Scalar_Range_Check): Deal with access
3768         type prefix.
3769
3770 2011-09-06  Yannick Moy  <moy@adacore.com>
3771
3772         * sem_ch13.adb (Analyze_Aspect_Specifications, case
3773         Aspect_Invariant): Do not issue error at this point on illegal
3774         pragma placement, as this is checked later on when analyzing
3775         the corresponding pragma.
3776         * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
3777         similar to Error_Pragma_Arg, except the source name of the
3778         aspect/pragma to use in warnings may be equal to parameter
3779         Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
3780         message to distinguish source name of pragma/aspect, and whether
3781         the illegality resides in the type being public, or being private
3782         without a public declaration
3783
3784 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3785
3786         * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
3787         size check (fd_set is implemented differently on that platform).
3788
3789 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3790
3791         * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
3792         s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3793         s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
3794         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
3795         (ATCB_Allocation): New subpackage of
3796         System.Tasking.Primitive_Operations, shared across all targets
3797         with full tasking runtime.
3798         (ATCB_Allocation.New_ATCB): Moved there (from target specific
3799         s-taprop bodies).
3800         (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
3801         taking care of establishing a local temporary ATCB if the one
3802         being deallocated is Self, to avoid a reference to the freed
3803         ATCB in Abort_Undefer.
3804
3805 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3806
3807         * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
3808         terminated, mark it for deallocation upon termination.
3809         (Terminate_Task): Call Free_Task again if the task is marked
3810         for automatic deallocation upon termination.
3811
3812 2011-09-06  Robert Dewar  <dewar@adacore.com>
3813
3814         * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
3815         a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
3816         a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
3817         a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
3818         a-intnam-solaris.ads, a-intnam-tru64.ads,
3819         a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
3820         cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
3821         * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
3822         * par-prag.adb: Add dummy entry for pragma Implementation_Defined
3823         * s-rident.ads: Add new restriction No_Implementation_Identifiers
3824         Add new profile No_Implementation_Extensions
3825         * sem_prag.adb: Implement pragma Implementation_Defined Implement
3826         profile No_Implementation_Extensions
3827         * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
3828         Check violation of restriction No_Implementation_Identifiers
3829         * snames.ads-tmpl: Add entries for pragma Implementation_Defined
3830         Add entry for Name_No_Implementation_Extensions
3831
3832 2011-09-06  Robert Dewar  <dewar@adacore.com>
3833
3834         * impunit.ads: Minor reformatting.
3835
3836 2011-09-06  Robert Dewar  <dewar@adacore.com>
3837
3838         * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
3839
3840 2011-09-06  Pascal Obry  <obry@adacore.com>
3841
3842         * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
3843         types.
3844
3845 2011-09-06  Robert Dewar  <dewar@adacore.com>
3846
3847         * g-socket.adb: Minor reformatting
3848
3849 2011-09-06  Javier Miranda  <miranda@adacore.com>
3850
3851         * ali.adb (Scan_ALI): Add missing support to load references of
3852         entities imported from other languages.
3853         * ali.ads (Xref_Record): Adding new fields to store the language and
3854         name of an imported entity.
3855         * lib-xref.adb (Output_Import_Export_Info): Fix typo
3856         in comment.
3857
3858 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3859
3860         * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
3861         is allowed on a full type declaration if it is the completion of
3862         a private declarations.
3863         * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
3864         aspect is allowed on a full type declaration in the private part
3865         of a package.
3866
3867 2011-09-06  Robert Dewar  <dewar@adacore.com>
3868
3869         * sem_ch8.ads: Minor reformatting
3870
3871 2011-09-06  Thomas Quinot  <quinot@adacore.com>
3872
3873         * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
3874         Guard against socket values that are not in [0;FD_SETSIZE[
3875
3876 2011-09-06  Robert Dewar  <dewar@adacore.com>
3877
3878         * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
3879         reformatting.
3880
3881 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3882
3883         * s-linux-alpha.ads: Minor reformatting
3884         * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
3885         Use sizeof instead of corresponding C defines in s-oscons template.
3886
3887 2011-09-06  Vadim Godunko  <godunko@adacore.com>
3888
3889         * a-convec.ads, a-iteint.ads: Minor reformatting.
3890
3891 2011-09-06  Vincent Celier  <celier@adacore.com>
3892
3893         * projects.texi: Add menus and @node lines.
3894
3895 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3896
3897         * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
3898         where the return type is an unconstrained array and the context
3899         is an assignment. Optimize the case when the target of the
3900         assignment is a selected component.
3901
3902 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
3903
3904         * s-solita.adb: Update comments.
3905
3906 2011-09-06  Pascal Obry  <obry@adacore.com>
3907
3908         * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
3909         s-linux-sparc.ads: Remove hard coded and now wrong definitions.
3910         * s-oscons-tmplt.c: Add support for generating pthread related
3911         types size on GNU/Linux as done for Darwin.
3912         * s-osinte-linux.ads: Use s-oscons to define the pthread types.
3913
3914 2011-09-06  Robert Dewar  <dewar@adacore.com>
3915
3916         * exp_ch6.adb: Fix minor typo.
3917
3918 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3919
3920         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3921         (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
3922         (Double_Size_Of): Alphabetized. Update the comment on usage.
3923         (Make_Finalize_Address_Stmts): Update comments and reformat code.
3924         (Nearest_Multiple_Rounded_Up): New routine.
3925         (Size_Of): Update comment on usage. The generated expression now
3926         accounts for alignment gaps by rounding the size of the type to the
3927         nearest multiple rounded up of the type's alignment.
3928
3929 2011-09-06  Robert Dewar  <dewar@adacore.com>
3930
3931         * exp_ch7.adb, g-comlin.adb: Minor reformatting.
3932
3933 2011-09-06  Steve Baird  <baird@adacore.com>
3934
3935         * exp_ch4.adb (Expand_Allocator_Expression): Look through
3936         derived subprograms in checking for presence of an
3937         Extra_Accessibility_Of_Result formal parameter.
3938         * exp_ch6.adb (Expand_Call): Look through derived subprograms in
3939         checking for presence of an Extra_Accessibility_Of_Result formal
3940         parameter.
3941         (Expand_Call.Add_Actual_Parameter): Fix a bug in the
3942         case where the Parameter_Associatiations attribute is already set,
3943         but set to an empty list.
3944         (Needs_Result_Accessibility_Level):
3945         Unconditionally return False. This is a temporary
3946         change, disabling the Extra_Accessibility_Of_Result
3947         mechanism.
3948         (Expand_Simple_Function_Return): Check for
3949         Extra_Accessibility_Of_Result parameter's presence instead of
3950         testing Ada_Version when generating a runtime accessibility
3951         check which makes use of the parameter.
3952
3953 2011-09-06  Ed Schonberg  <schonberg@adacore.com>
3954
3955         * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
3956         expression in a given case alternative must be attached to the
3957         statement list of the ccrresponding case statement alternative
3958         They cannot be propagated ahead of the case statement, because
3959         the validity of the expression that generated the action may
3960         hold only for that alternative.
3961
3962 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3963
3964         * exp_ch7.adb: Remove with and use clauses for Get_Targ.
3965         (Alignment_Of): Remove the code for strict alignment targets.
3966         (Double_Alignment_Of): Removed.
3967         (Double_Size_Of): New routine.
3968         (Make_Finalize_Address_Stmts): Change the
3969         calculation of the dope's size.  Update relevant comments.
3970         (Size_Of): New routine.
3971
3972 2011-09-06  Steve Baird  <baird@adacore.com>
3973
3974         * einfo.ads (Extra_Accessibility): Update associated comment to use
3975         the term "present" correctly ("present" just means that it is not
3976         an error to query the value of the attribute - it does not imply
3977         that the value must be non-null).
3978         (Extra_Constrained): Ditto.
3979         (Is_Visible_Formal): Ditto.
3980         (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
3981         (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
3982         * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
3983         * exp_ch6.adb (Expand_Call): The callee may require an
3984         Extra_Accessibility_Of_Result actual parameter even if Ada_Version
3985         < Ada_2012. This can occur if the callee is exported from a Gnat
3986         runtimes unit. Also improve a comment.
3987
3988 2011-09-06  Hristian Kirtchev  <kirtchev@adacore.com>
3989
3990         * exp_ch7.adb: Add with and use clauses for Get_Targ.
3991         (Alignment_Of): Rename formal parameter Some_Typ
3992         to Typ, update related comment. Use the allocator alignment on
3993         strict alignment targets such as SPARC.
3994         (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
3995         related comment.
3996
3997 2011-09-06  Gary Dismukes  <dismukes@adacore.com>
3998
3999         * sem_ch9.adb (Check_Interfaces): Test
4000         Is_Limited_Type rather than Is_Limited_Record when checking that
4001         the partial view of a synchronized full view must be limited.
4002
4003 2011-09-06  Emmanuel Briot  <briot@adacore.com>
4004
4005         * g-comlin.adb (Free): Fix memory leak.
4006
4007 2011-09-06  Robert Dewar  <dewar@adacore.com>
4008
4009         * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
4010
4011 2011-09-06  Steve Baird  <baird@adacore.com>
4012
4013         * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
4014         (Ada2012) cases described in AI05-0234 where the accessibility
4015         level of a function result is "determined by the point of
4016         call", an implicit parameter representing that accessibility
4017         level is passed in. Extra_Accessibilty_Of_Result yields this
4018         additional formal parameter. Extra_Accessibility_Of_Result
4019         is analogous to the existing Extra_Accessibility
4020         function used in the implementation of access parameters.
4021         (Set_Extra_Accessibility_Of_Result): New procedure; sets
4022         Extra_Accessibility_Of_Result attribute.
4023         * einfo.adb (Extra_Accessibility_Of_Result): New function.
4024         (Set_Extra_Accessibility_Of_Result): New procedure.
4025         (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
4026         * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
4027         an accessibility level literal to Natural; introduce a nested
4028         function, Make_Level_Literal, to do this.
4029         * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
4030         determines whether a given function (or access-to-function
4031         type) needs to have an implicitly-declared accessibility-level
4032         parameter added to its profile.
4033         (Add_Extra_Actual_To_Call): Export an existing procedure which was
4034         previously declared in the body of Exp_Ch6.
4035         * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
4036         it to exp_ch6.ads.
4037         (Has_Unconstrained_Access_Discriminants): New Function; a
4038         predicate on subtype entities which returns True if the given
4039         subtype is unconstrained and has one or more access discriminants.
4040         (Expand_Call): When expanding a call to a function which takes an
4041         Extra_Accessibility_Of_Result parameter, pass in the appropriate
4042         actual parameter value. In the case of a function call which is
4043         used to initialize an allocator, this may not be possible because
4044         the Etype of the allocator may not have been set yet. In this
4045         case, we defer passing in the parameter and handle it later in
4046         Expand_Allocator_Expression.
4047         (Expand_Simple_Function_Return): When returning from a function which
4048         returns an unconstrained subtype having at least one access
4049         discriminant, generate the accessibility check needed to ensure that
4050         the function result will not outlive any objects designated by its
4051         discriminants.
4052         (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
4053         description.
4054         * exp_ch4.adb (Expand_Allocator_Expression): When a function call
4055         is used to initialize an allocator, we may need to pass in "the
4056         accessibility level determined by the point of call" (AI05-0234)
4057         to the function. Expand_Call, where such actual parameters are
4058         usually generated, is too early in this case because the Etype of
4059         the allocator (which is used in determining the level to be passed
4060         in) may not have been set yet when Expand_Call executes. Instead,
4061         we generate code to pass in the appropriate actual parameter
4062         in Expand_Allocator_Expression.
4063         * sem_ch6.adb (Create_Extra_Formals): Create
4064         the new Extra_Accessibility_Of_Result formal if
4065         Needs_Result_Accessibility_Level returns True. This includes the
4066         introduction of a nested procedure, Check_Against_Result_Level.
4067
4068 2011-09-06  Arnaud Charlet  <charlet@adacore.com>
4069
4070         * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
4071         declaration.
4072
4073 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4074
4075         * s-finmas.adb (Set_Finalize_Address): Explain the reason
4076         for the synchronization. Move the test for null from
4077         s-stposu.Allocate_Any_Controlled to this routine since the check
4078         needs to be protected too.
4079         (Set_Heterogeneous_Finalize_Address): Explain the reason for the
4080         synchronization code.
4081         * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
4082         explaining the context in which this routine is used.
4083         * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
4084         to s-finmas.Set_Finalize_Address.
4085
4086 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4087
4088         * einfo.ads: Document that itypes have no parent field.
4089
4090 2011-09-05  Robert Dewar  <dewar@adacore.com>
4091
4092         * rtsfind.adb (Check_CRT): Check for overloaded entity
4093         * rtsfind.ads: Document that entities to be found by rtsfind
4094         cannot be overloaded
4095         * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
4096         (Lock_Entries_With_Status): New name for Lock_Entries with two
4097         arguments (changed to meet rtsfind no overloading rule).
4098
4099 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4100
4101         * s-finmas.adb (Set_Finalize_Address (Address,
4102         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
4103         (Set_Finalize_Address (in out Finalization_Master,
4104         Finalize_Address_Ptr): Add synchronization code.
4105         * s-finmas.ads (Set_Finalize_Address (Address,
4106         Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
4107         * s-stposu.adb (Allocate_Any_Controlled): Update the call to
4108         Set_Finalize_Address for the heterogeneous case.
4109
4110 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4111
4112         * sem_ch3.adb: Undo previous change, not suitable after all.
4113
4114 2011-09-05  Robert Dewar  <dewar@adacore.com>
4115
4116         * einfo.ads: Minor comment clarification.
4117
4118 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4119
4120         * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
4121         no longer needs to search through the entities of the return
4122         statement scope to find the _chain.
4123         * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
4124         (Analyze_Block_Statement): Add local variable
4125         Is_BIP_Return_Statement. Add machinery to install all entities
4126         produced by the expansion of the return object declaration.
4127         (Install_Return_Entities): New routine.
4128         * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
4129
4130 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4131
4132         * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
4133         of subunit is incomplete.
4134         (Analyze_Proper_Body): If parent spec is not available, do not
4135         attempt analysis.
4136
4137 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4138
4139         * sem_disp.adb (Find_Controlling_Arg): Add checks for
4140         interface type conversions, that are expanded into dereferences.
4141
4142 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4143
4144         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4145         Examine the parameter and return profile of a subprogram and swap
4146         any incomplete types coming from a limited context with their
4147         corresponding non-limited views.
4148         (Exchange_Limited_Views): New routine.
4149
4150 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4151
4152         * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
4153         of internal entity to the subtype declaration, so that when
4154         entities are subsequently exchanged in a package body, the tree
4155         remains properly formatted for ASIS.
4156
4157 2011-09-05  Johannes Kanig  <kanig@adacore.com>
4158
4159         * g-comlin.adb (Set_Usage): Additional optional argument to set help
4160         message.
4161         (Display_Help): display the user given help message, if available.
4162
4163 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4164
4165         * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
4166         is legal if the original node is an identifier that is a
4167         parameterless function call.
4168
4169 2011-09-05  Pascal Obry  <obry@adacore.com>
4170
4171         * prj-nmsc.adb: Minor reformatting.
4172         Add support for standalone aggregate library.
4173         (Check_Stand_Alone_Library): Handle standalone aggregate library.
4174         * projects.texi: Fix documentation for aggregate library projects.
4175
4176 2011-09-05  Robert Dewar  <dewar@adacore.com>
4177
4178         * sem_ch6.adb: Minor reformatting.
4179
4180 2011-09-05  Matthew Gingell  <gingell@adacore.com>
4181
4182         * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
4183         stack guard page on PPC Linux. This patch ensures the 64K guard page at
4184         the bottom of the stack is not overwritten.
4185
4186 2011-09-05  Thomas Quinot  <quinot@adacore.com>
4187
4188         * exp_intr.adb, s-tasini.adb: Minor reformatting.
4189
4190 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4191
4192         * sem_ch3.adb (Access_Definition): If an access type declaration
4193         appears in a child unit, the scope of whatever anonymous type
4194         may be generated is the child unit itself.
4195
4196 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4197
4198         * sem_ch6.adb (Analyze_Expression_Function): Do not set
4199         Comes_From_Source on rewritten body.
4200         (Analyze_Subprogram_Body_Helper): Check that the original node for
4201         the body comes from source, when determining whether expansion
4202         of a protected operation is needed.
4203
4204 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4205
4206         * exp_aggr.adb (Replace_Type): If the target of the assignment is
4207         a selected component and the right-hand side is a self-referential
4208         access, the proper prefix of the rewritten attribute is a copy
4209         of the left-hand side, not of its prefix.
4210
4211 2011-09-05  Robert Dewar  <dewar@adacore.com>
4212
4213         * sem_ch5.adb: Minor reformatting.
4214         * sem_ch3.adb: Minor code clean up.
4215
4216 2011-09-05  Jose Ruiz  <ruiz@adacore.com>
4217
4218         * exp_ch9.adb (Make_Initialize_Protection): The fact that
4219         restriction No_Dynamic_Attachment is in effect or not should
4220         not influence the default priority associated to a protected
4221         object. With this change, when the restriction is in effect (as
4222         is the case for the Ravenscar profile) the default priority of
4223         a protected object with an interrupt handler is in the range of
4224         interrupt priorities (Default_Interrupt_Priority) as required
4225         by D.3(10).
4226
4227 2011-09-05  Arnaud Charlet  <charlet@adacore.com>
4228
4229         * a-iteint.ads: Fix header.
4230
4231 2011-09-05  Vincent Celier  <celier@adacore.com>
4232
4233         * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
4234         with a directory separator to avoid output such as:
4235           "/path/to/objauto.cgpr" has been deleted.
4236
4237 2011-09-05  Robert Dewar  <dewar@adacore.com>
4238
4239         * sem_ch3.adb: Minor reformatting.
4240
4241 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4242
4243         * sem_ch5.adb: Better error message.
4244
4245 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4246
4247         * exp_aggr.adb: Add with and use clause for Exp_Ch6.
4248         (Expand_Array_Aggregate): Detect a special case of an aggregate
4249         which contains tasks in the context of an unexpanded return
4250         statement of a build-in-place function.
4251         * exp_ch6.adb: Add with and use clause for Exp_Aggr.
4252         (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
4253         which contains tasks and expand it now that the original simple
4254         return statement has been rewritten.
4255         * exp_ch9.adb (Build_Activation_Chain_Entity): Code
4256         reformatting. Do not create a chain for an extended return
4257         statement if one is already available.
4258         (Has_Activation_Chain): New routine.
4259
4260 2011-09-05  Marc Sango  <sango@adacore.com>
4261
4262         * sem_ch3.adb (Analyze_Object_Declaration): Remove
4263         the wrong test and add the correct test to detect the violation
4264         of illegal use of unconstrained string type in SPARK mode.
4265
4266 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4267
4268         * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
4269         message on an iterator over an array.
4270
4271 2011-09-05  Robert Dewar  <dewar@adacore.com>
4272
4273         * lib-xref-alfa.adb: Minor reformatting.
4274
4275 2011-09-05  Robert Dewar  <dewar@adacore.com>
4276
4277         * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
4278         exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
4279
4280 2011-09-05  Gary Dismukes  <dismukes@adacore.com>
4281
4282         * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
4283
4284 2011-09-05  Johannes Kanig  <kanig@adacore.com>
4285
4286         * lib-xref-alfa.adb: Update comments.
4287
4288 2011-09-05  Thomas Quinot  <quinot@adacore.com>
4289
4290         * sem_res.adb: Minor reformatting
4291
4292 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4293
4294         * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
4295         present, create them now.  Needed in case the return type was
4296         a limited view in the function declaration.
4297         (Make_Build_In_Place_Call_In_Allocator): If return type contains
4298         tasks, build the activation chain for it.  Pass a reference to
4299         the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
4300         * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
4301         with build_in_place calls.
4302         * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
4303         incomplete, inatialize its Corresponding_Record_Type component.
4304         * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
4305         of limited views.
4306
4307 2011-09-05  Johannes Kanig  <kanig@adacore.com>
4308
4309         * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
4310         information.
4311
4312 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4313
4314         * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
4315         appears within a package specification and the token after "IS"
4316         is not a parenthesis, assume that this is an unparenthesized
4317         expression function, even if the token appears in a line by
4318         itself.
4319         * par.adb: Clarify use of Labl field of scope stack in error
4320         recovery.
4321
4322 2011-09-05  Bob Duff  <duff@adacore.com>
4323
4324         * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
4325         conversions instead of normal type conversions in all cases where a
4326         type conversion would be illegal. In particular, use unchecked
4327         conversions when the operand types are private.
4328
4329 2011-09-05  Johannes Kanig  <kanig@adacore.com>
4330
4331         * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
4332         objects of task type or protected type.
4333
4334 2011-09-05  Ed Schonberg  <schonberg@adacore.com>
4335
4336         * sem_ch6.adb (Analyze_Expression_Function): If the expression
4337         function comes from source, indicate that so does its rewriting,
4338         so it is compatible with any subsequent expansion of the
4339         subprogram body (e.g. when it is a protected operation).
4340         * sem_ch4.adb: minor reformatting
4341
4342 2011-09-05  Hristian Kirtchev  <kirtchev@adacore.com>
4343
4344         * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
4345         Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
4346         may lead to wrong ancestor package in the case of instantiated subunit
4347         bodies. If a subunit is instantiated, follow the chain of instantiations
4348         rather than the stub structure.
4349
4350 2011-09-02  Robert Dewar  <dewar@adacore.com>
4351
4352         * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
4353         * gcc-interface/Make-lang.in: Update dependencies.
4354
4355 2011-09-02  Marc Sango  <sango@adacore.com>
4356
4357         * sem_ch3.adb (Analyze_Object_Declaration): Change
4358         comment and add additional check to differentiate constant of
4359         type string from others unconstrained type.
4360
4361 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4362
4363         * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
4364         present in incomplete type declarations to refine the error
4365         message the full declaration is in the same unit.
4366         * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
4367         an incomplete type, set the Premature_Use for additional message.
4368         * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
4369         and Premature_Use is set, place additional information at the
4370         point of premature use.
4371
4372 2011-09-02  Bob Duff  <duff@adacore.com>
4373
4374         * sem_ch6.adb: (Check_Post_State): Suppress warning
4375         "postcondition refers only to pre-state" when the expression has not
4376         yet been analyzed, because it causes false alarms. This can happen when
4377         the postcondition contains a quantified expression, because those are
4378         analyzed later. This is a temporary/partial fix.
4379         (Process_Post_Conditions): Minor: change wording of warning.
4380
4381 2011-09-02  Marc Sango  <sango@adacore.com>
4382
4383         * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
4384         illegal use of unconstrained string type in SPARK mode.
4385         * sem_res.adb (Analyze_Operator_Symbol): Set the
4386         right place where the string operand of concatenation should be
4387         violate in SPARK mode.
4388
4389 2011-09-02  Robert Dewar  <dewar@adacore.com>
4390
4391         * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
4392         exp_ch3.adb: Minor reformatting.
4393
4394 2011-09-02  Vincent Celier  <celier@adacore.com>
4395
4396         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
4397         as the compiler driver so Is_Compilable returns True for sources.
4398         * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
4399         for the body.
4400
4401 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4402
4403         * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
4404         condition, a reference to a controlling formal must be interpreted
4405         as having the class-wide type (or an access to such) so that the
4406         inherited condition can be properly applied to any overriding
4407         operation (see ARM12 6.6.1 (7)).
4408
4409 2011-09-02  Tristan Gingold  <gingold@adacore.com>
4410
4411         * init.c (__gnat_is_vms_v7): Fix case and add prototype
4412         for LIB$GETSYI.
4413
4414 2011-09-02  Javier Miranda  <miranda@adacore.com>
4415
4416         * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
4417         initializing expression of a class-wide interface object declaration
4418         if its type is limited.
4419
4420 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4421
4422         * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
4423         literals, take into account the type name; the type is *not*
4424         the scope for an enumeration literal.
4425
4426 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4427
4428         * sem_ch6.adb (Check_Overriding_Indicator): add special check
4429         to reject an overriding indicator on a user-defined Adjust
4430         subprogram for a limited controlled type.
4431
4432 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4433
4434         * sem_res.adb (Resolve_Actuals): add missing call to Resolve
4435         for an actual that is a function call returning an unconstrained
4436         limited controlled type.
4437
4438 2011-09-02  Tristan Gingold  <gingold@adacore.com>
4439
4440         * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
4441
4442 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4443
4444         * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
4445         from "HEAP" to __HEAP Change comment that refers to that variable
4446         * put_alfa.adb: Change comment that refers to that variable
4447
4448 2011-09-02  Robert Dewar  <dewar@adacore.com>
4449
4450         * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
4451
4452 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4453
4454         * exp_util.adb (Extract_Renamed_Object): Renamed to
4455         Find_Renamed_Object. This routine has been reimplemented and now uses
4456         tree traversal to locate a renamed object.
4457         (Is_Aliased): Replace call to Extract_Renamed_Object with
4458         Find_Renamed_Object.
4459
4460 2011-09-02  Tristan Gingold  <gingold@adacore.com>
4461
4462         * init.c: (__gnat_is_vms_v7): New function.
4463
4464 2011-09-02  Olivier Hainque  <hainque@adacore.com>
4465
4466         * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
4467         that have a misaligned backchain, necessarily bogus.
4468
4469 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4470
4471         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
4472         TSS routine Finalize_Address when compiling in Alfa mode.
4473         (Expand_Freeze_Record_Type): Do not create TSS routine
4474         Finalize_Address when compiling in Alfa mode.
4475         * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
4476         call to Set_Finalize_Address in Alfa mode because Finalize_Address is
4477         not built.
4478         (Expand_N_Allocator): Do not produce a call to
4479         Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
4480         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
4481         produce a call to primitive Set_Finalize_Address in Alfa mode because
4482         Finalize_Address is not built.
4483         * exp_ch7.adb (Build_Finalization_Master): Do not create
4484         finalization masters in Afa mode since they are not needed.
4485         (Build_Finalizer): Do not create scope and library-level
4486         finalizers in Alfa mode since they are not needed.
4487         * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
4488         "new" and "free" when applied to controlled objects in Alfa mode since
4489         this is not needed.
4490
4491 2011-09-02  Vincent Celier  <celier@adacore.com>
4492
4493         * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
4494         only library names with the syntax of Ada identifiers, to avoid errors
4495         when compiling the binder generated files.
4496         * projects.texi: Document restriction on SAL library names
4497
4498 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4499
4500         * a-chtgbo.adb: Minor comment fix.
4501
4502 2011-09-02  Robert Dewar  <dewar@adacore.com>
4503
4504         * lib-xref.adb: Minor reformatting
4505
4506 2011-09-02  Vincent Celier  <celier@adacore.com>
4507
4508         * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
4509         gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
4510         --version and --help in usage.
4511         * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
4512
4513 2011-09-02  Bob Duff  <duff@adacore.com>
4514
4515         * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
4516         compilers don't understand it.
4517
4518 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4519
4520         * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
4521         underlying subtype rather than its base type on the call to
4522         Build_Record_Or_Elementary_Input_Function, so that any
4523         constraints on a discriminated subtype will be available for
4524         doing the check required by AI05-0192.
4525         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
4526         If the prefix subtype of the 'Input attribute is a constrained
4527         discriminated subtype, then check each constrained discriminant value
4528         against the corresponding value read from the stream.
4529
4530 2011-09-02  Yannick Moy  <moy@adacore.com>
4531
4532         * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
4533         warnings on suspicious contracts, and enable them with -gnatwa.
4534
4535 2011-09-02  Robert Dewar  <dewar@adacore.com>
4536
4537         * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
4538         reformatting.
4539
4540 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4541
4542         * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
4543         which ensure that restriction No_Dynamic_Attachment has not been
4544         violated.
4545         (Make_Initialize_Protection): Protected types with attach or
4546         interrupt handlers must not violate restriction No_Dynamic_Attachment.
4547         * exp_util.adb (Corresponding_Runtime_Package): Add a guard
4548         which ensures that restriction No_Dynamic_Attachment has not been
4549         violated.
4550         * sem_attr.adb: (Eval_Attribute): Transform
4551         VAX_Float_Type'First and 'Last into references to
4552         the temporaries which store the corresponding bounds. The
4553         transformation is needed since the back end cannot evaluate
4554         'First and 'Last on VAX.
4555         (Is_VAX_Float): New routine.
4556
4557 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4558
4559         * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
4560         generic unit is not intrinsic and has an explicit convention,
4561         the instance inherits it.
4562
4563 2011-09-02  Robert Dewar  <dewar@adacore.com>
4564
4565         * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
4566         prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
4567
4568 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4569
4570         * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
4571         Guard against a prefix that is an N_Has_Entity but has no
4572         associated entity.
4573
4574 2011-09-02  Yannick Moy  <moy@adacore.com>
4575
4576         * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
4577         references.
4578
4579 2011-09-02  Yannick Moy  <moy@adacore.com>
4580
4581         * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
4582         * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
4583         contracts.
4584         * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
4585         procedure looking for suspicious postconditions.
4586         * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
4587         * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
4588         options -gnatw.t and -gnatw.T.
4589
4590 2011-09-02  Pascal Obry  <obry@adacore.com>
4591
4592         * prj.adb: Minor code refactoring. Move check for null project in
4593         Project_Changed.
4594         * projects.texi: Fix minor typos.
4595
4596 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4597
4598         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
4599         of iteration is an expression, its value must be captured in a
4600         renaming declaration, so that modification of the elements is
4601         propagated to the original container.
4602
4603 2011-09-02  Pascal Obry  <obry@adacore.com>
4604
4605         * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
4606         prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
4607         prj-tree.adb: Minor reformatting and style fixes.
4608
4609 2011-09-02  Robert Dewar  <dewar@adacore.com>
4610
4611         * s-rident.ads: Add new restriction No_Implicit_Aliasing
4612         * sem_attr.adb: (Analyze_Access_Attribute): Deal with
4613         No_Implicit_Aliasing
4614         (Analyze_Attribute, case Address): ditto
4615         (Analyze_Attribute, case Unrestricted_Access): ditto
4616         * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
4617         No_Implicit_Aliasing restriction.
4618         * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
4619
4620 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4621
4622         * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
4623         is an unchecked conversion, apply test to its expression.
4624
4625 2011-09-02  Javier Miranda  <miranda@adacore.com>
4626
4627         * sem_ch3.adb (Check_Abstract_Overriding): When
4628         traversing the chain of aliased subprograms avoid reporting a
4629         redundant error on the current entity.
4630
4631 2011-09-02  Sergey Rybin  <rybin@adacore.com>
4632
4633         * gnat_ugn.texi: Minor clean up.
4634
4635 2011-09-02  Bob Duff  <duff@adacore.com>
4636
4637         * s-htable.adb (Set_If_Not_Present): Use renaming
4638         instead of ":=", because the type Key is limited in the generic (even
4639         if not in the instances).
4640
4641 2011-09-02  Robert Dewar  <dewar@adacore.com>
4642
4643         * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
4644         g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
4645         reformatting.
4646
4647 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4648
4649         * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
4650         inherited component with the enclosing derived type. Code reformatting.
4651
4652 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4653
4654         * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
4655         return done when overflow checks are enabled, since comparisons against
4656         Lor and Hir should not be done when OK1 is False.
4657
4658 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4659
4660         * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
4661         Add new formal Master_Exp. When present, add that expression to the
4662         call as an extra actual.
4663         (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
4664         Fmaster_Actual and in the case of a BIP call initializing a return
4665         object of an enclosing BIP function set it to a
4666         new reference to the implicit finalization master
4667         formal of the enclosing function. Fmaster_Actual is
4668         then passed to the new formal Master_Exp on the call to
4669         Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
4670         initializations of Enclosing_Func to its declaration.
4671
4672 2011-09-02  Thomas Quinot  <quinot@adacore.com>
4673
4674         * csets.ads: Minor reformatting
4675
4676 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4677
4678         * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
4679         the full view of a private type coming from an instantiation.
4680         * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
4681         loop to iterate over the declarations rather than use the
4682         First_Entity / Next_Entity scheme.
4683
4684 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4685
4686         * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
4687         X'range (N) into X'First (N) ..  X'Last (N), do not share the
4688         dimension indicator N, if present. Even though it is a static
4689         constant, its source location may be modified when printing
4690         expanded code under -gnatDL, and node sharing will lead to chaos
4691         in Sprint on large files, by generating a sloc value that does
4692         not correspond to any source file.
4693
4694 2011-09-02  Bob Duff  <duff@adacore.com>
4695
4696         * einfo.adb: (Has_Xref_Entry): Do not call
4697         Implementation_Base_Type. Lib.Xref has been
4698         rewritten to avoid the need for it, and it was costly.
4699         * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
4700         functions in support of efficient xref.
4701         * lib-xref-alfa.adb: Misc changes related to Key component of
4702         type Xref_Entry.
4703         * lib-xref.adb: (Add_Entry,etc): Speed improvement.
4704         (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
4705         no longer does. This is the one place where it is needed.
4706
4707 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4708
4709         * g-comlin.adb (Getopt): New optional argument Concatenate to have
4710         similar interface as the other Getopt function.
4711
4712 2011-09-02  Hristian Kirtchev  <kirtchev@adacore.com>
4713
4714         * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
4715         a call to Set_Finalize_Address if there is no allocator available.
4716         * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
4717         a case of allocator expansion where the allocator is not expanded but
4718         needs a custom allocate routine. Code reformatting.
4719         (Is_Finalizable_Transient): Remove local variables Has_Rens and
4720         Ren_Obj. Code reformatting.
4721         (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
4722         through the use of 'reference.
4723         * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
4724         as part of build-in-place expansion. They are intentionally marked as
4725         coming from source, but their parents are not.
4726
4727 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4728
4729         * sem_ch10.adb (Analyze_With_Clause): If the library unit
4730         is the generated subprogram declaration for a child unit body
4731         that acts as spec, use the original body in the with_clause,
4732         to prevent binding errors.
4733
4734 2011-09-02  Vincent Celier  <celier@adacore.com>
4735
4736         * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
4737         qualifier /MULTI_UNIT_INDEX=
4738
4739 2011-09-02  Johannes Kanig  <kanig@adacore.com>
4740
4741         * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
4742         instead of calling the callback function
4743
4744 2011-09-02  Robert Dewar  <dewar@adacore.com>
4745
4746         * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
4747         prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
4748
4749 2011-09-02  Vincent Celier  <celier@adacore.com>
4750
4751         * prj-nmsc.adb: (Find_Sources): When the list of sources is
4752         explicitly declared in an extending project, do not warn if a source
4753         for an inherited naming exception is not found.
4754
4755 2011-09-02  Gary Dismukes  <dismukes@adacore.com>
4756
4757         * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
4758         expansion is inactive.
4759
4760 2011-09-02  Ed Schonberg  <schonberg@adacore.com>
4761
4762         * sem_util.adb (Note_Possible_Modification): If the entity
4763         being modified is the renaming generated for an Ada2012 iterator
4764         element, the enclosing container or array is modified as well.
4765
4766 2011-09-02  Jose Ruiz  <ruiz@adacore.com>
4767
4768         * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
4769         Initialize): Define and initialize the
4770         mutex attributes and condition variable attributes locally.
4771
4772 2011-09-02  Vincent Celier  <celier@adacore.com>
4773
4774         * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
4775         exception replaced in an extending project.
4776         (Check_Object): No error when the other source is locally removed.
4777
4778 2011-09-02  Yannick Moy  <moy@adacore.com>
4779
4780         * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
4781         unresolved calls.
4782
4783 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
4784
4785         * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
4786         run-time files.
4787         * gcc-interface/Make-lang.in: Update dependencies.
4788
4789 2011-09-01  Robert Dewar  <dewar@adacore.com>
4790
4791         * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
4792
4793 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4794
4795         * adaint.h (__gnat_cpu_free): Fix the name of this profile.
4796         * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
4797         __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
4798         specific for systems where their glibc version does not define the
4799         routines to handle dynamically allocated CPU sets.
4800
4801 2011-09-01  Vincent Celier  <celier@adacore.com>
4802
4803         * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
4804         prj-env.adb: Implement inheritance of naming exceptions in extending
4805         projects.
4806
4807 2011-09-01  Romain Berrendonner  <berrendo@adacore.com>
4808
4809         * gnatls.adb: Display simple message instead of content of
4810         gnatlic.adl.
4811
4812 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4813
4814         * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
4815         access discriminant and anonymous access component scopes.
4816         (Inherit_Component): Reuse the itype of an access discriminant
4817         or anonymous access component by copying it in order to set the proper
4818         scope. This is done only when the parent and the derived type
4819         are in different scopes.
4820         (Set_Anonymous_Etype): New routine.
4821
4822 2011-09-01  Robert Dewar  <dewar@adacore.com>
4823
4824         * a-convec.adb: Minor reformatting throughout.
4825
4826 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4827
4828         * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
4829         __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
4830         CPU_ALLOC_SIZE and CPU_FREE linux macros.
4831         (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
4832         CPU_SET_S respectively because we are now using dynamically allocated
4833         CPU sets which are more portable across different glibc versions.
4834         * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
4835         CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
4836         masks dynamically according to the number of processors in the target
4837         platform.
4838         (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
4839         respectively, so we need to pass the size of the masks as
4840         parameters.
4841         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
4842         created cpu_set_t masks
4843         with the number of processors available in the target platform,
4844         instead of static bit arrays. It enhances portability because
4845         it uses the information from the target platform.
4846         * sem_ch8.adb: (Attribute_Renaming): When checking whether we
4847         are using a restricted run-time library, use the flag
4848         Configurable_Run_Time_Mode instead of Restricted_Profile.
4849
4850 2011-09-01  Vincent Celier  <celier@adacore.com>
4851
4852         * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
4853         * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
4854
4855 2011-09-01  Nicolas Roche  <roche@adacore.com>
4856
4857         * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
4858         on VxWorks in kernel mode.
4859
4860 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4861
4862         * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
4863         macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
4864         directly the bit array.
4865         * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
4866         the linux macros with the same name.
4867         * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
4868         wrappers around the CPU_ZERO and CPU_SET linux macros.
4869
4870 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4871
4872         * exp_ch7.adb (Find_Insertion_List): Removed.
4873         (Process_Transient_Objects): Insert the declarations of the hook
4874         access type and the hook object before the associated transient object.
4875
4876 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
4877
4878         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
4879         package System.Aux_Dec when using restricted run-time libraries which
4880         do not have this package.
4881
4882 2011-09-01  Tristan Gingold  <gingold@adacore.com>
4883
4884         * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
4885
4886 2011-09-01  Bob Duff  <duff@adacore.com>
4887
4888         * sem_attr.adb (Analyze_Access_Attribute): Do not call
4889         Kill_Current_Values for P'Unrestricted_Access, where P is library level
4890
4891 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4892
4893         * exp_ch5.adb: Minor reformatting
4894         * gnat_ugn.texi: Fix minor typos.
4895         * gcc-interface/Make-lang.in: Update dependencies.
4896
4897 2011-09-01  Robert Dewar  <dewar@adacore.com>
4898
4899         * inline.adb, sem_aggr.adb: Minor reformatting.
4900
4901 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4902
4903         * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
4904
4905 2011-09-01  Robert Dewar  <dewar@adacore.com>
4906
4907         * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
4908
4909 2011-09-01  Bob Duff  <duff@adacore.com>
4910
4911         * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
4912         body" the same as "in inlined body", because visibility shouldn't
4913         apply there.
4914
4915 2011-09-01  Eric Botcazou  <ebotcazou@adacore.com>
4916
4917         * inline.adb (Add_Inlined_Body): Refine previous change.
4918
4919 2011-09-01  Gary Dismukes  <dismukes@adacore.com>
4920
4921         * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
4922         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4923         Test for case where call
4924         initializes an object of a return statement before testing for
4925         a constrained call, to ensure that all such cases get handled
4926         by simply passing on the caller's parameters. Also, in that
4927         case call Needs_BIP_Alloc_Form to determine whether to pass on
4928         the BIP_Alloc_Form parameter of the enclosing function rather
4929         than testing Is_Constrained. Add similar tests for the return
4930         of a BIP call to later processing to ensure consistent handling.
4931         (Needs_BIP_Alloc_Form): New utility function.
4932         * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
4933         a BIP_Alloc_Form formal with call to new utility function
4934         Needs_BIP_Alloc_Form.
4935
4936 2011-09-01  Pascal Obry  <obry@adacore.com>
4937
4938         * prj-part.adb: Minor reformatting.
4939
4940 2011-09-01  Vincent Celier  <celier@adacore.com>
4941
4942         * prj-env.adb (Create_Mapping_File.Process): Encode the upper
4943         half character in the unit name.
4944
4945 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
4946
4947         * exp_ch4.adb: Minor code and comment reformatting.
4948
4949 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4950
4951         * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
4952         for Is_Limited_Type and Is_Tagged_Type in condition checking
4953         for by-reference type.
4954         * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
4955         subprograms may have a completion because of a previous
4956         Inline_Always clause, but the enclosing package must be marked
4957         inlined for the subprogram body to become visible to the backend.
4958
4959 2011-09-01  Thomas Quinot  <quinot@adacore.com>
4960
4961         * sem_aux.adb, exp_ch4.adb: Minor reformatting
4962
4963 2011-09-01  Pascal Obry  <obry@adacore.com>
4964
4965         * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
4966
4967 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4968
4969         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
4970         the formals of a subprogram stub that acts as a spec.
4971
4972 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
4973
4974         * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
4975         type, declare a renaming for it, not an object declaration.
4976
4977 2011-09-01  Yannick Moy  <moy@adacore.com>
4978
4979         * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
4980         Ignore_Errors to ignore failures to read ALI files when True.
4981
4982 2011-09-01  Javier Miranda  <miranda@adacore.com>
4983
4984         * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
4985         constructor calls associated with non-tagged record types.
4986
4987 2011-09-01  Robert Dewar  <dewar@adacore.com>
4988
4989         * g-socthi-vms.adb: Minor reformatting.
4990
4991 2011-09-01  Nicolas Roche  <roche@adacore.com>
4992
4993         * sysdep.c: Don't use macro functions for stdio functions on VxWorks
4994         in order to avoid impact of imcompatible changes.
4995         * cstreams.c: Likewise
4996         * cio.c: Likewise
4997         * aux-io.c: Likewise
4998
4999 2011-09-01  Yannick Moy  <moy@adacore.com>
5000
5001         * lib-writ.adb (Write_With_Lines): Always output complete information
5002         on "with" line in Alfa mode, as this is required by formal verification
5003         back-end.
5004
5005 2011-09-01  Tristan Gingold  <gingold@adacore.com>
5006
5007         * g-socthi-vms.adb: Add comments.
5008
5009 2011-09-01  Pascal Obry  <obry@adacore.com>
5010
5011         * prj.ads: Minor reformatting.
5012
5013 2011-09-01  Vincent Celier  <celier@adacore.com>
5014
5015         * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
5016         exceptions in the config pragmas file.
5017
5018 2011-09-01  Tristan Gingold  <gingold@adacore.com>
5019
5020         * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
5021
5022 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5023
5024         * exp_ch7.adb (Find_Insertion_List): New routine.
5025         (Process_Transient_Objects): Add code to handle the abnormal
5026         finalization of a controlled transient associated with a subprogram
5027         call. Since transients are cleaned up right after the associated
5028         context, an exception raised during a subprogram call may bypass the
5029         finalization code.
5030
5031 2011-09-01  Robert Dewar  <dewar@adacore.com>
5032
5033         * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
5034         aliased.
5035
5036 2011-09-01  Robert Dewar  <dewar@adacore.com>
5037
5038         * exp_ch4.adb, a-exexda.adb: Minor reformatting.
5039
5040 2011-09-01  Robert Dewar  <dewar@adacore.com>
5041
5042         * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
5043
5044 2011-09-01  Thomas Quinot  <quinot@adacore.com>
5045
5046         * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
5047         GNATRTL_NONTASKING_OBJS.
5048
5049 2011-09-01  Robert Dewar  <dewar@adacore.com>
5050
5051         * einfo.ads (Is_Aliased): Fix existing documentation and add note on
5052         possibility of this flag being set for formals in Ada 2012 mode.
5053         * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
5054         2012.
5055         * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
5056         mode.
5057         * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
5058         Ada 2012.
5059         * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
5060         Ada 2012.
5061
5062 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5063
5064         * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
5065         insertion node in a tree of nested Expression_With_Actions nodes.
5066         (Process_Transient_Object): In the case where a complex if statement
5067         has been converted into nested Expression_With_Actions nodes, the
5068         "hook" object and the associated access type must be inserted before
5069         the top most Expression_With_Actions.
5070
5071 2011-09-01  Robert Dewar  <dewar@adacore.com>
5072
5073         * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
5074         a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
5075
5076 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
5077
5078         * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
5079
5080 2011-09-01  Jose Ruiz  <ruiz@adacore.com>
5081
5082         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
5083         aspect.
5084         * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
5085         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
5086         in a similar way as we do for the Priority or Dispatching_Domain aspect.
5087         * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
5088         Dispatching_Domains_Frozen): Move this local data to package
5089         System.Tasking because with the CPU aspect we need to have access
5090         to this data when creating the task in System.Tasking.Stages.Create_Task
5091         * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
5092         Move these variables from the body of
5093         System.Multiprocessors.Dispatching_Domains because with the CPU aspect
5094         we need to have access to this data when creating the task in
5095         System.Tasking.Stages.Create_Task.
5096         * s-taskin.adb (Initialize): Signal the allocation of the environment
5097         task to a CPU, if any, so that we know whether the CPU can be
5098         transferred to a different dispatching domain.
5099         * s-tassta.adb (Create_Task): Check whether the CPU to which this task
5100         is being allocated belongs to the dispatching domain where the task
5101         lives. Signal the allocation of the task to a CPU, if any, so that we
5102         know whether the CPU can be transferred to a different dispatching
5103         domain.
5104
5105 2011-09-01  Ed Schonberg  <schonberg@adacore.com>
5106
5107         * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
5108         attributes Same_Storage and Overlaps_Storage.
5109
5110 2011-09-01  Hristian Kirtchev  <kirtchev@adacore.com>
5111
5112         * exp_strm.adb: Remove with and use clause for Opt.
5113         (Build_Array_Input_Function): Remove the version-dependent generation
5114         of the return statement. The Ada 2005 tree is now the default.
5115
5116 2011-09-01  Yannick Moy  <moy@adacore.com>
5117
5118         * put_alfa.adb: Unconditionnally write files in Alfa section, so that
5119         it is never empty when compiling in Alfa mode.
5120
5121 2011-09-01  Robert Dewar  <dewar@adacore.com>
5122
5123         * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
5124         comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
5125         s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
5126         gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
5127
5128 2011-09-01  Matthew Heaney  <heaney@adacore.com>
5129
5130         * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
5131         a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
5132         * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
5133         * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
5134         unbounded queue container.
5135         * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
5136         bounded queue container.
5137         * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
5138         unbounded priority queue container.
5139         * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
5140         bounded priority queue container.
5141
5142 2011-08-31  Pascal Obry  <obry@adacore.com>
5143
5144         * a-direct.adb: Do not try to create an UNC path on Windows.
5145         (Create_Path): Skip leading computer name in UNC path if any.
5146
5147 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5148
5149         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
5150         version-dependent generation of the return statement. The Ada 2005 tree
5151         is now the default.
5152
5153 2011-08-31  Thomas Quinot  <quinot@adacore.com>
5154
5155         * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
5156         types Stream_Element_Offset and Storage_Offset have a different native
5157         type depending on whether the platform is 32 or 64 bits. When
5158         exchanging them, always convert to 64 bits.
5159
5160 2011-08-31  Yannick Moy  <moy@adacore.com>
5161
5162         * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
5163         --force-alfa to gnat2why.
5164
5165 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5166
5167         * sem_ch12.adb (Save_References): If the node has aspects, save
5168         references within the corresponding expressions in a separate step,
5169         because the aspects are not directly in the tree for the declaration
5170         to which they belong.
5171
5172 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
5173
5174         * freeze.adb (Freeze_Record_Type): Omit test on variable size component
5175         in CodePeer mode, since representation clauses are partially ignored.
5176         * gcc-interface/Make-lang.in: Update dependencies.
5177
5178 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5179
5180         * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5181         s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
5182         to any dispatching domain.
5183
5184 2011-08-31  Thomas Quinot  <quinot@adacore.com>
5185
5186         * exp_ch4.adb: Minor reformatting.
5187
5188 2011-08-31  Bob Duff  <duff@adacore.com>
5189
5190         * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
5191         on nodes for which it is not defined.
5192         (Is_Non_Overriding_Operation): Exit the loop when we find a generic
5193         parent type.
5194
5195 2011-08-31  Bob Duff  <duff@adacore.com>
5196
5197         * sem_ch3.adb (Process_Full_View): Disable legality check if
5198         In_Instance, to avoid spurious errors.
5199         * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
5200         if In_Instance, to avoid spurious errors.
5201
5202 2011-08-31  Pascal Obry  <obry@adacore.com>
5203
5204         * a-direct.adb: Use Dir_Seps everywhere to properly handle all
5205         directory speparators.
5206         (Compose): Use Dir_Seps to handle both forms.
5207         (Create_Path): Use Dir_Seps instead of explicit check, no semantic
5208         changes.
5209         (Extension): Use Dir_Seps to handle both forms.
5210
5211 2011-08-31  Pascal Obry  <obry@adacore.com>
5212
5213         * prj-conf.adb: Minor reformatting.
5214
5215 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5216
5217         * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
5218         dispatching domain aspect.
5219         * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
5220         aspect.
5221         * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
5222         Dispatching_Domain aspect in a similar way as we do for the Priority
5223         aspect.
5224         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
5225         Dispatching_Domain component if a Dispatching_Domain pragma or aspect
5226         is present.
5227         (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
5228         * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
5229         * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
5230         Dispatching_Domain and add it to the task definition.
5231         (Sig_Flags): Add Pragma_Dispatching_Domain.
5232         * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
5233         support to find the types Dispatching_Domain and
5234         Dispatching_Domain_Access.
5235         * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
5236         Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
5237         query the availability of a pragma Dispatching_Domain.
5238         * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
5239         the expander to pass the Dispatching_Domain when creating a task.
5240         (Name_Dispatching_Domain): Add this new name for a pragma.
5241         (Pragma_Id): Add the new Pragma_Dispatching_Domain.
5242         * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
5243         task has been allocated at creation time.
5244         * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
5245         Ravenscar is always null.
5246         * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
5247         the task has been allocated at creation time.
5248         * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
5249         a specific dispatching domain.
5250         * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
5251         s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
5252         and CPU are specified for the task, and the CPU value is not contained
5253         within the range of processors for the domain.
5254
5255 2011-08-31  Vincent Celier  <celier@adacore.com>
5256
5257         * make.adb (Original_Gcc) : New constant String_Access.
5258         (Gnatmake): For VM targets, do not use VM version of the compiler if
5259         --GCC= has been specified.
5260
5261 2011-08-31  Thomas Quinot  <quinot@adacore.com>
5262
5263         * sem_ch5.adb: Minor reformatting.
5264
5265 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5266
5267         * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
5268         not reanalyze it.
5269
5270 2011-08-31  Bob Duff  <duff@adacore.com>
5271
5272         * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
5273         the access type is private; we don't care about privacy in expansion.
5274
5275 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5276
5277         * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
5278         subcomponents tnat may be limited, because they originate in view
5279         conflicts. If the original aggregate is legal and the actuals are
5280         legal, the aggregate itself is legal.
5281
5282 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5283
5284         * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
5285         status.
5286
5287 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5288
5289         * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
5290         errors in B tests.
5291
5292 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5293
5294         * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
5295         Interrupt_Priority aspects, force the analysis of the aspect expression
5296         (when building the equivalent pragma). Otherwise, its analysis is done
5297         too late, after the task or protected object has been created.
5298         * sem_ch9.adb (Analyze_Single_Protected_Declaration,
5299         Analyze_Single_Task_Declaration): Remove the code to move the aspects
5300         to the object declaration because they are needed in the type
5301         declaration.
5302
5303 2011-08-31  Robert Dewar  <dewar@adacore.com>
5304
5305         * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
5306         a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
5307         reformatting.
5308
5309 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5310
5311         * exp_util.adb (Find_Protection_Type): Do not look for fields _object
5312         if the corresponding type is malformed due to restriction violations.
5313
5314 2011-08-31  Robert Dewar  <dewar@adacore.com>
5315
5316         * s-ransee.ads, s-ransee.adb: Minor reformatting.
5317
5318 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5319
5320         * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
5321         would cause the generation of Set_Finalize_Address if the target is a
5322         VM and the designated type is not derived from [Limited_]Controlled.
5323
5324 2011-08-31  Arnaud Charlet  <charlet@adacore.com>
5325
5326         * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
5327         subprogram.
5328         (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
5329         case of a compilation error.
5330
5331 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5332
5333         * init.c (__gnat_error_handler): Standardize the stack overflow or
5334         erroneous memory access message.
5335         * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
5336         or erroneous memory access message.
5337
5338 2011-08-31  Robert Dewar  <dewar@adacore.com>
5339
5340         * sem_ch4.adb: Minor reformatting.
5341         * sem_ch6.adb: Minor code reorganization (use Ekind_In).
5342
5343 2011-08-31  Thomas Quinot  <quinot@adacore.com>
5344
5345         * scos.ads: Minor documentation clarification.
5346         * put_scos.adb: Do not generate SCO unit header line for a unit that
5347         has no SCO lines.
5348
5349 2011-08-31  Robert Dewar  <dewar@adacore.com>
5350
5351         * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
5352
5353 2011-08-31  Tristan Gingold  <gingold@adacore.com>
5354
5355         * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
5356         hold variables between these following subprograms.
5357         (Build_Exception_Handler, Build_Object_Declarations,
5358         Build_Raise_Statement): Use the above type as parameter.
5359         Make the above adjustments.
5360         * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
5361
5362 2011-08-31  Pascal Obry  <obry@adacore.com>
5363
5364         * projects.texi: Minor reformatting.
5365
5366 2011-08-31  Tristan Gingold  <gingold@adacore.com>
5367
5368         * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
5369         * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
5370
5371 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5372
5373         * exp_ch5.adb: Minor code cleanup.
5374         * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
5375         prevent cascaded errors.
5376         (Analyze_Loop_Statement): In semantics-only mode, introduce loop
5377         variable of an iterator specification in current scope.
5378         * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
5379         postconditions on the stack, as they contain no return statements.
5380
5381 2011-08-31  Yannick Moy  <moy@adacore.com>
5382
5383         * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
5384         Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
5385         call Qualify_Entity_Names.
5386         (Expand_Alfa): call Qualify_Entity_Names in more cases
5387         * lib-xref-alfa.adb: Take into account system package.
5388         * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
5389         CodePeer mode in which we are interested in finding bugs even if
5390         compiler cannot compile source.
5391         * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
5392         deferred constant.
5393
5394 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5395
5396         * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
5397         denoted by the subtype mark to ensure getting the concurrent type in
5398         the case where the subtype mark denotes a private subtype of a
5399         concurrent type (needed when using -gnatc).
5400         (Process_Subtype): For the processing specific to type kinds, case on
5401         the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
5402         subtype denotes a private subtype whose base type is nonprivate (needed
5403         for subtypes of private fulfilled by task types when compiling with
5404         -gnatc).
5405
5406 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5407
5408         * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
5409         late primitives that override interface operations when the full
5410         expander is not active, to avoid blowups in Register_Primitive when
5411         types don't have associated secondary dispatch tables.
5412
5413 2011-08-31  Yannick Moy  <moy@adacore.com>
5414
5415         * alfa_test.adb: Code clean up.
5416
5417 2011-08-31  Marc Sango  <sango@adacore.com>
5418
5419         * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
5420         by Comes_From_Source (Original_Node (N)) in order to treat also the
5421         nodes which have been rewritten.
5422         * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
5423         explicit dereference and slice violation in spark mode on the nodes 
5424         coming only from the source code.
5425
5426 2011-08-31  Robert Dewar  <dewar@adacore.com>
5427
5428         * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
5429         lib-xref-alfa.adb: Minor reformatting.
5430
5431 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5432
5433         * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
5434
5435 2011-08-31  Javier Miranda  <miranda@adacore.com>
5436
5437         * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
5438         only for class-wide subprograms conflicting with entities of concurrent
5439         tagged types.
5440
5441 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5442
5443         * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
5444         node to null value.
5445
5446 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5447
5448         * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
5449         general description of the routine.
5450
5451 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5452
5453         * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
5454         doubly-linked lists.
5455
5456 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5457
5458         * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
5459         check is needed for a left-hand side that is a dereference, and the
5460         base type is private without discriminants (whereas the full type does
5461         have discriminants), an extra retrieval of the underlying type may be
5462         needed in the case where the subtype is a record subtype whose base
5463         type is private. Update comments.
5464
5465 2011-08-31  Javier Miranda  <miranda@adacore.com>
5466
5467         * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
5468         found check if there is a class-wide subprogram covering the primitive.
5469         
5470 2011-08-31  Yannick Moy  <moy@adacore.com>
5471
5472         * sem_res.adb: Further cases where full expansion test is needed,
5473         rather than expansion test.
5474
5475 2011-08-31  Pascal Obry  <obry@adacore.com>
5476
5477         * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
5478
5479 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5480
5481         * exp_ch5.adb: Handle iterators over derived container types.
5482
5483 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5484
5485         * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
5486         (Has_Anonymous_Master): New routine.
5487         (Set_Has_Anonymous_Master): New routine.
5488         (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
5489         * exp_ch4.adb: Add with and use clause for Sem_Ch8.
5490         (Current_Anonymous_Master): New routine.
5491         (Current_Unit_First_Declaration): Removed.
5492         (Current_Unit_Scope): Removed.
5493         (Expand_N_Allocator): Anonymous access-to-controlled types now chain
5494         their objects on a per-unit heterogeneous finalization master.
5495
5496 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5497
5498         * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
5499         array.
5500
5501 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5502
5503         * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
5504         when not needed.
5505
5506 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5507
5508         * sem_disp.adb (Propagate_Tag): Return without propagating in the case
5509         where the actual is an unexpanded call to 'Input.
5510
5511 2011-08-31  Yannick Moy  <moy@adacore.com>
5512
5513         * sem_ch4.adb: Code clean up.
5514
5515 2011-08-31  Yannick Moy  <moy@adacore.com>
5516
5517         * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
5518
5519 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5520
5521         * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
5522         and TSS primitive Finalize_Address if finalization is suppressed.
5523         (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
5524         primitive Finalize_Address if finalization is suppressed.
5525
5526 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5527
5528         * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
5529         s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
5530         sure that the underlying task has already been created before trying
5531         to change its affinity.
5532         (Set_CPU): Use the term processor instead of CPU, as we do in
5533         Assign_Task.
5534
5535 2011-08-31  Vincent Celier  <celier@adacore.com>
5536
5537         * prj-attr.adb: New Compiler attribute Source_File_Switches.
5538         * prj-nmsc.adb (Process_Compiler): Process attribute
5539         Source_File_Switches.
5540         * prj.ads (Language_Config): New name list component
5541         Name_Source_File_Switches.
5542         * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
5543
5544 2011-08-31  Ed Schonberg  <schonberg@adacore.com>
5545
5546         * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
5547         discriminated component of an actual, expand at once to prevent
5548         ouf-of-order references with generated subtypes.
5549
5550 2011-08-31  Yannick Moy  <moy@adacore.com>
5551
5552         * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
5553         reference to operator in Alfa xrefs.
5554
5555 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5556
5557         * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
5558         where the parent instance was frozen before the current instance due to
5559         the presence of a source body. Update calls to Insert_After_Last_Decl.
5560         (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
5561         Update the comment which illustrates the purpose of the routine.
5562         Package instances are now frozen by source bodies which appear after
5563         the instance. This ensures that entities coming from within the
5564         instance are available for use in the said bodies.
5565         (Install_Body): Add code to handle the case where the parent instance
5566         was frozen before the current instance due to the presence of a source
5567         body. Update calls to Insert_After_Last_Decl.
5568
5569 2011-08-31  Jose Ruiz  <ruiz@adacore.com>
5570
5571         * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
5572         access types.
5573         * affinity.c (__gnat_set_affinity_mask): Declare index variable.
5574
5575 2011-08-31  Yannick Moy  <moy@adacore.com>
5576
5577         * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
5578         full-expander test.
5579         * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
5580         errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
5581         freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
5582         lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
5583         opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
5584         sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5585         sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
5586         ALFA in Alfa (we dropped acronym).
5587         * einfo.adb (Primitive_Operations): Correctly return list of primitive
5588         operations in a case where it returned previously No_Elist.
5589
5590 2011-08-31  Robert Dewar  <dewar@adacore.com>
5591
5592         * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
5593         s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
5594         sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
5595         s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
5596         s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
5597         s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
5598         reformatting.
5599
5600 2011-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
5601
5602         * sem_ch12 (Check_Private_View): Revert previous change.
5603         * sem_res.adb (Conversion_Check): Do not emit the error message if the
5604         conversion is in a generic instance.
5605
5606 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5607
5608         * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
5609         * a-chtgbo.adb (Free): Allow 0 as index value.
5610
5611 2011-08-31  Matthew Heaney  <heaney@adacore.com>
5612
5613         * a-cborma.adb (Insert): Add comment to explain why no element
5614         assignment.
5615
5616 2011-08-31  Gary Dismukes  <dismukes@adacore.com>
5617
5618         * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
5619         spec discriminant is already a concurrent type, in which case just use
5620         it, otherwise fetch the Corresponding_Concurrent_Type as before.
5621
5622 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5623
5624         * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
5625         system-linux-mips.ads, system-linux-mipsel.ads,
5626         system-linux-mips64el.ads, system-linux-ppc64.ads,
5627         system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
5628
5629 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5630
5631         * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
5632         * gcc-interface/utils2.c (build_binary_op): Tighten condition.
5633         (build_unary_op): Likewise.
5634
5635 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5636
5637         * raise-gcc.c: Do not include coretypes.h and tm.h.
5638         (setup_to_install): Remove test for compiler macro.
5639         * targext.c: Document use for the library.
5640         * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
5641
5642 2011-08-30  Eric Botcazou  <ebotcazou@adacore.com>
5643
5644         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
5645         the expression to the nominal type if the latter is a record type with
5646         a variant part and the type of the former is a record type without one.
5647
5648 2011-08-30  Yannick Moy  <moy@adacore.com>
5649
5650         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5651         expansion in Alfa mode.
5652         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
5653         * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
5654         Alfa mode.
5655         * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
5656         * sem_res.adb: Ditto.
5657         * gcc-interface/Make-lang.in: Update dependencies.
5658
5659 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5660
5661         * g-socket.ads: Minor documentation adjustment.
5662
5663 2011-08-30  Robert Dewar  <dewar@adacore.com>
5664
5665         * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
5666
5667 2011-08-30  Yannick Moy  <moy@adacore.com>
5668
5669         * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
5670         exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
5671         exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
5672         gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
5673         Revert change which introduced files for "light"
5674         expansion, to be replaced by a single file for Alfa expansion.
5675
5676 2011-08-30  Robert Dewar  <dewar@adacore.com>
5677
5678         * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
5679         Minor code reorg/reformatting.
5680
5681 2011-08-30  Yannick Moy  <moy@adacore.com>
5682
5683         * opt.adb, opt.ads (Full_Expander_Active): New function defines a
5684         common shorthand for (Expander_Active and not ALFA_Mode) that can be
5685         used for testing full expansion, that is active expansion not in the
5686         reduced mode for Alfa
5687         * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
5688         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
5689         of the verbose (Expander_Active and not ALFA_Mode)
5690
5691 2011-08-30  Tristan Gingold  <gingold@adacore.com>
5692
5693         * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
5694         s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5695         s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
5696         Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
5697
5698 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
5699
5700         * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
5701         access conversions to check that the conversion is a rewritten node,
5702         rather than just having Comes_From_Source set to False, which wasn't
5703         sufficient.
5704
5705 2011-08-30  Robert Dewar  <dewar@adacore.com>
5706
5707         * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
5708         g-socket.ads: Minor reformatting.
5709
5710 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5711
5712         * sem_util.adb: Minor reformatting.
5713
5714 2011-08-30  Tristan Gingold  <gingold@adacore.com>
5715
5716         * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
5717         to be compliant with the ABI.
5718
5719 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
5720
5721         * sem_ch12.adb (Check_Private_View): Exchange the private and full view
5722         of a designated type when the related access type is an actual in an
5723         instance. This ensures that the full view of designated type is
5724         available when inside the body of the instance.
5725
5726 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5727
5728         * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
5729         in a position to be modified, a slice is treated like an indexed
5730         component.
5731
5732 2011-08-30  Thomas Quinot  <quinot@adacore.com>
5733
5734         * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
5735         field tv_sec in struct timeval.
5736
5737 2011-08-30  Yannick Moy  <moy@adacore.com>
5738
5739         * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
5740         blocks of code doing full expansion, previously only guarded by
5741         Expander_Active, by anding the test that ALFA_Mode is not set
5742
5743 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5744
5745         * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
5746         add the function to the list of private dependents, for subsequent
5747         legality check on Taft amendment types.
5748         * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
5749         Private_Dependents, as for other incomplete types.
5750         * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
5751         Taft-amendment type is used as the return type of a function.
5752
5753 2011-08-30  Javier Miranda  <miranda@adacore.com>
5754
5755         * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
5756         which emits an error by a call to a new routine which report the error.
5757         * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
5758         entity does not cover an existing interface.
5759         * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
5760         code.
5761         * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
5762         protected procedures or entries whose mode is not conformant.
5763         (Check_Synchronized_Overriding): Code cleanup: replace code which emits
5764         an error by a call to a new routine which report the error.
5765
5766 2011-08-30  Robert Dewar  <dewar@adacore.com>
5767
5768         * gnat_rm.texi: Minor change.
5769         * exp_attr_light.adb: Minor reformatting.
5770
5771 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
5772
5773         * sem_ch3.adb: Patch inheritance of aspects in
5774         Complete_Private_Subtype, to avoid infinite loop.
5775
5776 2011-08-30  Javier Miranda  <miranda@adacore.com>
5777
5778         * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
5779         been reported and a subprogram covering an interface primitive is not
5780         found then skip generating the internal entity. Done to avoid crashing
5781         the frontend.
5782         (Check_Abstract_Overriding): Change text of error of wrong formal of
5783         protected subprogram or entry. Done for consistency to emit exactly the
5784         same error reported by Check_Synchronized_Overriding. In addition, the
5785         error is restricted to protected types (bug found working on AI05-0090)
5786
5787 2011-08-30  Yannick Moy  <moy@adacore.com>
5788
5789         * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
5790         expansion in Alfa mode.
5791         * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
5792         * exp_light.adb, exp_light.ads: New package defining light expansion.
5793         * expander.adb (Expand): Call light expansion in Alfa mode
5794         * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
5795         constructs.
5796         * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
5797         constructs.
5798         * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
5799         * gnat1drv.adb (Adjust_Global_Switches): Comment
5800
5801 2011-08-30  Yannick Moy  <moy@adacore.com>
5802
5803         * lib-xref-alfa.adb: Minor refactoring.
5804
5805 2011-08-30  Yannick Moy  <moy@adacore.com>
5806
5807         * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
5808         mode.
5809         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
5810         expansion in Alfa mode.
5811         * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
5812         mode.
5813
5814 2011-08-30  Robert Dewar  <dewar@adacore.com>
5815
5816         * debug_a.adb: Update comment.
5817
5818 2011-08-30  Robert Dewar  <dewar@adacore.com>
5819
5820         * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
5821         sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
5822         exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
5823         sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
5824
5825 2011-08-30  Robert Dewar  <dewar@adacore.com>
5826
5827         * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
5828         volatile.
5829
5830 2011-08-30  Hristian Kirtchev  <kirtchev@adacore.com>
5831
5832         * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
5833         Build_Finalization_Master by supplying an insertion node and enclosing
5834         scope. In its old version, the call did not generate a finalization
5835         master.
5836         (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
5837         recognize anonymous access-to-controlled components. Rewrite the
5838         machinery which creates finalization masters to service anonymous
5839         access-to-controlled components of a record type. In its current state,
5840         only one heterogeneous master is necessary to handle multiple anonymous
5841         components.
5842         (Freeze_Type): Comment reformatting.
5843         * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
5844         RE_Unit_Table.
5845         * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
5846         associates TSS primitive Finalize_Address with either the master itself
5847         or with the internal hash table depending on the mode of operation of
5848         the master.
5849
5850 2011-08-30  Javier Miranda  <miranda@adacore.com>
5851
5852         * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
5853         interface type then do not generate code to compare this component.
5854         Required since they have no components and their equality operator is
5855         abstract.
5856
5857 2011-08-30  Steve Baird  <baird@adacore.com>
5858
5859         * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
5860         of a saooaaat (i.e, a stand-alone object of an anonymous access type),
5861         returns the (static) accessibility level of the object. Otherwise, the
5862         same as Type_Access_Level.
5863         (Dynamic_Accessibility_Level): New function; given an expression which
5864         could occur as the rhs of an assignment to a saooaaat (i.e., an
5865         expression of an access-to-object type), return the new value for the
5866         saooaaat's associated Extra_Accessibility object.
5867         (Effective_Extra_Accessibility): New function; same as
5868         Einfo.Extra_Accessibility except that object renames are looked through.
5869         * sem_util.adb 
5870         (Deepest_Type_Access_Level): New function; see sem_util.ads description.
5871         (Dynamic_Accessibility_Level): New function; see sem_util.ads
5872         description.
5873         (Effective_Extra_Accessibility): New function; see sem_util.ads
5874         description.
5875         * einfo.ads (Is_Local_Anonymous_Access): Update comments.
5876         (Extra_Accessibility): Update comments.
5877         (Init_Object_Size_Align): New procedure; same as Init_Size_Align
5878         except RM_Size field (which is only for types) is unaffected.
5879         * einfo.adb
5880         (Extra_Accessibility): Expand domain to allow objects, not just formals.
5881         (Set_Extra_Accessibility): Expand domain to allow objects, not just
5882         formals.
5883         (Init_Size): Add assertion that we are not trashing the
5884         Extra_Accessibility attribute of an object.
5885         (Init_Size_Align): Add assertion that we are not trashing the
5886         Extra_Accessibility attribute of an object.
5887         (Init_Object_Size_Align): New procedure; see einfo.ads description.
5888         * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
5889         differently for the type of a (non-library-level) saooaaat depending
5890         whether Ada_Version < Ada_2012. This is the only point where Ada_Version
5891         is queried in this set of changes - everything else (in particular,
5892         setting of the Extra_Accessibility attribute in exp_ch3.adb) is
5893         driven off of the setting of the Is_Local_Anonymous_Access attribute.
5894         The special treatment of library-level saooaaats is an optimization,
5895         not required for correctnesss. This is based on the observation that the
5896         Ada2012 rules (static and dynamic) for saooaaats turn out to be
5897         equivalent to the Ada2005 rules in the case of a library-level saooaaat.
5898         * exp_ch3.adb
5899         (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
5900         false for the type of a saooaaat, declare and initialize its
5901         accessibility level object and set the Extra_Accessibility attribute
5902         of the saooaaat to refer to this object.
5903         * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
5904         * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
5905         calls to Effective_Extra_Accessibility in order to support
5906         renames of saooaaats.
5907         (Expand_N_Type_Conversion): Add new local function,
5908         Has_Extra_Accessibility, and call it when determining whether an
5909         accessibility check is needed.
5910         It returns True iff Present (Effective_Extra_Accessibility (Id)) would
5911         evaluate to True (without raising an exception).
5912         * exp_ch5.adb
5913         (Expand_N_Assignment_Statement): When assigning to an Ada2012
5914         saooaaat, update its associated Extra_Accessibility object (if
5915         it has one). This includes an accessibility check.
5916         * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
5917         a saooaaat, update its Extra_Accessibility object too (if it
5918         has one).
5919         (Expand_Call): Replace a couple of calls to Type_Access_Level
5920         with calls to Dynamic_Access_Level to handle cases where
5921         passing a literal (any literal) is incorrect.
5922         * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
5923         checks associated with "Saooaat := Some_Object'Access;"; this must
5924         be rejected if Some_Object is declared in a more nested scope
5925         than Saooaat.
5926         * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
5927         assignment to a saooaaat even if Is_Local_Anonymous_Access
5928         returns False for its type (indicating a 2012-style saooaaat).
5929         * sem_ch8.adb
5930         (Analyze_Object_Renaming): Replace a call to Init_Size_Align
5931         (which is only appropriate for objects, not types) with a call
5932         of Init_Object_Size_Align in order to avoid trashing the
5933         Extra_Accessibility attribute of a rename (the two attributes
5934         share storage).
5935         * sem_res.adb
5936         (Valid_Conversion) Replace six calls to Type_Access_Level with
5937         calls to Deepest_Type_Access_Level. This is a bit tricky. For an
5938         Ada2012 non-library-level saooaaat, the former returns library level
5939         while the latter returns the (static) accessibility level of the
5940         saooaaat. A type conversion to the anonymous type of a saooaaat
5941         can only occur as part of an assignment to the saooaaat, so we
5942         know that such a conversion must be in a lhs context, so Deepest
5943         yields the result that we need. If such a conversion could occur,
5944         say, as the operand of an equality operator, then this might not
5945         be right. Also add a test so that static accessibilty checks are
5946         performed for converting to a saooaaat's type even if
5947         Is_Local_Anonymous_Access yields False for the type.
5948
5949 2011-08-30  Javier Miranda  <miranda@adacore.com>
5950
5951         * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
5952         controls generation of a warning associated with late declaration of
5953         dispatching functions. Required to avoid generating spurious
5954         warnings.
5955
5956 2011-08-30  Gary Dismukes  <dismukes@adacore.com>
5957
5958         * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
5959         return object has an anonymous access type and the function's type is
5960         a named access type.
5961         * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
5962         conversions on implicit conversions, since such conversions can occur
5963         for anonymous access cases due to expansion. Issue error for attempt
5964         to rename an anonymous expression as an object of a named access type.
5965         * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
5966         to indicate whether this function should report errors on invalid
5967         conversions.
5968         * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
5969         the expression is of an anonymous access type and the expected type is
5970         a named general access type, rewrite the expression as a type
5971         conversion, unless this is an expression of a membership test.
5972         (Valid_Conversion.Error_Msg_N): New procedure that conditions the
5973         calling of Error_Msg_N on new formal Report_Errs.
5974         (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
5975         calling of Error_Msg_NE on new formal Report_Errs.
5976         (Valid_Conversion): Move declaration of this function to the package
5977         spec, to allow calls from membership test processing. For Ada 2012,
5978         enforce legality restrictions on implicit conversions of anonymous
5979         access values to general access types, disallowing such conversions in
5980         cases where the expression has a dynamic accessibility level (access
5981         parameters, stand-alone anonymous access objects, or a component of a
5982         dereference of one of the first two cases).
5983         * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
5984         in the context of a named general access expected type.
5985         * exp_ch4.adb Add with and use of Exp_Ch2.
5986         (Expand_N_In): Add processing for membership tests applied to
5987         expressions of an anonymous access type. First, Valid_Conversion is
5988         called to check whether the test is statically False, and then the
5989         conversion is expanded to test that the expression's accessibility
5990         level is no deeper than that of the tested type. In the case of
5991         anonymous access-to-tagged types, a tagged membership test is applied
5992         as well.
5993         (Tagged_Membership): Extend to handle access type cases, applying the
5994         test to the designated types.
5995         * exp_ch6.adb (Expand_Call): When creating an extra actual for an
5996         accessibility level, and the actual is a 'Access applied to a current
5997         instance, pass the accessibility level of the type of the current
5998         instance rather than applying Object_Access_Level to the prefix. Add a
5999         ??? comment, since this level isn't quite right either (will eventually
6000         need to pass an implicit level parameter to init procs).
6001
6002 2011-08-30  Bob Duff  <duff@adacore.com>
6003
6004         * s-taskin.ads: Minor comment fix.
6005
6006 2011-08-30  Ed Schonberg  <schonberg@adacore.com>
6007
6008         * sem_res.adb (Check_Parameterless_Call): If the node is a selected
6009         component and the selector is a dispatching operation, check if it is
6010         a prefixed call before rewriting as a parameterless function call.
6011
6012 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
6013
6014         * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
6015         tsystem.h into $(RTSDIR) instead of rts.
6016
6017 2011-08-29  Robert Dewar  <dewar@adacore.com>
6018
6019         * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
6020         reformatting.
6021         * gcc-interface/Make-lang.in: Update dependencies.
6022
6023 2011-08-29  Yannick Moy  <moy@adacore.com>
6024
6025         * alfa.ads (Name_Of_Heap_Variable): New constant name.
6026         * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
6027         table to hold dereferences.
6028         (Add_ALFA_Xrefs): Take into account dereferences as special
6029         reads/writes to the variable "HEAP".
6030         (Enclosing_Subprogram_Or_Package): Move subprogram here.
6031         (Generate_Dereference): New procedure to store a read/write dereferencew
6032         in the table Drefs.
6033         * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
6034         the special "HEAP" var.
6035         * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
6036         in ALFA mode.
6037         * sem_util.adb (Note_Possible_Modification): Store write dereference
6038         in ALFA mode.
6039
6040 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6041
6042         * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
6043         ensures that the level of the subpool access type is not deeper than
6044         that of the pool object.
6045         * sem_util.adb (Object_Access_Level): Expand to handle defining
6046         identifiers.
6047         * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
6048         subpool handle name of a rewritten allocator.
6049
6050 2011-08-29  Robert Dewar  <dewar@adacore.com>
6051
6052         * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
6053
6054 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6055
6056         * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
6057         values, we generate multiple triples of parameters in the TypeCode.
6058         Bump Choice_Index for each such triple so that a subsequent default
6059         choice is associated with the correct index in the typecode.
6060
6061 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6062
6063         * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
6064         container.
6065         (First, Last): Handle properly an iterator over a null container.
6066
6067 2011-08-29  Bob Duff  <duff@adacore.com>
6068
6069         * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
6070         processing if we run across a node with no Scope. This can happen if
6071         we're with-ing an library-level instance, and that instance got errors
6072         that caused "instantiation abandoned".
6073         * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
6074         an exception instead of using Assert, so it won't go into an infinite
6075         loop, even when assertions are turned off.
6076
6077 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6078
6079         * a-coorse.adb: Proper handling of empty ordered sets.
6080
6081 2011-08-29  Johannes Kanig  <kanig@adacore.com>
6082
6083         * debug.adb: Add comments.
6084
6085 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6086
6087         * a-except.adb, a-except-2005.adb: Minor comment rewording and
6088         reformatting.
6089
6090 2011-08-29  Yannick Moy  <moy@adacore.com>
6091
6092         * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
6093         declaration for Itypes in Alfa mode.
6094
6095 2011-08-29  Robert Dewar  <dewar@adacore.com>
6096
6097         * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
6098         a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
6099         a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
6100         reformatting.
6101
6102 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6103
6104         * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
6105         package spec.
6106         * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
6107         * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
6108         while raising PE.
6109
6110 2011-08-29  Robert Dewar  <dewar@adacore.com>
6111
6112         * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
6113
6114 2011-08-29  Javier Miranda  <miranda@adacore.com>
6115
6116         * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
6117         renamings of formal subprograms when the actual for a formal type is
6118         class-wide.
6119
6120 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6121
6122         * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
6123         to Target.
6124
6125 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6126
6127         * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
6128         components of record type.
6129         * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
6130         to Target.
6131
6132 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6133
6134         * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
6135         a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
6136         container packages.
6137
6138 2011-08-29  Robert Dewar  <dewar@adacore.com>
6139
6140         * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
6141         reformatting.
6142
6143 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6144
6145         * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
6146         components of record type.
6147
6148 2011-08-29  Bob Duff  <duff@adacore.com>
6149
6150         * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
6151         by the termination handler.
6152
6153 2011-08-29  Yannick Moy  <moy@adacore.com>
6154
6155         * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
6156         created in Alfa mode, instead of inserting artificial declarations of
6157         non-Itypes in the tree.
6158         * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
6159         know if an Itype has a corresponding declaration, as defined in
6160         itypes.ads.
6161
6162 2011-08-29  Yannick Moy  <moy@adacore.com>
6163
6164         * gnat1drv.adb: Minor rewrite.
6165
6166 2011-08-29  Bob Duff  <duff@adacore.com>
6167
6168         * s-tasuti.adb (Make_Passive): Work around race condition in
6169         Make_Independent, which can cause Wait_Count to be zero. So instead of
6170         asserting that Wait_Count > 0, and then decrementing it, decrement it
6171         only if Wait_Count > 0.
6172         * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
6173         should be nonnegative, so declare them Natural instead of Integer.
6174
6175 2011-08-29  Robert Dewar  <dewar@adacore.com>
6176
6177         * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
6178         sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
6179         a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
6180         a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
6181         exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
6182
6183 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6184
6185         * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
6186
6187 2011-08-29  Vadim Godunko  <godunko@adacore.com>
6188
6189         * s-parint.ads: Minor comment clarification.
6190
6191 2011-08-29  Vincent Celier  <celier@adacore.com>
6192
6193         * prj.adb (Initialize): Make sure that new reserved words after Ada 95
6194         may be used as identifiers.
6195
6196 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6197
6198         * a-coinho.ads: Minor reformating.
6199
6200 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6201
6202         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
6203         container of a derived type.
6204
6205 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6206
6207         * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
6208         a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
6209
6210 2011-08-29  Pascal Obry  <obry@adacore.com>
6211
6212         * exp_disp.adb: Minor comment fix.
6213         (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
6214         to avoid warnings when compiling with -Wall.
6215         (Make_Disp_Conditional_Select_Body): Likewise.
6216         (Make_Disp_Timed_Select_Body): Likewise.
6217
6218 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6219
6220         * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
6221         an entity name, generate reference for it.
6222
6223 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6224
6225         * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
6226         iterator form.
6227         * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
6228         the class-wide type.
6229         * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
6230
6231 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6232
6233         * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
6234         subtype for an object whose type is an unconstrained union.
6235
6236 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6237
6238         * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
6239         is allowed in a component definition, by AI95-406.
6240
6241 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6242
6243         * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
6244
6245 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6246
6247         * a-except-2005.adb: Alphabetize all routines.
6248         (Triggered_By_Abort): New routine.
6249         * a-except-2005.ads (Triggered_By_Abort): New routine.
6250         * a-except.adb Alphabetize all routines.
6251         (Triggered_By_Abort): New routine.
6252         * a-except.ads (Triggered_By_Abort): New routine.
6253         * exp_ch7.adb: Update all comments involving the detection of aborts in
6254         finalization code.
6255         (Build_Object_Declarations): Do not generate code to detect the
6256         presence of an abort at the start of finalization code, use a runtime
6257         routine istead.
6258         * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
6259         RE_Unit_Table.
6260         * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
6261         allocate a task on a subpool.
6262         * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
6263         The flag disables all actions related to the maintenance of
6264         Finalize_Address_Table when subpools are not in use.
6265         (Allocate_Any_Controlled): Signal the machinery that subpools are in
6266         use.
6267         (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
6268         performs costly task locking when subpools are not in use.
6269
6270 2011-08-29  Yannick Moy  <moy@adacore.com>
6271
6272         * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
6273         types and dispatching calls in Alfa mode.
6274         * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
6275         correspondance between body and spec scopes, to reuse utility functions
6276         (Traverse_Declarations_Or_Statements): Protect access to body for stub
6277         by testing the presence of the library unit for the body
6278         * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
6279         mode the expansion of accept statements is skipped
6280         * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
6281         the unique entity corresponding to the one returned by
6282         Unique_Defining_Entity applied to the enclosing declaration of the
6283         argument.
6284
6285 2011-08-29  Bob Duff  <duff@adacore.com>
6286
6287         * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
6288         gdb when x is not a node (it can be a node list, name_id, etc). pp is
6289         an alias for pn. ppp is an alias for pt.
6290
6291 2011-08-29  Javier Miranda  <miranda@adacore.com>
6292
6293         * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
6294         aggregate to take a consistent decision on the need to convert into
6295         assignments aggregates that initialize constant objects.
6296
6297 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6298
6299         * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
6300         Build_Allocate_Deallocate_Proc in order to handle allocation of
6301         non-controlled objects on subpools.
6302         * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
6303         to be end-user visible.
6304         * s-finmas.adb: Add with and use clause for System.HTable.
6305         Add an instantiation of Simple_HTable which provides a mapping between
6306         the address of a controlled object and the corresponding
6307         Finalize_Address used to clean up the object. The table is used when a
6308         master is operating in heterogeneous mode.
6309         (Attach): Explain why the input node is not verified on being already
6310         attached.
6311         (Delete_Finalize_Address): New routine.
6312         (Detach): Add pragma Assert which ensures that a node is already
6313         attached.
6314         (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
6315         since nodes are no longer removed on traversal. Explain why node
6316         detachment is undesirable in this case.
6317         (Get_Finalize_Address): New routine.
6318         (Hash): New routine.
6319         (Is_Empty_List): Removed.
6320         (pm): Renamed to Print_Master. Add output for discriminant
6321         Is_Homogeneous.
6322         Comment reformatting.
6323         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6324         * s-finmas.ads: Various comments additions / improvements.
6325         Type Finalization_Master has a discriminant which determines the mode of
6326         operation.
6327         (Delete_Finalize_Address): New routine.
6328         (Get_Finalize_Address): New routine.
6329         (pm): Renamed to Print_Master.
6330         (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
6331         * s-stposu.adb: Add with clause for System.Address_Image; Add with and
6332         use clause for System.IO.
6333         (Allocate_Any_Controlled): Add machinery to set TSS primitive
6334         Finalize_Address depending on the mode of allocation and the mode of
6335         the master.
6336         (Deallocate_Any_Controlled): Remove the relation pair object -
6337         Finalize_Address regardless of the master mode. Add comment explaining
6338         the reason.
6339         (Detach): Ensure that fields Prev and Next are null after detachment.
6340         (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
6341         scheme to check whether the list of subpools is empty. There is no
6342         longer need to store the next subpool or advance the current pointer.
6343         (Is_Empty_List): New routine.
6344         (Print_Pool): New routine.
6345         (Print_Subpool): New routine.
6346         * s-stposu.ads: Various comments additions / improvements.
6347         Field Master of type Root_Subpool is now a heterogeneous collection.
6348         (Print_Pool): New routine.
6349         (Print_Subpool): New routine.
6350
6351 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6352
6353         * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
6354         forms, using aspects of container types.
6355         * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
6356         Has_Implicit_Dereference flags, that may be set on the partial view.
6357         * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
6358         container type with an indexing aspect.
6359         (Analyze_Quantified_Expression): Analyze construct with expansion
6360         disabled, because it will be rewritten as a loop during expansion.
6361         (Try_Container_Indexing): The prefix itself may be a container type
6362         with an indexing aspect, as with a vector of vectors.
6363         * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
6364         the original doamin of iteration, for name capture.
6365         (Analyze_Iterator_Specification): If the domain is an expression that
6366         needs finalization, create a separate declaration for it.
6367         For an iterator with "of" retrieve default iterator info from aspect of
6368         container type. For "in" iterator, retrieve type of Iterate function.
6369         * sem_ch13.adb (Check_Iterator_Function): Fix typo.
6370         (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
6371         analysis, to prevent spurious errors about late attributes.
6372         * sprint.adb: Handle quantified expression with either loop or iterator
6373         specification.
6374         * a-convec.ads, a-convec.adb: Iterate function returns a reversible
6375         iterator.
6376
6377 2011-08-29  Vincent Celier  <celier@adacore.com>
6378
6379         * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
6380         Binder or Linker of the main project file.
6381
6382 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6383
6384         * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
6385         unit.
6386
6387 2011-08-29  Yannick Moy  <moy@adacore.com>
6388
6389         * exp_ch9.adb: Partial revert of previous change for Alfa mode
6390
6391 2011-08-29  Yannick Moy  <moy@adacore.com>
6392
6393         * exp_ch11.adb: Minor expansion of comment.
6394
6395 2011-08-29  Yannick Moy  <moy@adacore.com>
6396
6397         * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
6398
6399 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6400
6401         * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
6402         interpretation, set the type before resolving the operands, because
6403         legality checks on an exponention operand need to know the type of the
6404         context.
6405
6406 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6407
6408         * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
6409         cleanups on a master if the instance is within a generic unit.
6410         Complement to the corresponding fix to inline.adb for K520-030.
6411
6412 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6413
6414         * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
6415         occurrence.
6416         * exp_intr.adb: Minor comment fix.
6417
6418 2011-08-29  Bob Duff  <duff@adacore.com>
6419
6420         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
6421         Delay_Required was used as an uninitialized variable.
6422
6423 2011-08-29  Robert Dewar  <dewar@adacore.com>
6424
6425         * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
6426         sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
6427         a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
6428
6429 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6430
6431         * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
6432         Remove unused variables.
6433
6434 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6435
6436         * sem_res.adb: Remove Build_Explicit_Dereference.
6437         * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
6438         from sem_res.adb, used in analysis of additional constructs.
6439         (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
6440         expansion of iterators.
6441         (Is_Object_Reference): Recognize variables rewritten as explicit
6442         dereferences in Ada2012.
6443         * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
6444         Reversible_Iterator names, for expansion of Ada2012 iterators.
6445         * aspects.ads, aspects.adb (Find_Aspect): Utility.
6446         * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
6447         linked list container.
6448         * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
6449         * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
6450
6451 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6452
6453         * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
6454         containers.
6455
6456 2011-08-29  Vincent Celier  <celier@adacore.com>
6457
6458         * make.adb (Gnatmake): Get the maximum number of simultaneous
6459         compilation processes after the Builder switches has been scanned, as
6460         there may include -jnn.
6461
6462 2011-08-29  Matthew Heaney  <heaney@adacore.com>
6463
6464         * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
6465
6466 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6467
6468         * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
6469         GNAT_DRIVER_COMMAND_LINE to 255.
6470
6471 2011-08-29  Pascal Obry  <obry@adacore.com>
6472
6473         * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
6474         reformatting and style fix (class attribute casing).
6475
6476 2011-08-29  Yannick Moy  <moy@adacore.com>
6477
6478         * exp_ch11.adb: Yet another case where expansion should be common
6479         between CodePeer and Alfa.
6480
6481 2011-08-29  Yannick Moy  <moy@adacore.com>
6482
6483         * exp_ch9.adb: Partial revert of previous change for Alfa mode.
6484
6485 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6486
6487         * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
6488         incomplete type and its completion match.
6489
6490 2011-08-29  Yannick Moy  <moy@adacore.com>
6491
6492         * exp_ch13.adb: Adjust previous change.
6493
6494 2011-08-29  Robert Dewar  <dewar@adacore.com>
6495
6496         * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
6497         exp_ch4.adb, sem_ch8.adb: Minor code reorganization
6498         Minor reformatting.
6499
6500 2011-08-29  Emmanuel Briot  <briot@adacore.com>
6501
6502         * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
6503         initialize aggregated projects.
6504
6505 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6506
6507         * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
6508         depth of candidates to resolve a potentially spurious ambiguity between
6509         two visible subprograms.
6510
6511 2011-08-29  Yannick Moy  <moy@adacore.com>
6512
6513         * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
6514         Requires/Ensures.
6515         * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
6516         Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
6517         Requires/Ensures.
6518
6519 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6520
6521         * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
6522         Add comment.
6523
6524 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6525
6526         * sem_res.adb: Minor reformatting.
6527
6528 2011-08-29  Johannes Kanig  <kanig@adacore.com>
6529
6530         * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
6531         mode.
6532         * gnat1drv.adb (Adjust_Global_Switches): Set
6533         Use_Expressions_With_Actions to False in ALFA mode.
6534         * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
6535         ALFA mode.
6536
6537 2011-08-29  Yannick Moy  <moy@adacore.com>
6538
6539         * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
6540         * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
6541         * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
6542         tagged types and dispatching calls in Alfa mode.
6543
6544 2011-08-29  Javier Miranda  <miranda@adacore.com>
6545
6546         * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
6547         we do not report an error on an Empty node.
6548
6549 2011-08-29  Geert Bosch  <bosch@adacore.com>
6550
6551         * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
6552         a-nlrear.o and a-nurear.o.
6553
6554 2011-08-29  Robert Dewar  <dewar@adacore.com>
6555
6556         * freeze.adb: Minor code reorganization.
6557         Minor reformatting.
6558         * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
6559         sem_ch6.adb: Minor reformatting
6560
6561 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6562
6563         * s-except.ads, s-except.adb: Provide dummy body.
6564
6565 2011-08-29  Yannick Moy  <moy@adacore.com>
6566
6567         * sem_warn.adb (Within_Postcondition): Take into account the case of
6568         an Ensures component in a Test_Case.
6569
6570 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6571
6572         * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
6573         * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
6574         System_Exceptions_Debug
6575         (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
6576         * a-except.adb: With and use System.Exceptions_Debug instead of
6577         System.Exceptions.
6578         * a-except-2005.adb: Likewise.
6579         * s-assert.adb: Likewise.
6580         * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
6581         * Makefile.rtl: Add s-excdeb.  Adjust compilation rule.
6582         * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
6583         s-excdeb. Update dependencies.
6584         (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
6585         as these no longer need external libraries.
6586
6587 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6588
6589         * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
6590         exponentiation operator on universal values in a context that requires
6591         a fixed-point type.
6592
6593 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6594
6595         * raise-gcc.c (personnality_routine): Fix thinko.  Set Ada occurrence
6596         before calling notify_handled_exception.
6597         * a-exextr.adb: Fix comment.
6598
6599 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6600
6601         * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
6602         Finalize_Address of the access type's finalization master.
6603         (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
6604         access type's finalization master. Add a guard to prevent
6605         Associated_Storage_Pool from being set on .NET/JVM.
6606         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
6607         attribute Finalize_Address of the access type's finalization master.
6608         * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
6609         * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
6610         * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
6611         RE_Unit_Table.
6612         * s-finmas.adb: Add with clause for System.Address_Image. Add with and
6613         use clause for System.IO
6614         (Detach): Relax the assertion, to be reinstated later.
6615         (Finalize): Rewrite the iteration loop to avoid pointer comparison.
6616         Relax the assertion on Finalize_Address, to be reinstated later.
6617         (Is_Empty_List): New routine.
6618         (pm): New debug routine.
6619         (Set_Finalize_Address): New routine.
6620         * s-finmas.ads (pm): New debug routine.
6621         (Set_Finalize_Address): New routine.
6622         * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
6623
6624 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6625
6626         * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
6627         Remove convention C.
6628
6629 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6630
6631         * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
6632         (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
6633         (Finalize_TCB): Remove its finalization.
6634         (Initialize): Remove assignment of GET_Exc_Stack_Addr
6635         * s-soflin.adb (NT_Exc_Stack): Remove
6636         (Get_Exc_Stack_Addr_NT): Likewise.
6637         (Get_Exc_Stack_Addr_Soft): Likewise.
6638         * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
6639         (Get_Exc_Stack_Addr): Likewise.
6640         (Get_Exc_Stack_Addr_Soft): Likewise
6641         * s-taspri-vms.ads (Exc_Stack_T): Remove.
6642         (Exc_Stack_Ptr_T): Likewise.
6643         (Private_Data): Remove Exc_Stack_Ptr component.
6644
6645 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6646
6647         * raise-gcc.c (get_ip_from_context): New function. Factorize code.
6648
6649 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6650
6651         * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
6652
6653 2011-08-29  Geert Bosch  <bosch@adacore.com>
6654
6655         * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
6656         L2_Norm, Swap_Column): New generic subprograms
6657         * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
6658         L2_Norm, Swap_Column): Implement new subprograms in order to
6659         eliminate dependency on BLAS and LAPACK libraries in
6660         Ada.Numerics.Generic_Real_Arrays and eventually also the complex
6661         version. Forward_Eliminate/Back_Substitute can be used to put a
6662         matrix in row echelon or reduced row echelon form using partial
6663         pivoting.
6664         * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
6665         Swap_Column): Instantiate from System.Generic_Array_Operations.
6666         ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
6667         (Sqrt): Local function for simple computation of square root without
6668         adding dependencies on Generic_Elementary_Functions.
6669         (Swap): New subprogram to exchange floating point numbers.
6670         (Inverse): Reimplement using Jordan-Gauss elimination.
6671         (Jacobi): New procedure implementing Jacobi's method for computation
6672         of eigensystems, based on Rutishauser's implementation.
6673         (L2_Norm): Implement directly using the inner product.
6674         (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
6675         decreasing eigenvalue as required by the Ada RM.
6676         (Swap_Column): New helper procedure for Sort_Eigensystem.
6677         Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
6678         Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
6679         Sort_Eigensystems.
6680
6681 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6682
6683         * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
6684         statements line.
6685
6686 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6687
6688         * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
6689         than the current node.
6690         * s-finmas.ads: Move field Finalize_Address from type FM_Node to
6691         Finalization_Master. The list headers have two fields instead of three.
6692         This should fix alignment issue but subpool allocations are now
6693         unusable. Alphabetize subprograms.
6694         * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
6695         the size of the header when converting the beginning of the object to
6696         a FM_Node. Set the master's Finalize_Address attribute if not already
6697         set.
6698         (Deallocate_Any_Controlled): Use the offset rather than the size of the
6699         header when converting the beginning of the object to a FM_Node.
6700
6701 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6702
6703         * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
6704         reraise when compiling for CodePeer.
6705
6706 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
6707
6708         * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
6709         now needed by a-convec.adb. Fix warning.
6710
6711 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6712
6713         * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
6714         processing of TSS routine Finalize_Address when compiling in
6715         CodePeer_Mode.
6716
6717 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6718
6719         * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
6720         sem_warn.adb: Minor reformatting.
6721
6722 2011-08-29  Emmanuel Briot  <briot@adacore.com>
6723
6724         * prj-conf.adb (Get_Config_Switches): Also collect the list of
6725         languages from aggregated projects.
6726
6727 2011-08-29  Yannick Moy  <moy@adacore.com>
6728
6729         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
6730         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6731         Traverse_Package_Declaration, Traverse_Subprogram_Body,
6732         Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
6733         for stubs are traversed too when parameter is set
6734         (Traverse_All_Compilation_Units): Traverse without going inside stubs
6735         (Traverse_Declarations_Or_Statements): Do the special traversing for
6736         stubs when required.
6737         * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
6738         return subprogram or package body from stub.
6739         (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
6740         stubs without prior subprogram decl.
6741
6742 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
6743
6744         * gnat_ugn.texi: Fix typo.
6745
6746 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6747
6748         * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
6749         which accounts for size vs alignment issues and calculates the size of
6750         the list header.
6751         (Deallocate_Any_Controlled): Ditto.
6752         (Nearest_Multiple_Rounded_Up): New routine.
6753
6754 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6755
6756         * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
6757         * a-exexda.adb (Set_Exception_C_Msg): Ditto.
6758         (Set_Exception_Msg): Ditto.
6759         * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
6760         Private_Data.
6761         * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
6762         Use Save_Occurrence instead of Save_Occurrence_No_Private.
6763         (Raise_With_Msg): Remove Cleanup_Flag.
6764         * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
6765         Clean_Flag and Private_Data components.
6766
6767 2011-08-29  Yannick Moy  <moy@adacore.com>
6768
6769         * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
6770         in CodePeer mode.
6771         * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
6772         of an explicitly declared type, so that the base types of the original
6773         type and this generated type are the same, and a "type" (not a subtype
6774         like previously).
6775         * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
6776         small" in Alfa mode, like in CodePeer mode.
6777         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
6778         clauses in Alfa mode.
6779
6780 2011-08-29  Javier Miranda  <miranda@adacore.com>
6781
6782         * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
6783         function to the package spec.
6784         * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
6785         internally generated bodies of null procedures locate the internally
6786         generated spec enforcing mode conformance.
6787         (Is_Interface_Conformant): Ensure that the controlling formal of the
6788         primitives match.
6789
6790 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6791
6792         * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
6793         reject the pragma if it appears to apply to a formal subprogram.
6794
6795 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6796
6797         * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
6798         inner expression, to prevent double evaluation.
6799
6800 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6801
6802         * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
6803         they were unused.
6804         * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
6805         * a-except-2005.adb (Propagate_Exception): Adjust spec.
6806         (Raise_Current_Excep): Adjust call.
6807         (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
6808
6809 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6810
6811         * exp_disp.adb: Minor reformatting.
6812
6813 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6814
6815         * a-exexpr.adb (Setup_Exception): Removed.
6816         * a-exexpr-gcc.adb (Setup_Exception): Removed.
6817         * a-except.adb (Exception_Propagation): Removed.
6818         * a-except-2005.adb (Setup_Exception): Removed.
6819         (Reraise): Remove call to Setup_Exception.
6820         (Reraise_Occurrence): Ditto.
6821         (Reraise_Occurrence_Always): Ditto.
6822         (Reraise_Occurrence_No_Defer): Ditto.
6823         (Transfer_Occurrence): Ditto.
6824         * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
6825         (Set_Exception_Msg): Ditto.
6826
6827 2011-08-29  Robert Dewar  <dewar@adacore.com>
6828
6829         * a-convec.adb, exp_disp.adb: Minor reformatting.
6830
6831 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6832
6833         * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
6834
6835 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
6836
6837         * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
6838         Exception_Handlers to No_List instead of Empty_List in the case where
6839         there are no handlers.
6840
6841 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6842
6843         * gcc-interface/gigi.h (enum standard_datatypes): Add
6844         ADT_reraise_zcx_decl
6845         (reraise_zcx_decl): New macro.
6846         * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
6847         (gigi): Set reraise_zcx_decl.
6848         (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
6849         (gnat_to_gnu): Handle N_Raise_Statement.
6850
6851 2011-08-29  Robert Dewar  <dewar@adacore.com>
6852
6853         * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
6854         a-undesu.adb: Minor reformatting.
6855
6856 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
6857
6858         * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
6859         table, accept an unfrozen untagged component if it is an actual for a
6860         formal incomplete type.
6861         * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
6862         provide new iterator forms over vectors.
6863         Introduce type Iterator in package body to implement operations of
6864         Reversible_Iterator interface.
6865         * a-iteint.ads: Make package pure so it is usable with new container
6866         packages, that are categorized Remote_Types.
6867
6868 2011-08-29  Robert Dewar  <dewar@adacore.com>
6869
6870         * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
6871
6872 2011-08-29  Bob Duff  <duff@adacore.com>
6873
6874         * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
6875         of <>, because this is the routine that checks for dimensionality
6876         errors (for example, for a two-dimensional array, (others => <>) should
6877         be (others => (others => <>)).
6878
6879 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
6880
6881         * impunit.adb: Add new run-time units.
6882         * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
6883         s-stposu.ads, s-stposu.adb: Code clean up.
6884         Handle protected class-wide or task class-wide types
6885         Handle C/C++/CIL/Java types.
6886         * s-spsufi.adb, s-spsufi.ads: New files.
6887
6888 2011-08-29  Yannick Moy  <moy@adacore.com>
6889
6890         * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
6891         library-level subprogram.
6892         * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
6893         placement.
6894         (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
6895         component.
6896         * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
6897         component.
6898         * gnat_rm.texi: Update doc for Test_Case pragma.
6899
6900 2011-08-29  Tristan Gingold  <gingold@adacore.com>
6901
6902         * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
6903         convention C.
6904         (GCC_Exception_Access): New type.
6905         (Unwind_DeleteException): New imported procedure
6906         (Foreign_Exception): Import it.
6907         (GNAT_GCC_Exception): Simply have the occurrence inside.
6908         (To_GCC_Exception): New function.
6909         (To_GNAT_GCC_Exception): New function.
6910         (GNAT_GCC_Exception_Cleanup): New procedure..
6911         (Propagate_GCC_Exception): New procedure.
6912         (Reraise_GCC_Exception): New procedure.
6913         (Setup_Current_Excep): New procedure.
6914         (CleanupUnwind_Handler): Change type of UW_Exception parameter.
6915         (Unwind_RaiseException): Ditto.
6916         (Unwind_ForcedUnwind): Ditto.
6917         (Remove): Removed.
6918         (Begin_Handler): Change type of parameter.
6919         (End_Handler): Ditto. Now delete the exception if still present.
6920         (Setup_Key): Removed.
6921         (Is_Setup_And_Not_Propagated): Removed.
6922         (Set_Setup_And_Not_Propagated): Ditto.
6923         (Clear_Setup_And_Not_Propagated): Ditto.
6924         (Save_Occurrence_And_Private): Ditto.
6925         (EID_For): Add 'not null' constraint on parameter.
6926         (Setup_Exception): Does nothing.
6927         (Propagate_Exception): Simplified.
6928         * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
6929         re-raise is not expanded anymore.
6930         * s-except.ads (Foreign_Exception): New exception - placeholder for
6931         non Ada exceptions.
6932         * raise-gcc.c (__gnat_setup_current_excep): Declare
6933         (CXX_EXCEPTION_CLASS): Define (not yet used)
6934         (GNAT_EXCEPTION_CLASS): Define.
6935         (is_handled_by): Handle foreign exceptions.
6936         (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
6937
6938 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6939
6940         * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
6941
6942 2011-08-29  Thomas Quinot  <quinot@adacore.com>
6943
6944         * a-synbar-posix.adb: Minor reformatting.
6945
6946 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6947
6948         * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
6949         a-exetim-default.ads (Interrupt_Clocks_Supported,
6950         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6951         definitions to be compliant with AI-0171. The target systems do not
6952         support separate account for the execution time of interrupt handlers.
6953
6954 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6955
6956         * a-synbar.adb (Wait): Change the order of evaluation of the conditions
6957         in the barrier to put first the easiest to evaluate (and the one which
6958         will be True more often). More efficient.
6959
6960 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
6961
6962         * s-atocou-x86.adb: Fix constraint in machine code insertion.
6963
6964 2011-08-29  Bob Duff  <duff@adacore.com>
6965
6966         * aspects.ads, aspects.adb: Add new aspects for various pragmas and
6967         attributes that are now aspects, as specified by AI05-0229-1.
6968         * sem_ch13.adb (Analyze_Aspect_Specifications,
6969         Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
6970         pragmas or attribute references, as appropriate.
6971
6972 2011-08-29  Robert Dewar  <dewar@adacore.com>
6973
6974         * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
6975         a-synbar-posix.ads: Minor reformatting.
6976
6977 2011-08-29  Yannick Moy  <moy@adacore.com>
6978
6979         * snames.ads-tmpl: Add name Force.
6980
6981 2011-08-29  Pascal Obry  <obry@adacore.com>
6982
6983         * prj-nmsc.adb: Minor reformatting.
6984
6985 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
6986
6987         * a-exetim.ads (Interrupt_Clocks_Supported,
6988         Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
6989         definitions to be compliant with AI-0171.
6990
6991 2011-08-29  Robert Dewar  <dewar@adacore.com>
6992
6993         * a-ngelfu.adb: Add comments.
6994
6995 2011-08-29  Geert Bosch  <bosch@adacore.com>
6996
6997         * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
6998         the closest machine number to Pi / 2.0.
6999
7000 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7001
7002         * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
7003         package Ada.Synchronous_Barriers.
7004         * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
7005         Add new specs and bodies for Ada.Synchronous_Barriers. There is a
7006         default implementation using protected objects and another one
7007         a-synbar-posix using POSIX barriers as the underlying support.
7008         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
7009         x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
7010         Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
7011         Clean up dependencies.
7012         * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
7013
7014 2011-08-29  Robert Dewar  <dewar@adacore.com>
7015
7016         * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
7017         exp_dist.adb: Minor code reorganization.
7018         Minor reformatting.
7019
7020 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7021
7022         * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
7023         primitive operation must support external streaming if it is not a
7024         controlling access result.
7025
7026 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7027
7028         * sinfo.ads, sem_ch7.adb: Minor reformatting.
7029
7030 2011-08-29  Bob Duff  <duff@adacore.com>
7031
7032         * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
7033         restriction on allocators, as required by AI05-0013-1.
7034         * restrict.ads: Minor comment fix.
7035
7036 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7037
7038         * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
7039         (To_Jmpbuf_Address): Ditto
7040         (builtin_longjmp): Ditto
7041
7042 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7043
7044         * sem_res.adb: Minor reformatting.
7045
7046 2011-08-29  Vincent Celier  <celier@adacore.com>
7047
7048         * make.adb (Gnatmake): Move special processing for VM targets after the
7049         call to Get_Target_Parameters.
7050
7051 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7052
7053         * sem_ch12.adb, par-ch12.adb: Minor reformatting.
7054
7055 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7056
7057         * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
7058         where an anonymous access discriminant of a limited designated type
7059         appears in a non-immutably limited discriminated type and issue an
7060         error message. Add local variable Desig_T and replace all occurrences
7061         of Designated_Type.
7062
7063 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7064
7065         * a-rttiev.adb (Set_Handler): Update comment to indicate that our
7066         implementation is compliant to RM D.15(15/2) after the modification
7067         imposed by AI05-0094-1 (binding interpretation).
7068
7069 2011-08-29  Robert Dewar  <dewar@adacore.com>
7070
7071         * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
7072         s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
7073
7074 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7075
7076         * par-endh.adb (Check_End): For an END where it is mandatory to repeat
7077         the scope name, do not report a missing label as a style violation (it
7078         will be diagnosed as an illegality).
7079         * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
7080         variant records: Get_Enum_Lit_From_Pos already returns a usage
7081         occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
7082         on Expr in Integer_Literal case so that it can be used by
7083         Build_To_Any_Call.
7084
7085 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7086
7087         * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
7088         Adjust comment.
7089         * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
7090         (Build_Abort_Block_Handler): New function to build an Abort_Signal
7091         exception handler.
7092         * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
7093         Build_Abort_Block_Handler to build the exception handler. Do not
7094         undefer aborts for the Abort_Signal exception handler if back-end
7095         exception mechanism.
7096         * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
7097         back_end exceptions for all others and abort_signal.
7098         * s-except.ads (ZCX_By_Default): New constant.
7099         * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
7100         (Raise_Exception_Always): Ditto.
7101         (Raise_From_Signal_Handler): Ditto.
7102         (Raise_With_Location_And_Msg): Ditto.
7103         (Raise_With_Msg): Ditto.
7104         (Reraise): Ditto.
7105         (Reraise_Occurence): Ditto.
7106         (Reraise_Occurrence_Always): Ditto.
7107         * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
7108         * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
7109
7110 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7111
7112         * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
7113
7114 2011-08-29  Robert Dewar  <dewar@adacore.com>
7115
7116         * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
7117         Minor code reorganization.
7118
7119 2011-08-29  Bob Duff  <duff@adacore.com>
7120
7121         * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
7122         2012, not just Ada 2005.
7123
7124 2011-08-29  Vincent Celier  <celier@adacore.com>
7125
7126         * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
7127         with a project file or with gprbuid, if -gnatep= is specified, the
7128         builder may need to be invoked with -x.
7129
7130 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7131
7132         * a-exexpr-gcc.adb: Minor comment fix.
7133
7134 2011-08-29  Robert Dewar  <dewar@adacore.com>
7135
7136         * sem_ch8.adb: Minor reformatting.
7137
7138 2011-08-29  Bob Duff  <duff@adacore.com>
7139
7140         * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
7141         * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
7142         treating "some" as unreserved in earlier Ada versions. This is now
7143         handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
7144         rather than Name_Some, since Tok_Some is now recognized as reserved.
7145         * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
7146         reserved word.
7147         * scans.ads: Minor comment fixes.
7148         * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
7149         for other language versions.
7150         * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
7151         treating "some" as unreserved in earlier Ada versions. This is now
7152         handled in Snames.Is_Keyword_Name.
7153         * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
7154         Ada 2012.
7155         (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
7156         unreserved in earlier Ada versions. This is now handled in
7157         Snames.Is_Keyword_Name.
7158         * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
7159         words as for other language versions.
7160         * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
7161         Ada 2012, not just Ada 2005.
7162
7163 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7164
7165         * sem_ch13.adb: Additional semantic checks for aspects involved in
7166         iterators.
7167
7168 2011-08-29  Matthew Heaney  <heaney@adacore.com>
7169
7170         * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
7171         a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
7172         Container parameter.
7173         (Ancestor_Find): ditto.
7174
7175 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7176
7177         * par-endh.adb: Minor reformatting.
7178
7179 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7180
7181         * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
7182         (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
7183         (Adjust_N_CLeanups_For): Remove.
7184         (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
7185         stack is reached.
7186         (Propgate_Exception): Adjust.
7187         * raise-gcc.c: Add a few static/const.
7188         (Adjust_N_Cleanups_For): Remove declaration.
7189         (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
7190
7191 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7192
7193         * sem_ch8.adb: Use type of function return when rewriting as object
7194         declaration.
7195
7196 2011-08-29  Gary Dismukes  <dismukes@adacore.com>
7197
7198         * sem_type.adb: Minor reformatting.
7199
7200 2011-08-29  Robert Dewar  <dewar@adacore.com>
7201
7202         * makeutl.adb: Minor reformatting.
7203
7204 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7205
7206         * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
7207         function call of a limited type, the expansion of the renaming is
7208         complicated by the presence of various temporaries and subtypes that
7209         capture constraints of the renamed object.
7210         Rewrite node as an object declaration, whose expansion is simpler.
7211         Given that the object is limited there is no copy involved and no
7212         performance hit.
7213
7214 2011-08-29  Robert Dewar  <dewar@adacore.com>
7215
7216         * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
7217         freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
7218
7219 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7220
7221         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
7222         system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
7223         system-linux-hppa.ads, system-linux-s390.ads,
7224         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
7225         system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
7226         system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
7227         system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
7228         system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
7229         system-solaris-sparc.ads, system-lynxos-x86.ads,
7230         system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
7231         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
7232         system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
7233         system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7234         system-vxworks-x86.ads: Remove GCC_ZCX_Support.
7235         * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
7236         s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
7237         * opt.ads: Adjust comment.
7238         * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
7239         * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
7240         * system.ads: Move GCC_ZCX_Support to obsolete entries.
7241
7242 2011-08-29  Emmanuel Briot  <briot@adacore.com>
7243
7244         * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
7245         file name is specified on the gnatmake or gprbuild command line, and
7246         before we search for that file in the project.
7247
7248 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7249
7250         * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
7251         used to determine whether a possible interpretation for an overloadable
7252         entity is declared within the current instantiation and should be
7253         included in the candidate set.
7254
7255 2011-08-29  Vasiliy Fofanov  <fofanov@adacore.com>
7256
7257         * gnat_rm.texi, gnat_ugn.texi: Clean ups.
7258
7259 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7260
7261         * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
7262         access subtype is access_to_subprogram, when applying checks for
7263         RM 3.10.2 (27).
7264
7265 2011-08-29  Matthew Heaney  <heaney@adacore.com>
7266
7267         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
7268         for sibling when common parent.
7269
7270 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7271
7272         * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
7273         "pragma_".
7274
7275 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7276
7277         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
7278         for the return type when in ASIS mode.
7279
7280 2011-08-29  Vincent Celier  <celier@adacore.com>
7281
7282         * make.adb (Gnatmake): Get the default search dirs, then the target
7283         parameters after getting the Builder switches, as the Builder switches
7284         may include --RTS= and that could change the default search dirs.
7285
7286 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7287
7288         * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
7289         Make_Final_Call. Move the processing for class-wide types before the
7290         processing for derivations from [Limited_]Controlled.
7291         (Make_Final_Call): Move the processing for class-wide types before the
7292         processing for derivations from [Limited_]Controlled.
7293         * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
7294         Add code to account for alignments larger than the list header. Add a
7295         comment illustrating the structure of the allocated object + padding +
7296         header.
7297         (Deallocate_Any_Controlled): Add code to account for alignments larger
7298         than the list header.
7299
7300 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7301
7302         * sinfo.ads, sinfo.adb: New node kind
7303         N_Formal_Incomplete_Type_Definition, related flags.
7304         par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
7305         Parse formal incomplete types.
7306         * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
7307         sem_ch12.
7308         * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
7309         Formal incomplete types do not need completion.
7310         * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
7311         Validate_Incomplete_Type_Instance): New procedures to handle formal
7312         incomplete types.
7313         * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
7314         that corresponds to a formal incomplete type.
7315         * sprint.adb: Handle formal incomplete type declarations.
7316         * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
7317         an insertion point.
7318
7319 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7320
7321         * a-fihema.ads, a-fihema.adb: Unit removed.
7322         * a-undesu.ads, a-undesu.adb: New unit implementing
7323         Ada.Unchecked_Deallocate_Subpool.
7324         * einfo.adb: Remove Associated_Collection from the node usage.
7325         Add Finalization_Master to the node usage.
7326         (Associated_Collection): Removed.
7327         (Finalization_Master): New routine.
7328         (Set_Associated_Collection): Removed.
7329         (Set_Finalization_Master): New routine.
7330         (Write_Field23_Name): Remove Associated_Collection from the output. Add
7331         Finalization_Master to the output.
7332         * einfo.ads: Remove attribute Associated_Collection and its uses in
7333         entities.
7334         Add new attribute Finalization_Master along with its uses in entitites.
7335         (Associated_Collection): Removed along with its pragma import.
7336         (Finalization_Master): New routine along with a pragma import.
7337         (Set_Associated_Collection): Removed along with its pragma import.
7338         (Set_Finalization_Master): New routine along with a pragma import.
7339         * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
7340         Build_Finalization_Collection with Build_Finalization_Master.
7341         (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
7342         before the bodies of the predefined routines. Add comment explaining
7343         this. Replace call to Build_Finalization_Collection with
7344         Build_Finalization_Master.
7345         (Freeze_Type): Replace call to Build_Finalization_Collection with
7346         Build_Finalization_Master.
7347         (Make_Finalize_Address_Body): Comment reformatting.
7348         (Make_Predefined_Primitive_Specs): Code reformatting.
7349         (Stream_Operation_OK): Update comment mentioning finalization
7350         collections. Replace RE_Finalization_Collection with
7351         RE_Finalization_Master.
7352         * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
7353         Associated_Collection with Finalization_Master. Replace call to
7354         Build_Finalization_Collection with Build_Finalization_Master.
7355         (Expand_Allocator_Expression): Replace call to Associated_Collection
7356         with Finalization_Master. Replace call to Set_Associated_Collection with
7357         Set_Finalization_Master. Remove the generation of
7358         Set_Finalize_Address_Ptr.
7359         (Expand_N_Allocator): Replace call to Associated_Collection with
7360         Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
7361         * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
7362         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
7363         comment on usage. Replace call to Needs_BIP_Collection with
7364         Needs_BIP_Finalization_Master Remplace BIP_Collection with
7365         BIP_Finalization_Master. Update all comments which mention finalization
7366         collections. Replace Associated_Collection with
7367         Finalization_Master. Replace Build_Finalization_Collection with
7368         Build_Finalization_Master.
7369         (BIP_Formal_Suffix): Update BIP_Collection's case.
7370         (Build_Heap_Allocator): Update the related comment. Rename local
7371         variable Collect to Fin_Mas_Id and update its occurrences. Update
7372         comments which mention finalization collections. Replace
7373         Set_Associated_Collection with Set_Finalization_Master.
7374         (Expand_Call): Update the code which detects a special piece of library
7375         code for .NET/JVM.
7376         (Make_Build_In_Place_Call_In_Allocator): Replace the call to
7377         Add_Collection_Actual_To_Build_In_Place_Call with
7378         Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
7379         which generates a call to Make_Set_Finalize_Address_Ptr_Call.
7380         (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
7381         Add_Collection_Actual_To_Build_In_Place_Call with
7382         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7383         (Make_Build_In_Place_Call_In_Assignment): Replace call to
7384         Add_Collection_Actual_To_Build_In_Place_Call with
7385         Add_Finalization_Master_Actual_To_Build_In_Place_Call.
7386         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7387         * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
7388         (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
7389         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
7390         Rename local variable Collect to Fin_Mas_Id and update its occurrences.
7391         Replace call to Set_Associated_Collection with Set_Finalization_Master.
7392         (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
7393         Replace the call to Associated_Collection with Finalization_Master.
7394         Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
7395         Update the way finalization master names are generated. Update the
7396         retrieval of the correct access type which will carry the pool and
7397         master attributes.
7398         (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
7399         (Make_Finalize_Address_Body): Abstract types do not need
7400         Finalize_Address. Code reformatting.
7401         (Make_Finalize_Address_Stmts): Update comment on usage.
7402         (Make_Set_Finalize_Address_Ptr_Call): Removed.
7403         (Process_Declarations): Update comments.
7404         * exp_ch7.ads (Build_Finalization_Collection): Renamed to
7405         Build_Finalization_Master. Update associated comment.
7406         (Make_Set_Finalize_Address_Ptr_Call): Removed.
7407         * exp_ch13.adb: Update comments which mention finalization collections.
7408         (Expand_N_Free_Statement): Replace the call to Associated_Collection
7409         with Finalization_Master.
7410         * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
7411         create calls to routines Allocate_Any_Controlled and
7412         Deallocate_Any_Controlled.
7413         (Find_Finalize_Address): New routine.
7414         (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
7415         comparison.
7416         (Requires_Cleanup_Actions): Update the comment on freeze node
7417         inspection.
7418         * exp_util.ads: Remove comment on generated code for
7419         Build_Allocate_Deallocate_Proc. The code is now quite complex and it
7420         is better to simply look in the body.
7421         * freeze.adb (Freeze_All): Update the comment of finalization
7422         collections. Replace the call to Associated_Collection with
7423         Finalization_Master. Replace the call to Build_Finalization_Collection
7424         with Build_Finalization_Master.
7425         * impunit.adb: Add a-undesu and s-stposu to the list of units.
7426         * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
7427         a-fihema.
7428         * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
7429         Ada.Finalization. Add processing for children of System.Storage_Pools.
7430         * rtsfind.ads: Remove the naming of second level children of
7431         Ada.Finalization.
7432         Remove Ada_Finalization_Heap_Management from the list of units.
7433         Remove subtype Ada_Finalization_Child.
7434         Remove the following subprogram entities:
7435         
7436            RE_Allocate
7437            RE_Deallocate
7438            RE_Finalization_Collection
7439            RE_Finalization_Collection_Ptr
7440            RE_Set_Finalize_Address_Ptr
7441         
7442         Add the naming of second level children of System.Storage_Pools.
7443         Add System_Finalization_Masters and System_Storage_Pools_Subpools to
7444         the list of units.
7445         Add subtype System_Storage_Pools_Child.
7446         Add the following subprogram entities to System.Finalization_Masters:
7447         
7448            RE_Finalization_Master
7449            RE_Finalization_Master_Ptr
7450         
7451         Add the following subprogram entities to System.Storage_Pools.Subpools:
7452         
7453            RE_Allocate_Any_Controlled
7454            RE_Deallocate_Any_Controlled
7455            RE_Root_Storage_Pool_With_Subpools
7456            RE_Root_Subpool
7457            RE_Subpool_Handle
7458         
7459         Move the following subprogram entities from
7460         Ada.Finalization.Heap_Management to System.Finalization_Masters:
7461         
7462            RE_Add_Offset_To_Address
7463            RE_Attach
7464            RE_Base_Pool
7465            RE_Detach
7466         
7467         * sem_ch3.adb (Access_Type_Declaration): Replace the call to
7468         Set_Associated_Collection with Set_Finalization_Master.
7469         * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
7470         BIP_Finalization_Master is created.
7471         * s-finmas.adb: New unit System.Finalization_Masters.
7472         * s-finmas.ads: New unit System.Finalization_Masters.
7473         * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
7474         * s-stposu.ads, s-stposu.adb: New unit implementing
7475         System.Storage_Pools.Subpools.
7476
7477 2011-08-29  Bob Duff  <duff@adacore.com>
7478
7479         * tbuild.adb: Add assertion.
7480
7481 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7482
7483         * s-pooglo.adb: Minor reformatting.
7484
7485 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7486
7487         * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
7488         an indexed component of a packed array whose element type is a record
7489         with a representation clause different from that of the right-hand
7490         side, generate a temporary to minimuze the number of bit-field
7491         operations generated.
7492
7493 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7494
7495         * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
7496         declarations, and thus are likely insertion points for actions.
7497
7498 2011-08-29  Bob Duff  <duff@adacore.com>
7499
7500         * einfo.ads: Minor comment fix.
7501
7502 2011-08-29  Robert Dewar  <dewar@adacore.com>
7503
7504         * frontend.adb, gnat1drv.adb: Minor reformatting.
7505
7506 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7507
7508         * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
7509         * a-fihema.adb (Allocate, Deallocate): Ditto.  Possibly add padding
7510         space in front of the header.
7511
7512 2011-08-29  Johannes Kanig  <kanig@adacore.com>
7513
7514         * frontend.adb (Frontend): Exit after creating Standard package when
7515         -gnatd.H is present.
7516         * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
7517         present.
7518
7519 2011-08-29  Robert Dewar  <dewar@adacore.com>
7520
7521         * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
7522         makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
7523         snames.ads-tmpl: Minor reformatting.
7524
7525 2011-08-29  Philippe Gil  <gil@adacore.com>
7526
7527         * prj.adb (Reset_Units_In_Table): New procedure.
7528         Reset units to avoid access to freed memory.
7529
7530 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7531
7532         * get_scos.adb: When reading a P statement SCO without a pragma name
7533         (from an older ALI file), ensure that the Pragma_Name component is set
7534         to Unknown_Pragma (not left uninitialized).
7535
7536 2011-08-29  Vincent Celier  <celier@adacore.com>
7537
7538         * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
7539         modified to compute correctly the object path of a SAL project that is
7540         extending another library project.
7541         (Write_Path_File): New procedure.
7542         * makeutl.ads (Directories): New table moved from Buildgpr
7543         (Get_Directories): New procedure moved from Buildgpr
7544         (Write_Path_File): New procedure
7545         * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
7546         paths before binding SALs, instead of Set_Ada_Paths.
7547         * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
7548         Prj.
7549         * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
7550         (Current_Source_Path_File_Of): New function
7551         (Set_Current_Object_Path_File_Of): New procedure
7552         (Current_Source_Object_File_Of): New function
7553         (Set_Current_Object_Path_File_Of): New procedure
7554         * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
7555         (Current_Source_Path_File_Of): New function
7556         (Set_Current_Object_Path_File_Of): New procedure
7557         (Current_Source_Object_File_Of): New function
7558         (Set_Current_Object_Path_File_Of): New procedure
7559
7560 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7561
7562         * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
7563         packed entity, use a bit-field assignment only if there is no change of
7564         representation.
7565
7566 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7567
7568         * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
7569         Is_RTU instead of using Chars comparisons.
7570
7571 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7572
7573         * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
7574         temporary object if the actual is constrained, and the discriminants
7575         read from the stream don't match.
7576
7577 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7578
7579         * sem_attr.adb, exp_attr.adb: Add handling of
7580         Attribute_System_Allocator_Alignment
7581         * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
7582         Attribute_System_Allocator_Alignment.
7583         * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
7584         * gcc-interface/targtyps.c, gcc-interface/utils2.c,
7585         gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
7586         get_target_system_allocator_alignment.
7587
7588 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7589
7590         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
7591         dependencies.
7592
7593 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7594
7595         * exp_ch3.adb (In_Runtime): Fix typo.
7596
7597 2011-08-29  Bob Duff  <duff@adacore.com>
7598
7599         * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
7600
7601 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7602
7603         * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
7604         and a separate tag assignment is generated, ensure that the tag
7605         assignment is analyzed.
7606
7607 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7608
7609         * atree.ads, atree.adb (Copy_Separate_List): New function that applies
7610         Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
7611         of statement lists that may contain local declarations.
7612         * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
7613         duplicate the triggering statements needed for the expansion of this
7614         construct, when the trigger is a dispatching call to a synchronized
7615         primitive.
7616
7617 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7618
7619         * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
7620         * bindgen.adb: Add comments.
7621         * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
7622         in CodePeer mode.
7623
7624 2011-08-29  Robert Dewar  <dewar@adacore.com>
7625
7626         * exp_attr.adb: Minor reformatting.
7627         Minor code reorganization and commenting.
7628         * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
7629         reformatting.
7630
7631 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7632
7633         * get_scos.adb: Ignore chaining indicators not currently supported
7634         by Ada.
7635
7636 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7637
7638         * system.ads: Minor editing.
7639
7640 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7641
7642         * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
7643         CodePeer mode.
7644         * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
7645         Attribute_Elab_Subp_Body.
7646         * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
7647         * sem_util.adb: Update comments.
7648
7649 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7650
7651         * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
7652         pragma name for each SCO statement corresponding to a pragma.
7653
7654 2011-08-29  Arnaud Charlet  <charlet@adacore.com>
7655
7656         * opt.ads: Minor editing.
7657
7658 2011-08-29  Yannick Moy  <moy@adacore.com>
7659
7660         * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
7661         that only made sense for CodePeer mode.
7662
7663 2011-08-29  Jose Ruiz  <ruiz@adacore.com>
7664
7665         * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
7666         which is no longer used.
7667         * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
7668         handling of the 64-bit division check.
7669         * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
7670         division available.
7671         * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
7672         longer used.
7673
7674 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7675
7676         * get_scos.adb: Minor reformatting.
7677
7678 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7679
7680         * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
7681         statement list is wrapped in a block, the block is explicitly analyzed
7682         in order to properly redecorate the entities and create a servicing
7683         finalizer.
7684
7685 2011-08-29  Tristan Gingold  <gingold@adacore.com>
7686
7687         * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
7688         (Set_Zero_Cost_Handling): Remove.
7689
7690 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7691
7692         * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
7693
7694 2011-08-29  Geert Bosch  <bosch@adacore.com>
7695
7696         * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
7697         instruction, as the latter may produce -0.0, which is not a valid VAX
7698         F float number.
7699         (Neg_G): Likewise for VAX F float.
7700
7701 2011-08-29  Robert Dewar  <dewar@adacore.com>
7702
7703         * exp_util.adb: Minor reformatting.
7704
7705 2011-08-29  Yannick Moy  <moy@adacore.com>
7706
7707         * sem_ch3.adb: Minor comment update.
7708
7709 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7710
7711         * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
7712         the operand type.
7713
7714 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7715
7716         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
7717         current statement sequence on a generic instantiation or a subprogram
7718         declaration.
7719
7720 2011-08-29  Robert Dewar  <dewar@adacore.com>
7721
7722         * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
7723         Minor reformatting.
7724
7725 2011-08-29  Hristian Kirtchev  <kirtchev@adacore.com>
7726
7727         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
7728         Correct the check which involves the freeze node of a controlled or
7729         access-to-controlled type.
7730
7731 2011-08-29  Geert Bosch  <bosch@adacore.com>
7732
7733         * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
7734         statements.
7735         * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
7736         Asm statements.
7737
7738 2011-08-29  Yannick Moy  <moy@adacore.com>
7739
7740         * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
7741         for every index type and component type that is not a subtype_mark.
7742         (Process_Subtype): Set Etype of subtype.
7743
7744 2011-08-29  Robert Dewar  <dewar@adacore.com>
7745
7746         * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
7747         reorganization.  Minor reformatting.
7748
7749 2011-08-29  Steve Baird  <baird@adacore.com>
7750
7751         * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
7752         for CodePeer and ALFA modes.
7753
7754 2011-08-29  Ed Schonberg  <schonberg@adacore.com>
7755
7756         * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
7757         that comes from an enclosing scope if it is not the renaming of an
7758         actual, to handle properly a spurious ambiguity in an instance.
7759
7760 2011-08-29  Eric Botcazou  <ebotcazou@adacore.com>
7761
7762         * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
7763         (Alignment_Check_For_Size_Change): ...this.  Add SIZE parameter and
7764         use it instead of the Esize of the first parameter.
7765         (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
7766         above change.
7767         <Size>: Likewise.  Call it for composite types on the RM size.
7768
7769 2011-08-29  Yannick Moy  <moy@adacore.com>
7770
7771         * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
7772         * sem_util.adb (Unique_Name): Correct behaviour for names of
7773         compilation units.
7774
7775 2011-08-29  Yannick Moy  <moy@adacore.com>
7776
7777         * sem_prag.adb (Check_Precondition_Postcondition): In formal
7778         verification mode, analyze pragma expression for correctness, for
7779         pre/post on library-level subprogram, as it is not expanded later.
7780
7781 2011-08-29  Yannick Moy  <moy@adacore.com>
7782
7783         * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
7784         in formal verification.
7785
7786 2011-08-29  Thomas Quinot  <quinot@adacore.com>
7787
7788         * sem_util.adb: Minor reformatting.
7789         * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
7790         there's no pragma.
7791         * par_sco.ads, par_sco.adb: Update comments.
7792
7793 2011-08-29  Yannick Moy  <moy@adacore.com>
7794
7795         * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
7796         associated getter/setter.
7797         * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
7798
7799 2011-08-29  Vincent Celier  <celier@adacore.com>
7800
7801         * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
7802         * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
7803         with declarations for Language_Kind and Dependency_Kind for Ada.
7804         * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
7805         (Process_Compiler): Take into account the new attributes Dependency_Kind
7806         and Language_Kind.
7807         (Check_Configuration): Check if language kind is unit based, not if the
7808         language name is Ada.
7809         (Process_Exceptions_Unit_Based): Ditto
7810         (Add_Language): Remove default additions of language and dependency kind
7811         * prj.ads: Minor comment change
7812         * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
7813
7814 2011-08-29  Johannes Kanig  <kanig@adacore.com>
7815
7816         * debug.adb: Update comments.
7817
7818 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
7819
7820         * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
7821         (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
7822         (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
7823         (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7824         (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
7825
7826 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7827
7828         * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
7829         (GNATLIBCFLAGS_FOR_C): Replace
7830         TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
7831         (gnatlib-shared-default, gnatlib-shared-dual-win32)
7832         (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
7833         (gnatlib-sjlj, gnatlib-zcx): Likewise.
7834
7835 2011-08-07  Eric Botcazou  <ebotcazou@adacore.com>
7836
7837         * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
7838
7839         * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
7840
7841         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
7842
7843 2011-08-05  Nicolas Roche  <roche@adacore.com>
7844
7845         * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
7846         libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
7847         canadian cross.
7848         * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7849
7850 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7851
7852         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
7853         subprogram bodies declared out-of-order.
7854
7855 2011-08-05  Yannick Moy  <moy@adacore.com>
7856
7857         * sem_util.adb (Unique_Name): only prefix with "standard" the names of
7858         entities directly in package Standard, otherwise skip the standard
7859         prefix.
7860
7861 2011-08-05  Robert Dewar  <dewar@adacore.com>
7862
7863         * a-cbmutr.adb: Minor reformatting
7864         (Allocate_Node): refactor node allocation algorithm
7865
7866 2011-08-05  Robert Dewar  <dewar@adacore.com>
7867
7868         * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
7869         * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
7870         mode.
7871         (Analyze_Pragma, case Check_Policy): Ditto.
7872         * sem_prag.ads (Check_Disabled): New function
7873         * snames.ads-tmpl: Add Name_Disable.
7874
7875 2011-08-05  Robert Dewar  <dewar@adacore.com>
7876
7877         * gnat_rm.texi: Document implementation-defined policy DISABLE for
7878         pragmas Assertion_Policy, Check_Policy, Debug_Policy.
7879
7880 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7881
7882         * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
7883         that appears in a generic formal part and applies to a formal
7884         subprogram.
7885
7886 2011-08-05  Robert Dewar  <dewar@adacore.com>
7887
7888         * a-cbmutr.ads: Minor reformatting.
7889
7890 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7891
7892         * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
7893         to check count, check sign of value instead.
7894         * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
7895         (Copy_Subtree): allocate copy of source element
7896         (Equal_Subtree): compare elements, not access objects
7897
7898 2011-08-05  Vincent Celier  <celier@adacore.com>
7899
7900         * gnat_ugn.texi: Fix VMS alternative.
7901
7902 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7903
7904         * sem_ch11.adb: Add comment.
7905
7906 2011-08-05  Robert Dewar  <dewar@adacore.com>
7907
7908         * exp_util.adb: Minor comment fix.
7909
7910 2011-08-05  Robert Dewar  <dewar@adacore.com>
7911
7912         * scng.adb (Error_Unterminated_String): Improve flag position when
7913         comma present.
7914
7915 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7916
7917         * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
7918         tree containers).
7919         * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
7920         multiway tree containers.
7921
7922 2011-08-05  Robert Dewar  <dewar@adacore.com>
7923
7924         * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
7925         * stylesw.adb: Implement -gnatyC to control comment spacing
7926         * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
7927         -gnatyc/C).
7928         * usage.adb: Add line for -gnatyC.
7929
7930 2011-08-05  Robert Dewar  <dewar@adacore.com>
7931
7932         * gnat_ugn.texi: Document -gnatyC.
7933         * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
7934         synonym for COMMENTS2).
7935
7936 2011-08-05  Robert Dewar  <dewar@adacore.com>
7937
7938         * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
7939         a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
7940         sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
7941         a-comutr.ads, lib-xref.adb: Minor reformatting.
7942
7943 2011-08-05  Robert Dewar  <dewar@adacore.com>
7944
7945         * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
7946         warning if there is an exception handler present.
7947
7948 2011-08-05  Pascal Obry  <obry@adacore.com>
7949
7950         * a-iteint.ads: Fix copyright year.
7951
7952 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7953
7954         * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
7955         statement SCO for a USE clause or a representation clause.
7956
7957 2011-08-05  Yannick Moy  <moy@adacore.com>
7958
7959         * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
7960         between body and spec for stub.
7961         (Detect_And_Add_ALFA_Scope): take into account subprogram stub
7962         * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
7963         pragma precondition or postcondition, for which the enclosing
7964         subprogram or package in the AST is not the desired one, return empty.
7965
7966 2011-08-05  Thomas Quinot  <quinot@adacore.com>
7967
7968         * g-expect.adb: Minor reformatting.
7969
7970 2011-08-05  Bob Duff  <duff@adacore.com>
7971
7972         * a-fihema.adb: Comment out OS_Lib.
7973
7974 2011-08-05  Matthew Heaney  <heaney@adacore.com>
7975
7976         * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
7977         (unbounded multiway tree containers) and a-iteint.ads.
7978         * a-comutr.ads, a-comutr.adb:
7979         This is the new Ada 2012 unit for unbounded multiway tree containers
7980         * a-cimutr.ads, a-cimutr.adb
7981         This is the new Ada 2012 unit for indefinite multiway tree containers
7982         * a-iteint.ads: New file.
7983
7984 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7985
7986         * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
7987
7988 2011-08-05  Bob Duff  <duff@adacore.com>
7989
7990         * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
7991         subpools.
7992         * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7993
7994 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
7995
7996         * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
7997         general indexing aspects of Ada2012. Called when analyzing indexed
7998         components when other interpretations fail.
7999         * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
8000         in an expression context where overloading is meaningful. This excludes
8001         the occurrence in an aspect specification (efficiency only).
8002         * sem_attr.adb (Analyze_Attribute): indicate that the attributes
8003         related to iterators can be set by an attribute specification, but
8004         cannot be queried.
8005         * sem_ch13.adb (Analyze_Aspect_Specifications): handle
8006         Constant_Indexing and Variable_Indexing.
8007         (Check_Indexing_Functions): New procedure to perform legality checks.
8008         Additional semantic checks at end of declarations.
8009
8010 2011-08-05  Sergey Rybin  <rybin@adacore.com>
8011
8012         * tree_io.ads: Update ASIS_Version_Number because of the change of the
8013         order of calling Tree_Write/Tree_Read routines made for aspects.
8014
8015 2011-08-05  Bob Duff  <duff@adacore.com>
8016
8017         * a-fihema.adb (Finalize): Fix race condition.
8018
8019 2011-08-05  Yannick Moy  <moy@adacore.com>
8020
8021         * sem_ch12.adb (Analyze_Package_Instantiation,
8022         Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
8023         mode.
8024
8025 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8026
8027         * sem_type.adb (Specific_Type): in an instance, the type-specific
8028         operand of an equality check that involves null may have a private
8029         type. Use full view to determine legality of construct.
8030
8031 2011-08-05  Vincent Celier  <celier@adacore.com>
8032
8033         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
8034         delete or close the file when the call to gnatmake was successful.
8035
8036 2011-08-05  Yannick Moy  <moy@adacore.com>
8037
8038         * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
8039         Global_Discard_Names.
8040
8041 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8042
8043         * sinfo.ads: comments on use of entity field for aspect specifications.
8044
8045 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8046
8047         * sem_ch12.adb (Reset_Entity): If the entity field of the associated
8048         node is not itself an entity but a selected component, it is a
8049         rewritten parameterless call to an en enclosing synchronized operation,
8050         and this expansion will be performed again in the instance, so there is
8051         no global information to preserve.
8052
8053 2011-08-05  Javier Miranda  <miranda@adacore.com>
8054
8055         * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
8056         for renamings of predefined primitives.
8057         (In_Predef_Prims_DT): New subprogram.
8058
8059 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8060
8061         * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
8062         possible interpretation of name is a reference type, add an
8063         interpretation that is the designated type of the reference
8064         discriminant of that type.
8065         * sem_res.adb (resolve): If the interpretation imposed by context is an
8066         implicit dereference, rewrite the node as the deference of the
8067         reference discriminant.
8068         * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
8069         Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
8070         parent type or base type.
8071         * sem_ch4.adb (Process_Indexed_Component,
8072         Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
8073         Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
8074         Check for implicit dereference.
8075         (List_Operand_Interps): Indicate when an implicit dereference is
8076         ambiguous.
8077         * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
8078
8079 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8080
8081         * scos.ads: Update documentation of SCO table. Pragma statements can now
8082         be marked as disabled (using 'p' instead of 'P' as the statement kind).
8083         * par_sco.ads, par_sco.adb: Implement the above change.
8084         (Process_Decisions_Defer): Generate a P decision for the first parameter
8085         of a dyadic pragma Debug.
8086         * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
8087         necessary.
8088         * put_scos.adb: Code simplification based on above change.
8089
8090 2011-08-05  Robert Dewar  <dewar@adacore.com>
8091
8092         * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
8093         bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
8094         a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
8095         prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
8096
8097 2011-08-05  Bob Duff  <duff@adacore.com>
8098
8099         * a-stunau.ads, g-spipat.adb: Update comments.
8100
8101 2011-08-05  Bob Duff  <duff@adacore.com>
8102
8103         * a-fihema.ads: Minor comment fix.
8104         * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
8105         correct.
8106         (Attach, Detach): Remove some unnecessary code.
8107         (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
8108
8109 2011-08-05  Bob Duff  <duff@adacore.com>
8110
8111         * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
8112         allocation for Objects component. This simplifies the code somewhat. It
8113         is also a little more efficient in the not-so-unusual case where there
8114         are no controlled objects allocated.
8115         Make Finalization_Started flag atomic.
8116         (Finalize): Avoid unnecessary detachment of items from the list.
8117         (pcol): Minor cleanup.
8118
8119 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8120
8121         * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
8122         package whose name is the same as that of the generic unit, or its
8123         ultimate prefix.
8124
8125 2011-08-05  Bob Duff  <duff@adacore.com>
8126
8127         * a-fihema.adb, a-fihema.ads: Minor comment improvements.
8128         * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
8129         Minor comment fixes.
8130
8131 2011-08-05  Arnaud Charlet  <charlet@adacore.com>
8132
8133         * make.adb (Linking_Phase): No longer need to set source search path
8134         before calling gnatlink in CodePeer mode.
8135         * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
8136         gcc in CodePeer mode, since the binder generated file no longer has a
8137         'with Main'.
8138         * switch.ads, switch.adb (Is_Language_Switch): Removed.
8139         * switch-c.adb: Update comment.
8140
8141 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8142
8143         * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
8144
8145 2011-08-05  Nicolas Roche  <roche@adacore.com>
8146
8147         * gnat_ugn.texi: Fix minor syntax error issue.
8148
8149 2011-08-05  Vincent Celier  <celier@adacore.com>
8150
8151         * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
8152         delete or close the file when the call to gnatmake returns a non
8153         successful return code.
8154
8155 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8156
8157         * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
8158         check, indicate that the copy of the original node does not come from
8159         source, to prevent an infinite recursion of the expansion.
8160
8161 2011-08-05  Johannes Kanig  <kanig@adacore.com>
8162
8163         * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
8164         VC generation for subprogram bodies.
8165
8166 2011-08-05  Yannick Moy  <moy@adacore.com>
8167
8168         * einfo.ads: Typo.
8169         * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
8170         the base type with the smallest allowed base type.
8171
8172 2011-08-05  Sergey Rybin  <rybin@adacore.com>
8173
8174         * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
8175         aspects.
8176
8177 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8178
8179         * sem_ch12.ads: minor comment updates.
8180
8181 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8182
8183         * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
8184         instantiation and a formal package the compiler generates a package
8185         renaming declaration so that the generic name within the declaration
8186         is interpreted as a renaming of the instance. At the end of a formal
8187         package declaration, this renaming must become invisible.
8188
8189 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
8190
8191         * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
8192         comparison and rely on concrete entities instead.
8193
8194 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8195
8196         * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
8197         and discriminants, to indicate that the type has an access discriminant
8198         that supports implicit dereference.
8199         * snames.ads-tmpl: Add names of aspects and attributes related to
8200         Ada2012 iterators: constant_indexing, default_iterator,
8201         iterator_element, implicit_dereference, variable_indexing.
8202         * aspects.ads, aspects.adb: entries for iterator-related aspects.
8203         * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
8204         iterator-related aspects.
8205         * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
8206
8207 2011-08-05  Sergey Rybin  <rybin@adacore.com>
8208
8209         * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
8210         metrics in gnatmetric to cover new kinds of coupling mentrics.
8211
8212 2011-08-05  Steve Baird  <baird@adacore.com>
8213
8214         * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
8215         of calling the user-defined main subprogram.
8216         (Gen_Main):  Declare Ada_Main_Program and (if CodePeer_Mode
8217         is set) Call_Main_Subprogram ahead of, as opposed to
8218         inside of, Main.
8219         (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
8220         generation of a "with" of the user-defined main subprogram.
8221         Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
8222         (which is now called from Gen_Main instead).
8223
8224 2011-08-05  Emmanuel Briot  <briot@adacore.com>
8225
8226         * projects.texi: Added reference to the Makefile package.
8227
8228 2011-08-05  Thomas Quinot  <quinot@adacore.com>
8229
8230         * exp_ch7.adb: Minor comment rewording.
8231
8232 2011-08-05  Ed Falis  <falis@adacore.com>
8233
8234         * env.c: Fix comment.
8235
8236 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
8237
8238         * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
8239         character comparison and rely on concrete entities instead.
8240
8241 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8242
8243         * sem_ch3.adb: (Check_Private_Overriding): better error message,
8244         suggested by AI95-0068.
8245
8246 2011-08-05  Hristian Kirtchev  <kirtchev@adacore.com>
8247
8248         * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
8249         the two potential initialization calls. This accounts for any
8250         access-before-elaboration checks which may precede the initialization
8251         calls.
8252         (Next_Suitable_Statement): New routine. Returns the next real statement
8253         after the input node while skipping generated checks.
8254         * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
8255         with comment on usage.
8256         Do not generate Elaborate_All when the trigger is a finalization call
8257         coming from a type init proc.
8258         (Check_Elab_Call): Propagate the initialization procedure context to
8259         subsequent calls to Check_A_Call.
8260         (Check_Internal_Call_Continue): Propagate the initialization procedure
8261         context to subsequent calls to Check_Elab_Call.
8262         (Is_Finalization_Procedure): New routine. Returns True if the input
8263         entity denotes a [Deep_]Finalize routine.
8264         * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
8265         along with comment on usage.
8266
8267 2011-08-05  Vadim Godunko  <godunko@adacore.com>
8268
8269         * s-atocou.ads: Add list of supported platforms.
8270
8271 2011-08-05  Yannick Moy  <moy@adacore.com>
8272
8273         * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
8274
8275         * opt.ads (Disable_ALI_File): new Boolean flag
8276         * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
8277
8278 2011-08-05  Ed Falis  <falis@adacore.com>
8279
8280         * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
8281         environ is properly defined.
8282
8283 2011-08-05  Vincent Celier  <celier@adacore.com>
8284
8285         * make.adb (Compilation_Phase): Exit immediately when all objects have
8286         been found up to date, to avoid multiple exit messages.
8287         * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
8288         same project for languages with no compiler.
8289         * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
8290         -eI.
8291 2011-08-05  Robert Dewar  <dewar@adacore.com>
8292
8293         * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
8294         sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
8295         prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
8296         s-atocou-builtin.adb: Minor reformatting.
8297
8298 2011-08-05  Yannick Moy  <moy@adacore.com>
8299
8300         * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
8301         if the node to wrap is a pragma check, this node and enclosed
8302         expression are not expanded, so do not apply any transformations here.
8303         * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
8304         introducing transient scopes.
8305
8306 2011-08-05  Jose Ruiz  <ruiz@adacore.com>
8307
8308         * adaint.c (__gnat_set_writable, __gnat_set_readable,
8309         __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
8310         __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
8311         routine is available, so we use the default implementation of these
8312         functions.
8313         * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
8314         support for copying attributes on VxWorks 6.
8315
8316 2011-08-05  Yannick Moy  <moy@adacore.com>
8317
8318         * debug.adb: Remove use of -gnatd.D.
8319         * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
8320         * opt.ads: Simplify variables for ALFA mode, to keep one only
8321         * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
8322         to ALFA mode.
8323
8324 2011-08-05  Vincent Celier  <celier@adacore.com>
8325
8326         * prj-conf.adb (Do_Autoconf): Look also for --RTS in
8327         Builder'Default_Switches.
8328
8329 2011-08-05  Vincent Celier  <celier@adacore.com>
8330
8331         * makeusg.adb: Add lines for --create-map-file switches.
8332
8333 2011-08-05  Ed Schonberg  <schonberg@adacore.com>
8334
8335         * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
8336         profile is incomplete and the full view is available, replace it with
8337         the full view.
8338         * sem_ch6.adb (Possible_Freeze): if a type in the profile is
8339         incomplete, freezing the subprogram is delayed until the full view is
8340         frozen.
8341         * sem_type.adb (Disambiguate): an ambiguity between a user-defined
8342         fixed-point multiplication operator and the predefined operator is
8343         resolved in favor of the user-defined one.
8344
8345 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8346
8347         * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
8348         CONST_CAST.
8349
8350 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8351
8352         * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
8353         whether a type lacks user-defined Read or Write operations, or has a
8354         component that lacks them.
8355         * sem_attr.adb (Check_Stream_Attribute): if restriction
8356         No_Default_Stream_Attributes is active, verify that all subcomponent
8357         types of the target have user-defined stream operations, and report
8358         error otherwise.
8359         * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
8360         * exp_strm.adb: Build_Elementary_Input_Call,
8361         Build_Elementary_Write_Call): remove checks for restriction
8362         No_Default_Stream_Attributes, now checked in semantics.
8363
8364 2011-08-04  Vincent Celier  <celier@adacore.com>
8365
8366         * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
8367         switches on the command line, look for all valid --RTS switches in the
8368         Builder switches and for each language use the first runtime name found
8369         to invoke gprconfig.
8370         (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
8371         command line and there is no auto-configuration.
8372         (Runtime_Name_Set_For): New function.
8373
8374 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8375
8376         * exp_ch7.adb (Build_Object_Declarations): Do not generate the
8377         elaborate initialization expression for variable Abort when processing
8378         a package body or a declaration.
8379         (Create_Finalizer): Propagate the package context when creating the
8380         exception-related variables.
8381         * exp_ch7.ads (Build_Object_Declarations): New formal parameter
8382         For_Package along with usage comment.
8383
8384 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8385
8386         * gcc-interface/Makefile.in: Clean up targets.
8387         Enable new package for atomic counters and copy-on-write implementation
8388         of unbounded strings on x86 platforms.
8389         * gcc-interface/Make-lang.in: Update dependencies.
8390
8391 2011-08-04  Robert Dewar  <dewar@adacore.com>
8392
8393         * exp_ch7.adb: Minor reformatting.
8394
8395 2011-08-04  Robert Dewar  <dewar@adacore.com>
8396
8397         * exp_strm.adb: Minor reformatting.
8398
8399 2011-08-04  Vadim Godunko  <godunko@adacore.com>
8400
8401         * s-atocou.adb: Replace by dummy version and use on targets where atomic
8402         operations are not supported.
8403         * s-atocou-builtin.adb: Renamed from s-atocou.adb.
8404         * s-atocou-x86.adb: New file.
8405         * Makefile.rtl: Add s-atocou.o file
8406
8407 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8408
8409         * make.adb (Compile): Move setting of CodePeer_Mode to ...
8410         (Compilation_Phase): ... here.
8411         (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
8412
8413 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8414
8415         * Make-generated.in: Fix minor typo in comment.
8416
8417 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8418
8419         * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
8420         the project path.
8421
8422 2011-08-04  Robert Dewar  <dewar@adacore.com>
8423
8424         * a-coinho.adb: Minor reformatting.
8425
8426 2011-08-04  Robert Dewar  <dewar@adacore.com>
8427
8428         * a-coinho.ads: Minor reformatting.
8429
8430 2011-08-04  Vadim Godunko  <godunko@adacore.com>
8431
8432         * s-atocou.ads, s-atocou.adb: New files.
8433         * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
8434         a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
8435         direct use of GCC's atomic builtins and replace them by use of new
8436         atomic counter package.
8437
8438 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8439
8440         * exp_strm.adb: better error message for No_Default_Stream_Attributes.
8441
8442 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8443
8444         * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
8445         with a call to Get_External_Tag.
8446         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
8447         subprogram usage. Remove the guard against package declarations and
8448         bodies since Build_Cleanup_Statements is no longer invoked in that
8449         context.
8450         (Build_Components): Initialize Tagged_Type_Stmts when the context
8451         contains at least one library-level tagged type.
8452         (Build_Finalizer): New local variables Has_Tagged_Types and
8453         Tagged_Type_Stmts along with associated comments on usage. Update the
8454         logic to include tagged type processing.
8455         (Create_Finalizer): Insert all library-level tagged type unregistration
8456         code before the jump block circuitry.
8457         (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
8458         (Expand_N_Package_Declaration): Remove the call to
8459         Build_Cleanup_Statements.
8460         (Process_Tagged_Type_Declaration): New routine. Generate a call to
8461         unregister the external tag of a tagged type.
8462         (Processing_Actions): Reimplemented to handle tagged types.
8463         (Process_Declarations): Detect the declaration of a library-level
8464         tagged type and carry out the appropriate actions.
8465         (Unregister_Tagged_Types): Removed. The machinery has been directly
8466         merged with Build_Finalizer.
8467
8468 2011-08-04  Robert Dewar  <dewar@adacore.com>
8469
8470         * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
8471         gnatls.adb, exp_ch3.adb: Minor reformatting.
8472
8473 2011-08-04  Marc Sango  <sango@adacore.com>
8474
8475         * sem_attr.adb (Analyze_Attribute): Replace the message
8476         "invisible attribute of}" of the spark restriction violation in
8477         attribute reference by the simple message "invisible attribute of type".
8478         Indeed, the node value Error_Msg_Node_1 used is in conflit with the
8479         two insertion characters: '&' and '}'.
8480
8481 2011-08-04  Vadim Godunko  <godunko@adacore.com>
8482
8483         * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
8484         * a-coinho.ads, a-coinho.adb: New file.
8485         * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
8486
8487 2011-08-04  Nicolas Roche  <roche@adacore.com>
8488
8489         * alfa_test.adb: Not all ali files are containing alfa information even
8490         if compiled with -gnatd.F. So suppress warning about missing ALFA
8491         information.
8492
8493 2011-08-04  Yannick Moy  <moy@adacore.com>
8494
8495         * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
8496         scope.
8497         * put_alfa.adb: Check that scope name is not empty.
8498
8499 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8500
8501         * exp_ch3.adb (Stream_Operation_Ok): new predicate
8502         Needs_Elementary_Stream_Operation, to determine whether user-defined
8503         Read and Write attributes are available for the elementary components
8504         of the given type. If only the predefined attributes are available,
8505         then when restriction No_Default_Stream_Attributes is active the
8506         predefined stream attributes for the composite type cannot be created.
8507
8508 2011-08-04  Robert Dewar  <dewar@adacore.com>
8509
8510         * bindgen.adb: Fix obsolete comments and names from Ada/C days.
8511         Put routines in alpha order
8512
8513 2011-08-04  Jose Ruiz  <ruiz@adacore.com>
8514
8515         * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
8516         * gcc-interface/Make-lang.in: Update dependencies.
8517
8518 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8519
8520         * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
8521         * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
8522         gnat1why).
8523
8524 2011-08-04  Robert Dewar  <dewar@adacore.com>
8525
8526         * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
8527         lib-xref-alfa.adb: Minor reformatting.
8528
8529 2011-08-04  Marc Sango  <sango@adacore.com>
8530
8531         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
8532         Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
8533         Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
8534         mode.
8535
8536 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8537
8538         * bindgen.adb (Gen_Adainit_C): Remove.
8539         (Gen_Adafinal_C): Ditto.
8540         (Gen_Elab_Externals_C): Ditto.
8541         (Gen_Elab_Calls_C): Ditto.
8542         (Gen_Elab_Order_C): Ditto.
8543         (Gen_Elab_Defs_C): Ditto.
8544         (Gen_Finalize_Library_C): Ditto.
8545         (Gen_Finalize_Library_Defs_C): Ditto.
8546         (Gen_Main_C): Ditto.
8547         (Gen_Output_File_C): Ditto.
8548         (Gen_Restrictions_C): Ditto.
8549         (Gen_Versions_C): Ditto.
8550         (Write_Info_Ada_C): Ditto.
8551         (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
8552         (Gen_Output_File): Do not force Ada_Bind_File anymore.
8553         Always call Gen_Output_File_Ada.
8554         * gnatlink.adb (Begin_Info): Now a constant.
8555         (End_Info): Ditto.
8556         (Ada_Bind_File): Remove
8557         (Process_Args): Do not handle -A/-C.  Remove not Ada_Bind_File cases.
8558         * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
8559         * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
8560         * opt.ads (Ada_Bind_File): Remove.
8561
8562 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8563
8564         * projects.texi: Document target-specific directory in default project
8565         path for gnatmake.
8566
8567 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8568
8569         * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
8570         path in all cases .
8571
8572 2011-08-04  Yannick Moy  <moy@adacore.com>
8573
8574         * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
8575         opt.ads, lib-xref.ads: Code clean up.
8576
8577 2011-08-04  Yannick Moy  <moy@adacore.com>
8578
8579         * gnat_rm.texi: Update description of Test_Case
8580         * gnat_ugn.texi: Typo.
8581
8582 2011-08-04  Ed Falis  <falis@adacore.com>
8583
8584         * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
8585
8586 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8587
8588         * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
8589         it is of type Root_Controlled. This action eliminates fields Prev and
8590         Next from type equality.
8591
8592 2011-08-04  Yannick Moy  <moy@adacore.com>
8593
8594         * lib-xref-alfa.adb: Correct typo.
8595
8596 2011-08-04  Matthew Heaney  <heaney@adacore.com>
8597
8598         * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
8599         component.
8600
8601 2011-08-04  Yannick Moy  <moy@adacore.com>
8602
8603         * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
8604         (Analyze_Pragma): allow static string expression for name of Test_Case,
8605         instead of simply string literals.
8606         * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
8607         expressions.
8608
8609 2011-08-04  Vincent Celier  <celier@adacore.com>
8610
8611         * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
8612         case suffixes to find truncated main sources.
8613
8614 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8615
8616         * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
8617         s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
8618         (Compute_Current_Task): Ditto.
8619
8620 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8621
8622         * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
8623
8624 2011-08-04  Yannick Moy  <moy@adacore.com>
8625
8626         * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
8627         library-level constant.
8628         (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
8629         * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
8630         used as selector of parameter association, in ALFA mode.
8631
8632 2011-08-04  Robert Dewar  <dewar@adacore.com>
8633
8634         * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
8635         s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
8636         reformatting.
8637
8638 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8639
8640         * make.adb (Linking_Phase): Set source search path before calling
8641         gnatlink in CodePeer mode.
8642
8643 2011-08-04  Javier Miranda  <miranda@adacore.com>
8644
8645         * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
8646         Remove code which takes care of building TSDs.
8647         * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
8648         * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
8649         the accessibility check in VM targets.
8650         * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
8651         (Building_Static_DT): Now returns false for VM targets.
8652         (Build_VM_TSDs): Removed.
8653         (Expand_Interface_Conversion): Generate missing runtime check for
8654         conversions to interface types whose target type is unknown at compile
8655         time.
8656         (Make_VM_TSD): Add missing code to disable the generation of calls to
8657         Check_TSD if the tagged type is not defined at library level, or not
8658         has a representation clause specifying its external tag, or -gnatdQ is
8659         active.
8660         * exp_disp.ads (Build_VM_TSDs): Removed.
8661         (Make_VM_TSDs): Spec relocated from exp_disp.adb
8662         * sem_disp.adb (Check_Dispatching_Operation): No code required to
8663         register primitives in the dispatch tables in VM targets.
8664         * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
8665         initialization of class-wide interface objects in VM targets.
8666         (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
8667         of Make_DT).
8668
8669 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
8670
8671         * gnatlink.adb (Gnatlink): Correct missleading error message displayed
8672         when dotnet-ld cannot be found.
8673
8674 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
8675
8676         * bindgen.adb: Simplify significantly generation of binder body file in
8677         CodePeer mode.
8678         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
8679         when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
8680         not expanded).
8681
8682 2011-08-04  Yannick Moy  <moy@adacore.com>
8683
8684         * sem_prag.adb, sem.ads: Code cleanup.
8685
8686 2011-08-04  Tristan Gingold  <gingold@adacore.com>
8687
8688         * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
8689         * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
8690         results if possible.
8691         * s-stusta.adb (Print): Adjust after changes in s-stausa.
8692         * gnat_ugn.texi: Update dynamic stack usage section.
8693
8694 2011-08-04  Steve Baird  <baird@adacore.com>
8695
8696         * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
8697         Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
8698         contains only a call to the user-defined main subprogram.
8699         (Gen_Main_Ada) - If CodePeer_Mode is set, then
8700         call the "wrapper" subprogram instead of directly
8701         calling the user-defined main subprogram.
8702
8703 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8704
8705         * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
8706         alternatives of a case statement for controlled objects. Rename local
8707         variable A to Dead_Alt.
8708         (Expand_N_If_Statement): Check the then and else statements of an if
8709         statement for controlled objects. Check the then statements of all
8710         elsif parts of an if statement for controlled objects.
8711         (Expand_N_Loop_Statement): Check the statements of a loop for controlled
8712         objects.
8713         * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
8714         detects a loop associated with the expansion of an array object.
8715         Augment the processing of the loop statements to account for a possible
8716         wrap done by Process_Statements_For_Controlled_Objects.
8717         * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
8718         statements and abortable part of an asynchronous select for controlled
8719         objects.
8720         (Expand_N_Conditional_Entry_Call): Check the else statements of a
8721         conditional entry call for controlled objects.
8722         (Expand_N_Selective_Accept): Check the alternatives of a selective
8723         accept for controlled objects.
8724         (Expand_N_Timed_Entry_Call): Check the entry call and delay
8725         alternatives of a timed entry call for controlled objects.
8726         * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
8727         exception handler for controlled objects.
8728         * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
8729         Add formal parameter Nested_Constructs along with its associated
8730         comment.
8731         (Requires_Cleanup_Actions (Node_Id)): Update all calls to
8732         Requires_Cleanup_Actions.
8733         (Process_Statements_For_Controlled_Objects): New routine.
8734         * exp_util.ads (Process_Statements_For_Controlled_Objects): New
8735         routine. Inspect a node which contains a non-handled sequence of
8736         statements for controlled objects. If such an object is found, the
8737         statements are wrapped in a block.
8738
8739 2011-08-04  Bob Duff  <duff@adacore.com>
8740
8741         * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
8742         need to compare with Class_Wide_Type (T2), in order to get at the
8743         original class-wide type node.
8744         * sem_type.ads (Covers): Improve the comment.
8745         * einfo.ads (Class_Wide_Type): Improve the comment.
8746         * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
8747         the type of the Deref.
8748
8749 2011-08-04  Yannick Moy  <moy@adacore.com>
8750
8751         * gnat_rm.texi: Document that Test_Case pragma can only appear on
8752         separate declarations.
8753         * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
8754         check identifier of pragma argument.
8755         (Chain_TC): check that no other test case associated to the same entity
8756         share the same name.
8757         (Check_Test_Case): disallow test case inside subprogram body
8758         (Analyze_Pragma): correct call to check identifier and not argument
8759         * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
8760         function gets name from test case pragma.
8761
8762 2011-08-04  Yannick Moy  <moy@adacore.com>
8763
8764         * gnat_rm.texi: Document new pragma and aspect.
8765         * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
8766         (No_Duplicates_Allowed): new constant array defining whether duplicates
8767         aspects of each kind can appear on the same declaration.
8768         * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
8769         field, which points to a node holding the previous Spec_PPC_List.
8770         * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
8771         through the indirection with Contract.
8772         * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
8773         * par-prag.adb (Prag): do nothing on Test_Case pragma
8774         * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
8775         be called directly.
8776         * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
8777         component Ensures of Test_Case.
8778         * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
8779         (Analyze_Generic_Subprogram_Declaration,
8780         Analyze_Subprogram_Instantiation,
8781         Analyze_Abstract_Subprogram_Declaration,
8782         Analyze_Subprogram_Body_Helper,
8783         Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
8784         insert contract in subprogram node at point of definition
8785         * sem_ch13.adb
8786         (Aspect_Loop): do not raise error on duplicate Test_Case aspect
8787         (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
8788         corresponding pragma
8789         (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
8790         * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
8791         similar to the analysis of pre/post
8792         (Derive_Subprogram): insert contract in subprogram node at point of
8793         derivation.
8794         * sem_prag.adb, sem_prag.ads
8795         (Check_Arg_Is_String_Literal, Check_Identifier):
8796         new checking procedures to be called in treatment of pragmas
8797         (Check_Test_Case): new procedure to check that a Test_Case aspect or
8798         pragma is well-formed. This does not check currently that 'Result is
8799         used only in the Ensures component of a Test_Case.
8800         (Analyze_Pragma): add case for Test_Case
8801         (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
8802         components of a Test_Case.
8803         (Preanalyze_TC_Args): new procedure to preanalyze the boolean
8804         expressions in the 3rd (and 4th if present) arguments of a Test_Case
8805         pragma, treated as spec expressions.
8806         (Sig_Flags): add value -1 for Test_Case.
8807         * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
8808         Get_Requires_From_Test_Case_Pragma): getters for both expression
8809         components of a Test_Case.
8810         * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
8811         indirection between an entry or [generic] subprogram entity and its
8812         pre/post + test-cases.
8813         (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
8814         get/set for fields of an N_Contract node.
8815         * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
8816         Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
8817         names and pragma for Test_Case.
8818         * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
8819
8820 2011-08-04  Vincent Celier  <celier@adacore.com>
8821
8822         * gnat_ugn.texi: Improve documentation of gnatmake switch
8823         --source-info-file=.
8824
8825 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8826
8827         * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
8828         type). Initialize Atyp to the appropriate type which is later checked
8829         for completion. Rewrite the assertion associated with private type
8830         completion.
8831
8832 2011-08-04  Ed Falis  <falis@adacore.com>
8833
8834         * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
8835         initialize the number of CPUs.
8836
8837 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8838
8839         * sem_type.adb (Disambiguate): New subsidiary routine
8840         In_Same_Declaration_List, to implement AI05-0020: a user-defined
8841         equality on an anonymous access type whose designated type is private
8842         does not lead to an ambiguity with the universal access equality
8843         operator in the body or child units of the defining package. The same
8844         is true for a multiplication operator on a private type completed with
8845         a fixed-point-type.
8846
8847 2011-08-04  Javier Miranda  <miranda@adacore.com>
8848
8849         * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
8850         (Normalize_Scalars_Config): Removed.
8851         * opt.adb
8852         (Register_Opt_Config_Switches): Remove registering config values of
8853         Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
8854         (Restore_Opt_Config_Switches): Remove code which restores the values of
8855         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8856         Init_Or_Norm_Scalars.
8857         (Save_Opt_Config_Switches): Remove code which saves values of
8858         Init_Or_Norm_Scalars and Normalize_Scalars.
8859         (Set_Opt_Config_Switches): Remove code which restores config values of
8860         Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
8861         Init_Or_Norm_Scalars.
8862
8863 2011-08-04  Yannick Moy  <moy@adacore.com>
8864
8865         * frontend.adb (Frontend): remove previous patch to avoid full
8866         qualification in ALFA mode.
8867         * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
8868         * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
8869         unique name for an entity, which could be used to identify the entity
8870         across compilation units.
8871
8872 2011-08-04  Thomas Quinot  <quinot@adacore.com>
8873
8874         * prj-env.adb
8875         (Initialize_Default_Project_Path): Add target specific directory
8876         ($prefix/$target/lib/gnat) in front of project path in all cases
8877         (making gnatmake's behaviour consistent with gprbuild).
8878         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
8879         Pass target name from Sdefault to project subsystem.
8880         * gnatls.adb: Show new target specific default project directory.
8881
8882 2011-08-04  Johannes Kanig  <kanig@adacore.com>
8883
8884         * cstand.adb: Add Information to Identifier in Standard
8885         (Identifer_For): Set Entity to the corresponding entity
8886
8887 2011-08-04  Sergey Rybin  <rybin@adacore.com>
8888
8889         * gnat_ugn.texi: Update doc on gnatcheck.
8890
8891 2011-08-04  Yannick Moy  <moy@adacore.com>
8892
8893         * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
8894         xrefs in a scope.
8895
8896 2011-08-04  Yannick Moy  <moy@adacore.com>
8897
8898         * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
8899         performing expansion.
8900         * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
8901         Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
8902         it is not called in ALFA mode.
8903
8904 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8905
8906         * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
8907         after all, so removed.
8908
8909 2011-08-04  Sergey Rybin  <rybin@adacore.com>
8910
8911         * vms_data.ads: Add missing VMS qualifiers.
8912
8913 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8914
8915         * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
8916         the list of files on the command line after processing it through
8917         Complete_Mains.
8918
8919 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8920
8921         * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
8922         processing for .NET/JVM. These targets can now benefit from
8923         Raise_From_Controlled_Operation and they share the same processing with
8924         standard targets.
8925         (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
8926         These targets need transient scopes in order to properly finalize short
8927         lived controlled objects.
8928         (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
8929          NET/JVM. These targets can now benefit from
8930         Raise_From_Controlled_Operation and they share the same processing with
8931         standard targets.
8932
8933 2011-08-04  Geert Bosch  <bosch@adacore.com>
8934
8935         * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
8936
8937 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
8938
8939         * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
8940         Expand_Record_Aggregate, to determine whether aggregate must be
8941         expanded into assignments. This is the case if the ancestor part is
8942         private, regarless of the setting of the flag Has_Private_Ancestor.
8943
8944 2011-08-04  Ed Falis  <falis@adacore.com>
8945
8946         * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
8947
8948 2011-08-04  Bob Duff  <duff@adacore.com>
8949
8950         * sinfo.ads: Fix comment.
8951
8952 2011-08-04  Steve Baird  <baird@adacore.com>
8953
8954         * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
8955         choose a package name in much the same way as is
8956         done for JGNAT when VM_Target /= No_VM, except that
8957         a slightly more distinctive prefix string is used.
8958
8959 2011-08-04  Emmanuel Briot  <briot@adacore.com>
8960
8961         * makeutl.adb (Complete_Mains): no longer accept unit names on the
8962         gnatmake command line.
8963         This behavior was never documented (and was supported only because of
8964         an early bug in the code). This case might lead to ambiguous cases
8965         (between unit names and truncated base names without suffixes).
8966
8967 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
8968
8969         * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
8970         Remove the external tag of a tagged type from the internal hash table.
8971         * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
8972         expanded usage of the routine. Strenghten the check for Is_Master. Add
8973         processing for tagged types.
8974         (Build_Finalizer): Create all the necessary lists used in finalizer
8975         creation when the processed context is a package that may contain
8976         tagged types.
8977         (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
8978         Requires_Cleanup_Actions.
8979         (Expand_N_Package_Body): Package bodies may need clean up code
8980         depending on whether they contain tagged types.
8981         (Expand_N_Package_Declaration): Package declarations may need clean up
8982         code depending on whether they contain tagged types.
8983         (Unregister_Tagged_Types): New routine. Search through a list of
8984         declarations or statements, looking for non-abstract Ada tagged types.
8985         For each such type, generate code to unregister the external tag.
8986         * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
8987         Requires_Cleanup_Actions.
8988         (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
8989         through a list of declarations or statements looking for non-abstract
8990         Ada tagged types or controlled objects.
8991         * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
8992         Requires_Cleanup_Actions.
8993         (Has_Controlled_Objects (List_Id, Boolean)): Removed.
8994         * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
8995         RE_Unit_Table.
8996
8997 2011-08-04  Vincent Celier  <celier@adacore.com>
8998
8999         * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
9000         has Ada sources, not project Project, because if the root project
9001         Project has no sources of its own, all projects will be deemed without
9002         sources.
9003
9004 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
9005
9006         * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
9007         of the No_Param_Proc acc-to-subp type used for initialization of
9008         __gnat_finalize_library_objects so that it's declared at library level
9009         rather than nested inside of the adainit routine.
9010
9011 2011-08-04  Javier Miranda  <miranda@adacore.com>
9012
9013         * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
9014         if the tagged type has a representation clause which specifies its
9015         external tag.
9016
9017 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9018
9019         * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
9020         Remove previous procedure with that name.
9021         * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
9022         when appropriate.
9023         * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
9024         subtype mark, the ancestor cannot have unknown discriminants.
9025         (Resolve_Record_Aggregate): if the type has invisible components
9026         because of a private ancestor, the aggregate is illegal.
9027
9028 2011-08-04  Vincent Celier  <celier@adacore.com>
9029
9030         * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
9031         account switches -gnat2005, -gnat12 and -gnat2012.
9032
9033 2011-08-04  Bob Duff  <duff@adacore.com>
9034
9035         * s-tasdeb.ads: Minor comment fix.
9036
9037 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9038
9039         * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
9040         CodePeer mode.
9041         * switch.ads, switch.adb (Is_Language_Switch): New function.
9042
9043 2011-08-04  Vincent Celier  <celier@adacore.com>
9044
9045         * switch-c.adb: Minor comment addition.
9046
9047 2011-08-04  Vincent Celier  <celier@adacore.com>
9048
9049         * vms_conv.adb (Process_Argument): Fail graciously when qualifier
9050         ending with '=' is followed by a space (missing file name).
9051
9052 2011-08-04  Pascal Obry  <obry@adacore.com>
9053
9054         * g-regist.ads: Fix size of HKEY on x86_64-windows.
9055
9056 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9057
9058         * sem_ch12.adb (Analyze_Associations): New routine
9059         Check_Overloaded_Formal_Subprogram to reject a formal package when
9060         there is a named association or a box initialisation for an overloaded
9061         formal subprogram of the corresponding generic.
9062
9063 2011-08-04  Yannick Moy  <moy@adacore.com>
9064
9065         * alfa.ads (ALFA_Xref_Record): add component for type of entity
9066         * get_alfa.adb, put_alfa.adb: Read and write new component of
9067         cross-reference.
9068         * lib-xref-alfa.adb (Collect_ALFA): generate new component.
9069
9070 2011-08-04  Pascal Obry  <obry@adacore.com>
9071
9072         * urealp.adb: Minor reformatting.
9073
9074 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9075
9076         * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
9077         Handle the case when Cleanup_Protected_Object returns Empty.
9078
9079 2011-08-04  Yannick Moy  <moy@adacore.com>
9080
9081         * frontend.adb (Frontend): only qualify names in non-ALFA mode
9082
9083 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9084
9085         * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
9086         call, ignore functions.
9087
9088 2011-08-04  Geert Bosch  <bosch@adacore.com>
9089
9090         * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
9091         point.
9092
9093 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9094
9095         * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
9096         as an index for Builder'Switches. This conforms to the documentation.
9097         * make.adb (Insert_Project_Sources): avoid duplicate code
9098
9099 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9100
9101         * makeutl.adb (Complete_Mains): if the user has passed a relative file
9102         name on the command line (for instance "../dummy"), never assume it can
9103         be a unit name.
9104
9105 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9106
9107         * bindgen.adb: Remove code the reference or create the
9108         Break_Start/__gnat_break_start procedure.
9109         * s-stalib.adb (Break_Start): Removed.
9110
9111 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9112
9113         * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
9114         shared with gprbuild.
9115
9116 2011-08-04  Yannick Moy  <moy@adacore.com>
9117
9118         * par-ch4.adb (P_Primary): preferentially issue an error message about
9119         a missing parenthesis arount a conditional or case expression in Ada
9120         2012 mode, if we detect that the alignment is not correct for a
9121         statement.
9122
9123 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9124
9125         * exp_ch7.adb (Process_Declarations): Do not consider the result of a
9126         tag-to-class-wide conversion as needing finalization actions.
9127         * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
9128         a tag-to-class-wide conversion as needing finalization actions.
9129         (Is_Finalizable_Transient): The result of a tag-to-class-wide
9130         conversion does not need finalization actions.
9131         (Is_Tag_To_CW_Conversion): New routine.
9132         * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
9133         whether an object is the result of a tag-to-class-wide conversion.
9134
9135 2011-08-04  Yannick Moy  <moy@adacore.com>
9136
9137         * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
9138         the left-hand-side and right-hand-side of a conjunct are inserted when
9139         translating a pre- or postcondition
9140         * sem_ch6.adb: Correct typo in comment
9141
9142 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9143
9144         * gnat_rm.texi: Ravenscar does not prohibit dependence on
9145         Unchecked_Conversion and Unchecked_Deallocation.
9146
9147 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9148
9149         * make.adb: Minor reformatting.
9150
9151 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9152
9153         * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
9154         sources in the project and its imported projects, but not in the whole
9155         tree.
9156
9157 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9158
9159         * make.adb: Remove debug trace.
9160
9161 2011-08-04  Vincent Celier  <celier@adacore.com>
9162
9163         * makeutl.adb (Do_Complete): Get the absolute path name of a relative
9164         path in canonical form, to be able to compare path names on platforms
9165         such as Windows or Darwin.
9166
9167 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9168
9169         * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
9170         For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
9171         * scos.ads: Update documentation accordingly.
9172         * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
9173         pragmas.
9174
9175 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9176
9177         * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
9178         attribute only if prefix type is scalar.
9179
9180 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9181
9182         * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
9183         in gnatmake for specifying mains on the command line that do not belong
9184         to the main project. These mains must currently all belong to the same
9185         project, though.
9186         (Ultimate_Extension_Of): removed, since duplicated
9187         Ultimate_Extending_Project.
9188
9189 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9190
9191         * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
9192         instead.
9193         (CodePeer_Mode_String): New.
9194         (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
9195         CodePeer mode.
9196         (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
9197         * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
9198         mode, since no useful elaboration subprogram is needed by CodePeer.
9199         * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
9200         In this mode, compile binder file with -gnatC and do stop after this
9201         step.
9202
9203 2011-08-04  Vincent Celier  <celier@adacore.com>
9204
9205         * exp_ch7.adb: Minor comment fix.
9206
9207 2011-08-04  Robert Dewar  <dewar@adacore.com>
9208
9209         * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
9210         exp_ch4.adb, makeutl.adb: Minor reformatting.
9211
9212 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9213
9214         * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
9215         Create several new subprograms to move code out of Make. This makes the
9216         code more readable, removes code duplication, and is a preparation work
9217         for adding support for aggregate projects.
9218
9219 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9220
9221         * s-po32gl.ads, s-po32gl.adb: New files.
9222         * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
9223         * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
9224         (Build_Finalization_Collection): Use it.
9225         * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
9226         * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
9227         literals.
9228         * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
9229         * gcc-interface/Make-lang.in: Update dependencies.
9230
9231 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9232
9233         * makeutl.adb (Complete_Mains): add support for specs with no suffix on
9234         the command line.
9235
9236 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9237
9238         * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
9239         command line is not a file name, also check whether it could be a unit
9240         name.
9241
9242 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9243
9244         * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
9245         the header of the finalization routine.
9246         If the unit has no finalizer but is a body whose spec has one, then
9247         generate the decrement of the elaboration entity only.
9248         If the unit has a finalizer and is a spec, then do not generate the
9249         decrement of the elaboration entity.
9250         (Gen_Finalize_Library_C): Likewise.
9251
9252 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9253
9254         * exp_ch7.adb (Alignment_Of): New subsidiary routine.
9255         (Bounds_Size_Expression): Removed.
9256         (Double_Alignment_Of): New subsidiary routine.
9257         (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
9258         for a hole in the dope vector of unconstrained arrays due to different
9259         index and element alignments.
9260
9261 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9262
9263         * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
9264         raise program_error because body has not been seen yet.
9265
9266 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9267
9268         * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
9269         an unresolved name.
9270
9271 2011-08-04  Vincent Celier  <celier@adacore.com>
9272
9273         * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
9274
9275 2011-08-04  Yannick Moy  <moy@adacore.com>
9276
9277         * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
9278         * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
9279
9280 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9281
9282         * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
9283         instantiation in RCI.
9284
9285 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9286
9287         * make.adb: Share more code with gprbuild
9288
9289 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9290
9291         * projects.texi: Added documentation for the IDE'Gnat project file
9292         attribute.
9293
9294 2011-08-04  Nicolas Roche  <roche@adacore.com>
9295
9296         * gnat_rm.texi: Minor editing.
9297
9298 2011-08-04  Javier Miranda  <miranda@adacore.com>
9299
9300         * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
9301         and the library case for VM targets.
9302         (Gen_Adainit_Ada): Likewise.
9303
9304 2011-08-04  Robert Dewar  <dewar@adacore.com>
9305
9306         * g-altive.ads: Minor comment updates.
9307         * prj-nmsc.adb: Minor reformatting.
9308
9309 2011-08-04  Javier Miranda  <miranda@adacore.com>
9310
9311         * opt.ads
9312         (Normalize_Scalars_Config): Value of the configuration switch set by
9313         pragma Normalize_Scalars when it appears in the gnat.adc file.
9314         (Normalize_Scalars): New field for record Config_Switches_Type. Used
9315         to save and restore settings of this pragma.
9316         * opt.adb
9317         (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
9318         Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
9319
9320 2011-08-04  Vincent Celier  <celier@adacore.com>
9321
9322         * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
9323
9324 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9325
9326         * makeutl.adb: Minor reformatting.
9327
9328 2011-08-04  Olivier Hainque  <hainque@adacore.com>
9329
9330         * g-altive.ads: Update comments to reflect that only the soft
9331         binding is available today.
9332
9333 2011-08-04  Robert Dewar  <dewar@adacore.com>
9334
9335         * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
9336         makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
9337         * gcc-interface/Make-lang.in: Update dependencies.
9338
9339 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9340
9341         * prj-env.adb: Remove local debug traces.
9342
9343 2011-08-04  Yannick Moy  <moy@adacore.com>
9344
9345         * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
9346         was used instead of Hi_OK, which could cause a read of an uninitialized
9347         value later on. Detected while working on the new warning.
9348         * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
9349         to local variable.
9350         * sem_ch5.adb (Analyze_Assignment): set the last assignment component
9351         in more cases, in order to detect more unreferenced values.
9352         * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
9353         object for expression, if any.
9354
9355 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9356
9357         * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
9358         the operand types instead of the Esize.
9359
9360 2011-08-04  Steve Baird  <baird@adacore.com>
9361
9362         * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
9363         enable CodePeer_Mode.
9364         * bindusg.adb (Display): Add help message describing -P binder switch.
9365         * gnat_ugn.texi: Document -P binder switch.
9366         * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
9367         user-defined main program directly.
9368         (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
9369         user-defined main program in the context clause of the package body.
9370
9371 2011-08-04  Yannick Moy  <moy@adacore.com>
9372
9373         * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
9374         duplicate of Defining_Entity
9375         (Get_Unique_Entity_For_Decl): rename function into
9376         Unique_Defining_Entity
9377         * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
9378         (Formal_Proof_On): remove synthesized flag
9379         * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9380         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
9381         sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
9382         * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
9383         Annotate (Formal_Proof)
9384
9385 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9386
9387         * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
9388         source files with non-standard naming schemes, in imported projects
9389
9390 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9391
9392         * makeutl.adb (Complete_Mains): when a multi-unit source file is
9393         specified on the gprbuild command line, we need to compile all units
9394         within that file, not just the first one we find
9395         Fix error message for mains that are not found.
9396
9397 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9398
9399         * sem_ch6.adb: Update comment.
9400         * sem_ch12.adb: Minor reformatting.
9401
9402 2011-08-04  Bob Duff  <duff@adacore.com>
9403
9404         * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
9405         Acceptor.Terminate_Alternative without locking Acceptor, which causes a
9406         race condition whose symptom is to fail to lock Parent. That, in turn,
9407         causes Parent.Awake_Count to be accessed without locking Parent, which
9408         causes another race condition whose symptom is that Parent.Awake_Count
9409         can be off by 1 (either too high or too low). The solution is to lock
9410         Parent unconditionally, and then lock Acceptor, before reading
9411         Acceptor.Terminate_Alternative.
9412
9413 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9414
9415         * debug.adb: Update comment.
9416
9417 2011-08-04  Robert Dewar  <dewar@adacore.com>
9418
9419         * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
9420         sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
9421         exp_ch6.adb: Minor reformatting.
9422
9423 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
9424
9425         * gnat_ugn.texi: Add sentence about the case of compile-time-detected
9426         checks for -gnateE.
9427
9428 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9429
9430         * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
9431
9432 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9433
9434         * sinfo.ads: Minor reformatting.
9435
9436 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9437
9438         * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
9439         even if there is no location.
9440
9441 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9442
9443         * sem_res.adb, sem_ch4.adb: move check for restriction
9444         No_Task_Hierarchy to resolve_allocator.
9445
9446 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9447
9448         * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
9449         This flag of N_Pragma nodes is not used, remove it as well as all of
9450         the associated circuitry.
9451
9452 2011-08-04  Javier Miranda  <miranda@adacore.com>
9453
9454         * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
9455         runtime check on duplicated externa tags
9456         * debug.adb Document switch -gnatdQ.
9457
9458 2011-08-04  Gary Dismukes  <dismukes@adacore.com>
9459
9460         * a-fihema.ads: Minor typo fix.
9461
9462 2011-08-04  Yannick Moy  <moy@adacore.com>
9463
9464         * sem_ch10.adb: Minor comment update.
9465
9466 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9467
9468         * einfo.adb: Update the node field usage to reflect the renaming of
9469         Return_Flag to Return_ Flag_Or_Transient_Decl.
9470         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
9471         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
9472         (Write_Field15_Name): Change Return_Flag to
9473         Return_Flag_Or_Transient_Decl.
9474         * einfo.ads: Rename node field Return_Flag to
9475         Return_Flag_Or_Transient_Decl. Update the associated comment and all
9476         occurrences in entities.
9477         (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
9478         associated Inline pragma.
9479         (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
9480         associated Inline pragma.
9481         * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
9482         routine.
9483         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
9484         Return_Flag and Set_Return_Flag.
9485         * exp_ch7.adb (Process_Declarations): Add code to recognize hook
9486         objects generated for controlled transients declared inside an
9487         Exception_With_Actions. Update the calls to Return_Flag.
9488         (Process_Object_Declaration): Add code to add a null guard for hook
9489         objects generated for controlled transients declared inside an
9490         Exception_With_Actions. Update related comment.
9491         * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
9492         objects generated for controlled transients declared inside an
9493         Exception_With_Actions. Update the calls to Return_Flag.
9494         * expander.adb (Expand): Add new case for N_Expression_With_Actions.
9495
9496 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9497
9498         * sem_util.adb:(Wrong_Type): Improve error message on a one-element
9499         positional aggregate.
9500
9501 2011-08-04  Vincent Celier  <celier@adacore.com>
9502
9503         * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
9504         SLOC only for pragmas.
9505
9506 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9507
9508         * projects.texi: Minor typo fix.
9509
9510 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9511
9512         * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
9513         on case-sensitive file systems.
9514
9515 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9516
9517         * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
9518         nested in a disabled pragma.
9519         * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
9520         enclosing pragma, if any, for X decisions.
9521
9522 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9523
9524         * sem_prag.adb: Minor reformatting.
9525
9526 2011-08-04  Vincent Celier  <celier@adacore.com>
9527
9528         * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
9529         allowed in no run time mode.
9530
9531 2011-08-04  Vincent Celier  <celier@adacore.com>
9532
9533         * make.adb (Check): When -gnatc is used, check for the source file
9534         inside the ALI file with a canonical case file name.
9535
9536 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9537
9538         * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
9539         overriding the separator.
9540
9541 2011-08-04  Robert Dewar  <dewar@adacore.com>
9542
9543         * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
9544         prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
9545
9546 2011-08-04  Robert Dewar  <dewar@adacore.com>
9547
9548         * gnat_rm.texi: Minor documentation fix for pragma Annotate.
9549
9550 2011-08-04  Yannick Moy  <moy@adacore.com>
9551
9552         * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
9553         'Result only appears in postcondition of function.
9554
9555 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9556
9557         * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
9558         external tag, include the value of the external tag in the exception
9559         message.
9560
9561 2011-08-04  Yannick Moy  <moy@adacore.com>
9562
9563         * sem_attr.adb (Result): modify error message for misplaced 'Result
9564
9565 2011-08-04  Sergey Rybin  <rybin@adacore.com>
9566
9567         * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
9568         clear that the second argument must be an identifier.
9569
9570 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9571
9572         * exp_ch9.adb (Build_Barrier_Function): When compiling with
9573         -fpreserve-control-flow, insert an IF statement on the barrier
9574         condition to ensure that a conditional branch instruction is generated.
9575
9576 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9577
9578         * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
9579         (Processing_Flags.Ignore_Missing_With): new flag.
9580
9581 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9582
9583         * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
9584         Source_List_File on case-insensitive systems where the file is actually
9585         on a case-sensitive file system (NFS,...).
9586
9587 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9588
9589         * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
9590         function return contains a controlled [extension] aggregate and the
9591         return statement is not part of a handled sequence of statements, wrap
9592         the return in a block. This ensures that all controlled temporaries
9593         generated during aggregate resolution will be picked up by the
9594         finalization machinery.
9595
9596 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9597
9598         * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
9599         components, freeze type before resolution, to ensure that default
9600         initializations are present for all components.
9601         * sem_res.adb (Resolve_Actuals): the designated object of an
9602         accces-to-constant type is a legal actual in a call to an
9603         initialization procedure.
9604
9605 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9606
9607         * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
9608         N_Unchecked_Type_Conversion to the possible containers of a renamed
9609         transient variable.
9610
9611 2011-08-04  Yannick Moy  <moy@adacore.com>
9612
9613         * par-ch13.adb (Aspect_Specifications_Present): recognize
9614         "with Identifier'Class =>" as an aspect, so that a meaningful warning
9615         is issued in Strict mode.
9616         * par.adb: Fix typos in comments.
9617
9618 2011-08-04  Yannick Moy  <moy@adacore.com>
9619
9620         * sem_attr.adb (Result): modify error message to take into account Post
9621         aspect when compiling Ada 2012 (or newer) code.
9622
9623 2011-08-04  Nicolas Roche  <roche@adacore.com>
9624
9625         * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
9626         remove need for GCC exceptions.
9627
9628 2011-08-04  Vincent Celier  <celier@adacore.com>
9629
9630         * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
9631         project, not the source file name.
9632         * prj.adb (Find_Sources.Look_For_Sources): If the source has been
9633         excluded, continue looking. This excluded source will only be returned
9634         if there is no other source with the same base name that is not locally
9635         removed.
9636
9637 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9638
9639         * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
9640         private and one of the operands is a real literal, use a qualified
9641         expression rather than a conversion which is not meaningful to the
9642         back-end.
9643
9644 2011-08-04  Yannick Moy  <moy@adacore.com>
9645
9646         * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
9647         corresponding aspect X'Class are allowed, proceed with analysis of the
9648         aspect instead of skipping it.
9649
9650 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9651
9652         * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
9653         This will allow to have an Ada implementation for the subprogram.
9654
9655 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9656
9657         * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
9658         completion and aspects are present, apply them to the entity for the
9659         type which is currently the partial view, but which is the one that
9660         will be frozen.
9661         * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
9662         applies to a partial view, indicate that the full view has predicates
9663         and delayed aspects.
9664         (Replace_Type_Reference): Handle properly predicates that apply to the
9665         full view of a private completion.
9666
9667 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9668
9669         * layout.adb (Layout_Type): For composite types, do not set Esize.
9670         * freeze.adb (Set_Small_Size): Remove test on alignment and do not
9671         set Esize.
9672         (Size_Known): Look at the RM size of components instead of the Esize.
9673         (Freeze_Record_Type): Look at the RM size instead of the Esize to
9674         issue warning and activate Implicit_Packing.
9675         (Freeze_Entity): Likewise.  Do not issue a warning for alias/atomic
9676         if the Esize is not known.
9677         * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
9678         for elementary types only.
9679         (Analyze_Record_Representation_Clause): Look at the RM size instead
9680         of the Esize to issue errors.
9681         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
9682         is not known.
9683         <E_Record_Type>: Look at the RM size instead of the Esize.  Remove
9684         obsolete block.
9685         Look at the RM size instead of the Esize for types if the latter is
9686         not known.
9687         (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
9688
9689 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9690
9691         * sem_type.adb: proper handling of equality not involving anonymous
9692         access types.
9693
9694 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9695
9696         * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
9697         Vis_Decls. When creating a library-level finalizer for a package spec,
9698         both the declaration and body of the finalizer are inserted either in
9699         the visible or private declarations of the package spec.
9700
9701 2011-08-04  Javier Miranda  <miranda@adacore.com>
9702
9703         * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
9704         use of the full-view of a type when invoking Is_Ancestor.
9705         * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
9706         the full-view of private parents is requested, then use also the
9707         full-view of the parent of the first derivation.
9708
9709 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9710
9711         * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
9712         instead of the locally imported procedure.
9713         * s-taprop-mingw.adb (Enter_Task): Ditto.
9714         * s-valrea.adb (Scan_Real): Ditto.
9715         * s-imgrea.adb (Set_Image_Real): Ditto.
9716         * s-flocon.ads: Make the package pure.
9717
9718 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9719
9720         * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
9721         * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
9722         * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
9723         New subprogram, moved here from...
9724         * par.adb, par-ch5.adb (P_Statement_Name): ... here.
9725         * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
9726         rewriting of the last argument into a procedure call statement here...
9727         * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
9728         instead.
9729
9730 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9731
9732         * par_sco.adb: Minor reformatting.
9733
9734 2011-08-04  Robert Dewar  <dewar@adacore.com>
9735
9736         * erroutc.adb: Minor reformatting.
9737
9738 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9739
9740         * par_sco.adb: Comment update.
9741
9742 2011-08-04  Tristan Gingold  <gingold@adacore.com>
9743
9744         * s-flocon.ads: New file.
9745         * g-flocon.ads: Now a renaming of s-flocon.
9746         * Makefile.rtl: Add s-flocon.o
9747
9748 2011-08-04  Javier Miranda  <miranda@adacore.com>
9749
9750         * exp_strm.adb (Build_Array_Input_Function): if the array type is
9751         constrained, do not attempt to build a subtype of it.
9752
9753 2011-08-04  Yannick Moy  <moy@adacore.com>
9754
9755         * errout.ads Change comments: remove 'R'M as an example where quotes
9756         are needed; add ALFA as another case where quotes are not needed
9757         * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
9758         case where quotes are not needed.
9759         * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
9760         sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
9761         Remove all occurrences of 'A'L'F'A
9762
9763 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9764
9765         * sem_ch13.adb: check legality of invariant pragma.
9766
9767 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9768
9769         * bindgen.adb: Add comments.
9770
9771 2011-08-04  Yannick Moy  <moy@adacore.com>
9772
9773         * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
9774         synthesized flag.
9775         * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
9776         (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
9777
9778 2011-08-04  Robert Dewar  <dewar@adacore.com>
9779
9780         * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
9781         osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
9782         sem_ch13.adb, s-pooloc.adb: Minor reformatting.
9783
9784 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9785
9786         * s-pooloc.ads, s-pooglo.ads: Minor reformatting
9787
9788 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9789
9790         PR ada/47880
9791         * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
9792         allocated object.
9793
9794 2011-08-04  Robert Dewar  <dewar@adacore.com>
9795
9796         * einfo.ads, exp_ch4.adb: Minor reformatting.
9797
9798 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9799
9800         * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
9801
9802 2011-08-04  Ed Schonberg  <schonberg@adacore.com>
9803
9804         * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
9805         type in all cases to compute list of primitive operations, because full
9806         view may be an itype that is not attached to the list of declarations.
9807
9808 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9809
9810         * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
9811         library has already been finalized.
9812         (Gen_Adafinal_C): Likewise.
9813         (Gen_Adainit_Ada): Generate an early return if the library has
9814         already been elaborated.
9815         (Gen_Adainit_C): Likewise.
9816         (Gen_Output_File_Ada): Generate an elaboration flag.
9817         (Gen_Output_File_C): Likewise.
9818
9819 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9820
9821         * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
9822         Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
9823         built in the first place.
9824         (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
9825         for CodePeer because Finalize_Address was not built to begin with.
9826         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
9827
9828 2011-08-04  Pascal Obry  <obry@adacore.com>
9829
9830         * adaint.c (__gnat_tmp_name): Use current process id to create temp
9831         filenames, this ensures unicity of filenames across processes.
9832
9833 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9834
9835         * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
9836         Raise_Controlled to Raise_From_Controlled_Operation. Update the
9837         signature of Raise_From_Controlled_Operation by adding flag From_Abort.
9838         Add False as the actual to From_Abort in the generated call to
9839         Raise_From_Controlled_Operation.
9840
9841 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9842
9843         * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
9844         so that the ali file name can be retrieved from outside of this package.
9845         * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
9846         doing nothing in the general case, but used to update the object file
9847         timestamp if directly generated by the backend.
9848         * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
9849         to a later time than the ali file one.
9850
9851 2011-08-04  Yannick Moy  <moy@adacore.com>
9852
9853         * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
9854         entities whose body contains an Annotate pragma which forces formal
9855         proof on this body.
9856         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9857         sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
9858         Mark_Non_ALFA_Subprogram to pass in a message and node.
9859         * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
9860         (Forma_Proof, On) which sets the flag Formal_Proof_On in the
9861         surrounding subprogram.
9862         * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
9863         Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
9864         as not in ALFA is annotated with Formal_Proof being On, then an error
9865         is issued based on the additional parameters for message and node.
9866         * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
9867         * gcc-interface/Make-lang.in: Update dependencies.
9868
9869 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9870
9871         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
9872         Finalize_Address when CodePeer is enabled.
9873
9874 2011-08-04  Pascal Obry  <obry@adacore.com>
9875
9876         * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
9877         the latter returns a pointer to a static buffer which is deallocated
9878         at the end of the routine.
9879
9880 2011-08-04  Yannick Moy  <moy@adacore.com>
9881
9882         * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
9883         after index creation; mark unconstrained base array type generated as
9884         being in/not in ALFA as well
9885         (Make_Index): mark subtype created as in/not in ALFA
9886         * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
9887         over a loop as in/not in ALFA, depending on its type and form of loop
9888         iteration.
9889
9890 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9891
9892         * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
9893         directly to False on .NET and JVM.
9894
9895 2011-08-04  Yannick Moy  <moy@adacore.com>
9896
9897         * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
9898         constraint that subtype must come from source code to be in ALFA, so
9899         that anonymous subtypes can be in ALFA too.
9900
9901 2011-08-04  Yannick Moy  <moy@adacore.com>
9902
9903         * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
9904         reference for ALFA mode.
9905         * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
9906         procedure public so as to use it from formal verification back-end.
9907
9908 2011-08-04  Jerome Lambourg  <lambourg@adacore.com>
9909
9910         * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
9911         invalid checks of the Parameter, making Remove_Switch not working
9912         correctly.
9913
9914 2011-08-04  Arnaud Charlet  <charlet@adacore.com>
9915
9916         * targparm.ads: Update header: no run-time exception is needed on this
9917         file.
9918
9919 2011-08-04  Vincent Celier  <celier@adacore.com>
9920
9921         * a-fihema.adb: Use System.IO instead of GNAT.IO
9922
9923 2011-08-04  Thomas Quinot  <quinot@adacore.com>
9924
9925         * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
9926         are forbidden in Compiler_Unit mode.
9927
9928 2011-08-04  Robert Dewar  <dewar@adacore.com>
9929
9930         * sem_util.adb: Minor reformatting.
9931
9932 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9933
9934         * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
9935         library-level finalizers.
9936         (Gen_Finalize_Library_C): Update the import string for library-level
9937         finalizers.
9938         (Gen_Finalize_Library_Defs_C): Update the definition name of a
9939         library-level finalizer.
9940         * exp_ch7.adb: Remove with and use clauses for Stringt.
9941         (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
9942         Spec_Decl. Add local variable Body_Id. The names of library-level
9943         finalizers are now manually fully qualified and are no longer external.
9944         A single name is now capable of servicing .NET, JVM and non-VM targets.
9945         Pragma Export is no longer required to provide visibility for the name.
9946         (Create_Finalizer_String): Removed.
9947         (New_Finalizer_Name): New routine which mimics New_..._Name.
9948
9949 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
9950
9951         * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
9952         elaboration counter to Standard_Short_Integer.
9953         * sem_util.adb (Build_Elaboration_Entity): Likewise.
9954         * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
9955         (Gen_Elab_Externals_C): Likewise.
9956
9957 2011-08-04  Ed Falis  <falis@adacore.com>
9958
9959         * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
9960         system-vxworks-ppc.ads, system-vxworks-m68k.ads,
9961         system-vxworks-mips.ads, system-vxworks-x86.ads
9962         (Always_Compatible_Rep): set to False for all VxWorks targets.
9963
9964 2011-08-04  Robert Dewar  <dewar@adacore.com>
9965
9966         * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
9967         makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
9968         exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
9969         exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
9970         exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
9971         sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
9972         sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
9973         Minor reformatting and code reorganization.
9974
9975 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9976
9977         * projects.texi: Added doc for aggregate projects.
9978
9979 2011-08-04  Emmanuel Briot  <briot@adacore.com>
9980
9981         * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
9982         Add support for overriding the Project_Path in aggregate projects.
9983
9984 2011-08-04  Robert Dewar  <dewar@adacore.com>
9985
9986         * a-cofove.ads: Minor reformatting.
9987
9988 2011-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
9989
9990         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
9991         on the generated code.
9992         (Build_Finalize_Statements): Update the comment on the generated code.
9993         (Build_Initialize_Statements): Update the comment on the generated code.
9994         (Build_Object_Declarations): Add local variable Result. The object
9995         declarations are now built in sequence.
9996         * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
9997         RE_Unit_Table.
9998
9999 2011-08-04  Robert Dewar  <dewar@adacore.com>
10000
10001         * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
10002
10003 2011-08-04  Eric Botcazou  <ebotcazou@adacore.com>
10004
10005         * einfo.ads (Elaboration_Entity): Document new definition and use.
10006         (Elaboration_Entity_Required): Adjust to above change.
10007         * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
10008         * exp_ch12.adb: And with and use for Snames.
10009         (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
10010         * exp_util.adb (Set_Elaboration_Flag): Likewise.
10011         * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
10012         <Check_Unit_Name>: Deal with N_Expanded_Name.
10013         <Attribute_Elaborated>: Extend to all unit names.
10014         * sem_elab.adb: And with and use for Uintp.
10015         (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
10016         * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
10017         * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
10018         * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
10019         from Gen_Adainit_Ada.
10020         (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
10021         (Gen_Adafinal_Ada): Remove redundant test.  In the non-main program
10022         case, do not call System.Standard_Library.Adafinal; instead call
10023         finalize_library if needed.
10024         (Gen_Adafinal_C): Likewise.
10025         (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
10026         non-main program case.
10027         (Gen_Adainit_C): Generate a couple of external declarations here.
10028         In the main program case, set SSL.Finalize_Library_Objects.
10029         (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
10030         (Gen_Elab_Calls_C): Likewise.
10031         (Gen_Finalize_Library_Ada): Likewise.  Skip SAL interface units.
10032         (Gen_Finalize_Library_C): Likewise.  Generate a full function.
10033         (Gen_Main_C): Put back call to Ada_Final and don't finalize library
10034         objects here.
10035         (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
10036         if -a is specified.  Call Gen_Elab_Externals_Ada.  Move around call to
10037         Gen_Adafinal_Ada.
10038         (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
10039         if -a is specified.  Call Gen_Elab_Externals_C.  Remove useless couple
10040         of external declarations.  Call Gen_Finalize_Library_C.
10041
10042 2011-08-04  Emmanuel Briot  <briot@adacore.com>
10043
10044         * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
10045         Compute_Compilation_Phases): new subprogram.
10046         (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
10047         The number of mains as well as the various compilation phases that
10048         need to be run are now project tree specific, since various
10049         aggregated trees might have different requirements. In particular,
10050         they do not all require bind or link phases.
10051
10052 2011-08-04  Emmanuel Briot  <briot@adacore.com>
10053
10054         * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
10055         (Project_Tree_Appdata): New type.
10056         It is now possible to associate application-specific data to a project
10057         tree. In particular, this is used in the gprbuild builder to avoid a
10058         number of global tables and htables, especially now that there can be
10059         several project trees loaded at once because of aggregate projects.
10060         (Debug_Name): new procedure.
10061         * projects.texi: Clarify syntax of "**" for Source_Dirs
10062
10063 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10064
10065         * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
10066         the "roots" for a main.
10067         (Fill_From_Project): add support for aggregate projects. Main units
10068         in aggregated projects are now automatically added in the list of
10069         files to build (although this fails later on in gprbuild, because
10070         these files are not using the root proejct tree, so this needs
10071         further cleanup)
10072         * gcc-interface/Make-lang.in: Update dependencies.
10073
10074 2011-08-03  Yannick Moy  <moy@adacore.com>
10075
10076         * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
10077         conditional expression in ALFA.
10078         * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
10079         expressions as not in ALFA.
10080
10081 2011-08-03  Robert Dewar  <dewar@adacore.com>
10082
10083         * a-cofove.adb: Minor reformatting.
10084
10085 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10086
10087         * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
10088         (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
10089         gprbuild sources.
10090         These packages are more logically placed in the Queue package, since
10091         they manipulate the queue. It is also likely that they can be adapted
10092         for gnatmake, thus sharing more code.
10093         (Finish_Program, Fail_Program): moved from the gprbuild sources, so
10094         that we could move the above.
10095
10096 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10097
10098         * errutil.adb (Finalize): clean up the list of error messages on exit.
10099         Calling this subprogram multiple times will no longer show duplicate
10100         error messages on stderr.
10101
10102 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10103
10104         * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
10105         Getopt_Switches when we have already define a command line
10106         configuration.
10107
10108 2011-08-03  Yannick Moy  <moy@adacore.com>
10109
10110         * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
10111         in ALFA. Instead, they are considered as assertions to prove.
10112         * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
10113         nodes as not in ALFA. Instead, include conditional expressions in ALFA
10114         if they have no ELSE part, or if they occur in pre- and postconditions,
10115         where the Condition cannot have side-effects in ALFA
10116         (Analyze_Membership_Op): do not mark such nodes as not in ALFA
10117         (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
10118         Instead, include type conversion between scalar types in ALFA.
10119         * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
10120         if-and-only-if its type is in ALFA.
10121
10122 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10123
10124         * scos.adb, get_scos.adb, put_scos.adb
10125         New code letter for decisions: G (entry guard)
10126         * par_sco.adb
10127         (Traverse_Subprogram_Body): Rename to...
10128         (Traverse_Subprogram_Or_Task_Body): New subrpogram.
10129         (Traverse_Protected_Body): New subprogram
10130         (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
10131         protected bodies and entry bodies.
10132
10133 2011-08-03  Yannick Moy  <moy@adacore.com>
10134
10135         * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
10136         entities with get/set subprograms, which is set on procedure entities
10137         generated by the compiler for a postcondition.
10138         * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
10139         * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
10140         entity for a declaration
10141         (Get_Unique_Entity_For_Decl): new function returning an entity which
10142         represents a declaration, so that matching spec and body have the same
10143         entity.
10144
10145 2011-08-03  Robert Dewar  <dewar@adacore.com>
10146
10147         * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
10148         a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
10149
10150 2011-08-03  Yannick Moy  <moy@adacore.com>
10151
10152         * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
10153         library-level because retriction No_Implicit_Dynamic_Code in the
10154         front-end prevents its definition as a local subprogram
10155         (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
10156         for reuse in other contexts
10157         (Traverse_Declarations_Or_Statements,
10158         Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
10159         Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
10160         procedures take a callback parameter to be called on all declarations
10161         * lib-xref.ads
10162         (Traverse_All_Compilation_Units): new generic function to traverse a
10163         compilation unit and call a callback parameter on all declarations
10164
10165 2011-08-03  Javier Miranda  <miranda@adacore.com>
10166
10167         * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
10168         in Java since they are always enclosed in a namespace that
10169         differentiates them, and overloaded entities are supported by the VM.
10170
10171 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10172
10173         * checks.adb (Determine_Range): If a computed bound of an operation is
10174         outside the range of the base type of the expression, and overflow
10175         checks are enabled, the result is unknown and cannot be used for any
10176         subsequent constant folding.
10177         * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
10178         unknown, so is the result of the comparison.
10179
10180 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10181
10182         * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
10183         From_Abort. When finalization was triggered by an abort, propagate
10184         Standard'Abort_Signal rather than Program_Error.
10185         * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
10186         From_Abort.
10187         * a-except.adb (Raise_From_Controlled_Operation): Add new formal
10188         From_Abort. When finalization was triggered by an abort, propagate
10189         Standard'Abort_Signal rather than Program_Error.
10190         * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
10191         From_Abort.
10192         * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
10193         Abort_Id. Update the calls to Build_Object_Declarations and
10194         Build_Raise_Statement to include Abort_Id.
10195         (Build_Adjust_Statements): New local variable Abort_Id. Update the
10196         calls to Build_Object_Declarations and Build_Raise_Statement to include
10197         Abort_Id.
10198         (Build_Finalize_Statements): New local variable Abort_Id. Update the
10199         calls to Build_Object_Declarations and Build_Raise_Statement to include
10200         Abort_Id.
10201         (Build_Components): Create an entity for Abort_Id when exceptions are
10202         allowed on the target.
10203         (Build_Finalizer): New local variable Abort_Id.
10204         (Build_Initialize_Statements): New local variable Abort_Id. Update the
10205         calls to Build_Object_Declarations and Build_Raise_Statement to include
10206         Abort_Id.
10207         (Build_Object_Declarations): Add new formal Abort_Id. Create the
10208         declaration of flag Abort_Id to preserve the original abort status
10209         before finalization code is executed.
10210         (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
10211         runtime routine Raise_From_Controlled_Operation.
10212         (Create_Finalizer): Update the call to Build_Raise_Statement to include
10213         Abort_Id. Update the call to Build_Object_Declarations to include
10214         Abort_Id. Update the layout of the finalizer body.
10215         (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
10216         (Process_Transient_Objects): New local variable Abort_Id. Remove the
10217         clunky code to create all flags and objects related to
10218         exception propagation and replace it with a call to
10219         Build_Object_Declarations. Update the call to Build_Raise_Statement to
10220         include Abort_Id.
10221         * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
10222         Add new formal Abort_Id and associated comment on its use.
10223         (Build_Raise_Statement): Add new formal Abort_Id and associated comment
10224         on its use.
10225         * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
10226         Remove the clunky code to create all flags and objects related to
10227         exception propagation and replace it with a call to
10228         Build_Object_Declarations. Update the call to Build_Raise_Statement.
10229
10230 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10231
10232         * s-tassta.adb: Fix minor typos.
10233
10234 2011-08-03  Robert Dewar  <dewar@adacore.com>
10235
10236         * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
10237         lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
10238
10239 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10240
10241         * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
10242         to packages. This ensures that the finalizer body will not end up
10243         inside the freeze node.
10244         (Process_Declarations): Add code to detect whether a freeze node has a
10245         nested finalization collection.
10246
10247 2011-08-03  Pascal Obry  <obry@adacore.com>
10248
10249         * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
10250         (Current_Session): Return a not null access to Session_Type.
10251         (Default_Session): Likewise.
10252
10253 2011-08-03  Robert Dewar  <dewar@adacore.com>
10254
10255         * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
10256         exp_ch3.adb, exp_ch3.ads: Minor reformatting.
10257
10258 2011-08-03  Pascal Obry  <obry@adacore.com>
10259
10260         * g-awk.ads: Minor comment fix.
10261
10262 2011-08-03  Sergey Rybin  <rybin@adacore.com>
10263
10264         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
10265         the tree structure related to discriminant constraints.
10266         Original_Discriminant cannot be used any more for computing the
10267         defining name for the reference to a discriminant.
10268
10269 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10270
10271         * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
10272         function is not visibly tagged, this is not a dispatching call and
10273         therfore is not Tag_Indeterminate, even if the function is marked as
10274         dispatching on result.
10275
10276 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10277
10278         * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
10279         (Expand_N_Free_Statement): Add a guard to protect against run-times
10280         which do not support controlled types.
10281         * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
10282         against run-times which do not support controlled types.
10283         * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
10284         against run-times which do not support controlled types.
10285         * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
10286         against run-times which do not support controlled types.
10287         * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
10288         protect against run-times which do not support controlled types.
10289
10290 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
10291
10292         * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
10293         (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
10294
10295 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10296
10297         * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
10298         modified in the source, to prevent spurious warnings when compiling
10299         with -gnatg.
10300
10301 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10302
10303         * a-except-2005.adb: Minor reformatting.
10304
10305 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10306
10307         * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
10308         is a renaming declaration in the private part of a package, do not emit
10309         a warning that the with_clause could be moved because the renaming may
10310         be used in the body or in a child unit.
10311
10312 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10313
10314         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10315         Propagate the Comes_From_Source attribute from the original return
10316         object to the renaming.
10317
10318 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
10319
10320         * exp_ch7.adb (Build_Raise_Statement): Do not call
10321         Raise_From_Controlled_Operation when this routine is not present in
10322         the run-time library.
10323         (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
10324         libraries (Ravenscar), tasks are non-terminating, and protected objects
10325         and tasks can only appear at library level, so we do not want
10326         finalization of protected objects nor tasks.
10327         * exp_intr.adb: Minor clarification in comment.
10328         bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
10329         Gen_Output_File_C): Remove references to finalization of library-level
10330         objects when using restricted run-time libraries.
10331
10332 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10333
10334         * sem_ch3.adb (Build_Discriminant_Constraints): Set
10335         Original_Discriminant only if the parent type is a generic formal.
10336
10337 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10338
10339         * exp_ch13.adb: Add with and use clause for Targparm;
10340         (Expand_N_Free_Statement): Prevent the generation of a custom
10341         Deallocate on .NET/JVM targets since this requires pools and address
10342         arithmetic.
10343         * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
10344         .NET/JVM targets, attach the newly allocated object to the access
10345         type's finalization collection. Do not generate a call to
10346         Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
10347         exist in the runtime.
10348         (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
10349         create a custom Allocate for object that do not require initialization.
10350         Attach a newly allocated object to the access type's finalization
10351         collection on .NET/JVM.
10352         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
10353         assignment of controlled types on .NET/JVM. The two hidden pointers
10354         Prev and Next and stored and later restored after the assignment takes
10355         place.
10356         * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
10357         kludge for .NET/JVM to recognize a particular piece of code coming from
10358         Heap_Management and change the call to Finalize into Deep_Finalize.
10359         * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
10360         finalization collections on .NET/JVM only for types derived from
10361         Controlled. Separate the association of storage pools with a collection
10362         and only allow it on non-.NET/JVM targets.
10363         (Make_Attach_Call): New routine.
10364         (Make_Detach_Call): New routine.
10365         (Process_Object_Declarations): Suppress the generation of
10366         build-in-place return object clean up code on .NET/JVM since it uses
10367         pools.
10368         * exp_ch7.ads (Make_Attach_Call): New routine.
10369         (Make_Detach_Call): New routine.
10370         * exp_intr.adb Add with and use clause for Targparm.
10371         (Expand_Unc_Deallocation): Detach a controlled object from a collection
10372         on .NET/JVM targets.
10373         * rtsfind.ads: Add entries RE_Attach, RE_Detach and
10374         RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
10375         * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
10376         names used in finalization.
10377
10378 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10379
10380         * a-fihema.adb: Add with and use clauses for System.Soft_Links.
10381         (Attach, Detach): Lock the current task when chaining an object onto a
10382         collection.
10383
10384 2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>
10385
10386         * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
10387         Rewritten to create the message strings when the exception is not
10388         raised by an abort during finalization.
10389         * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
10390         Raise_From_Controlled_Operation and update its associated comment.
10391         * a-fihema.ads, a-fihema.adb: New GNAT unit.
10392         Ada.Finalization.Heap_Management provides key functionality
10393         associated with controlled objects on the heap, their creation,
10394         finalization and reclamation. Type Finalization_Collection is
10395         effectively a wrapper which sits ontop of a storage pool and performs
10396         all necessary bookkeeping for all the objects it contains. Each
10397         access-to-controlled or access-to-class-wide type receives a collection
10398         as part of its expansion. The compiler generates buffer code and
10399         invokes Allocate / Deallocate to create and destroy allocated
10400         controlled objects.
10401         * a-finali.adb ("="): Removed.
10402         * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
10403         fields Prev and Next.
10404         * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
10405         A library unit with at least one controlled object on the library level
10406         has a special finalizer which is invoked by the binder. To signal this,
10407         ali files carry field PF.
10408         * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
10409         associated comment on field usage.
10410         * a-tags.adb (Get_RC_Offset): Removed.
10411         (Needs_Finalization): New routine.
10412         * a-tags.ads: Update the structure of the GNAT dispatch tables.
10413         Dispatch tables now carry field Needs_Finalization which provides
10414         runtime indication whether a type is controlled or has controlled
10415         components or both. Remove field RC_Offset.
10416         (Get_RC_Offset): Removed along with its associated pragma Export.
10417         Since tagged types with controlled components no longer carry hidden
10418         field _controller, the special mechanism to retrieve its location is no
10419         longer needed.
10420         (Needs_Finalization): New routine.
10421         * atree.ads, atree.adb (Elist24): New routine.
10422         (Set_Elist24): New routine.
10423         * atree.h: Add a define clause for Elist24.
10424         * bindgen.adb New library-level variable Lib_Final_Built.
10425         (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
10426         presence of a VM target, the routine generates calls to the proper
10427         library finalization routine.
10428         (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
10429         targets. Set the correct library finalization routine depending on
10430         whether the library has controlled objects or this is a VM compilation.
10431         (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
10432         to library-level finalizers of compiled units in reverse order of
10433         elaboration. It also produces exception management code and reraises a
10434         potential exception after all units have been finalized.
10435         (Gen_Finalize_Library_C): New routine. This procedure generates calls to
10436         library-level finalizers of compiled units in reverse order of
10437         elaboration.
10438         (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
10439         definitions of all library-level finalizers available to the compilation
10440         (Gen_Main_Ada): Directly call Adafinal which now contails all target
10441         dependent code.
10442         (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
10443         System.Standard_Library.Adafinal directly. If the library needs
10444         finalization actions, create the sequence of finalization calls.
10445         (Gen_Output_File_Ada): Alphabetize local variables and constants.
10446         Generate a with clause for System.Soft_Links when compiling for a VM.
10447         Remove the code which imports System.Standard_Library.Adafinal as
10448         Do_Finalize. Generate the library finalization routine.
10449         (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
10450         If the library needs finalization actions, create all the definitions
10451         of library- level finalizers.
10452         (Has_Finalizer): New routine. Determines whether at least one compiled
10453         unit has a library-level finalizer.
10454         Add type Qualification_Mode.
10455         (Set_Unit_Name): Add a formal which controls the replacement of a dot.
10456         * einfo.adb: New usage of field 15 as Return_Flag.
10457         Remove Finalization_Chain_Entity from the usages of field 19.
10458         Remove Associated_Final_Chain from the usages of field 23.
10459         New usage of field 23 as Associated_Collection.
10460         New usage of field 24 as Finalizer.
10461         New usage of flag 252 as Is_Processed_Transient.
10462         (Associated_Final_Chain): Removed.
10463         (Associated_Collection): New routine.
10464         (Finalization_Chain_Entity): Removed.
10465         (Finalizer): New routine.
10466         (Is_Finalizer): New routine.
10467         (Is_Processed_Transient): New routine.
10468         (Return_Flag): New routine.
10469         (Set_Associated_Final_Chain): Removed.
10470         (Set_Associated_Collection): New routine.
10471         (Set_Finalization_Chain_Entity): Removed.
10472         (Set_Finalizer): New routine.
10473         (Set_Is_Processed_Transient): New routine.
10474         (Set_Return_Flag): New routine.
10475         (Write_Entity_Flags): Include Is_Processed_Transient to the list of
10476         displayed flags.
10477         (Write_Field8_Name): Alphabetize the output.
10478         (Write_Field11_Name): Alphabetize the output.
10479         (Write_Field12_Name): Alphabetize the output.
10480         (Write_Field13_Name): Alphabetize the output.
10481         (Write_Field14_Name): Alphabetize the output.
10482         (Write_Field15_Name): Alphabetize the output.
10483         (Write_Field16_Name): Alphabetize the output.
10484         (Write_Field17_Name): Alphabetize the output.
10485         (Write_Field18_Name): Alphabetize the output.
10486         (Write_Field19_Name): Alphabetize the output. Remove the output of
10487         Finalization_Chain_Entity.
10488         (Write_Field20_Name): Alphabetize the output.
10489         (Write_Field21_Name): Alphabetize the output.
10490         (Write_Field22_Name): Alphabetize the output.
10491         (Write_Field23_Name): Alphabetize the output. Remove the output of
10492         Associated_Final_Chain. Add output for Associated_Collection.
10493         (Write_Field24_Name): Alphabetize the output.
10494         (Write_Field25_Name): Add output for Finalizer.
10495         (Write_Field26_Name): Alphabetize the output.
10496         (Write_Field27_Name): Alphabetize the output.
10497         (Write_Field28_Name): Alphabetize the output.
10498         * einfo.ads: Add new field description for Associated_Collection and
10499         its uses in nodes.
10500         Remove Associated_Final_Chain and its uses in nodes.
10501         Remove Finalization_Chain_Entity and its uses in nodes.
10502         Add new field description for Finalizer and its uses in nodes.
10503         Add new synthesized attribute Is_Finalizer.
10504         Add new flag description for Is_Processed_Transient and its uses in
10505         nodes.
10506         Add new field description for Return_Flag and its uses in nodes.
10507         (Associated_Final_Chain): Removed along with its pragma Inline.
10508         (Associated_Collection): New routine and pragma Inline.
10509         (Finalization_Chain_Entity): Removed along with its pragma Inline.
10510         (Finalizer): New routine and pragma Inline.
10511         (Is_Finalizer): New routine and pragma Inline.
10512         (Is_Processed_Transient): New routine and pragma Inline.
10513         (Return_Flag): New routine and pragma Inline.
10514         (Set_Associated_Final_Chain): Removed along with its pragma Inline.
10515         (Set_Associated_Collection): New routine and pragma Inline.
10516         (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
10517         (Set_Finalizer): New routine and pragma Inline.
10518         (Set_Is_Processed_Transient): New routine and pragma Inline.
10519         (Set_Return_Flag): New routine and pragma Inline.
10520         * exp_aggr.adb: Alphabetize subprograms.
10521         (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
10522         (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
10523         associated comments. Remove local variables External_Final_List and
10524         Attach.
10525         Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
10526         Ancestor. Remove the retrieval of finalization lists. Update the call to
10527         Make_Adjust_Call.
10528         (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
10529         lists. Update the call to Late_Expansion.
10530         (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
10531         (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
10532         (Gen_Assign): Remove the retrieval of the finalization list used to
10533         build the assignment. Update the calls to Make_Init_Call and
10534         Make_Adjust_Call.
10535         (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
10536         Remove the mechanism to determine attachment levels and finalization
10537         list retrieval. Remove the processing for coextensions.
10538         (Init_Controller): Removed. Controllers no longer exist.
10539         (Late_Expansion): Remove formals Flist and Obj along with their
10540         associated comments. Update the calls to Build_Record_Aggr_Code and
10541         Build_Array_Aggr_Code.
10542         * exp_ch13.adb (Expand_N_Free_Statement): New routine.
10543         (Expand_N_Freeze_Entity): Add special processing for finalizers which
10544         appear in entry bodies, protected subprograms and task bodies.
10545         * exp_ch13.ads (Expand_N_Free_Statement): New routine.
10546         * exp_ch3.adb (Add_Final_Chain): Removed.
10547         (Build_Array_Init_Proc): Alphabetize local variables.
10548         (Build_Assignment): Alphabetize local variables. Update the call to
10549         Maked_Adjust_Call.
10550         (Build_Class_Wide_Master): Rename local variables to better reflect
10551         their role.
10552         (Build_Discriminant_Assignments): Code reformatting.
10553         (Build_Init_Call_Thru): Code reformatting.
10554         (Build_Init_Procedure): Code reformatting. Generate a special version
10555         of Deep_Finalize which is capable of finalizing all initialized
10556         components and ignore the rest.
10557         (Build_Init_Statements): Rename local variables to better reflect their
10558         role.
10559         Reimplement the mechanism to include the creation and update of an index
10560         variable called a "counter". It is used as a bookmark for tracing
10561         initialized and non-initialized components.
10562         (Build_Initialization_Call): Remove local variable Controller_Typ.
10563         Alphabetize all local variables. Remove the initialization of the
10564         record controller and update the call to Make_Init_Call.
10565         (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
10566         New local variable Counter.
10567         (Constrain_Array): Alphabetize.
10568         (Expand_Freeze_Array_Type): Create a collection instead of a
10569         finalization list.
10570         (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
10571         Finalize_Address which is used in conjunction with allocated controlled
10572         objects.
10573         (Expand_N_Object_Declaration): Remove the creation of a finalization
10574         list for anonymous access types. Update the calls to Make_Init_Call and
10575         Make_Adjust_Call.
10576         (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
10577         retrieval of finalization lists. Remove the expansion of the record
10578         controller. Create TSS primitive Finalize_Address used in conjunction
10579         with controlled objects on the heap. Create finalization collections
10580         for access-to-controlled record components.
10581         (Expand_Record_Controller): Removed.
10582         (Freeze_Type): Remove the freezing of record controllers. Freezing of
10583         class-wide types now requires additional processing. Create
10584         finalization collections for access-to-controlled types.
10585         (Increment_Counter): New routine.
10586         (Make_Counter): New routine.
10587         (Make_Eq_If): Remove the mention of Name_uController.
10588         (Make_Predefined_Primitive_Specs): There is no longer need to skip
10589         types coming from System.Finalization_Root.
10590         (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
10591         (Predefined_Primitive_Bodies): There is no longer need to skip types
10592         coming from System.Finalization_Root.
10593         (Stream_Operation_OK): Do not generate stream routines for
10594         type Ada.Finalization.Heap_Management.Finalization_Collection.
10595         * exp_ch3.ads: Alphabetize subprograms.
10596         * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
10597         Add with and use clause for Lib.
10598         (Complete_Coextension_Finalization): Removed.
10599         (Complete_Controlled_Allocation): New routine. Create a finalization
10600         collection for anonymous access-to-controlled types. Create a custom
10601         Allocate which interfaces with the back end and the machinery in
10602         Heap_Management.
10603         (Expand_Allocator_Expression): Add necessary calls to
10604         Complete_Controlled_Allocation. Remove the retrieval of finalization
10605         lists. Update the calls to Make_Adjust_Call. Generate a call to
10606         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10607         the associated collection.
10608         (Expand_N_Allocator): Remove the processing for dynamic coextensions.
10609         Code clean up. Remove the retrieval of finalization lists and
10610         attachment levels.
10611         Update the call to Make_Init_Call. Generate a call to
10612         Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
10613         the associated collection.
10614         (Get_Allocator_Final_List): Removed. Finalization lists are not
10615         available.
10616         (Suitable_Element): Remove the mention of Name_uController.
10617         * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
10618         (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
10619         the left hand side, carry out the assignment and adjust the left hand
10620         side.
10621         * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
10622         (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
10623         (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
10624         BIP_Collection and BIPcollection.
10625         (Build_Heap_Allocator): New routine used to allocate the return object
10626         of a build-in-place function onto a collection.
10627         (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
10628         (Expand_Call): Do not replace direct calls to Deep routines with their
10629         aliases.
10630         (Expand_N_Extended_Return_Statement): Give all variables shorter names
10631         and update their occurrences. Add a special return flag to monitor the
10632         [ab]normal execution of the function. The flag is set right before the
10633         return statement.
10634         Rewrite the mechanism used to allocate a build-in-place return object
10635         on the heap or on a storage pool.
10636         (Is_Direct_Deep_Call): New routine.
10637         (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
10638         build-in-place function call instead of a final list. Build a call to
10639         Set_Finalize_Address_Ptr to decorate the associated collection.
10640         (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
10641         order to name the build-in-place function call's result for later
10642         finalization. Add a collection to a build-in-place function call
10643         instead of a final list.
10644         (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
10645         build-in-place function call instead of a final list. Remove the code
10646         which moves one final list and transforms it into the actual in a
10647         nested build-in-place call.
10648         (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
10649         build-in-place function call instead of a final list.
10650         (Move_Final_List): Removed.
10651         (Needs_BIP_Collection): New routine.
10652         (Needs_BIP_Final_List): Removed.
10653         * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
10654         enumeration type BIP_Formal_Kind.
10655         Update the related comment.
10656         (Needs_BIP_Collection): New routine.
10657         (Needs_BIP_Final_List): Removed.
10658         * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
10659         and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
10660         majority of subprograms in this unit. Add Name_Finalize_Address to
10661         array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
10662         (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
10663         statements for an array type.
10664         (Build_Adjust_Statements): Create the adjust statements for a record
10665         type.
10666         (Build_Cleanup_Statements): New routine. A procedure which given any
10667         construct containing asynchronous calls, references to _master, or is a
10668         task body, a task allocation or a protected body produces the necessary
10669         runtime calls to clean up these constructs.
10670         (Build_Exception_Handler): New routine.
10671         (Build_Final_List): Removed.
10672         (Build_Finalization_Collection): New routine. A core procedure which
10673         creates a collection to service heap allocated controlled objects
10674         associated with an access-to-controlled type.
10675         (Build_Finalize_Statements): Create the finalization statements for a
10676         record types.
10677         (Build_Finalizer): New routine. A core procedure which given any
10678         construct with declarations and/or statements detects all objects which
10679         need any type of clean up (controlled objects, protected objects) and
10680         generates all necessary code to clean up the said objects in the proper
10681         order.
10682         (Build_Finalizer_Call): New routine.
10683         (Build_Initialize_Statements): Create the initialization statements for
10684         an array type. The generated routine contains code to finalize partially
10685         initialized arrays.
10686         (Build_Object_Declarations): New routine.
10687         (Build_Raise_Statement): New routine.
10688         (Clean_Simple_Protected_Objects): Removed.
10689         (Controller_Component): Removed.
10690         (Enclosing_Function): New routine.
10691         (Expand_Cleanup_Actions): Create a finalizer for a construct which has
10692         either declarations or statements or both.
10693         (Expand_N_Package_Body): Create a finalizer for a non-generic package.
10694         (Expand_N_Package_Declaration): Create a finalizer for a non-generic
10695         package.
10696         (Find_Final_List): Removed.
10697         (Global_Flist_Ref): Removed.
10698         (In_Finalization_Root): Removed.
10699         (Insert_Actions_In_Scope_Around): Determine the range of the transient
10700         scope in terms of tree nodes. Process all transient variables within
10701         that range.
10702         (Make_Adjust_Call): Rewritten. There is no longer an attach call
10703         generated after the adjust.
10704         (Make_Attach_Call): Removed.
10705         (Make_Call): New routine.
10706         (Make_Clean): Removed.
10707         (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
10708         build routines.
10709         (Make_Deep_Proc): Rewritten to generate the new profile signature used
10710         in Deep routines.
10711         (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
10712         build routines.
10713         (Make_Final_Call): Modified to simply create a call to either
10714         Deep_Finalize or Finalize.
10715         (Make_Finalize_Address_Body): New routine.
10716         (Make_Finalize_Address_Stmts): New routine. A function which produces
10717         TSS primitive Finalize_Address used in conjunction with heap allocated
10718         controlled objects.
10719         (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
10720         (Make_Init_Call): Rewritten. There is no longer an attach call
10721         generated after initialization.
10722         (Make_Local_Deep_Finalize): New routine.
10723         (Make_Set_Finalize_Address_Ptr_Call): New routine.
10724         (Make_Transient_Block): Remove the finalization list retrieval and
10725         manipulation.
10726         (Needs_Finalization): Moved to Exp_Util.
10727         (Parent_Field_Type): New routine.
10728         (Preprocess_Components): New routine.
10729         (Process_Transient_Objects): New routine.
10730         (Wrap_HSS_In_Block): New routine.
10731         (Wrap_Transient_Declaration): Remove finalization list management and
10732         controller insertion.
10733         (Wrap_Transient_Expression): Code reformatting.
10734         (Wrap_Transient_Statement): Code reformatting.
10735         * exp_ch7.ads (Build_Final_List): Removed.
10736         (Build_Finalization_Collection): New routine.
10737         (Build_Raise_Statement): New routine.
10738         (Controller_Component): Removed.
10739         (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
10740         (Find_Final_List): Removed.
10741         (In_Finalization_Root): Removed.
10742         (Is_Simple_Protected_Type): Update related comment.
10743         (Make_Adjust_Call): New parameter profile and associated comments.
10744         (Make_Attach_Call): Removed.
10745         (Make_Final_Call): New parameter profile and associated comments.
10746         (Make_Finalize_Address_Body): New routine.
10747         (Make_Init_Call): New parameter profile and associated comments.
10748         (Make_Local_Deep_Finalize): New routine.
10749         (Make_Set_Finalize_Address_Ptr_Call): New routine.
10750         (Needs_Finalization): Moved to Exp_Util.
10751         * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
10752         (Expand_N_Protected_Body): Remove the handling of finalization lists.
10753         (Find_Protection_Type): Moved to Exp_Util.
10754         * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
10755         (Make_DT): Update sequence of dispatch table initialization. Remove the
10756         initialization of field RC_Offset. Add initialization of field Needs_
10757         Finalization.
10758         * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
10759         Reimplement how an object is first finalized, then deallocated.
10760         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
10761         Code reformatting.
10762         * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
10763         Register TSS_Finalize_Address with type TSS_Names.
10764         * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
10765         procedure provides the interface between an allocation / deallocation
10766         and the support machinery in Ada.Finalization.Heap_Management.
10767         (Find_Init_Call): Code reformatting.
10768         (Find_Init_Call_In_List): Code reformatting.
10769         (Find_Protection_Type): Moved from Exp_Ch9.
10770         (Find_Prim_Op): Reimplement to add preference of recovered primitive.
10771         (Has_Controlled_Coextensions): Removed.
10772         (Has_Controlled_Objects): New routine.
10773         (In_Library_Level_Package_Body): New routine.
10774         (Insert_Action_After): New routine.
10775         (Is_Finalizable_Transient): New routine. This predicate determines
10776         whether an object declaration is one of the many variants of controlled
10777         transients.
10778         (Is_Null_Access_BIP_Func_Call): New routine.
10779         (Is_Non_BIP_Func_Call): New routine.
10780         (Is_Related_To_Func_Return): New routine.
10781         (Needs_Finalization): Moved from Exp_Ch7.
10782         * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
10783         (Find_Protection_Type): Moved from Exp_Ch9.
10784         (Has_Controlled_Coextensions): Removed.
10785         (Has_Controlled_Objects): New routine.
10786         (In_Library_Level_Package_Body): New routine.
10787         (Insert_Action_After): New routine.
10788         (Is_Finalizable_Transient): New routine.
10789         (Is_Null_Access_BIP_Func_Call): New routine.
10790         (Is_Non_BIP_Func_Call): New routine.
10791         (Is_Related_To_Func_Return): New routine.
10792         (Needs_Finalization): Moved from Exp_ch7.
10793         * expander.adb (Expand): Add a case for N_Free_Statement.
10794         * freeze.adb (Freeze_All): Replace the generation of a finalization
10795         list with a collection for access-to-controlled types.
10796         (Freeze_Entity): Code reformatting.
10797         (Freeze_Record_Type): Remove the freezing of a record controller
10798         component.
10799         (Freeze_Subprogram): Code reformatting.
10800         * inline.adb (Cleanup_Scopes): Remove the reset of the scope
10801         finalization list.
10802         * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
10803         has a library-level finalizer.
10804         * lib-writ.ads: Add "PF" to the sequence of unit attributes.
10805         * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
10806         * Makefile.rtl: Remove a-filico and s-finimp from the list of object
10807         files. Add a-fihema to the list of object files.
10808         * par-ch4.adb:
10809         Alphabetize the associations in type Is_Parameterless_Attribute.
10810         * rtsfind.ads: Ada.Finalization_List.Controller and
10811         System.Finalization_Implementation are no longer a GNAT unit.
10812         Update the range of type Ada_Finalization_Child. Remove the following
10813         recoverable entities:
10814
10815            RE_Attach_To_Final_List
10816            RE_Deep_Tag_Attach
10817            RE_Finalize_List
10818            RE_Finalize_One
10819            RE_Finalizable_Ptr_Ptr
10820            RE_Global_Final_List
10821            RE_Limited_Record_Controller
10822            RE_List_Controller
10823            RE_Move_Final_List
10824            RE_Record_Controller
10825            RE_Simple_List_Controller
10826
10827         Add the following recoverable entities:
10828
10829            RE_Add_Offset_To_Address
10830            RE_Allocate
10831            RE_Base_Pool
10832            RE_Deallocate
10833            RE_Exception_Identity
10834            RE_Finalization_Collection
10835            RE_Finalization_Collection_Ptr
10836            RE_Needs_Finalization
10837            RE_Save_Library_Occurrence
10838            RE_Set_Finalize_Address_Ptr
10839            RE_Set_Storage_Pool_Ptr
10840            RE_Storage_Count
10841         * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
10842         Name_uController.
10843         * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
10844         (First_Stored_Discriminant): Remove the mention of Name_uController.
10845         * sem_aux.ads: Comment reformatting.
10846         * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
10847         to redecorate an already existing class-wide type.
10848         (Decorate_Tagged_Type): New parameter profile and associated comment.
10849         Create a "shadow class-wide type" for a shadow entity.
10850         * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
10851         of the final chain along with the associated comment.
10852         * sem_ch3.adb (Access_Type_Declaration): Add new local variable
10853         Full_Desig and set it to the full view of the designated type.
10854         Initialize the finalization collection to empty.
10855         (Build_Derived_Record_Type): Alphabetize local variables. Code
10856         reformatting.
10857         (Collect_Fixed_Components): Remove the mention of Name_uController.
10858         (Create_Constrained_Components): Remove the mention of Name_uController.
10859         (Make_Class_Wide_Type): Add specialized code to redecorate an existing
10860         class-wide type of a shadow entity.
10861         (Process_Full_View): Update the machinery which marks type
10862         Limited_Controlled's entity as limited.
10863         * sem_ch4.adb (Analyze_One_Call): Code reformatting.
10864         * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
10865         list, instead make a collection build-in-place formal.
10866         * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
10867         a designated type in order to establish a match between the renaming
10868         and the renamed entity.
10869         (Find_Selected_Component): Add guard to prevent spurious exceptions
10870         from being raised on .NET/JVM.
10871         * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
10872         to the list of primitive that need special processing. Update arrays
10873         C_Names and D_Names.
10874         (Replace_Types): Handle class-wide types.
10875         * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
10876         different parameter profile, look at the first formal.
10877         * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
10878         use clauses for Exp_Util.
10879         * sem_res.adb: Remove with and use clauses for Elists.
10880         (Propagate_Coextensions): Removed.
10881         (Resolve_Allocator): Do not propagate the list of coextensions from one
10882         allocator to another.
10883         * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
10884         Deaccessed_T to Desig_Typ.
10885         (Enter_Name): Remove the mention of Name_uController.
10886         (Gather_Components): Remove the mention of Name_uController.
10887         (Incomplete_Or_Private_View): New routine.
10888         (Is_Coextension_Root): Removed.
10889         (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
10890         * sem_util.ads (Incomplete_Or_Private_View): New routine.
10891         (Is_Coextension_Root): Removed.
10892         * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
10893         Controlled types are now derived from a null tagged record. Remove
10894         types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
10895         * sinfo.adb (Coextensions): Removed.
10896         (Set_Coextensions): Removed.
10897         * sinfo.ads: Remove Coextensions from the explanation of node fields
10898         and its uses in nodes.
10899         Update the field usage of N_Allocator.
10900         (Coextensions): Removed along with its pragma Inline.
10901         (Set_Coextensions): Removed along with its pragma Inline.
10902         * snames.ads-tmpl: Remove names
10903
10904           Name_uClean
10905           Name_uController
10906           Name_uFinal_List
10907           Name_uLocal_Final_List
10908           Name_Finalization_Root
10909           Name_Next
10910           Name_Prev
10911
10912         Add names
10913
10914           Name_uFinalizer
10915           Name_Finalize_Address
10916         * s-pooglo.adb (Allocate): Add overriding indicator.
10917         (Deallocate): Add overriding indicator.
10918         (Storage_Size): Add overriding indicator.
10919         * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
10920         than Finalize_Global_List.
10921         (Null_Finalize_Global_List): Removed.
10922         (Save_Library_Occurrence): New routine.
10923         * s-soflin.ads: Remove variable Finalize_Global_List along with its
10924         initialization. Add variable Finalize_Library_Objects along with its
10925         pragma Export. Add variables Library_Exception and
10926         Library_Exception_Set along with their pragma Export.
10927         (Null_Finalize_Global_List): Removed.
10928         (Save_Library_Occurrence): New routine.
10929         * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
10930         rather than Finalize_Global_List.
10931         * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
10932         of the constructed node.
10933
10934 2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10935
10936         * link.c: Include "auto-host.h" before system headers.
10937
10938 2011-08-03  Vincent Celier  <celier@adacore.com>
10939
10940         * make.adb (Gnatmake): Add to table Library_Projs only library projects
10941         that are not extended. Do not check if a library project that is
10942         extended should be regenerated. Do not add to table Library_Paths the
10943         libraries that are in extended projects. Link only with libraries that
10944         are in libray projects that are not extended.
10945         * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
10946         for a library project that is extended.
10947
10948 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10949
10950         * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
10951         conforming subprogram renamings that appear to be completions if they
10952         are not fully conformant.
10953         Such renamings are homographs but not completions.
10954         * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
10955         names in a subprogram renaming that appears in an instance.
10956
10957 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
10958
10959         * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
10960         not immutably limited, build actual subtype from expression to provide
10961         proper bounds to caller.
10962
10963 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
10964
10965         * sem_ch8.adb: Minor comment correction.
10966
10967 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10968
10969         * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
10970         returning a limited array, use an extended return statement.
10971
10972 2011-08-03  Vincent Celier  <celier@adacore.com>
10973
10974         * make.adb (Initialize): If --subdirs= is used, but no project file is
10975         specified, attempt to create the specify subdir if it does not already
10976         exist and use it as the object directory as if -D had been specified.
10977
10978 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
10979
10980         * s-tpopsp-vms.adb: New file.
10981         * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
10982         * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
10983
10984 2011-08-03  Emmanuel Briot  <briot@adacore.com>
10985
10986         * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
10987         package.
10988
10989 2011-08-03  Yannick Moy  <moy@adacore.com>
10990
10991         * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
10992         * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
10993         * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
10994         detect that an array has static bounds.
10995
10996 2011-08-03  Thomas Quinot  <quinot@adacore.com>
10997
10998         * exp_dist.adb: Minor reformatting.
10999
11000 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11001
11002         * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
11003         (ATCB_Key): Removed, not always used.
11004
11005 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11006
11007         * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
11008         clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
11009         most remaining global variables.
11010
11011 2011-08-03  Robert Dewar  <dewar@adacore.com>
11012
11013         * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
11014         prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
11015         reformatting.
11016
11017 2011-08-03  Javier Miranda  <miranda@adacore.com>
11018
11019         * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
11020         that must be passed by copy in VM targets.
11021
11022 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11023
11024         * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
11025         duplicates a similar htable now in the project tree.
11026
11027 2011-08-03  Claire Dross  <dross@adacore.com>
11028
11029         * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
11030         a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
11031         Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
11032         Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
11033         Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
11034         Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
11035         Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
11036         update.
11037
11038 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11039
11040         * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
11041         (ATCB_Key): Removed, not always used.
11042         * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
11043         s-taprop-posix.adb.
11044         * s-tpopsp-tls.adb: New file.
11045         * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
11046         x86/x64/ia64/powerpc/sparc Linux.
11047
11048 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11049
11050         * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
11051         * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
11052
11053 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11054
11055         * rtsfind.ads, exp_dist.adb, exp_dist.ads
11056         (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
11057         Fix type selection for mapping integer types to PolyORB types.
11058
11059 2011-08-03  Bob Duff  <duff@adacore.com>
11060
11061         * sem_ch7.adb: Minor comment clarification.
11062
11063 2011-08-03  Bob Duff  <duff@adacore.com>
11064
11065         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
11066         an error analyzing a choice, skip further processing. Further
11067         processing could cause a crash or cascade errors.
11068
11069 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11070
11071         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
11072         prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
11073         prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
11074         prj-env.ads (Shared_Project_Tree_Data): new type
11075         An aggregate project and its aggregated trees need to share the common
11076         data structures used for lists of strings, packages,... This makes the
11077         code simpler since otherwise we have to pass the root tree (also used
11078         for the configuration file data) in addition to the current project
11079         tree. This also avoids ambiguities as to which tree should be used.
11080         And finally this saves a bit of memory.
11081         (For_Every_Project_Imported): new parameter Tree.
11082         Since aggregated projects are using a different tree, we need to let
11083         the caller know which tree to use to manipulate the returned project.
11084
11085 2011-08-03  Robert Dewar  <dewar@adacore.com>
11086
11087         * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
11088         prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
11089         lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
11090         prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
11091
11092 2011-08-03  Javier Miranda  <miranda@adacore.com>
11093
11094         * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
11095         Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
11096
11097 2011-08-03  Bob Duff  <duff@adacore.com>
11098
11099         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
11100         the Base_Type.
11101
11102 2011-08-03  Joel Brobecker  <brobecker@adacore.com brobecker>
11103
11104         * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
11105         g-sehash.ads: Fix typo. Update header.
11106
11107 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11108
11109         * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
11110         expansion.
11111
11112 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
11113
11114         * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
11115         prefixes of private types along with records, since the selector may be
11116         a discriminant.
11117         * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
11118         private types along with records, since the selector may be a
11119         discriminant.
11120
11121 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11122
11123         * prj-pp.adb (Pretty_Print): Remove trailing blank line.
11124
11125 2011-08-03  Javier Miranda  <miranda@adacore.com>
11126
11127         * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
11128         Tagged_Type_Expansion.
11129
11130 2011-08-03  Yannick Moy  <moy@adacore.com>
11131
11132         * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
11133         violation when the argument of concatenation is the name of a
11134         constant.
11135
11136 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11137
11138         * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
11139         prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
11140         (Process_Declarative_Items): new parameter Child_Env.
11141
11142 2011-08-03  Yannick Moy  <moy@adacore.com>
11143
11144         * alfa.ads: Update format of ALFA section in ALI file in order to
11145         add a mapping from bodies to specs when both are present.
11146         (ALFA_Scope_Record): Add components for spec file/scope.
11147         * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
11148         present.
11149         * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
11150         collected, fill in the spec information when relevant.
11151         * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
11152         present.
11153
11154 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
11155
11156         * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
11157         code unit to decide whether to add internally generated subprograms.
11158
11159 2011-08-03  Javier Miranda  <miranda@adacore.com>
11160
11161         * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
11162         * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
11163         be handled by copy in VM targets.
11164
11165 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11166
11167         * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
11168         code with Makeutl.Get_Switches.
11169         * prj-tree.adb: Update comment.
11170
11171 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11172
11173         * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
11174         subprogram with a limited formal that does not support external
11175         streaming.
11176
11177 2011-08-03  Yannick Moy  <moy@adacore.com>
11178
11179         * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
11180         continuation line
11181         * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
11182         not from current unit in two phases, because it is not possible to
11183         change the table while iterating over its content.
11184         * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
11185
11186 2011-08-03  Sergey Rybin  <rybin@adacore.com>
11187
11188         * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
11189         * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
11190
11191 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11192
11193         * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
11194         and the component type is composite, this is ambiguous for predefined
11195         concatenation, but if the node is not overloaded and the entity is a use
11196         -defined function its profile can be used to resolve that aggregate.
11197
11198 2011-08-03  Robert Dewar  <dewar@adacore.com>
11199
11200         * exp_ch4.adb: Minor code cleanup.
11201
11202 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11203
11204         * exp_dist.adb: Do not generate distribution stubs if serious errors
11205         have been diagnosed.
11206
11207 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11208
11209         * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
11210         the first formal of a primitive operation, go to the base type to
11211         handle properly an access to a derived type with constrained
11212         discriminants.
11213         * sem_type.adb (Disambiguate): an immediately visible operator hides a
11214         user-defined function that is only use-visible.
11215
11216 2011-08-03  Robert Dewar  <dewar@adacore.com>
11217
11218         * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
11219         make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
11220         fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
11221         prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
11222         sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
11223         prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
11224         prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
11225         alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
11226
11227 2011-08-03  Robert Dewar  <dewar@adacore.com>
11228
11229         * repinfo.adb (List_Mechanism): Add handling of
11230         Convention_Ada_Pass_By_XXX.
11231         * sem_mech.adb (Set_Mechanism): Ditto.
11232         * sem_prag.adb (Process_Convention): Add entries for
11233         Convention_Ada_Pass_By_XXX.
11234         * snames.adb-tmpl, snames.ads-tmpl: Ditto.
11235
11236 2011-08-03  Pascal Obry  <obry@adacore.com>
11237
11238         * makeutl.adb: Minor reformatting.
11239
11240 2011-08-03  Vincent Celier  <celier@adacore.com>
11241
11242         * fname-uf.adb
11243         (Get_File_Name) If the file cannot be found when there are no config
11244         pragmas file and May_Fail is True, return No_File instead of the file
11245         name, to be consistent.
11246
11247 2011-08-03  Pascal Obry  <obry@adacore.com>
11248
11249         * adaint.c (__gnat_is_executable_file_attr): Avoid access
11250         to null pointer.
11251
11252 2011-08-03  Javier Miranda  <miranda@adacore.com>
11253
11254         * sem_ch13.adb
11255         (Same_Representation): In VM targets the representation of arrays with
11256         aliased components differs from arrays with non-aliased components.
11257
11258 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11259
11260         * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
11261         not systematically lower case attribute indexes that contain no "."
11262         Fix definition of several Naming attributes, which take
11263         a unit name as index and therefore should be case insensitive.
11264         Minor refactoring (reduce length of variable names).
11265
11266 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11267
11268         * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
11269
11270 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11271
11272         * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
11273         prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
11274         prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
11275         prj-tree.ads (Prj.Tree.Environment): new type.
11276
11277 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11278
11279         * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
11280         prj-tree.adb, prj-tree.ads (Environment): new type.
11281
11282 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11283
11284         * prj-tree.ads: Remove unused variable.
11285
11286 2011-08-03  Yannick Moy  <moy@adacore.com>
11287
11288         * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
11289         issuing messages related to SPARK restriction violation.
11290
11291 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11292
11293         * sem_ch6.adb: guard against error nodes in return statements.
11294
11295 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11296
11297         * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
11298         a warning can only appear on a configuration file, so emit warning
11299         without further checks.
11300
11301 2011-08-03  Arnaud Charlet  <charlet@adacore.com>
11302
11303         * s-interr.ads: add overriding keyword.
11304
11305 2011-08-03  Geert Bosch  <bosch@adacore.com>
11306
11307         * exp_attr.adb: Fix minor typo.
11308
11309 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11310
11311         * par-ch4.adb: improve error recovery.
11312
11313 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11314
11315         * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
11316         prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
11317         to Errout_Handling.
11318
11319 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11320
11321         * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
11322         "external" as an attribute name in aggregate projects.
11323
11324 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
11325
11326         * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
11327         uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
11328         from 0, so we need to adjust.
11329
11330 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11331
11332         * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
11333         prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
11334
11335 2011-08-03  Yannick Moy  <moy@adacore.com>
11336
11337         * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
11338         restriction on overloaded entity if the entity is not an operator.
11339
11340 2011-08-03  Yannick Moy  <moy@adacore.com>
11341
11342         * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
11343         restrict.ads: Rename remaining Check_Formal_Restriction* into
11344         Check_SPARK_Restriction*.
11345
11346 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11347
11348         * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
11349         prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
11350         qualifier.
11351         (Project_Empty): removed
11352         (Empty_Project): new parameter Qualifier
11353         This is used to have fields specific to aggregate projects, cleaner
11354         New field to store the list of aggregated projects.
11355         (Check_Aggregate_Project): removed
11356         (Process_Aggregated_Projects, Free): new subprograms.
11357
11358 2011-08-03  Olivier Hainque  <hainque@adacore.com>
11359
11360         * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
11361
11362 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11363
11364         * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
11365         explicit dereference of an unconstrained type, create a constrained
11366         subtype for it, as is done for function calls that return an
11367         unconstrained type.
11368
11369 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11370
11371         * g-pehage.adb (Finalize): Avoid possible double-free.
11372
11373 2011-08-03  Steve Baird  <baird@adacore.com>
11374
11375         * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
11376         Elab_Spec/Body attrs in CodePeer_Mode.
11377
11378 2011-08-03  Javier Miranda  <miranda@adacore.com>
11379
11380         * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
11381         low bound is not known at compile time but they have no others choice.
11382         Done because in this case the bounds can be obtained directly from the
11383         aggregate.
11384
11385 2011-08-03  Ed Falis  <falis@adacore.com>
11386
11387         * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
11388         on VxWorks SMP. Remove unusable constant ANY_CPU.
11389
11390 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11391
11392         * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
11393         clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
11394         prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
11395         Prj.Env.Initialize_Empty): new subprograms
11396         (Get_Env, Find_Project): remove parameter Target_Name.
11397
11398 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
11399
11400         * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
11401         as a condition for the delayed call to Derived_Subprograms done for the
11402         case of the rewriting of a derived type that constrains the
11403         discriminants of its parent type.
11404         Avoids redundant subprogram derivations for private subtype derivations.
11405
11406 2011-08-03  Javier Miranda  <miranda@adacore.com>
11407
11408         * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
11409         Build_Record_Aggr_Code.
11410         (Build_Record_Aggr_Code): Add missing support to initialize hidden
11411         discriminants in extension aggregates.
11412
11413 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11414
11415         * prj-pp.adb (Print): also output project qualifiers, since in
11416         particular "aggregate" is mandatory in an aggregate project.
11417
11418 2011-08-03  Emmanuel Briot  <briot@adacore.com>
11419
11420         * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
11421         (Debug_Output): new function.
11422
11423 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
11424
11425         * gnat_ugn.texi: Document -Wstack-usage.
11426         * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
11427
11428 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11429
11430         * sem_prag.adb Issue an error (not a warning) when a C++ type does not
11431         have keyword LIMITED.
11432
11433 2011-08-03  Yannick Moy  <moy@adacore.com>
11434
11435         * alfa.adb, alfa.ads, alfa_test.adb: New files.
11436         * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
11437         (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
11438         section (does not happen in compiler, only if code directly calls
11439         Scan_ALI).
11440         * get_alfa.adb, get_alfa.ads: New files.
11441         * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
11442         needed.
11443         * lib-xref-alfa.adb: New file.
11444         * lib-xref.adb, lib-xref.ads
11445         (Xref_Entry): redefine information needed in cross-references for ALFA.
11446         Push ALFA treatments in separated local package.
11447         (Enclosing_Subpragram_Or_Package): treat specially subprogram
11448         identifiers. Return entity of package body instead of spec. Return
11449         Empty for a scope with no location.
11450         (Generate_Reference): adapt to new components for ALFA information.
11451         Remove the need for D references on definitions.
11452         (Is_Local_Reference): moved to ALFA local package
11453         (Output_References): extract subfunction as Extract_Source_Name
11454         (Output_Local_References): remove procedure, replaced by filtering of
11455         cross-references in package ALFA and printing in Put_ALFA.
11456         (Write_Entity_Name): remove procedure
11457         * lib.adb, lib.ads (Extract_Source_Name): extract here function to
11458         print exact name of entity as it appears in source file
11459         (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
11460         * put_alfa.adb, put_alfa.ads: New files.
11461         * xref_lib.adb (Search_Xref): protect read of cross-references against
11462         reading other sections of the ALI file, in gnatxref
11463         (Search): protect read of cross-references against reading other
11464         sections of the ALI file, in gnatfind.
11465         * gcc-interface/Make-lang.in: Update dependencies.
11466
11467 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11468
11469         * sem_ch3.adb: Minor reformatting.
11470
11471 2011-08-03  Jose Ruiz  <ruiz@adacore.com>
11472
11473         * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
11474         raising an exception.
11475
11476 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11477
11478         * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
11479         type, always use 1 as the lower bound or string, even if lower bound of
11480         context is not static, to handle properly null strings in a non-static
11481         context.
11482
11483 2011-08-03  Bob Duff  <duff@adacore.com>
11484
11485         * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
11486         always legal on the right-hand side of an assignment statement; there
11487         is always an applicable index constraint in this case. Therefore, the
11488         check for Pkind = N_Assignment_Statement is now unconditional -- it
11489         doesn't depend on whether Is_Constrained (Typ).
11490
11491 2011-08-03  Robert Dewar  <dewar@adacore.com>
11492
11493         * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
11494
11495 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11496
11497         * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
11498         for an itype created within a generic unit.
11499
11500 2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>
11501
11502         * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
11503         suppresses all inlining.
11504
11505 2011-08-03  Robert Dewar  <dewar@adacore.com>
11506
11507         * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
11508         exp_aggr.adb: Minor reformatting.
11509
11510 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11511
11512         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
11513         tagged assignment when discriminant checks are suppressed. This is
11514         useless and extremely costly in terms of static stack usage.
11515
11516 2011-08-03  Bob Duff  <duff@adacore.com>
11517
11518         * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
11519         of generics, because this leads to the wrong entity in the wrong scope,
11520         causing (e.g.) pragma Export_Procedure to get an error if the entity is
11521         an instance.
11522         (Process_Interface_Name): Follow Alias for instances of generics, to
11523         correct for the above change.
11524
11525 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11526
11527         * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
11528         is an integer literal it is always safe to replace the reference. In
11529         addition, if the reference appears in the generated code for an object
11530         declaration it is necessary to copy because otherwise the reference
11531         might be to the uninitilized value of the discriminant of the object
11532         itself.
11533
11534 2011-08-03  Pascal Obry  <obry@adacore.com>
11535
11536         * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
11537         ACL used, in this case we want to check for ending .exe, not .exe
11538         anywhere in the path.
11539
11540 2011-08-03  Sergey Rybin  <rybin@adacore.com>
11541
11542         * tree_io.ads (ASIS_Version_Number): Update because of the changes in
11543         the tree structure (semantic decoration of references to record
11544         discriminants).
11545
11546 2011-08-03  Gary Dismukes  <dismukes@adacore.com>
11547
11548         * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
11549         choices of a named array aggregate, bail out when any choices are
11550         marked as Errors_Posted.
11551
11552 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11553
11554         * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
11555         in which entity is frozen, to handle properly loop variables in
11556         iterators.
11557
11558 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11559
11560         * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
11561         subtype is not static, compute the upper bound using attributes, to
11562         handle properly index types that are not integer types.
11563
11564 2011-08-03  Bob Duff  <duff@adacore.com>
11565
11566         * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
11567         Update copyright notice.
11568
11569 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11570
11571         * sem_ch3.adb (Build_Discriminant_Constraints): Only use
11572         Original_Discriminant if within an instance.
11573         * sem_ch4.adb (Analyze_Selected_Component): Ditto.
11574
11575 2011-08-03  Thomas Quinot  <quinot@adacore.com>
11576
11577         * einfo.ads: Minor reformatting.
11578
11579 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11580
11581         * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
11582         composite type with an unfrozen subcomponent, in the profile of a
11583         primitive operation.
11584
11585 2011-08-03  Robert Dewar  <dewar@adacore.com>
11586
11587         * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
11588
11589 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11590
11591         * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
11592         unconstrained type with discriminants is initialized with an aggregate,
11593         use the constrained subtype of the aggregate as the type of the object,
11594         because it is immutable, and this allows the back-end to generate no
11595         code for the object declaration.
11596
11597 2011-08-03  Robert Dewar  <dewar@adacore.com>
11598
11599         * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
11600         comparison operand is variable, and turns out to be zero or negative.
11601
11602 2011-08-03  Javier Miranda  <miranda@adacore.com>
11603
11604         * exp_intr.adb
11605         (Expand_Dispatching_Constructor_Call): Disable expansion of
11606         code required for native targets. Done to avoid generating
11607         references to unavailable runtime entities in VM targets.
11608         * exp_ch3.adb
11609         (Expand_N_Object_Declaration): Add missing support to handle
11610         the explicit initialization of class-wide interface objects.
11611         Fix documentation.
11612
11613 2011-08-03  Matthew Heaney  <heaney@adacore.com>
11614
11615         * a-cobove.adb (Merge): Move source onto target, instead of using
11616         Assign.
11617
11618 2011-08-03  Matthew Heaney  <heaney@adacore.com>
11619
11620         * a-cbdlli.adb (Splice): Move source items from first to last.
11621
11622 2011-08-03  Yannick Moy  <moy@adacore.com>
11623
11624         * sem_util.ads: Add comment.
11625
11626 2011-08-03  Javier Miranda  <miranda@adacore.com>
11627
11628         * exp_aggr.adb
11629         (Expand_Record_Aggregate): In VM targets disable the expansion into
11630         assignments of aggregates whose type is not known at compile time.
11631
11632 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
11633
11634         * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
11635         protected entries and task entries, to build the proper renaming
11636         declaration for entry formals, used in debugging.
11637         * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
11638         parameters in the same way.
11639
11640 2011-08-02  Robert Dewar  <dewar@adacore.com>
11641
11642         * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
11643         sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
11644         code reorganization.
11645
11646 2011-08-02  Robert Dewar  <dewar@adacore.com>
11647
11648         * debug.adb: Debug flag d.P to suppress length comparison optimization
11649         * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
11650         comparison of Length by comparing First/Last instead.
11651
11652 2011-08-02  Matthew Heaney  <heaney@adacore.com>
11653
11654         * a-cobove.ads: Code clean up.
11655
11656 2011-08-02  Vincent Celier  <celier@adacore.com>
11657
11658         * adaint.c (file_names_case_sensitive_cache): New static int.
11659         (__gnat_get_file_names_case_sensitive): Cache the return value in
11660         file_names_case_sensitive_cache at the first invocation, to avoid
11661         multiple calls to getenv.
11662
11663 2011-08-02  Bob Duff  <duff@adacore.com>
11664
11665         * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
11666
11667 2011-08-02  Yannick Moy  <moy@adacore.com>
11668
11669         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
11670         sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
11671         sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
11672         indicate that we are in a precondition or postcondition. This is used in
11673         Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
11674         decide whether to flag the spec or body of the current subprogram as
11675         not in ALFA.
11676
11677 2011-08-02  Fabien Chouteau  <chouteau@adacore.com>
11678
11679         * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
11680         list.
11681         * a-extiin.ads: New file.
11682
11683 2011-08-02  Bob Duff  <duff@adacore.com>
11684
11685         * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
11686         now raises Name_Error instead of Use_Error in certain cases. The other
11687         parts of this AI were already implemented properly.
11688
11689 2011-08-02  Vincent Celier  <celier@adacore.com>
11690
11691         * link.c: Only import "auto-host.h" when building the gnattools.
11692
11693 2011-08-02  Yannick Moy  <moy@adacore.com>
11694
11695         * sem_util.adb: Inter-unit inlining does not work for a subprogram
11696         which calls a local subprogram, so extract subprogram
11697         from Mark_Non_ALFA_Subprogram_Body.
11698
11699 2011-08-02  Javier Miranda  <miranda@adacore.com>
11700
11701         * exp_ch9.adb
11702         (Extract_Dispatching_Call): If the type of the dispatching object is an
11703         access type then return an explicit dereference in the Object out-mode
11704         parameter.
11705
11706 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11707
11708         * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
11709         compatibility checks for all indexes of an array subtype, not just the
11710         first. Reset Has_Dynamic_Range_Check on the subtype before each
11711         potential check to ensure that Insert_Range_Checks will not elide any
11712         of the dynamic checks.
11713
11714 2011-08-02  Yannick Moy  <moy@adacore.com>
11715
11716         * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
11717         SPARK restriction at parsing time.
11718         * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
11719         directive only if the SPARK restriction is set for this unit.
11720
11721 2011-08-02  Yannick Moy  <moy@adacore.com>
11722
11723         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
11724         sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
11725         sem_ch11.adb: Protect call to Current_Subprogram which might be costly
11726         when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
11727         Mark_Non_ALFA_Subprogram_Body.
11728         Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
11729         inlined.
11730
11731 2011-08-02  Yannick Moy  <moy@adacore.com>
11732
11733         * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
11734         might be costly.
11735
11736 2011-08-02  Robert Dewar  <dewar@adacore.com>
11737
11738         * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
11739         exp_ch3.adb: Minor reformatting.
11740
11741 2011-08-02  Emmanuel Briot  <briot@adacore.com>
11742
11743         * adaint.c (__gnat_locate_exec_on_path): only returns executable
11744         files, not any regular file.
11745         (__gnat_locate_file_with_predicate): new subprogram.
11746
11747 2011-08-02  Yannick Moy  <moy@adacore.com>
11748
11749         * sinfo.adb, sinfo.ads: Restrict the use of flags
11750         Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
11751         nodes, plus N_Subtype_Declaration for the 2nd one.
11752
11753 2011-08-02  Sergey Rybin  <rybin@adacore.com>
11754
11755         * gnat_rm.texi: Ramification of pragma Eliminate documentation
11756          - fix bugs in the description of Source_Trace;
11757          - get rid of UNIT_NAME;
11758
11759 2011-08-02  Javier Miranda  <miranda@adacore.com>
11760
11761         * exp_ch9.adb
11762         (Build_Dispatching_Requeue): Adding support for VM targets
11763         since we cannot directly reference the Tag entity.
11764         * exp_sel.adb (Build_K): Adding support for VM targets.
11765         (Build_S_Assignment): Adding support for VM targets.
11766         * exp_disp.adb
11767         (Default_Prim_Op_Position): In VM targets do not restrict availability
11768         of predefined interface primitives to compiling in Ada 2005 mode.
11769         (Is_Predefined_Interface_Primitive): In VM targets this service is not
11770         restricted to compiling in Ada 2005 mode.
11771         (Make_VM_TSD): Generate code that declares and initializes the OSD
11772         record. Needed to support dispatching calls through synchronized
11773         interfaces.
11774         * exp_ch3.adb
11775         (Make_Predefined_Primitive_Specs): Enable generation of predefined
11776         primitives associated with synchronized interfaces.
11777         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11778         primitives associated with synchronized interfaces.
11779
11780 2011-08-02  Yannick Moy  <moy@adacore.com>
11781
11782         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11783         statements hidden in SPARK if preceded by the HIDE directive
11784         (Parse_Exception_Handlers): mark each exception handler in a sequence of
11785         exception handlers as hidden in SPARK if preceded by the HIDE directive
11786         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11787         if starting with the HIDE directive
11788         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11789         starting with the HIDE directive; mark the declarations in a private
11790         part as hidden in SPARK if the private part starts with the HIDE
11791         directive
11792         * restrict.adb, restrict.ads
11793         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11794         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11795         argument node belongs to a part which is hidden in SPARK
11796         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11797         parts in SPARK; protect the possibly costly call to
11798         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11799         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11800         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11801         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11802         Tok_SPARK_Hide.
11803         (Scan): recognize special comment starting with '#' and followed by
11804         SPARK keyword "hide" as a HIDE directive.
11805
11806 2011-08-02  Yannick Moy  <moy@adacore.com>
11807
11808         * types.ads, erroutc.ads: Minor reformatting.
11809
11810 2011-08-02  Vincent Celier  <celier@adacore.com>
11811
11812         * link.c: Add response file support for cross platforms.
11813
11814 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11815
11816         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
11817         in an association, set parent field of copy before partial analysis.
11818         * sem_res.adb (Resolve_Slice): create reference to itype only when
11819         expansion is enabled.
11820
11821 2011-08-02  Yannick Moy  <moy@adacore.com>
11822
11823         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
11824         for new flag denoting which subprogram bodies are in ALFA
11825         * restrict.adb, sem_ch7.adb: Update comment
11826         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
11827         sem_ch9.adb, sem_res.adb: Add calls to
11828         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
11829         * sem_ch6.adb (Analyze_Function_Return): add calls to
11830         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
11831         middle of the body, and extended return.
11832         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
11833         False when missing return.
11834         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
11835         to True for subprograms whose spec is in ALFA. Remove later on the flag
11836         on the entity used for a subprogram body when there exists a separate
11837         declaration.
11838         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
11839         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
11840         False, otherwise do nothing.
11841
11842 2011-08-02  Robert Dewar  <dewar@adacore.com>
11843
11844         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
11845
11846 2011-08-02  Yannick Moy  <moy@adacore.com>
11847
11848         * sem_ch4.ads: minor formatting.
11849
11850 2011-08-02  Yannick Moy  <moy@adacore.com>
11851
11852         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
11853         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
11854         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
11855         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
11856         opt.ads: cleanup of SPARK mode
11857
11858 2011-08-02  Yannick Moy  <moy@adacore.com>
11859
11860         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
11861         types.
11862         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
11863         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
11864         * sem_ch3.adb
11865         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
11866         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
11867         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
11868         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
11869         types.
11870         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
11871         non-static range.
11872         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
11873         functions whose return type is not in ALFA.
11874         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11875         specifications.
11876         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11877         parameter's type is not in ALFA.
11878         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11879         types are in ALFA.
11880
11881 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11882
11883         * sem_ch6 (Analyze_Expression_Function): treat the function as
11884         Inline_Always, and introduce a subprogram declaration for it when it is
11885         not a completion.
11886         * inline.adb (Add_Inlined_Body): recognize bodies that come from
11887         expression functions, so that the back-end can determine whether they
11888         can in fact be inlined.
11889         * sem_util.adb (Is_Expression_Function): predicate to determine whether
11890         a function body comes from an expression function.
11891
11892 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
11893
11894         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11895         null exclusions to test Can_Never_Be_Null on the anonymous access types
11896         of the formals rather than testing the formals themselves. Exclude this
11897         check in cases where the Old_Formal is marked as a controlling formal,
11898         to avoid issuing spurious errors for bodies completing dispatching
11899         operations (due to the flag not getting set on controlling access
11900         formals in body specs).
11901         (Find_Corresponding_Spec): When checking full and subtype conformance of
11902         subprogram bodies in instances, pass Designated and E in that order, for
11903         consistency with the expected order of the formals (New_Id followed by
11904         Old_Id).
11905
11906 2011-08-02  Robert Dewar  <dewar@adacore.com>
11907
11908         * sem_ch8.adb: Minor reformatting.
11909
11910 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
11911
11912         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11913         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11914         primitive operations of class-wide actuals.
11915
11916 2011-08-02  Javier Miranda  <miranda@adacore.com>
11917
11918         * exp_atag.ads, exp_atag.adb
11919         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11920         since its value is implicitly passed in argument Typ.
11921         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11922         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11923         Build_Common_Dispatching_Select_Statements.
11924
11925 2011-08-02  Robert Dewar  <dewar@adacore.com>
11926
11927         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11928         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11929         Minor reformatting.
11930
11931 2011-08-02  Robert Dewar  <dewar@adacore.com>
11932
11933         * sem_res.adb: Minor reformatting.
11934         * sem_prag.adb: Minor reformatting.
11935
11936 2011-08-02  Javier Miranda  <miranda@adacore.com>
11937
11938         * exp_atag.adb, exp_atags.ads
11939         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11940         by the tagged type Entity. Required to use this routine in the VM
11941         targets since we do not have available the Tag entity in the VM
11942         platforms.
11943         * exp_ch6.adb
11944         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11945         Ada.Tags has not been previously loaded.
11946         * exp_ch7.adb
11947         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11948         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11949         * sem_aux.adb
11950         (Enclosing_Dynamic_Scope): Add missing support to handle the full
11951         view of enclosing scopes. Required to handle enclosing scopes that
11952         are synchronized types whose full view is a task type.
11953         * exp_disp.adb
11954         (Build_VM_TSDs): Minor code improvement to avoid generating and
11955         analyzing lists with empty nodes.
11956         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11957         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11958         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11959         (Make_Disp_Timed_Select_Body): Add support for VM targets.
11960         (Make_Select_Specific_Data_Table): Add support for VM targets.
11961         (Make_VM_TSD): Generate code to initialize the SSD structure of
11962         the TSD.
11963
11964 2011-08-02  Yannick Moy  <moy@adacore.com>
11965
11966         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11967         cross-references section in ALI.
11968         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11969         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11970         Sub).
11971         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11972         subprogram or package entity of a node
11973         (Is_Local_Reference_Type): new function returns True for references
11974         selected in local cross-references.
11975         (Lt): function extracted from Lt in Output_References
11976         (Write_Entity_Name): function extracted from Output_References
11977         (Generate_Definition): generate reference with type 'D' for definition
11978         of objects (object declaration and parameter specification), with
11979         appropriate locations and units, for use in local cross-references.
11980         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11981         references of type 'I' for initialization in object definition.
11982         (Output_References): move part of function Lt and procedure
11983         Write_Entity_Name outside of the body. Ignore references of types 'D'
11984         and 'I' introduced for local cross-references.
11985         (Output_Local_References): new procedure to output the local
11986         cross-references sections.
11987         (Lref_Entity_Status): new array defining whether an entity is a local
11988         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11989         with 'I' type when initialization expression is present.
11990         * get_scos.adb, get_scos.ads: Correct comments and typos
11991
11992 2011-08-02  Javier Miranda  <miranda@adacore.com>
11993
11994         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11995         the JVM target.
11996         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11997         the JVM target.
11998         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11999         TSD support.
12000
12001 2011-08-02  Vincent Celier  <celier@adacore.com>
12002
12003         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12004         (No_Space_Img): New function
12005         (Find_Excluded_Sources): When reading from a file, record the file name
12006         and the line number for each excluded source.
12007         (Mark_Excluded_Sources): When reporting an error, if the excluded
12008         sources were read from a file, include file name and line number in
12009         the error message.
12010
12011 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12012
12013         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12014
12015 2011-08-02  Robert Dewar  <dewar@adacore.com>
12016
12017         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12018
12019 2011-08-02  Javier Miranda  <miranda@adacore.com>
12020
12021         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12022         generation of TSDs to the DOTNET compiler.
12023         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12024         generation of TSDs to the DOTNET compiler.
12025
12026 2011-08-02  Javier Miranda  <miranda@adacore.com>
12027
12028         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12029         record of all the tagged types declared inside library level package
12030         declarations, library level package bodies or library level subprograms.
12031         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12032         associated with a given tagged type.
12033         (Build_VM_TSDs): New subprogram.
12034         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12035         compilation units that are subprograms.
12036         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12037         compilation units that are package bodies.
12038         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12039         units that are a package declaration or a package instantiation.
12040         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12041         reorganization to improve the error generated by the frontend when the
12042         function Ada.Tags.Secondary_Tag is not available.
12043         * rtsfind.ads (RE_Register_TSD): New runtime entity.
12044         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12045
12046 2011-08-02  Javier Miranda  <miranda@adacore.com>
12047
12048         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12049
12050 2011-08-02  Robert Dewar  <dewar@adacore.com>
12051
12052         * s-imenne.ads: Minor reformatting.
12053
12054 2011-08-02  Robert Dewar  <dewar@adacore.com>
12055
12056         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12057         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12058         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12059
12060 2011-08-02  Robert Dewar  <dewar@adacore.com>
12061
12062         * einfo.ads (Materialize_Entity): Document this is only for renamings
12063         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12064         required debug information in the case where we transform the object
12065         declaration into a renaming declaration.
12066         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12067         object
12068         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12069         Materialize_Entity.
12070
12071 2011-08-02  Robert Dewar  <dewar@adacore.com>
12072
12073         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12074         Suppress_Init_Procs.
12075         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12076         Suppress_Initialization/Initialization_Suppressed.
12077         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12078         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12079         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12080         * sem_prag.adb: New processing for pragma Suppress_Initialization.
12081
12082 2011-08-02  Robert Dewar  <dewar@adacore.com>
12083
12084         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12085         Minor reformatting.
12086
12087 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12088
12089         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12090         only have inheritable classwide pre/postconditions.
12091
12092 2011-08-02  Javier Miranda  <miranda@adacore.com>
12093
12094         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12095         * rtsfind.ads (RE_Check_TSD): New runtime entity.
12096         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12097         checks if the external tag of a type is the same as the external tag
12098         of some other declaration.
12099
12100 2011-08-02  Thomas Quinot  <quinot@adacore.com>
12101
12102         * s-taskin.ads: Minor reformatting.
12103
12104 2011-08-02  Emmanuel Briot  <briot@adacore.com>
12105
12106         * g-comlin.adb (Display_Help): swap the order in which it prints the
12107         short help and the general usage.
12108
12109 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12110
12111         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12112         the aspect declarations and attach them to the generic copy for
12113         subsequent analysis.
12114         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12115         declarations of the generic tree to the new subprogram declarations.
12116         * sem_attr.adb (Check_Precondition_Postcondition): recognize
12117         conditions that apply to a subprogram instance.
12118
12119 2011-08-02  Robert Dewar  <dewar@adacore.com>
12120
12121         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12122
12123 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12124
12125         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12126         private type with a tagged full view is not derived in the immediate
12127         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12128
12129 2011-08-02  Robert Dewar  <dewar@adacore.com>
12130
12131         * exp_ch4.adb: Minor reformatting.
12132
12133 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12134
12135         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
12136         Ada2012 iterator, the loop will be rewritten during expansion into a
12137         while loop with a cursor and an element declaration. Do not analyze the
12138         body in this case, because if the container is for indefinite types the
12139         actual subtype of the elements will only be determined when the cursor
12140         declaration is analyzed.
12141
12142 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12143
12144         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12145         size/alignment related attributes in CodePeer_Mode.
12146
12147 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
12148
12149         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12150         Prepend_Element, since this can result in the operation getting the
12151         wrong slot in the full type's dispatch table if the full type has
12152         inherited operations. The incomplete type's operation will get added
12153         to the proper position in the full type's primitives
12154         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12155         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12156         dispatching operations, since there are cases where nonprimitive
12157         subprograms can get added to the list of incomplete dependents (such
12158         as subprograms in nested packages).
12159         * sem_ch6.adb (Process_Formals): First, remove test for being in a
12160         private part when determining whether to add a primitive with a
12161         parameter of a tagged incomplete type to the Private_Dependents list.
12162         Such primitives can also occur in the visible part, and should not have
12163         been excluded from being private dependents.
12164         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12165         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12166         list of a Taft-amendment incomplete type is a primitive before issuing
12167         an error that the full type must appear in the same unit. There are
12168         cases where nonprimitives can be in the list (such as subprograms in
12169         nested packages).
12170         * sem_disp.adb (Derives_From): Use correct condition for checking that
12171         a formal's type is derived from the type of the corresponding formal in
12172         the parent subprogram (the condition was completely wrong). Add
12173         checking that was missing for controlling result types being derived
12174         from the result type of the parent operation.
12175
12176 2011-08-02  Yannick Moy  <moy@adacore.com>
12177
12178         * errout.adb (First_Node): minor renaming
12179         * restrict.adb (Check_Formal_Restriction): put restriction warning on
12180         first node.
12181
12182 2011-08-02  Yannick Moy  <moy@adacore.com>
12183
12184         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12185         before accessing operands.
12186         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12187         decide whether an initialization expression respects SPARK rules, as
12188         the plain node is the expanded one. This allows for more valid warnings
12189         to be issued.
12190         * gnat_rm.texi: Minor update.
12191
12192 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12193
12194         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12195         previous change.
12196
12197 2011-08-02  Robert Dewar  <dewar@adacore.com>
12198
12199         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12200
12201 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12202
12203         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12204         loop statements and the element renaming declaration with a block when
12205         the element type is controlled.
12206
12207 2011-08-02  Yannick Moy  <moy@adacore.com>
12208
12209         * sinfo.ads: Minor formatting.
12210
12211 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12212
12213         * sem_aggr.adb (Add_Association): if the association has a box and no
12214         expression, use the Sloc of the aggregate itself for the new
12215         association.
12216         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12217         the Original_Node.
12218
12219 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12220
12221         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12222         When a container is provided via a function call, generate a renaming
12223         of the function result. This avoids the creation of a transient scope
12224         and the premature finalization of the container.
12225         * exp_ch7.adb (Is_Container_Cursor): Removed.
12226         (Wrap_Transient_Declaration): Remove the supression of the finalization
12227         of the list controller when the declaration denotes a container cursor,
12228         it is not needed.
12229
12230 2011-08-02  Yannick Moy  <moy@adacore.com>
12231
12232         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12233         node is from source, instead of the original node being from source.
12234         * sem_aggr.adb
12235         (Resolve_Array_Aggregate): refine the check for a static expression, to
12236         recognize also static ranges
12237         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12238         Array_Type_Declaration): postpone the test for the type being a subtype
12239         mark after the type has been resolved, so that component-selection and
12240         expanded-name are discriminated.
12241         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12242         to distinguish the case of an iteration scheme, so that an error is
12243         issed on a non-static range in SPARK except in an iteration scheme.
12244         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12245         In_Iter_Schm = True.
12246         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12247         user-defined operators so that they are allowed in renaming
12248         * sem_ch8.adb
12249         (Find_Selected_Component): refine the check for prefixing of operators
12250         so that they are allowed in renaming. Move the checks for restrictions
12251         on selector name after analysis discriminated between
12252         component-selection and expanded-name.
12253         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12254         concatenation argument of string type if it is static.
12255         * sem_util.adb, sem_util.ads
12256         (Check_Later_Vs_Basic_Declarations): add a new function
12257         Is_Later_Declarative_Item to decice which declarations are allowed as
12258         later items, in the two different modes Ada 83 and SPARK. In the SPARK
12259         mode, add that renamings are considered as later items.
12260         (Enclosing_Package): new function to return the enclosing package
12261         (Enter_Name): correct the rule for homonyms in SPARK
12262         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12263         from source (result of expansion) to avoid issuing wrong warnings.
12264
12265 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12266
12267         * errout.adb: On anything but an expression First_Node returns its
12268         argument.
12269
12270 2011-08-02  Pascal Obry  <obry@adacore.com>
12271
12272         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12273
12274 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12275
12276         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12277         Set the associated loop as the related expression of internally
12278         generated cursors.
12279         * exp_ch7.adb (Is_Container_Cursor): New routine.
12280         (Wrap_Transient_Declaration): Supress the finalization of the list
12281         controller when the declaration denotes a container cursor.
12282
12283 2011-08-02  Yannick Moy  <moy@adacore.com>
12284
12285         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12286         command line now.
12287         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12288         expression is a simple expression. This check cannot be performed in
12289         the semantics, so just drop it.
12290         (P_Index_Or_Discriminant_Constraint): move check that the index or
12291         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12292         semantics. Other cases were previously checked in the semantics.
12293         * par-ch4.adb (P_Name): move checks that a selector name is not
12294         character literal or an operator symbol to Find_Selected_Component in
12295         the semantics
12296         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12297         declarations are not placed after later declarations in a separate
12298         procedure in Sem_Util (possibly not the best choice?), to be used both
12299         during parsing, for Ada 83 mode, and during semantic analysis, for
12300         SPARK mode.
12301         * par-endh.adb (Check_End): move check that end label is not missing
12302         to Process_End_Label in the semantics
12303         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12304         the special case for SPARK restriction
12305         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12306         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12307         parameter Force to issue the error message even on internal node (used
12308         for generated end label). Call Check_Restriction to check when an error
12309         must be issued. In SPARK mode, issue an error message even if the
12310         restriction is not set.
12311         (Check_Restriction): new procedure with an additional out parameter to
12312         inform the caller that a message has been issued
12313         * sem_aggr.adb: Minor modification of message
12314         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12315         instead of issuing an error message directly
12316         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12317         declarations are not placed after later declarations, by calling
12318         Check_Later_Vs_Basic_Declarations
12319         (Analyze_Subtype_Declaration): move here the check that an index or
12320         discriminant constraint must be a subtype mark. Change the check that
12321         a subtype of String must start at one so that it works on subtype marks.
12322         * sem_ch4.adb (Analyze_Call): move here the check that a named
12323         association cannot follow a positional one in a call
12324         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12325         instead of issuing an error message directly
12326         * sem_ch8.adb (Find_Selected_Component): move here the check that a
12327         selector name is not a character literal or an operator symbol. Move
12328         here the check that the prefix of an expanded name cannot be a
12329         subprogram or a loop statement.
12330         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12331         procedure called from parsing and semantics to check that basic
12332         declarations are not placed after later declarations
12333         (Process_End_Label): move here the check that end label is not missing
12334
12335 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12336
12337         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12338         representation clause in codepeer mode, since it confuses CodePeer and
12339         does not bring useful info.
12340
12341 2011-08-02  Ed Falis  <falis@adacore.com>
12342
12343         * init.c: initialize fp hw on MILS.
12344
12345 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12346
12347         * errout.adb (First_Node): for bodies, return the node itself (small
12348         optimization). For other nodes, do not check source_unit if the node
12349         comes from Standard.
12350
12351 2011-08-02  Robert Dewar  <dewar@adacore.com>
12352
12353         * exp_ch3.adb: Minor comment additions.
12354         * sem_ch13.adb: Minor reformatting.
12355
12356 2011-08-02  Pascal Obry  <obry@adacore.com>
12357
12358         * make.adb, makeutl.adb: Removes some superfluous directory separator.
12359
12360 2011-08-02  Robert Dewar  <dewar@adacore.com>
12361
12362         * sem_attr.adb: Minor reformatting.
12363
12364 2011-08-02  Robert Dewar  <dewar@adacore.com>
12365
12366         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12367         (Has_Default_Component_Value): Removed
12368         * einfo.ads Comment updates
12369         (Has_Default_Aspect): Replaces Has_Default_Value
12370         (Has_Default_Component_Value): Removed
12371         * exp_ch13.adb
12372         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12373         * exp_ch3.adb
12374         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12375         (Get_Simple_Init_Val): Handle Default_Value aspect
12376         (Needs_Simple_Initialization): Handle Default_Value aspect
12377         * exp_ch3.ads: Needs_Simple_Initialization
12378         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12379         * par-prag.adb (Pragma_Default[_Component]Value) Removed
12380         * sem_ch13.adb
12381         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12382         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12383         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12384
12385 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12386
12387         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12388         package containing iteration primitives.
12389         exp_ch5.adb (Expand_Iterator_Loop): ditto.
12390
12391 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12392
12393         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12394         "of", pre-analyze expression in case it is a function call with
12395         finalization actions that must be placed ahead of the loop.
12396         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12397         on an Ada2012 iterator, insert them ahead of the rewritten loop.
12398
12399 2011-08-02  Geert Bosch  <bosch@adacore.com>
12400
12401         * cstand.adb (Create_Float_Types): Only consider C's long double for
12402         Long_Long_Float, in addition to double.
12403
12404 2011-08-02  Robert Dewar  <dewar@adacore.com>
12405
12406         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12407         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12408         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12409         Minor reformatting.
12410
12411 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12412
12413         * sem_attr.adb: handle properly 'Result when it is a prefix of an
12414         indexed component.
12415
12416 2011-08-02  Javier Miranda  <miranda@adacore.com>
12417
12418         * einfo.ads, einfo.adb
12419         (Original_Access_Type): Move this attribute to Node26 since there was
12420         an undocumented use of Node21 in E_Access_Subprogram_Type entities
12421         which causes conflicts and breaks the generation of the .NET compiler.
12422         (Interface_Name): Add missing documentation on JGNAT only uses of
12423         this attribute.
12424
12425 2011-08-02  Geert Bosch  <bosch@adacore.com>
12426
12427         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12428         (Find_Back_End_Float_Type): Likewise
12429         (Create_Back_End_Float_Types): Likewise
12430         (Create_Float_Types): Likewise
12431         (Register_Float_Type): Likewise
12432         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12433         Nlist and split out type selection in new local Find_Base_Type function.
12434         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12435         Nlist
12436         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12437
12438 2011-08-02  Robert Dewar  <dewar@adacore.com>
12439
12440         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12441         alpha order).
12442         * opt.ads: Minor comment change.
12443         * sem_ch12.adb: Minor code reorganization.
12444
12445 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
12446
12447         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12448         subtype's list of rep items to the list on the full subtype in the case
12449         where the lists are the same.
12450
12451 2011-08-02  Geert Bosch  <bosch@adacore.com>
12452
12453         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12454         using the one from System.Strings, which also deallocates all strings.
12455
12456 2011-08-02  Geert Bosch  <bosch@adacore.com>
12457
12458         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12459         function.
12460         * gcc-interface/Make-lang.in: Update dependencies.
12461
12462 2011-08-02  Olivier Hainque  <hainque@adacore.com>
12463
12464         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12465         end_locus.
12466
12467 2011-08-02  Javier Miranda  <miranda@adacore.com>
12468
12469         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12470         associated with anonymous access to subprograms.
12471
12472 2011-08-02  Geert Bosch  <bosch@adacore.com>
12473
12474         * opt.ads
12475         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12476         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12477         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12478         (Add_Symbol_Definition): Move to switch-c.adb
12479         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12480         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12481         (Add_Symbol_Definition): Move to switch-c.adb.
12482         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12483         * sem_warn.adb
12484         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12485         Move to warnsw.adb.
12486         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12487         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12488         Move to warnsw.adb.
12489         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12490         (Add_Symbol_Definition): Moved from Prepcomp.
12491         * switch-c.ads: Update copyright notice. Use String_List instead of
12492         Argument_List, removing dependency on System.OS_Lib.
12493
12494 2011-08-02  Yannick Moy  <moy@adacore.com>
12495
12496         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12497         mode on initialization expression which does not respect SPARK
12498         restrictions.
12499         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12500         if the tree referenced by its argument represents an initialization
12501         expression in SPARK, suitable for initializing an object in an object
12502         declaration.
12503
12504 2011-08-02  Javier Miranda  <miranda@adacore.com>
12505
12506         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12507         internally generated access to subprogram with its associated protected
12508         subprogram type.
12509         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12510
12511 2011-08-02  Geert Bosch  <bosch@adacore.com>
12512
12513         * cstand.adb (Register_Float_Type): Print information about type to
12514         register, if the Debug_Flag_Dot_B is set.
12515         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12516         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12517         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12518         with a requested precision of more than Max_Digits digits and no more
12519         than Max_Base_Digits digits, if a range specification is present and the
12520         Predefined_Float_Types list has a suitable type to derive from.
12521         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12522         case of type completion with pragma Import
12523         * sem_prag.adb
12524         (Process_Import_Predefined_Type): Processing to complete a type
12525         with pragma Import. Currently supports floating point types only.
12526         (Set_Convention_From_Pragma): Do nothing without underlying type.
12527         (Process_Convention): Guard against absence of underlying type,
12528         which may happen when importing incomplete types.
12529         (Process_Import_Or_Interface): Handle case of importing predefined
12530         types. Tweak error message.
12531
12532 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12533
12534         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12535         functions to previous change.  Reorganize code slightly.
12536
12537 2011-08-02  Geert Bosch  <bosch@adacore.com>
12538
12539         * back_end.ads (Register_Type_Proc): New call back procedure type for
12540         allowing the back end to provide information about available types.
12541         (Register_Back_End_Types): New procedure to register back end types.
12542         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12543         available types.
12544         * cstand.adb (Back_End_Float_Types): New list for floating point types
12545         supported by the back end.
12546         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12547         (Copy_Float_Type): New procedure to make new copies of predefined types.
12548         (Register_Float_Type): New call back procedure to populate the BEFT list
12549         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12550         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12551         (Create_Float_Types): New procedure to create entities for floating
12552         point types predefined in Standard, and put these and any remaining
12553         BEFTs on the Predefined_Float_Types list.
12554         * stand.ads (Predefined_Float_Types): New list for predefined floating
12555         point types that do not have declarations in package Standard.
12556
12557 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12558
12559         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
12560         entity node for the unit containing the parameter.
12561         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12562         (Add_Inlined_Subprogram): Likewise.
12563         * gcc-interface/Make-lang.in: Update dependencies.
12564
12565 2011-08-02  Thomas Quinot  <quinot@adacore.com>
12566
12567         * s-stusta.adb (Print): Make sure Pos is always initialized to a
12568         suitable value.
12569
12570 2011-08-02  Geert Bosch  <bosch@adacore.com>
12571
12572         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12573
12574 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12575
12576         * sem_type.adb (Covers): Move trivial case to the top and reuse the
12577         computed value of Base_Type.
12578
12579 2011-08-02  Yannick Moy  <moy@adacore.com>
12580
12581         * restrict.adb (Check_Restriction): issue an error for any use of
12582         class-wide, even if the No_Dispatch restriction is not set.
12583         * sem_aggr.adb: Correct typos in comments and messages in formal mode
12584         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12585         when completing a private extension, the type named in the private part
12586         is not the same as that named in the visible part.
12587         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12588         of an inherited primitive operations of a tagged type or type extension
12589         that returns the tagged type.
12590         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12591         function which returns True for an implicit operation inherited by the
12592         derived type declaration for the argument type.
12593         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12594         order.
12595
12596 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12597
12598         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12599         Process_Bounds, to perform analysis with expansion of a range or an
12600         expression that is the iteration scheme for a loop.
12601         (Analyze_Iterator_Specification): If domain of iteration is given by a
12602         function call with a controlled result, as is the case if call returns
12603         a predefined container, ensure that finalization actions are properly
12604         generated.
12605         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12606
12607 2011-08-02  Javier Miranda  <miranda@adacore.com>
12608
12609         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12610         * gcc-interface/Make-lang.in: Update dependencies.
12611
12612 2011-08-02  Javier Miranda  <miranda@adacore.com>
12613
12614         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12615         determine if the analysis is performed using N or Original_Node (N).
12616         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12617         functionality of routine Is_Variable avoids code duplication.
12618         * checks.adb (Determine_Range): Handle temporaries generated by
12619         Remove_Side_Effects.
12620
12621 2011-08-02  Javier Miranda  <miranda@adacore.com>
12622
12623         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12624         expansion of the condition. Required since the previous analysis was
12625         done with expansion disabled (see Resolve_Quantified_Expression) and
12626         hence checks were not inserted and record comparisons have not been
12627         expanded.
12628
12629 2011-08-02  Ed Falis  <falis@adacore.com>
12630
12631         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12632         Update header.
12633
12634 2011-08-02  Bob Duff  <duff@adacore.com>
12635
12636         * opt.ads: Minor comment fix.
12637
12638 2011-08-02  Bob Duff  <duff@adacore.com>
12639
12640         * sem_ch12.adb (Analyze_Package_Instantiation,
12641         Analyze_Subprogram_Instantiation): Turn off style checking while
12642         analyzing an instance. Whatever style checks that apply to the generic
12643         unit should apply, so it makes no sense to apply them in an instance.
12644         This was causing trouble when compiling an instance of a runtime
12645         unit that violates the -gnatyO switch.
12646         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12647         one of the two case statements, causing spurious errors.
12648
12649 2011-08-02  Robert Dewar  <dewar@adacore.com>
12650
12651         * uname.adb: Minor reformatting.
12652         * gnatcmd.adb: Minor reformatting.
12653         * exp_attr.adb: Minor reformatting.
12654
12655 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12656
12657         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12658         No_Dispatching_Calls, do not look for the Assign primitive, because
12659         predefined primitives are not created in this case.
12660
12661 2011-08-02  Bob Duff  <duff@adacore.com>
12662
12663         * stylesw.ads: Minor comment fixes.
12664
12665 2011-08-02  Robert Dewar  <dewar@adacore.com>
12666
12667         * freeze.adb (Add_To_Result): New procedure.
12668
12669 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
12670
12671         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12672         time, if the specific run-time routines for handling streams of strings
12673         are not available, use the default mechanism.
12674
12675 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12676
12677         * s-regpat.ads: Fix typo.
12678
12679 2011-08-02  Vincent Celier  <celier@adacore.com>
12680
12681         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12682         not null, call it to create the in memory config project file without
12683         parsing an existing default config project file.
12684
12685 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12686
12687         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12688
12689 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12690
12691         * sem_elim.adb: an abstract subprogram does not need an eliminate
12692         pragma for its descendant to be eliminable.
12693
12694 2011-08-02  Ed Falis  <falis@adacore.com>
12695
12696         * init.c: revert to handling before previous checkin for VxWorks
12697         * s-intman-vxworks.adb: delete unnecessary declarations related to
12698         using Ada interrupt facilities for handling signals.
12699         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12700         * s-intman-vxworks.ads: Import __gnat_install_handler as
12701         Initialize_Interrupts.
12702         * s-taprop-vxworks.adb: Delete Signal_Mask.
12703         (Abort_Handler): change construction of mask to unblock exception
12704         signals.
12705
12706 2011-08-02  Jerome Guitton  <guitton@adacore.com>
12707
12708         * a-except-2005.adb (Raise_From_Signal_Handler): Call
12709         Debug_Raise_Exception before propagation starts.
12710
12711 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12712
12713         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12714         to Restriction_Check_Required.
12715         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12716         * sem_res.adb (Resolve_Call): Likewise.
12717         * sem_attr.adb (Check_Stream_Attribute): Likewise.
12718
12719 2011-08-02  Bob Duff  <duff@adacore.com>
12720
12721         * stylesw.ads: Update comment.
12722         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12723         * errout.ads: Remove obsolete comment.
12724
12725 2011-08-02  Javier Miranda  <miranda@adacore.com>
12726
12727         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12728         (Set_Is_Safe_To_Reevaluate): new procedure.
12729         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12730         assignment is allowed on safe-to-reevaluate variables.
12731         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12732         temporary created to remove side effects in expressions that use
12733         the secondary stack as safe-to-reevaluate.
12734         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12735         variables that are not true constants.
12736
12737 2011-08-02  Robert Dewar  <dewar@adacore.com>
12738
12739         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12740         sem_res.adb, sem_ch6.adb: Minor reformatting.
12741
12742 2011-08-02  Jerome Guitton  <guitton@adacore.com>
12743
12744         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12745
12746 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12747
12748         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12749         not set Overridden_Operation if subprogram is an initialization
12750         procedure.
12751
12752 2011-08-02  Yannick Moy  <moy@adacore.com>
12753
12754         * par-ch6.adb: Correct obsolete name in comments
12755         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12756         which takes two message arguments (existing function takes one), with
12757         second message used for continuation.
12758         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12759         block statements that originate from a source block statement, not
12760         generated block statements
12761         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12762         symmetry with procedure case
12763         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12764         function to issue an error in formal mode if a package specification
12765         contains more than one tagged type or type extension.
12766         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12767         parameters matching formals of tagged types are objects (or ancestor
12768         type conversions of objects), not general expressions. Issue an error
12769         on view conversions that are not involving ancestor conversion of an
12770         extended type.
12771         (Resolve_Type_Conversion): in formal mode, issue an error on the
12772         operand of an ancestor type conversion which is not an object
12773         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12774         procedure so that it works also for actuals of function calls
12775         (Is_Actual_Tagged_Parameter): new function which determines if its
12776         argument is an actual parameter of a formal of tagged type in a
12777         subprogram call
12778         (Is_SPARK_Object_Reference): new function which determines if the tree
12779         referenced by its argument represents an object in SPARK
12780
12781 2011-08-02  Robert Dewar  <dewar@adacore.com>
12782
12783         * sem_ch3.adb: Minor reformatting
12784         Minor comment addition
12785         Minor error msg text change
12786
12787 2011-08-02  Javier Miranda  <miranda@adacore.com>
12788
12789         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12790         function. Used to be more precise when we generate a variable plus one
12791         assignment to remove side effects in the evaluation of the Bound
12792         expressions.
12793         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12794         of the bound expression to force its re-analysis and thus expand the
12795         associated transient scope (if required). Code cleanup replacing the
12796         previous code that declared the constant entity by an invocation to
12797         routine Force_Evaluation which centralizes this work in the frontend.
12798
12799 2011-08-02  Robert Dewar  <dewar@adacore.com>
12800
12801         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12802         (Base_Type): Now uses improved Is_Base_Type function
12803         * einfo.ads (Base_Type): Inline this function
12804
12805 2011-08-02  Robert Dewar  <dewar@adacore.com>
12806
12807         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
12808         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
12809
12810 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12811
12812         * gcc-interface/Make-lang.in: Update dependencies.
12813         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
12814         targets.
12815
12816 2011-08-02  Yannick Moy  <moy@adacore.com>
12817
12818         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
12819         non-simple expression used in delta constraint
12820         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
12821         index constraint which is not a subtype mark
12822         * par.adb: With and use Restrict
12823         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
12824         mode on component type which is not a subtype mark and default
12825         expression on component
12826         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
12827         of string which does not have a lower index bound equal to 1
12828         (Array_Type_Declaration): issue an error in formal mode on index or
12829         component type which is not a subtype mark, and on aliased keyword on
12830         component
12831         (Derived_Type_Declaration): issue an error in formal mode on interface,
12832         limited or abstract type
12833         (Record_Type_Declaration): issue an error in formal mode on interface
12834         (Record_Type_Definition): issue an error in formal mode on tagged types
12835         and type extensions not declared in the specification of a library unit
12836         package; on null non-tagged record; on variant part
12837
12838 2011-08-02  Vincent Celier  <celier@adacore.com>
12839
12840         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
12841         not declared for qualified library project when Library_Name is not
12842         declared, but Library_Dir is.
12843
12844 2011-08-02  Robert Dewar  <dewar@adacore.com>
12845
12846         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
12847         pragmas (affects aspects [Component_]Default_Value
12848         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
12849         component type for the resolution
12850
12851 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
12852
12853         * einfo.adb (Base_Type): Tune implementation for speed.
12854
12855 2011-08-02  Robert Dewar  <dewar@adacore.com>
12856
12857         * freeze.adb: Minor reformatting.
12858
12859 2011-08-02  Thomas Quinot  <quinot@adacore.com>
12860
12861         * scos.ads: Update comments.
12862
12863 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12864
12865         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
12866         base type, because the parent may be a subtype of a private type whose
12867         convention is established in a private part.
12868
12869 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
12870
12871         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
12872         statement in a block when the expansion of the return expression has
12873         created a finalization chain.
12874         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
12875         with the parent node.
12876         Add N_Extended_Return_Statement to handle the case where a transient
12877         object declaration appears in the Return_Object_Declarations list of
12878         an extended return statement.
12879
12880 2011-08-02  Matthew Gingell  <gingell@adacore.com>
12881
12882         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12883         unused parameter 'name'.
12884
12885 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12886
12887         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12888         inherited operation, check whether its alias, which is the source
12889         operastion that it renames, has been marked eliminated.
12890
12891 2011-08-02  Javier Miranda  <miranda@adacore.com>
12892
12893         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12894         in-mode parameter whose type is an access type since it can be used to
12895         modify its designated object. Enforce code that handles as safe an
12896         access type that is not access-to-constant but it is the result of a
12897         previous removal of side-effects.
12898         (Remove_Side_Effects): Minor code reorganization of cases which require
12899         no action. Done to incorporate documentation on new cases uncovered
12900         working in this ticket: no action needed if this routine was invoked
12901         too early and the nodes are not yet decorated.
12902         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12903         to routine Remove_Side_Effects by calls to Force_Evaluation since they
12904         were issued with actuals that are implicitly provided by
12905         Force_Evaluation.
12906
12907 2011-08-02  Robert Dewar  <dewar@adacore.com>
12908
12909         * sem_ch3.adb, sem_res.adb: Minor reformatting.
12910
12911 2011-08-02  Yannick Moy  <moy@adacore.com>
12912
12913         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12914         to issue an error in formal mode on attribute not supported in this mode
12915         (Analyze_Attribute): issue errors on standard attributes not supported
12916         in formal mode.
12917         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12918         comment, and issue error in formal mode on modulus which is not a power
12919         of 2.
12920         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12921         range.
12922         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12923         subtype mark.
12924         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12925         operator on modular type (except 'not').
12926
12927 2011-08-02  Robert Dewar  <dewar@adacore.com>
12928
12929         * gnat_rm.texi: Minor reformatting.
12930
12931 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
12932
12933         * s-osinte-linux.ads: Minor comment update and reformatting.
12934         * i-cexten.ads: Make this unit pure, as for its parent.
12935         Will allow its usage in more contexts if needed.
12936
12937 2011-08-02  Robert Dewar  <dewar@adacore.com>
12938
12939         * s-utf_32.ads: Minor comment fix.
12940
12941 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12942
12943         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12944         operation of a tagged synchronized type, handle the case where the
12945         controlling argument is overloaded.
12946
12947 2011-08-02  Yannick Moy  <moy@adacore.com>
12948
12949         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12950         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12951         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12952         SPARK mode and formal verification mode on processing SPARK restriction
12953         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12954         requiring consistency checking.
12955
12956 2011-08-02  Robert Dewar  <dewar@adacore.com>
12957
12958         * sem_res.adb: Minor reformatting.
12959
12960 2011-08-02  Robert Dewar  <dewar@adacore.com>
12961
12962         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12963         a-cforse.ads: Remove unneeded with of Ada.Containers
12964         Remove commented out pragma Inline's
12965         Move specifications of new subprograms to the actual specs
12966
12967 2011-08-02  Yannick Moy  <moy@adacore.com>
12968
12969         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12970         a-cforse.ads: Update comments.
12971
12972 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
12973
12974         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12975
12976 2011-08-02  Robert Dewar  <dewar@adacore.com>
12977
12978         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12979         a-cforse.ads, a-cofove.ads: Minor reformatting.
12980
12981 2011-08-02  Claire Dross  <dross@adacore.com>
12982
12983         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12984         a-cofove.ads: Add comments.
12985
12986 2011-08-02  Yannick Moy  <moy@adacore.com>
12987
12988         * gnat_rm.texi: Document formal containers.
12989
12990 2011-08-02  Emmanuel Briot  <briot@adacore.com>
12991
12992         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12993         are empty sections.
12994
12995 2011-08-02  Robert Dewar  <dewar@adacore.com>
12996
12997         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12998         reformatting.
12999
13000 2011-08-02  Robert Dewar  <dewar@adacore.com>
13001
13002         * aspects.adb: New aspects Default_Value and Default_Component_Value
13003         New format of Aspect_Names table checks for omitted entries
13004         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13005         handling of boolean aspects for derived types.
13006         New aspects Default_Value and Default_Component_Value
13007         New format of Aspect_Names table checks for omitted entries
13008         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13009         (Has_Default_Value): New flag
13010         (Has_Default_Component_Value): New flag
13011         (Has_Default_Value): New flag
13012         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13013         table.
13014         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13015         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13016         Default_Value and Default_Component_Value
13017         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13018         New aspects Default_Value and Default_Component_Value
13019         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13020         * sprint.adb: Print N_Aspect_Specification node when called from gdb
13021
13022 2011-08-02  Vincent Celier  <celier@adacore.com>
13023
13024         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13025         inherit library kind.
13026
13027 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13028
13029         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13030         Minor reformatting.
13031
13032 2011-08-02  Robert Dewar  <dewar@adacore.com>
13033
13034         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13035
13036 2011-08-02  Yannick Moy  <moy@adacore.com>
13037
13038         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13039
13040 2011-08-02  Robert Dewar  <dewar@adacore.com>
13041
13042         * impunit.adb: Add comment.
13043
13044 2011-08-02  Yannick Moy  <moy@adacore.com>
13045
13046         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13047         qualification of aggregates in formal mode
13048         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13049         another aggregate
13050         (Resolve_Aggregate): complete the test that an aggregate is adequately
13051         qualified in formal mode
13052
13053 2011-08-02  Pascal Obry  <obry@adacore.com>
13054
13055         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13056         * mlib-prj.adb: Supress warning when compiling binder generated file.
13057         (Build_Library): Supress all warnings when compiling the binder
13058         generated file.
13059
13060 2011-08-02  Yannick Moy  <moy@adacore.com>
13061
13062         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13063         from here...
13064         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13065         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13066         Add with/use clauses to make Check_Formal_Restriction visible
13067
13068 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13069
13070         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13071         in-parameters when type of the generic formal is private in the generic
13072         spec and non-private in the body.
13073
13074 2011-08-02  Claire Dross  <dross@adacore.com>
13075
13076         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13077         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13078         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13079         * impunit.adb, Makefile.rtl: Take new files into account.
13080
13081 2011-08-02  Robert Dewar  <dewar@adacore.com>
13082
13083         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13084         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13085
13086 2011-08-02  Yannick Moy  <moy@adacore.com>
13087
13088         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13089         formal mode
13090         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13091         matching static array bounds, taking into account the special case of
13092         string literals
13093         * sem_ch3.adb: Typo in comment.
13094
13095 2011-08-02  Yannick Moy  <moy@adacore.com>
13096
13097         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13098         which issues an error in formal mode if its argument node is originally
13099         from source
13100         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13101         has a discriminant specification so that it does not include the case
13102         of derived types
13103         (Derived_Type_Declaration): move here the test that a derived type has a
13104         discriminant specification
13105         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13106         first element of a component association before accessing its choices
13107         (presence of component association is not enough)
13108         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13109         declaration is a library item before accessing the next element in a
13110         list, as library items are not member of lists
13111         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13112         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13113         Check_Formal_Restriction whenever possible.
13114
13115 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13116
13117         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13118         reference when needed.
13119
13120 2011-08-02  Bob Duff  <duff@adacore.com>
13121
13122         * gnat_ugn.texi: Fix typo.
13123
13124 2011-08-02  Vincent Celier  <celier@adacore.com>
13125
13126         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13127         archive file name. Do not use the full path name of archives for Open
13128         VMS.
13129
13130 2011-08-02  Robert Dewar  <dewar@adacore.com>
13131
13132         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13133         Analyze_Aspect_Specifications
13134         * sem_ch13.adb
13135         (Analyze_Aspect_Specifications): New handling for boolean aspects
13136         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13137         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13138         sequence for Analyze_Aspect_Specifications
13139         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13140         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13141
13142 2011-08-02  Robert Dewar  <dewar@adacore.com>
13143
13144         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13145         aspects, since these no longer exist.
13146
13147 2011-08-02  Robert Dewar  <dewar@adacore.com>
13148
13149         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13150         semicolon, do not try to see if there are aspects following it.
13151         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13152         aspect spec.
13153
13154 2011-08-02  Robert Dewar  <dewar@adacore.com>
13155
13156         * sem_ch8.adb, aspects.ads: Minor reformatting.
13157
13158 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
13159
13160         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13161         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13162         extracted from...
13163         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
13164
13165 2011-08-02  Yannick Moy  <moy@adacore.com>
13166
13167         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13168         mode on subprogram declaration outside of package specification, unless
13169         it is followed by a pragma Import
13170         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13171         Access_Type_Declaration): issue error in formal mode on access type
13172         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13173         incomplete type
13174         (Analyze_Object_Declaration): issue error in formal mode on object
13175         declaration which does not respect SPARK restrictions
13176         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13177         declaration which does not respect SPARK restrictions
13178         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13179         error in formal mode on digits or delta constraint
13180         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13181         decimal fixed point type
13182         (Derived_Type_Declaration): issue error in formal mode on derived type
13183         other than type extensions of tagged record types
13184         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13185         with check on access definition
13186         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13187         mode on protected definition.
13188         (Analyze_Task_Definition): issue error in formal mode on task definition
13189
13190 2011-08-02  Robert Dewar  <dewar@adacore.com>
13191
13192         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13193
13194 2011-08-02  Javier Miranda  <miranda@adacore.com>
13195
13196         * sem_ch6.adb (Can_Override_Operator): New function.
13197         (Verify_Overriding_Indicator): Add missing code to check overriding
13198         indicator in operators. Fixes regression.
13199         (Check_Overriding_Indicator): Minor reformating after replacing the
13200         code that evaluates if the subprogram can override an operator by
13201         invocations to the above new function.
13202         * einfo.adb
13203         (Write_Field26_Name): Add missing code to ensure that, following
13204         the documentation in einfo.ads, this field is not shown as attribute
13205         "Static_Initialization" on non-dispatching functions.
13206
13207 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
13208
13209         * sem_res.adb (Resolve_Call): A call to
13210         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13211         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13212         i.e., when the second parameter is of type Time_Span.
13213
13214 2011-08-02  Vincent Celier  <celier@adacore.com>
13215
13216         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13217         with an archive instead of -L<library dir> -l<library name>.
13218
13219 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13220
13221         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13222         mark the base types In_Use in addition to making the operations
13223         use_visible.
13224
13225 2011-08-02  Ed Falis  <falis@adacore.com>
13226
13227         * init.c: add and setup __gnat_signal_mask for the exception signals
13228         * s-inmaop-vxworks.adb: new file.
13229         * s-intman-vxworks.adb: remove unnecessary initializations and
13230         simplify remaining
13231         * s-intman-vxworks.ads: remove unnecessary variable
13232         * s-taprop-vxworks.adb: simplify signal initialization
13233
13234 2011-08-02  Robert Dewar  <dewar@adacore.com>
13235
13236         * sem_ch8.adb: Minor code reorganization, comment updates.
13237
13238 2011-08-02  Robert Dewar  <dewar@adacore.com>
13239
13240         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13241         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13242         here from Sem_Res.
13243         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13244         (Matching_Static_Array_Bounds): Moved here from Sem_Res
13245
13246 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13247
13248         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13249         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13250         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13251         use_type_clauses, to handle more efficiently use_type and use_all_type
13252         constructs.
13253         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13254         Ada2012 Use_All_Type clause.
13255         (Use_Class_Wide_Operations): new procedure.
13256
13257 2011-08-02  Robert Dewar  <dewar@adacore.com>
13258
13259         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13260         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13261         expression to expression function.
13262
13263 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13264
13265         * sem_ch4.adb: transform simple Ada2012 membership into equality only
13266         if types are compatible.
13267
13268 2011-08-02  Yannick Moy  <moy@adacore.com>
13269
13270         * sem_res.adb (Matching_Static_Array_Bounds): new function which
13271         returns True if its argument array types have same dimension and same
13272         static bounds at each index.
13273         (Resolve_Actuals): issue an error in formal mode on actuals passed as
13274         OUT or IN OUT paramaters which are not view conversions in SPARK.
13275         (Resolve_Arithmetic_Op): issue an error in formal mode on
13276         multiplication or division with operands of fixed point types which are
13277         not qualified or explicitly converted.
13278         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13279         Boolean or array type (except String) operands.
13280         (Resolve_Equality_Op): issue an error in formal mode on equality
13281         operators for array types other than String with non-matching static
13282         bounds.
13283         (Resolve_Logical_Op): issue an error in formal mode on logical operators
13284         for array types with non-matching static bounds. Factorize the code in
13285         Matching_Static_Array_Bounds.
13286         (Resolve_Qualified_Expression): issue an error in formal mode on
13287         qualified expressions for array types with non-matching static bounds.
13288         (Resolve_Type_Conversion): issue an error in formal mode on type
13289         conversion for array types with non-matching static bounds
13290
13291 2011-08-02  Robert Dewar  <dewar@adacore.com>
13292
13293         * par-ch10.adb: Minor code reorganization (use Nkind_In).
13294
13295 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
13296
13297         * par-ch9.adb: save location of entry for proper error message.
13298
13299 2011-08-02  Javier Miranda  <miranda@adacore.com>
13300
13301         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13302         (Use_Full_View) which permits this routine to climb through the
13303         ancestors using the full-view of private parents.
13304         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13305         Use_Full_View to true in calls to Is_Ancestor.
13306         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13307         true in call to Is_Ancestor.
13308         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13309         Use_Full_View to true in call to Is_Ancestor.
13310         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13311         call to Is_Ancestor.
13312         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13313         Use_Full_View to true in calls to Is_Ancestor.
13314         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13315         Make_Select_Specific_Data_Table, Register_Primitive,
13316         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13317         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13318         to true in call to Is_Ancestor.
13319         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13320         Use_Full_View to true in calls to Is_Ancestor.
13321         * exp_cg.adb
13322         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13323         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13324
13325 2011-08-02  Robert Dewar  <dewar@adacore.com>
13326
13327         * gnat_rm.texi: Minor reformatting.
13328         * sem_prag.adb: Minor reformatting.
13329
13330 2011-08-02  Tristan Gingold  <gingold@adacore.com>
13331
13332         * vms_data.ads: Add VMS qualifier for -gnateP.
13333
13334 2011-08-02  Robert Dewar  <dewar@adacore.com>
13335
13336         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13337         * par-ch7.adb (P_Package): Proper placement of aspects for package
13338         decl/instantiation.
13339         * par-endh.adb (Check_End): Ad Is_Sloc parameter
13340         (End_Statements): Add Is_Sloc parameterr
13341         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13342         (Check_End): Ad Is_Sloc parameter
13343         (End_Statements): Add Is_Sloc parameterr
13344
13345 2011-08-02  Vincent Celier  <celier@adacore.com>
13346
13347         * ug_words: Add VMS qualifier equivalent to -gnateP:
13348         /SYMBOL_PREPROCESSING.
13349
13350 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
13351
13352         * gnat-style.texi: For hexadecimal numeric literals the typical
13353         grouping of digits is 4 to represent 2 bytes.
13354         A procedure spec which is split into several lines is indented two
13355         characters.
13356
13357 2011-08-02  Yannick Moy  <moy@adacore.com>
13358
13359         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13360         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13361         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13362         properly qualified
13363         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13364         choice in array aggregate
13365         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13366         mark as ancestor
13367         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13368         positional and named aggregate for record, or others in record
13369         aggregate, or multiple choice in record aggregate
13370         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13371         array operands to logical operations AND, OR and XOR do not have the
13372         same static lower and higher bounds
13373         * sem_ch5.adb, sinfo.ads: Correct typos in comments
13374
13375 2011-08-01  Robert Dewar  <dewar@adacore.com>
13376
13377         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13378         Replaces Last_Source_Node_In_Sequence.
13379         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13380         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13381         parens and blank in string (this was inconsistently implemented).
13382         * errout.ads
13383         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13384         blank in string (this was inconsistently implemented).
13385         * gnat1drv.adb
13386         (Set_Global_Switches): Set formal mode switches appropriately
13387         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13388         * par-prag.adb
13389         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13390         call Set_Error_Msg_Lang to set "spark" as language name.
13391         * par.adb: Remove unnecessary call to set formal language for errout
13392         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13393         appropriately and call Set_Error_Msg_Lang to set "spark" as language
13394         name.
13395         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13396         calls to it, moved after resolution so that types are known
13397         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13398         result of concatenation is not of type String
13399         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13400         concatenation is not properly restricted
13401         * gnat_rm.texi: Add doc on pragma Spark_95.
13402         * gcc-interface/Makefile.in: Remove obsolete target pairs for
13403         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13404         * gcc-interface/Make-lang.in: Update dependencies.
13405
13406 2011-08-01  Javier Miranda  <miranda@adacore.com>
13407
13408         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13409         condition that detects if the overridden operation must replace an
13410         existing entity.
13411
13412 2011-08-01  Javier Miranda  <miranda@adacore.com>
13413
13414         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13415         code declarations inserted by Insert_Actions in each alternative of the
13416         N_Case_Expression node.
13417
13418 2011-08-01  Robert Dewar  <dewar@adacore.com>
13419
13420         * sem_ch6.adb: Minor code reorganization.
13421         * sem_util.adb: Minor reformatting.
13422
13423 2011-08-01  Pascal Obry  <obry@adacore.com>
13424
13425         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13426         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13427
13428 2011-08-01  Yannick Moy  <moy@adacore.com>
13429
13430         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13431         literal or operator symbol which is prefixed
13432         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13433         mode on access attributes.
13434         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13435         that concatenation operands are properly restricted in formal mode
13436         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13437         Analyze_Concatenation_Operand. Issue an error in formal mode if the
13438         result of the concatenation has a type different from String.
13439         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13440         Analyze_Quantified_Expression, Analyze_Slice,
13441         Analyze_Null): issue an error in formal mode on unsupported constructs
13442         * sem_ch5.adb
13443         (Analyze_Block_Statement): only issue error on source block statement
13444         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13445         function which returns the last node in a list of nodes for which
13446         Comes_From_Source returns True, if any
13447         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13448         Last_Source_Node_In_Sequence
13449         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13450         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13451         mode on unsupported constructs
13452         * sem_ch9.adb Do not return after issuing error in formal mode, as the
13453         rest of the actions may be needed later on since the error is marked as
13454         not serious.
13455         * sinfo.ads: Typos in comments.
13456
13457 2011-08-01  Pascal Obry  <obry@adacore.com>
13458
13459         * projects.texi: Minor editing.
13460
13461 2011-08-01  Yannick Moy  <moy@adacore.com>
13462
13463         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13464         insertion character ~~
13465         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13466         (Set_Error_Msg_Lang): new procedure which fixes the language for use
13467         with insertion character ~~
13468         (Set_Msg_Text): treat insertion character ~~
13469         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13470         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13471         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13472         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13473         errors related to the formal language restriction not serious
13474         (insertion character |).
13475         * par.adb (Par): set formal language for error messages if needed
13476         * sem_ch6.adb (Check_Missing_Return): take into account possible
13477         generated statements at the end of the function
13478         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13479         enumeration value to define a new pragma SPARK_95
13480         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13481         SPARK_Version): new type and variables to store the SPARK version
13482         (none by default).
13483         (SPARK_Mode): return True when SPARK_Version is set
13484         * par-prag.adb: Correct indentation
13485         (Prag): take Pragma_SPARK_95 into account
13486         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13487         into account.
13488
13489 2011-08-01  Robert Dewar  <dewar@adacore.com>
13490
13491         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13492         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13493         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13494
13495 2011-08-01  Pascal Obry  <obry@adacore.com>
13496
13497         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13498         Target_Name to Get_Path call.
13499         (Parse_Single_Project): Likewise.
13500         (Post_Parse_Context_Clause): Likewise.
13501         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13502         Call Initialise_Project_Path with the proper Target_Name.
13503         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13504         search path.
13505         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13506         with the proper Target_Name.
13507         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13508         Part.Parse routine.
13509         (Parse_Project_And_Apply_Config): Likewise.
13510         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13511         This is fine as this part of the code is supporting only native
13512         compilation.
13513         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13514         is fine as this part of the code is supporting only native compilation.
13515
13516 2011-08-01  Yannick Moy  <moy@adacore.com>
13517
13518         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13519         of homonym, unless the homonym is one of the cases allowed in SPARK
13520         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13521         package declaration occurring after a body.
13522
13523 2011-08-01  Robert Dewar  <dewar@adacore.com>
13524
13525         * checks.adb, exp_ch4.adb: Minor reformatting.
13526
13527 2011-08-01  Javier Miranda  <miranda@adacore.com>
13528
13529         * einfo.ads (Access_Disp_Table): Fix documentation.
13530         (Dispatch_Table_Wrappers): Fix documentation.
13531
13532 2011-08-01  Pascal Obry  <obry@adacore.com>
13533
13534         * prj-env.adb, prj-env.ads: Minor reformatting.
13535
13536 2011-08-01  Yannick Moy  <moy@adacore.com>
13537
13538         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13539         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13540         procedures out of these packages.
13541         * errout.ads, errout.adb
13542         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13543         procedures in of this package
13544         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13545         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13546         on misplaced later vs initial declarations, like in Ada 83
13547         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13548         formal mode on attribute of private type whose full type declaration
13549         is not visible
13550         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13551         package declaration inside a package specification
13552         (Analyze_Full_Type_Declaration): issue error in formal mode on
13553         controlled type or discriminant type
13554         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13555         user-defined operator means that it should come from the source
13556         (New_Overloaded_Entity): issue error in formal mode on overloaded
13557         entity.
13558         * sem_ch6.ads, sem_ch13.ads: typos in comments.
13559
13560 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13561
13562         * atree.adb: Minor reformatting.
13563         * checks.adb: Minor reformatting.
13564
13565 2011-08-01  Vincent Celier  <celier@adacore.com>
13566
13567         * s-parame-vms-ia64.ads: Fix typo in comment
13568         Minor reformatting
13569         * s-parame-vms-restrict.ads: Removed, unused.
13570
13571 2011-08-01  Javier Miranda  <miranda@adacore.com>
13572
13573         * exp_ch3.adb
13574         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13575         * sem_ch3.adb
13576         (Constrain_Index): Remove side effects in the evaluation of the bounds.
13577         * sem_ch3.ads, sem_ch3.adb
13578         (Is_Constant_Bound): New extended version of the subprogram that was
13579         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13580         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13581         * sem_aux.ads (Constant_Value): Fix typo in comment.
13582         * checks.adb (Generate_Index_Checks): New implementation which, for
13583         array objects with constant bounds, generates the runtime check
13584         referencing the bounds of the array type. For other cases this routine
13585         provides its previous behavior obtaining such values from the array
13586         object.
13587         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13588         parent type.
13589         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13590         we cannot have semantic interpretations of the new node.
13591
13592 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13593
13594         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13595         expressions.
13596
13597 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13598
13599         * sem_ch8.adb: Minor code editing.
13600         * s-vxwext.adb: Remove trailing space.
13601         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13602         consistency with other files.
13603
13604 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13605
13606         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13607
13608 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13609
13610         * par-ch10.adb: reject parameterized expressions as compilation unit.
13611         * sem_ch4.adb: handle properly conditional expression with overloaded
13612         then_clause and no else_clause.
13613
13614 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13615
13616         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13617         like done by System.Aux_DEC.
13618         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13619
13620 2011-08-01  Yannick Moy  <moy@adacore.com>
13621
13622         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13623         missing label at end of declaration (subprogram or package)
13624         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13625         of positional and named parameter association
13626         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13627         Error_Msg_SP which adds a prefix to the error message giving the name
13628         of the formal language analyzed
13629         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13630         access result type in subprogram, unconstrained array as result type,.
13631         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13632         procedure
13633         * sem_ch8.adb: Code clean up.
13634
13635 2011-08-01  Javier Miranda  <miranda@adacore.com>
13636
13637         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13638         * einfo.ads (Access_Disp_Table): Fix documentation.
13639         (Dispatch_Table_Wrappers): Fix documentation.
13640         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13641         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13642         to enforce the documentation of this attribute.
13643         (Set_Is_Interface): Cleanup the assertion.
13644         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13645         the Underlying_Type entity before reading attribute Access_Disp_Table.
13646         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13647         Locate the Underlying_Type before reading attribute Access_Disp_Table.
13648         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13649         the Underlying_Type entity before reading attribute Access_Disp_Table.
13650         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13651         Locate the Underlying_Type entity before reading attribute
13652         Access_Disp_Table.
13653
13654 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13655
13656         * s-poosiz.ads: Additional overriding indicators.
13657
13658 2011-08-01  Yannick Moy  <moy@adacore.com>
13659
13660         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13661         formal mode.
13662         (Analyze_Iteration_Scheme): issue error in formal mode when loop
13663         parameter specification does not include a subtype mark.
13664         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13665         formal mode on abstract subprogram.
13666         (Analyze_Subprogram_Specification): issue error in formal mode on
13667         user-defined operator.
13668         (Process_Formals): issue error in formal mode on access parameter and
13669         default expression.
13670         * sem_ch9.adb (Analyze_Abort_Statement,
13671         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13672         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13673         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13674         Analyze_Requeue, Analyze_Selective_Accept,
13675         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13676         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13677         issue error in formal mode on user-defined raise statement.
13678
13679 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13680
13681         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13682         declaration being hidden when overriding an implicit inherited
13683         subprogram.
13684         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13685         (-gnats), do not complain about a source file that contains only a
13686         pragma No_Body.
13687
13688 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13689
13690         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13691         variable if already set.
13692
13693 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13694
13695         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13696         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13697         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13698         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13699         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13700         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13701         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13702         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13703         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13704         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13705         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13706         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13707         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13708         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13709         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13710         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13711         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13712         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13713         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13714         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13715         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13716         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13717         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13718         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13719         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13720         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13721         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13722         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13723         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13724         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13725         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13726         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13727         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13728         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13729         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13730         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13731         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13732         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13733         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13734         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13735         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13736         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13737         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13738         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13739         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13740         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13741         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13742         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13743         s-osinte-mingw.ads: Update to GPLv3 run-time license.
13744         Use GNAT instead of GNARL.
13745
13746 2011-08-01  Bob Duff  <duff@adacore.com>
13747
13748         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13749         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13750         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13751         reformatting.
13752
13753 2011-08-01  Yannick Moy  <moy@adacore.com>
13754
13755         * debug.adb (d.D) reverve flag for the SPARK mode
13756         (d.E) reverve flag for SPARK generation mode
13757         (d.F) reverve flag for Why generation mode
13758         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13759         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
13760         functions which return True when the corresponding modes are set
13761         (Formal_Language): return "spark" or "alfa" when in formal verification
13762         mode.
13763         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13764         Error_Msg to prefix the error message with a tag giving the formal
13765         language
13766         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13767         message with a tag giving the formal language
13768         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13769         block statement
13770         (Analyze_Case_Statement): issue error in formal mode on case statement
13771         with a single "others" case alternative
13772         (Analyze_Exit_Statement): issue errors in formal mode on exit
13773         statements which do not respect SPARK restrictions
13774         (Analyze_Goto_Statement): issue error in formal mode on goto statement
13775         (Check_Unreachable_Code): always issue an error (not a warning) in
13776         formal mode on unreachable code (concerns both code after an infinite
13777         loop and after an unconditional jump, both not allowed in SPARK)
13778         * sem_ch6.adb (Analyze_Return_Statement): add call to
13779         Set_Return_Present for a procedure containing a return statement
13780         (already done for functions in Analyze_Function_Return)
13781         (Analyze_Function_Return): issue error in formal mode on extended
13782         return or if return is not last statement in function
13783         (Check_Missing_Return): issue error in formal mode if function does
13784         not end with return or if procedure contains a return
13785         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13786         function to detect if there is an inner scope of its parameter S which
13787         is a loop.
13788
13789 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13790
13791         * sem_ch6.ads: Minor reformatting.
13792
13793 2011-08-01  Javier Miranda  <miranda@adacore.com>
13794
13795         * sem_util.adb (Abstract_Interface_List): Complete condition when
13796         processing private type declarations to avoid reading unavailable
13797         attribute.
13798         (Is_Synchronized_Tagged_Type): Complete condition when processing
13799         private extension declaration nodes to avoid reading unavailable
13800         attribute.
13801
13802 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13803
13804         * sem_ch3.adb: Minor reformatting.
13805
13806 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13807
13808         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
13809         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
13810         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
13811         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
13812         for VMS, instead parametrize the common implementation with
13813         System.Parameters declarations.
13814
13815 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
13816
13817         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
13818
13819 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13820
13821         * seh_init.c: Fix SEH handler installation on win64.
13822
13823 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13824
13825         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
13826         double analysis of an anonymous access to subprogram, because it can
13827         lead to improper sharing of profiles and a back-end crash.
13828
13829 2011-08-01  Robert Dewar  <dewar@adacore.com>
13830
13831         * make.adb, sem_ch4.adb: Minor reformatting.
13832         * gcc-interface/Make-lang.in: Update dependencies.
13833         * sem_util.adb, exp_ch5.adb: Minor reformatting.
13834
13835 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13836
13837         * gnat_rm.texi: Fix definition of Long_Integer.
13838
13839 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13840
13841         * exp_aggr.adb: check limit size of static aggregate unconditionally,
13842         to prevent storage exhaustion.
13843         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
13844         finalized is a function body, insert the cleanup code before the final
13845         return statement, to prevent spurious warnings.
13846         * s-pooglo.ads: add overriding indicator.
13847
13848 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13849
13850         * sem_ch4.adb (Operator_Check): improve error message when both a
13851         with_clause and a use_clause are needed to make operator usage legal.
13852         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
13853         determine whether a compilation unit is visible within an other,
13854         either through a with_clause in the current unit, or a with_clause in
13855         its library unit or one one of its parents.
13856
13857 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13858
13859         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
13860         over an arbitrary expression of an array or container type.
13861         * lib-xref.adb: clarify comment.
13862
13863 2011-08-01  Bob Duff  <duff@adacore.com>
13864
13865         * einfo.ads: Minor reformatting.
13866         * debug.adb: Minor comment improvement.
13867
13868 2011-08-01  Javier Miranda  <miranda@adacore.com>
13869
13870         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
13871         consider hidden subprograms as valid candidates.
13872
13873 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
13874
13875         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13876
13877 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
13878
13879         * gnat_ugn.texi: Fix typo.
13880
13881 2011-08-01  Robert Dewar  <dewar@adacore.com>
13882
13883         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13884         lib-xref.adb: Minor reformatting
13885
13886 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
13887
13888         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13889         when to generate a call to Move_Final_List.
13890         (Has_Controlled_Parts): Remove this function.
13891
13892 2011-08-01  Geert Bosch  <bosch@adacore.com>
13893
13894         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13895         "," in choice list.
13896
13897 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13898
13899         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13900         explicit raise of a predefined exception as Comes_From_Source if the
13901         original N_Raise_Statement comes from source.
13902
13903 2011-08-01  Robert Dewar  <dewar@adacore.com>
13904
13905         * sinfo.ads: Add comment.
13906         * sem_ch6.adb: Minor reformatting.
13907
13908 2011-08-01  Robert Dewar  <dewar@adacore.com>
13909
13910         * freeze.adb (Freeze_Entity): Refine check for bad component size
13911         clause to avoid rejecting confirming clause when atomic/aliased present.
13912
13913 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13914
13915         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13916         better determine whether an entity reference is a write.
13917         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13918         subcomponent.
13919         * lib-xref.adb (Output_References): Do no suppress a read reference at
13920         the same location as an immediately preceeding modify-reference, to
13921         handle properly in-out actuals.
13922
13923 2011-08-01  Tristan Gingold  <gingold@adacore.com>
13924
13925         * env.c (__gnat_setenv) [VMS]: Refine previous change.
13926
13927 2011-08-01  Quentin Ochem  <ochem@adacore.com>
13928
13929         * i-cstrin.adb (New_String): Changed implementation, now uses only the
13930         heap to compute the result.
13931
13932 2011-08-01  Robert Dewar  <dewar@adacore.com>
13933
13934         * atree.ads: Minor reformatting.
13935
13936 2011-08-01  Emmanuel Briot  <briot@adacore.com>
13937
13938         * g-expect.adb (Get_Command_Output): Fix memory leak.
13939
13940 2011-08-01  Geert Bosch  <bosch@adacore.com>
13941
13942         * cstand.adb (P_Float_Type): New procedure to print the definition of
13943         predefined fpt types.
13944         (P_Mixed_Name): New procedure to print a name using mixed case
13945         (Print_Standard): Use P_Float_Type for printing floating point types
13946         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13947         precision IEEE float.
13948
13949 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13950
13951         * sem_ch3.adb: Minor reformatting.
13952
13953 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13954
13955         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13956         the completion of a generic function, insert the new body rather than
13957         rewriting the original.
13958
13959 2011-08-01  Yannick Moy  <moy@adacore.com>
13960
13961         * sinfo.ads, errout.ads: Typos in comments.
13962
13963 2011-08-01  Robert Dewar  <dewar@adacore.com>
13964
13965         * par-endh.adb: Minor reformatting.
13966
13967 2011-08-01  Robert Dewar  <dewar@adacore.com>
13968
13969         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13970         (Pre_Post_Aspects): New subtype.
13971         * par-ch12.adb (P_Generic): New syntax for aspects in packages
13972         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13973         * par-ch7.adb (P_Package): Remove Decl parameter
13974         (P_Package): Handle new syntax for aspects (before IS)
13975         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13976         new aspect syntax
13977         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13978         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13979         (P_Package): Remove Decl parameter
13980         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13981         aspects
13982         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13983         specs
13984         * sem_util.ads, sem_util.adb (Static_Boolean): New function
13985         * sinfo.ads: Document new syntax for aspects in packages etc.
13986         * sprint.adb: Handle new syntax of aspects before IS in package
13987
13988 2011-08-01  Thomas Quinot  <quinot@adacore.com>
13989
13990         * atree.ads: Minor reformatting.
13991         * sem_prag.adb: Minor reformatting.
13992
13993 2011-08-01  Robert Dewar  <dewar@adacore.com>
13994
13995         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13996         case expr alternative.
13997
13998 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
13999
14000         * sem_ch12.adb: Fix typo.
14001
14002 2011-08-01  Geert Bosch  <bosch@adacore.com>
14003
14004         * sem_prag.adb (Check_No_Link_Name): New procedure.
14005         (Process_Import_Or_Interface): Use Check_No_Link_Name.
14006         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14007         instead of Standard_Long_Long_Float_Size global. Preparation for
14008         eventual removal of per type constants.
14009         * exp_util.ads (Get_Stream_Size): New function returning the stream
14010         size value of subtype E.
14011         * exp_util.adb (Get_Stream_Size): Implement new function.
14012         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14013         function.
14014         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14015         * einfo.adb:
14016         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14017
14018 2011-08-01  Geert Bosch  <bosch@adacore.com>
14019
14020         * cstand.adb: Fix comments.
14021         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14022         count of arguments.
14023
14024 2011-08-01  Robert Dewar  <dewar@adacore.com>
14025
14026         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14027
14028 2011-08-01  Geert Bosch  <bosch@adacore.com>
14029
14030         * atree.ads: Fix comment.
14031
14032 2011-08-01  Robert Dewar  <dewar@adacore.com>
14033
14034         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14035         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14036         * par.adb: Add with for Namet.Sp.
14037         * par-tchk.adb: Minor reformatting.
14038
14039 2011-08-01  Vincent Celier  <celier@adacore.com>
14040
14041         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14042         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14043         of the init procedure of a SAL.
14044         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14045         New procedure.
14046
14047 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14048
14049         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14050         reformatting.
14051
14052 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14053
14054         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14055
14056 2011-08-01  Thomas Quinot  <quinot@adacore.com>
14057
14058         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14059         conformant with its spec (return True only for types that have
14060         an overriding Initialize primitive operation that prevents them from
14061         having preelaborable initialization).
14062         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14063         initialization for controlled types in Ada 2005 or later mode.
14064
14065 2011-08-01  Robert Dewar  <dewar@adacore.com>
14066
14067         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14068         Postcondition.
14069         (Same_Aspect): New function.
14070         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14071         Type_Invariant, Precondition, Postcondition.
14072         * snames.ads-tmpl: Add Name_Type_Invariant.
14073
14074 2011-08-01  Robert Dewar  <dewar@adacore.com>
14075
14076         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14077         here.
14078         (Freeze_All_Ent): Fix error in handling inherited aspects.
14079         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14080         already analyzed, but don't skip entire processing of a declaration,
14081         that's wrong in some cases of declarations being rewritten.
14082         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14083         Don't delay for integer, string literals
14084         Treat predicates in usual manner for delay, remove special case code,
14085         not needed.
14086         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14087         (Build_Predicate_Function): Update saved expression in aspect
14088         (Build_Invariant_Procedure): Update saved expression in aspect
14089         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14090         of replacement of discriminant references if the reference is simple.
14091
14092 2011-08-01  Robert Dewar  <dewar@adacore.com>
14093
14094         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14095         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14096         Static_Predicate and Dynamic_Predicate.
14097         (Build_Predicate_Function): Add processing for Static_Predicate
14098         and Dynamic_Predicate.
14099         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14100         (From_Static_Predicate): New flag
14101         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14102
14103 2011-08-01  Robert Dewar  <dewar@adacore.com>
14104
14105         * usage.adb: Documentation cleanup for Ada version modes in usage.
14106         * expander.adb: Minor reformatting.
14107
14108 2011-08-01  Robert Dewar  <dewar@adacore.com>
14109
14110         * atree.ads: Minor comment fix.
14111         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14112         a-witeio.ads, sem_prag.adb: Minor reformatting.
14113
14114 2011-08-01  Doug Rupp  <rupp@adacore.com>
14115
14116         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14117         pointers. Use descrip.h header file for convenience. Add some
14118         comments.
14119
14120 2011-08-01  Robert Dewar  <dewar@adacore.com>
14121
14122         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14123         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14124         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14125         New procedure.
14126         (Check_Aspect_At_End_Of_Declarations): New procedure
14127         (Analye_Aspect_Specification): Minor changes for above procedures
14128         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14129         specification node as well.
14130
14131 2011-08-01  Pascal Obry  <obry@adacore.com>
14132
14133         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14134         Windows files. Use GetFilesAttributes() in this case to check for file
14135         existence instead of returning with an error code.
14136
14137 2011-08-01  Vincent Celier  <celier@adacore.com>
14138
14139         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14140         High is above Source length.
14141
14142 2011-08-01  Robert Dewar  <dewar@adacore.com>
14143
14144         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14145
14146 2011-08-01  Robert Dewar  <dewar@adacore.com>
14147
14148         * aspects.ads (Boolean_Aspects): New subtype.
14149         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14150         for derived types in cases where the parent type and derived type have
14151         aspects.
14152         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14153         with aspects when parent type also has aspects.
14154         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14155         boolean expression at this point).
14156         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14157         accordance with final decision on the Ada 2012 feature.
14158         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14159
14160 2011-08-01  Matthew Heaney  <heaney@adacore.com>
14161
14162         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14163
14164 2011-08-01  Pascal Obry  <obry@adacore.com>
14165
14166         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14167         Fix Replace_Slice when High is above current string size.
14168         (Replace_Slice): Fix DL computation when High is above current
14169         string length.
14170
14171 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
14172
14173         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14174
14175 2011-08-01  Matthew Heaney  <heaney@adacore.com>
14176
14177         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14178         of node.
14179
14180 2011-08-01  Pascal Obry  <obry@adacore.com>
14181
14182         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14183         reformatting.
14184
14185 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14186
14187         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14188         access to protected subprograms in generic bodies.
14189         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14190         protected type, indicate that the convention of the subprogram is
14191         Convention_Protected, because it may be used in subsequent declarations
14192         within the protected declaration.
14193
14194 2011-08-01  Vincent Celier  <celier@adacore.com>
14195
14196         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14197         and "final" procedures when the name of the library is "ada", to avoid
14198         duplicate symbols "adainit" and "adafinal" in executables.
14199
14200 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
14201
14202         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14203         quantified expression that appears within a postcondition and uses the
14204         Ada2012 'Result attribute.
14205
14206 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14207
14208         * init.c (__gnat_error_handler): Cast reason to int.
14209         (__gnat_install_handler): Explain sa_sigaction use.
14210
14211 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
14212
14213         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14214         subprogram has copy-in copy-out parameters, try to promote the mode of
14215         the return type if it is passed in registers.
14216
14217 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
14218
14219         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14220         left operand as addressable.
14221
14222 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
14223
14224         * gcc-interface/gigi.h (build_function_stub): Remove.
14225         (build_return_expr): Likewise.
14226         (convert_vms_descriptor): Declare.
14227         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14228         (build_function_stub): Move to...
14229         * gcc-interface/utils2.c (build_return_expr): Move to...
14230         * gcc-interface/trans.c (build_function_stub): ...here.
14231         (build_return_expr): ...here.
14232         (Subprogram_Body_to_gnu): Add local variable for language_function.
14233         Disconnect the parameter attributes cache, if any, once done with it.
14234         Call end_subprog_body only after setting the end_locus.
14235         Build the stub associated with the function, if any, at the very end.
14236         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14237         variables and streamline control flow.
14238
14239 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
14240
14241         PR ada/49819
14242         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14243         g-trasym-dwarf.adb.
14244
14245 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14246
14247         PR bootstrap/49794
14248         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14249         Assign to act.sa_sigaction.
14250         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14251         current->return_address to char * before arithmetic.
14252
14253 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14254
14255         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14256         Correct argument types.
14257         Extract code from reason.
14258         (__gnat_install_handler): Assign to act.sa_sigaction.
14259
14260 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
14261
14262         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14263         (GNAT1_OBJS): ...here.
14264
14265 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
14266
14267         PR ada/48711
14268         * g-socthi-mingw.adb (Fill): Fix formatting.
14269
14270         * gcc-interface/gigi.h: Move around comment.
14271
14272 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
14273
14274         PR ada/46350
14275         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14276
14277 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
14278
14279         PR ada/48711
14280         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14281
14282 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
14283
14284         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14285         range comparison if Pmode is SImode.
14286
14287 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
14288             Eric Botcazou  <ebotcazou@adacore.com>
14289
14290         * adadecode.c: Wrap up in extern "C" block.
14291         * adadecode.h: Likewise.
14292         * adaint.c: Likewise.  Remove 'const' keyword.
14293         * adaint.h: Likewise.
14294         * argv.c: Likewise.
14295         * atree.h: Likewise.
14296         * cio.c: Likewise.
14297         * cstreams.c: Likewise.
14298         * env.c: Likewise.
14299         * exit.c: Likewise.
14300         * fe.h: Likewise.
14301         * final.c: Likewise.
14302         * init.c: Likewise.
14303         * initialize.c: Likewise.
14304         * link.c: Likewise.
14305         * namet.h: Likewise.
14306         * nlists.h: Likewise.
14307         * raise.c: Likewise.
14308         * raise.h: Likewise.
14309         * repinfo.h: Likewise.
14310         * seh_init.c: Likewise.
14311         * targext.c: Likewise.
14312         * tracebak.c: Likewise.
14313         * uintp.h: Likewise.
14314         * urealp.h: Likewise.
14315         * xeinfo.adb: Wrap up generated C code in extern "C" block.
14316         * xsinfo.adb: Likewise.
14317         * xsnamest.adb: Likewise.
14318         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14319         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14320         * gcc-interface/misc.c: Likewise.
14321         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14322         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
14323         ada/targext.o here...
14324         (GNAT_ADA_OBJS): ...and not here.
14325         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14326         (GNATBIND_OBJS): Reorder.
14327
14328 2011-07-07  Richard Henderson  <rth@redhat.com>
14329
14330         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14331         dwarf2out_frame_init.
14332
14333 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
14334
14335         * gcc-interface/misc.c (gnat_init): Tweak previous change.
14336
14337 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14338
14339         PR target/39150
14340         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14341
14342 2011-07-06  Richard Guenther  <rguenther@suse.de>
14343
14344         * gcc-interface/misc.c (gnat_init): Merge calls to
14345         build_common_tree_nodes and build_common_tree_nodes_2.
14346         Re-initialize boolean_false_node.
14347
14348 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
14349             Olivier Hainque  <hainque@adacore.com>
14350             Nicolas Setton  <setton@adacore.com>
14351
14352         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14353         the type according to the ARTIFICIAL_P parameter.
14354         (create_type_decl): Likewise.
14355         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14356
14357 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
14358
14359         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14360         (gnatbind): Likewise.
14361
14362 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14363
14364         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14365
14366 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
14367
14368         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14369         local variable throughout.  Remove useless call to Base_Type.
14370         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14371         Take it also into account for the volatileness of the field.  Set the
14372         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
14373
14374 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
14375
14376         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14377         on a dereference built for a by-ref object if it has an address clause.
14378
14379 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
14380
14381         * einfo.ads (Address_Taken): Document use for the second argument of
14382         Asm_Input and Asm_Output attributes.
14383         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14384         argument is an entity name, then set Address_Taken on it.
14385         <Attribute_Asm_Output>: Likewise.
14386         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14387         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14388         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14389         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14390
14391 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
14392
14393         PR middle-end/46500
14394         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14395
14396 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
14397
14398         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14399         (ada/utils.o): Update dependencies.
14400         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14401         ../../../libcpp/libcpp.a.
14402         * gcc-interface/utils.c: Include common/common-target.h.
14403         (process_attributes): Use targetm_common.have_named_sections.
14404
14405 2011-06-07  Richard Guenther  <rguenther@suse.de>
14406
14407         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14408         set_sizetype.
14409
14410 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14411
14412         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14413         TREE_THIS_NOTRAP flag.
14414
14415 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14416
14417         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14418         Fix thinko.
14419
14420 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14421
14422         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14423         constants whose full view has discriminants specially.
14424
14425 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14426
14427         * gcc-interface/utils.c: Include diagnostic.h.
14428         (gnat_write_global_declarations): Output debug information for all
14429         global type declarations before finalizing the compilation unit.
14430         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14431
14432 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
14433
14434         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14435
14436 2011-05-25  Kai Tietz  <ktietz@redhat.com>
14437
14438         * adaint.c (__gnat_to_canonical_file_list_next): Use array
14439         initialization instead of const/none-const pointer assignment.
14440
14441 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
14442
14443         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14444         $(EXTRA_GNAT1_OBJS).
14445         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14446         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14447         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14448         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14449         libcommon-target.a instead of prefix.o.
14450
14451 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
14452
14453         PR ada/49097
14454         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14455
14456 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
14457
14458         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14459         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14460         instead of version.o.
14461
14462 2011-05-18  Kai Tietz  <ktietz@redhat.com>
14463
14464         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14465         boolean_false_node instead of integer_zero_node.
14466         (convert_with_check): Likewise.
14467         * gcc-interface/decl.c (choices_to_gnu): Likewise.
14468
14469 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
14470
14471         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14472         type of the parameter is an unconstrained array, convert the actual to
14473         the type of the formal in the In Out and Out cases as well.
14474
14475 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
14476
14477         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14478         call build_function_type_array or build_varargs_function_type_array
14479         instead.
14480         (create_subprog_type): Don't call build_function_type; call
14481         build_function_type_vec instead.
14482
14483 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
14484
14485         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14486         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14487         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14488
14489 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
14490
14491         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14492
14493         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14494         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14495
14496 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
14497
14498         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14499
14500 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
14501
14502         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14503         instead of accessing TYPE_ARG_TYPES directly.
14504         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14505
14506 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
14507
14508         PR ada/48844
14509         * gcc-interface/gigi.h (get_variant_part): Declare.
14510         * gcc-interface/decl.c (get_variant_part): Make global.
14511         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14512         types have the same constant size, are record types and T1 has a
14513         variant part while T2 doesn't.
14514
14515 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
14516
14517         * gcc-interface/utils.c (begin_subprog_body): Do not call
14518         get_pending_sizes.
14519         (end_subprog_body): Likewise.
14520
14521 2011-05-04  Richard Guenther  <rguenther@suse.de>
14522
14523         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14524         int_const_binop.
14525         (pos_to_constructor): Likewise.
14526
14527 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
14528             Eric Botcazou  <ebotcazou@adacore.com>
14529
14530         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14531         of build_function_type.  Adjust calls to...
14532         (build_raise_check): ...this.  Do not take a void_tree parameter.
14533         Call build_function_type_list instead of build_function_type.
14534         Fix head comment and swap couple of conditional blocks.
14535
14536 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
14537
14538         * gnatvsn.ads (Library_Version): Bump to 4.7.
14539         (Current_Year): Bump to 2011.
14540
14541 2011-04-29  Michael Matz  <matz@suse.de>
14542
14543         * gcc-interface/misc.c (gnat_handle_option): Set
14544         warn_maybe_uninitialized.
14545
14546 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
14547
14548         * gnat_ugn.texi (Complexity Metrics Control): Update link to
14549         the Watson/McCabe paper.
14550
14551 2011-04-23  Jim Meyering  <meyering@redhat.com>
14552
14553         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14554
14555 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
14556
14557         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14558         onto the new type.
14559
14560 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
14561
14562         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14563         parameter.
14564         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
14565         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14566         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14567         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14568         <all>: Do not set flags on the reused DECL node coming from an alias.
14569         Set DECL_IGNORED_P on the DECL node built for subprograms if they
14570         don't need debug info here...
14571         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14572         (gigi): Adjust calls to create_subprog_decl.
14573         (build_raise_check): Likewise.
14574         (establish_gnat_vms_condition_handler): Likewise.
14575         (Compilation_Unit_to_gnu): Likewise.
14576         (gnat_to_gnu): Likewise.
14577
14578 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
14579
14580         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14581         (NO_REORDER_ADAFLAGS): New variable.
14582         (EXTRA_GNATTOOLS): Always define.
14583         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14584         Clean up and adjust list of files compiled with special options.
14585         * gcc-interface/Make-lang.in: Likewise.
14586         (ada/decl.o): Cosmetical change.
14587         (ada/misc.o): Remove dependency on $(PLUGIN_H).
14588
14589 2011-04-20  Jim Meyering  <meyering@redhat.com>
14590
14591         * initialize.c (__gnat_initialize): Remove useless if-before-free.
14592
14593 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
14594
14595         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14596         $(CFLAGS) on the link line.
14597
14598 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
14599
14600         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14601         padded type built for the return type if it is unconstrained.
14602
14603 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
14604
14605         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14606
14607 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
14608
14609         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14610         before calling TREE_CHAIN.
14611         * gcc-interface/misc.c (gnat_init_ts): New function.
14612         (LANG_HOOKS_INIT_TS): Define.
14613
14614 2011-04-12  Martin Jambor  <mjambor@suse.cz>
14615
14616         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14617         instead of cgraph_node.
14618
14619 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
14620
14621         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14622         alignment on fields of the RETURN type built for the Copy-In Copy-Out
14623         mechanism.
14624
14625 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
14626
14627         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14628         of aggregate types that contain a placeholder.
14629
14630 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
14631
14632         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14633         TYPE_ARG_TYPES.
14634         (handle_type_generic_attribute): Likewise.
14635
14636 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
14637
14638         PR ada/47163
14639         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14640
14641 2011-04-04  Kai Tietz  <ktietz@redhat.com>
14642
14643         PR ada/47163
14644         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14645         to flag value.
14646
14647 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14648
14649         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14650         type case, do not strip a padding type around the array type.
14651
14652 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14653
14654         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14655         types.
14656
14657 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14658
14659         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14660         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14661         code for -feliminate-unused-debug-types.
14662         (gnat_post_options): Likewise.
14663
14664 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14665
14666         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14667         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14668         distinct copy.
14669
14670 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14671
14672         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14673         DECL_ARTIFICIAL flag on enumeration types.
14674
14675 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14676
14677         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14678         fat pointer types artificial unconditionally.
14679         <E_Array_Subtype>: Attach the base array type as a parallel type if it
14680         isn't artificial.
14681
14682 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14683
14684         * gcc-interface/gigi.h (get_dummy_type): Declare.
14685         (build_dummy_unc_pointer_types): Likewise.
14686         (finish_fat_pointer_type): Likewise.
14687         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14688         fat pointer type has been built, complete it in place.
14689         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14690         and thin pointers.  Remove useless variable.
14691         (finish_fat_pointer_type): Make global and move to...
14692         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14693         (get_dummy_type): New function.
14694         (build_dummy_unc_pointer_types): Likewise.
14695         (gnat_pushdecl): Propage the name to the anonymous variants only.
14696         (update_pointer_to): Only adjust the pointer types in the unconstrained
14697         array case.
14698
14699 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14700
14701         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14702         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14703         if this is a Taft amendment type and the full declaration is available.
14704         * gcc-interface/trans.c (process_type): Likewise.
14705         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14706         (process_freeze_entity): Likewise.
14707         * gcc-interface/utils.c (dummy_global): New static variable.
14708         (gnat_write_global_declarations): If there are types declared as used
14709         at the global level, insert them in the global hash table.
14710
14711 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14712
14713         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14714         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14715         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14716         copy.
14717         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
14718         flag of the type accordingly.
14719         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14720
14721 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
14722
14723         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14724         finalizing types when updating the pointers to the designated type.
14725         <all>: Finalize the deferred types even if we didn't defer processing
14726         of incomplete types in this invocation.
14727
14728 2011-04-01  Olivier Hainque  <hainque@adacore.com>
14729             Nicolas Setton  <setton@adacore.com>
14730             Eric Botcazou  <ebotcazou@adacore.com>
14731
14732         * gcc-interface/misc.c (gnat_descriptive_type): New function.
14733         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14734
14735 2011-03-28  Kai Tietz  <ktietz@redhat.com>
14736
14737         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14738         Windows targets.
14739         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14740         * system-mingw.ads (System): Change ZCX_By_Default default to True.
14741
14742         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14743
14744 2011-03-28  Tristan Gingold  <gingold@adacore.com>
14745
14746         PR ada/44431
14747         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14748         Use ada output of gnatbind.
14749         (ada/b_gnatb.adb): Ditto.
14750         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14751         (ada.mostlyclean, ada.stage1)
14752         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14753         (ada.stagefeedback): Adjust.
14754         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14755         Use ada output of gnatbind.
14756         (b_gnatm.adb): Ditto.
14757         (b_gnatl.o, b_gnatm.o): New rules.
14758
14759 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14760
14761         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14762         for the padded type built to support a specified size or alignment.
14763
14764 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14765
14766         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14767         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14768         unconditionally to the end of the unit when the designated type is
14769         limited_with'ed.
14770         <all>: Rename local variable.  Attempt to un-defer types only and do it
14771         for limited_with'ed types as well.
14772         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
14773         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14774         consistently and remove redundant call to finalize_from_with_types.
14775
14776 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
14777
14778         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14779         subprograms without a previous spec declared in the same unit.
14780         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14781         subprograms at the end of the unit instead of at the beginning.
14782         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14783         isn't public for the special handling of non-inline functions nested
14784         inside inline external functions.
14785
14786 2011-03-25  Jeff Law  <law@redhat.com>
14787
14788         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14789
14790 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
14791
14792         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14793         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14794         to compute Set_Size_Depends_On_Discriminant.
14795         (Layout_Type): Call it on array types in back-end layout mode.
14796         * sem_util.adb (Requires_Transient_Scope): Return true for array
14797         types only if the size depends on the value of discriminants.
14798         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14799         type if the RHS is a call to a function that returns an unconstrained
14800         type with default discriminant.
14801
14802 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
14803
14804         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
14805         non-conversion to the nominal result type at the end.
14806
14807 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14808
14809         * gcc-interface/trans.c (create_temporary): New function taken from...
14810         (create_init_temporary): ...here.  Call it.
14811         (call_to_gnu): Create the temporary for the return value early, if any.
14812         Create it for a function with copy-in/copy-out parameters if there is
14813         no target; in other cases of copy-in/copy-out, use another temporary.
14814         Push the new binding level lazily.  Add and rename local variables.
14815
14816 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14817
14818         * gcc-interface/decl.c (validate_size): Improve comments and tweak
14819         error message.
14820         (set_rm_size): Likewise.
14821
14822 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
14823
14824         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14825         for the padded type built in order to support a specified alignment.
14826         Fix incorrect formatting.
14827
14828 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14829
14830         PR bootstrap/48216
14831         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
14832
14833 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14834
14835         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
14836         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
14837         to the end of the list.  Adjust recursive call.  Rename local variable.
14838         If REORDER is true, reorder components of the record type.
14839         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
14840         components_to_record and adjust the parameter list.
14841
14842 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
14843
14844         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
14845         disabled, use the variable for bounds of loop iteration scheme.
14846
14847 2011-03-21  Kai Tietz  <ktietz@redhat.com>
14848
14849         PR target/12171
14850         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
14851
14852 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
14853
14854         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
14855         out whether the expression is read-only.  Short-circuit placeholder
14856         case and rename a couple of local variables.
14857
14858 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
14859
14860         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
14861         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
14862         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
14863         (convert): Deal with conversions from a smaller form type specially.
14864
14865 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
14866
14867         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
14868         its argument, except for the special -I- switch.
14869
14870 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
14871
14872         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
14873         "Ada Issues".
14874
14875 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
14876
14877         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14878
14879 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
14880
14881         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14882         GNAT_FORMAL.
14883         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14884         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
14885         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
14886         Do not generate the check directly, instead instantiate the template
14887         check present in the descriptor.
14888         (make_descriptor_field): Move around.
14889         (build_vms_descriptor32): Build a template check in the POINTER field.
14890         (build_vms_descriptor): Remove useless suffixes.
14891         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14892
14893 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
14894
14895         PR bootstrap/47467
14896         * targext.c: Include target files if IN_RTS is defined.
14897
14898 2011-01-26  Richard Guenther  <rguenther@suse.de>
14899
14900         PR bootstrap/47467
14901         * targext.c: Include config.h.
14902         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14903         dependency.
14904
14905 2011-01-04  Pascal Obry  <obry@adacore.com>
14906             Eric Botcazou  <ebotcazou@adacore.com>
14907
14908         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14909
14910 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14911
14912         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14913         end-of-case on the end label and its associated gotos, if any.
14914
14915 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14916
14917         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14918         expressions of the parameter cache within the statement group of
14919         the CICO mechanism.
14920
14921 2011-01-04  Olivier Hainque  <hainque@adacore.com>
14922             Eric Botcazou  <ebotcazou@adacore.com>
14923
14924         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14925         (set_end_locus_from_node): New function.
14926         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14927         make and the function end_locus.
14928         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14929         for the elaboration subprogram.
14930         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14931         set the end_locus of the expression as well.
14932
14933 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
14934
14935         PR ada/47131
14936         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14937         variables that are referenced in exception handlers volatile.
14938
14939
14940 \f
14941 Copyright (C) 2011 Free Software Foundation, Inc.
14942
14943 Copying and distribution of this file, with or without modification,
14944 are permitted in any medium without royalty provided the copyright
14945 notice and this notice are preserved.
14946
14947         * gnat_rm.texi: Ramification of pragma Eliminate documentation
14948          - fix bugs in the description of Source_Trace;
14949          - get rid of UNIT_NAME;
14950
14951 2011-08-02  Javier Miranda  <miranda@adacore.com>
14952
14953         * exp_ch9.adb
14954         (Build_Dispatching_Requeue): Adding support for VM targets
14955         since we cannot directly reference the Tag entity.
14956         * exp_sel.adb (Build_K): Adding support for VM targets.
14957         (Build_S_Assignment): Adding support for VM targets.
14958         * exp_disp.adb
14959         (Default_Prim_Op_Position): In VM targets do not restrict availability
14960         of predefined interface primitives to compiling in Ada 2005 mode.
14961         (Is_Predefined_Interface_Primitive): In VM targets this service is not
14962         restricted to compiling in Ada 2005 mode.
14963         (Make_VM_TSD): Generate code that declares and initializes the OSD
14964         record. Needed to support dispatching calls through synchronized
14965         interfaces.
14966         * exp_ch3.adb
14967         (Make_Predefined_Primitive_Specs): Enable generation of predefined
14968         primitives associated with synchronized interfaces.
14969         (Make_Predefined_Primitive_Bodies): Enable generation of predefined
14970         primitives associated with synchronized interfaces.
14971
14972 2011-08-02  Yannick Moy  <moy@adacore.com>
14973
14974         * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
14975         statements hidden in SPARK if preceded by the HIDE directive
14976         (Parse_Exception_Handlers): mark each exception handler in a sequence of
14977         exception handlers as hidden in SPARK if preceded by the HIDE directive
14978         * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
14979         if starting with the HIDE directive
14980         * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
14981         starting with the HIDE directive; mark the declarations in a private
14982         part as hidden in SPARK if the private part starts with the HIDE
14983         directive
14984         * restrict.adb, restrict.ads
14985         (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
14986         (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
14987         argument node belongs to a part which is hidden in SPARK
14988         (Check_SPARK_Restriction): do not issue violations on nodes in hidden
14989         parts in SPARK; protect the possibly costly call to
14990         Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
14991         * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
14992         * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
14993         Accumulate_Token_Checksum_GNAT_5_03): add case for new token
14994         Tok_SPARK_Hide.
14995         (Scan): recognize special comment starting with '#' and followed by
14996         SPARK keyword "hide" as a HIDE directive.
14997
14998 2011-08-02  Yannick Moy  <moy@adacore.com>
14999
15000         * types.ads, erroutc.ads: Minor reformatting.
15001
15002 2011-08-02  Vincent Celier  <celier@adacore.com>
15003
15004         * link.c: Add response file support for cross platforms.
15005
15006 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15007
15008         * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
15009         in an association, set parent field of copy before partial analysis.
15010         * sem_res.adb (Resolve_Slice): create reference to itype only when
15011         expansion is enabled.
15012
15013 2011-08-02  Yannick Moy  <moy@adacore.com>
15014
15015         * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
15016         for new flag denoting which subprogram bodies are in ALFA
15017         * restrict.adb, sem_ch7.adb: Update comment
15018         * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
15019         sem_ch9.adb, sem_res.adb: Add calls to
15020         Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
15021         * sem_ch6.adb (Analyze_Function_Return): add calls to
15022         Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
15023         middle of the body, and extended return.
15024         (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
15025         False when missing return.
15026         (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
15027         to True for subprograms whose spec is in ALFA. Remove later on the flag
15028         on the entity used for a subprogram body when there exists a separate
15029         declaration.
15030         * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
15031         if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
15032         False, otherwise do nothing.
15033
15034 2011-08-02  Robert Dewar  <dewar@adacore.com>
15035
15036         * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
15037
15038 2011-08-02  Yannick Moy  <moy@adacore.com>
15039
15040         * sem_ch4.ads: minor formatting.
15041
15042 2011-08-02  Yannick Moy  <moy@adacore.com>
15043
15044         * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
15045         debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
15046         errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
15047         restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
15048         opt.ads: cleanup of SPARK mode
15049
15050 2011-08-02  Yannick Moy  <moy@adacore.com>
15051
15052         * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
15053         types.
15054         * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
15055         (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
15056         * sem_ch3.adb
15057         (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
15058         (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
15059         (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
15060         (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
15061         types.
15062         (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
15063         non-static range.
15064         * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
15065         functions whose return type is not in ALFA.
15066         (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
15067         specifications.
15068         (Process_Formals): unset Is_In_ALFA flag for subprograms if a
15069         parameter's type is not in ALFA.
15070         * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
15071         types are in ALFA.
15072
15073 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15074
15075         * sem_ch6 (Analyze_Expression_Function): treat the function as
15076         Inline_Always, and introduce a subprogram declaration for it when it is
15077         not a completion.
15078         * inline.adb (Add_Inlined_Body): recognize bodies that come from
15079         expression functions, so that the back-end can determine whether they
15080         can in fact be inlined.
15081         * sem_util.adb (Is_Expression_Function): predicate to determine whether
15082         a function body comes from an expression function.
15083
15084 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
15085
15086         * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
15087         null exclusions to test Can_Never_Be_Null on the anonymous access types
15088         of the formals rather than testing the formals themselves. Exclude this
15089         check in cases where the Old_Formal is marked as a controlling formal,
15090         to avoid issuing spurious errors for bodies completing dispatching
15091         operations (due to the flag not getting set on controlling access
15092         formals in body specs).
15093         (Find_Corresponding_Spec): When checking full and subtype conformance of
15094         subprogram bodies in instances, pass Designated and E in that order, for
15095         consistency with the expected order of the formals (New_Id followed by
15096         Old_Id).
15097
15098 2011-08-02  Robert Dewar  <dewar@adacore.com>
15099
15100         * sem_ch8.adb: Minor reformatting.
15101
15102 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15103
15104         * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
15105         Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
15106         primitive operations of class-wide actuals.
15107
15108 2011-08-02  Javier Miranda  <miranda@adacore.com>
15109
15110         * exp_atag.ads, exp_atag.adb
15111         (Build_Common_Dispatching_Select_Statements): Remove argument Loc
15112         since its value is implicitly passed in argument Typ.
15113         * exp_disp.adb (Make_Disp_Conditional_Select_Body,
15114         Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
15115         Build_Common_Dispatching_Select_Statements.
15116
15117 2011-08-02  Robert Dewar  <dewar@adacore.com>
15118
15119         * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
15120         exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
15121         Minor reformatting.
15122
15123 2011-08-02  Robert Dewar  <dewar@adacore.com>
15124
15125         * sem_res.adb: Minor reformatting.
15126         * sem_prag.adb: Minor reformatting.
15127
15128 2011-08-02  Javier Miranda  <miranda@adacore.com>
15129
15130         * exp_atag.adb, exp_atags.ads
15131         (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
15132         by the tagged type Entity. Required to use this routine in the VM
15133         targets since we do not have available the Tag entity in the VM
15134         platforms.
15135         * exp_ch6.adb
15136         (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
15137         Ada.Tags has not been previously loaded.
15138         * exp_ch7.adb
15139         (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
15140         Build_VM_TSDs if package Ada.Tags has not been previously loaded.
15141         * sem_aux.adb
15142         (Enclosing_Dynamic_Scope): Add missing support to handle the full
15143         view of enclosing scopes. Required to handle enclosing scopes that
15144         are synchronized types whose full view is a task type.
15145         * exp_disp.adb
15146         (Build_VM_TSDs): Minor code improvement to avoid generating and
15147         analyzing lists with empty nodes.
15148         (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
15149         (Make_Disp_Conditional_Select_Body): Add support for VM targets.
15150         (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
15151         (Make_Disp_Timed_Select_Body): Add support for VM targets.
15152         (Make_Select_Specific_Data_Table): Add support for VM targets.
15153         (Make_VM_TSD): Generate code to initialize the SSD structure of
15154         the TSD.
15155
15156 2011-08-02  Yannick Moy  <moy@adacore.com>
15157
15158         * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
15159         cross-references section in ALI.
15160         * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
15161         (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
15162         Sub).
15163         (Enclosing_Subprogram_Or_Package): new function to return the enclosing
15164         subprogram or package entity of a node
15165         (Is_Local_Reference_Type): new function returns True for references
15166         selected in local cross-references.
15167         (Lt): function extracted from Lt in Output_References
15168         (Write_Entity_Name): function extracted from Output_References
15169         (Generate_Definition): generate reference with type 'D' for definition
15170         of objects (object declaration and parameter specification), with
15171         appropriate locations and units, for use in local cross-references.
15172         (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
15173         references of type 'I' for initialization in object definition.
15174         (Output_References): move part of function Lt and procedure
15175         Write_Entity_Name outside of the body. Ignore references of types 'D'
15176         and 'I' introduced for local cross-references.
15177         (Output_Local_References): new procedure to output the local
15178         cross-references sections.
15179         (Lref_Entity_Status): new array defining whether an entity is a local
15180         * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
15181         with 'I' type when initialization expression is present.
15182         * get_scos.adb, get_scos.ads: Correct comments and typos
15183
15184 2011-08-02  Javier Miranda  <miranda@adacore.com>
15185
15186         * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
15187         the JVM target.
15188         * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
15189         the JVM target.
15190         * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
15191         TSD support.
15192
15193 2011-08-02  Vincent Celier  <celier@adacore.com>
15194
15195         * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
15196         (No_Space_Img): New function
15197         (Find_Excluded_Sources): When reading from a file, record the file name
15198         and the line number for each excluded source.
15199         (Mark_Excluded_Sources): When reporting an error, if the excluded
15200         sources were read from a file, include file name and line number in
15201         the error message.
15202
15203 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15204
15205         * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
15206
15207 2011-08-02  Robert Dewar  <dewar@adacore.com>
15208
15209         * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
15210
15211 2011-08-02  Javier Miranda  <miranda@adacore.com>
15212
15213         * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
15214         generation of TSDs to the DOTNET compiler.
15215         * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
15216         generation of TSDs to the DOTNET compiler.
15217
15218 2011-08-02  Javier Miranda  <miranda@adacore.com>
15219
15220         * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
15221         record of all the tagged types declared inside library level package
15222         declarations, library level package bodies or library level subprograms.
15223         * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
15224         associated with a given tagged type.
15225         (Build_VM_TSDs): New subprogram.
15226         * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
15227         compilation units that are subprograms.
15228         * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
15229         compilation units that are package bodies.
15230         (Expand_N_Package_Declaration): Generate TSDs of the main compilation
15231         units that are a package declaration or a package instantiation.
15232         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
15233         reorganization to improve the error generated by the frontend when the
15234         function Ada.Tags.Secondary_Tag is not available.
15235         * rtsfind.ads (RE_Register_TSD): New runtime entity.
15236         * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
15237
15238 2011-08-02  Javier Miranda  <miranda@adacore.com>
15239
15240         * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
15241
15242 2011-08-02  Robert Dewar  <dewar@adacore.com>
15243
15244         * s-imenne.ads: Minor reformatting.
15245
15246 2011-08-02  Robert Dewar  <dewar@adacore.com>
15247
15248         * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
15249         * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
15250         * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
15251
15252 2011-08-02  Robert Dewar  <dewar@adacore.com>
15253
15254         * einfo.ads (Materialize_Entity): Document this is only for renamings
15255         * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
15256         required debug information in the case where we transform the object
15257         declaration into a renaming declaration.
15258         * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
15259         object
15260         * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
15261         Materialize_Entity.
15262
15263 2011-08-02  Robert Dewar  <dewar@adacore.com>
15264
15265         * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
15266         Suppress_Init_Procs.
15267         * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
15268         Suppress_Initialization/Initialization_Suppressed.
15269         * gnat_rm.texi: New documentation for pragma Suppress_Initialization
15270         * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
15271         * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
15272         * sem_prag.adb: New processing for pragma Suppress_Initialization.
15273
15274 2011-08-02  Robert Dewar  <dewar@adacore.com>
15275
15276         * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
15277         Minor reformatting.
15278
15279 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15280
15281         * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
15282         only have inheritable classwide pre/postconditions.
15283
15284 2011-08-02  Javier Miranda  <miranda@adacore.com>
15285
15286         * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
15287         * rtsfind.ads (RE_Check_TSD): New runtime entity.
15288         * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
15289         checks if the external tag of a type is the same as the external tag
15290         of some other declaration.
15291
15292 2011-08-02  Thomas Quinot  <quinot@adacore.com>
15293
15294         * s-taskin.ads: Minor reformatting.
15295
15296 2011-08-02  Emmanuel Briot  <briot@adacore.com>
15297
15298         * g-comlin.adb (Display_Help): swap the order in which it prints the
15299         short help and the general usage.
15300
15301 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15302
15303         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
15304         the aspect declarations and attach them to the generic copy for
15305         subsequent analysis.
15306         (Analyze_Subprogram_Instantiation): copy explicitly the aspect
15307         declarations of the generic tree to the new subprogram declarations.
15308         * sem_attr.adb (Check_Precondition_Postcondition): recognize
15309         conditions that apply to a subprogram instance.
15310
15311 2011-08-02  Robert Dewar  <dewar@adacore.com>
15312
15313         * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
15314
15315 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15316
15317         * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
15318         private type with a tagged full view is not derived in the immediate
15319         scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
15320
15321 2011-08-02  Robert Dewar  <dewar@adacore.com>
15322
15323         * exp_ch4.adb: Minor reformatting.
15324
15325 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15326
15327         * sem_ch5.adb (Analyze_Loop_Statement):  If the iteration scheme is an
15328         Ada2012 iterator, the loop will be rewritten during expansion into a
15329         while loop with a cursor and an element declaration. Do not analyze the
15330         body in this case, because if the container is for indefinite types the
15331         actual subtype of the elements will only be determined when the cursor
15332         declaration is analyzed.
15333
15334 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15335
15336         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
15337         size/alignment related attributes in CodePeer_Mode.
15338
15339 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
15340
15341         * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
15342         Prepend_Element, since this can result in the operation getting the
15343         wrong slot in the full type's dispatch table if the full type has
15344         inherited operations. The incomplete type's operation will get added
15345         to the proper position in the full type's primitives
15346         list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
15347         (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
15348         dispatching operations, since there are cases where nonprimitive
15349         subprograms can get added to the list of incomplete dependents (such
15350         as subprograms in nested packages).
15351         * sem_ch6.adb (Process_Formals): First, remove test for being in a
15352         private part when determining whether to add a primitive with a
15353         parameter of a tagged incomplete type to the Private_Dependents list.
15354         Such primitives can also occur in the visible part, and should not have
15355         been excluded from being private dependents.
15356         * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
15357         RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
15358         list of a Taft-amendment incomplete type is a primitive before issuing
15359         an error that the full type must appear in the same unit. There are
15360         cases where nonprimitives can be in the list (such as subprograms in
15361         nested packages).
15362         * sem_disp.adb (Derives_From): Use correct condition for checking that
15363         a formal's type is derived from the type of the corresponding formal in
15364         the parent subprogram (the condition was completely wrong). Add
15365         checking that was missing for controlling result types being derived
15366         from the result type of the parent operation.
15367
15368 2011-08-02  Yannick Moy  <moy@adacore.com>
15369
15370         * errout.adb (First_Node): minor renaming
15371         * restrict.adb (Check_Formal_Restriction): put restriction warning on
15372         first node.
15373
15374 2011-08-02  Yannick Moy  <moy@adacore.com>
15375
15376         * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
15377         before accessing operands.
15378         * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
15379         decide whether an initialization expression respects SPARK rules, as
15380         the plain node is the expanded one. This allows for more valid warnings
15381         to be issued.
15382         * gnat_rm.texi: Minor update.
15383
15384 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15385
15386         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
15387         previous change.
15388
15389 2011-08-02  Robert Dewar  <dewar@adacore.com>
15390
15391         * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
15392
15393 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
15394
15395         * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
15396         loop statements and the element renaming declaration with a block when
15397         the element type is controlled.
15398
15399 2011-08-02  Yannick Moy  <moy@adacore.com>
15400
15401         * sinfo.ads: Minor formatting.
15402
15403 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15404
15405         * sem_aggr.adb (Add_Association): if the association has a box and no
15406         expression, use the Sloc of the aggregate itself for the new
15407         association.
15408         * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
15409         the Original_Node.
15410
15411 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
15412
15413         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
15414         When a container is provided via a function call, generate a renaming
15415         of the function result. This avoids the creation of a transient scope
15416         and the premature finalization of the container.
15417         * exp_ch7.adb (Is_Container_Cursor): Removed.
15418         (Wrap_Transient_Declaration): Remove the supression of the finalization
15419         of the list controller when the declaration denotes a container cursor,
15420         it is not needed.
15421
15422 2011-08-02  Yannick Moy  <moy@adacore.com>
15423
15424         * restrict.adb (Check_Formal_Restriction): only issue a warning if the
15425         node is from source, instead of the original node being from source.
15426         * sem_aggr.adb
15427         (Resolve_Array_Aggregate): refine the check for a static expression, to
15428         recognize also static ranges
15429         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
15430         Array_Type_Declaration): postpone the test for the type being a subtype
15431         mark after the type has been resolved, so that component-selection and
15432         expanded-name are discriminated.
15433         (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
15434         to distinguish the case of an iteration scheme, so that an error is
15435         issed on a non-static range in SPARK except in an iteration scheme.
15436         * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
15437         In_Iter_Schm = True.
15438         * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
15439         user-defined operators so that they are allowed in renaming
15440         * sem_ch8.adb
15441         (Find_Selected_Component): refine the check for prefixing of operators
15442         so that they are allowed in renaming. Move the checks for restrictions
15443         on selector name after analysis discriminated between
15444         component-selection and expanded-name.
15445         * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
15446         concatenation argument of string type if it is static.
15447         * sem_util.adb, sem_util.ads
15448         (Check_Later_Vs_Basic_Declarations): add a new function
15449         Is_Later_Declarative_Item to decice which declarations are allowed as
15450         later items, in the two different modes Ada 83 and SPARK. In the SPARK
15451         mode, add that renamings are considered as later items.
15452         (Enclosing_Package): new function to return the enclosing package
15453         (Enter_Name): correct the rule for homonyms in SPARK
15454         (Is_SPARK_Initialization_Expr): default to returning True on nodes not
15455         from source (result of expansion) to avoid issuing wrong warnings.
15456
15457 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15458
15459         * errout.adb: On anything but an expression First_Node returns its
15460         argument.
15461
15462 2011-08-02  Pascal Obry  <obry@adacore.com>
15463
15464         * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
15465
15466 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
15467
15468         * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
15469         Set the associated loop as the related expression of internally
15470         generated cursors.
15471         * exp_ch7.adb (Is_Container_Cursor): New routine.
15472         (Wrap_Transient_Declaration): Supress the finalization of the list
15473         controller when the declaration denotes a container cursor.
15474
15475 2011-08-02  Yannick Moy  <moy@adacore.com>
15476
15477         * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
15478         command line now.
15479         * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
15480         expression is a simple expression. This check cannot be performed in
15481         the semantics, so just drop it.
15482         (P_Index_Or_Discriminant_Constraint): move check that the index or
15483         discriminant is a subtype mark to Analyze_Subtype_Declaration in the
15484         semantics. Other cases were previously checked in the semantics.
15485         * par-ch4.adb (P_Name): move checks that a selector name is not
15486         character literal or an operator symbol to Find_Selected_Component in
15487         the semantics
15488         * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
15489         declarations are not placed after later declarations in a separate
15490         procedure in Sem_Util (possibly not the best choice?), to be used both
15491         during parsing, for Ada 83 mode, and during semantic analysis, for
15492         SPARK mode.
15493         * par-endh.adb (Check_End): move check that end label is not missing
15494         to Process_End_Label in the semantics
15495         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
15496         the special case for SPARK restriction
15497         * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
15498         * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
15499         parameter Force to issue the error message even on internal node (used
15500         for generated end label). Call Check_Restriction to check when an error
15501         must be issued. In SPARK mode, issue an error message even if the
15502         restriction is not set.
15503         (Check_Restriction): new procedure with an additional out parameter to
15504         inform the caller that a message has been issued
15505         * sem_aggr.adb: Minor modification of message
15506         * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
15507         instead of issuing an error message directly
15508         * sem_ch3.adb (Analyze_Declarations): move here the check that basic
15509         declarations are not placed after later declarations, by calling
15510         Check_Later_Vs_Basic_Declarations
15511         (Analyze_Subtype_Declaration): move here the check that an index or
15512         discriminant constraint must be a subtype mark. Change the check that
15513         a subtype of String must start at one so that it works on subtype marks.
15514         * sem_ch4.adb (Analyze_Call): move here the check that a named
15515         association cannot follow a positional one in a call
15516         * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
15517         instead of issuing an error message directly
15518         * sem_ch8.adb (Find_Selected_Component): move here the check that a
15519         selector name is not a character literal or an operator symbol. Move
15520         here the check that the prefix of an expanded name cannot be a
15521         subprogram or a loop statement.
15522         * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
15523         procedure called from parsing and semantics to check that basic
15524         declarations are not placed after later declarations
15525         (Process_End_Label): move here the check that end label is not missing
15526
15527 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15528
15529         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
15530         representation clause in codepeer mode, since it confuses CodePeer and
15531         does not bring useful info.
15532
15533 2011-08-02  Ed Falis  <falis@adacore.com>
15534
15535         * init.c: initialize fp hw on MILS.
15536
15537 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15538
15539         * errout.adb (First_Node): for bodies, return the node itself (small
15540         optimization). For other nodes, do not check source_unit if the node
15541         comes from Standard.
15542
15543 2011-08-02  Robert Dewar  <dewar@adacore.com>
15544
15545         * exp_ch3.adb: Minor comment additions.
15546         * sem_ch13.adb: Minor reformatting.
15547
15548 2011-08-02  Pascal Obry  <obry@adacore.com>
15549
15550         * make.adb, makeutl.adb: Removes some superfluous directory separator.
15551
15552 2011-08-02  Robert Dewar  <dewar@adacore.com>
15553
15554         * sem_attr.adb: Minor reformatting.
15555
15556 2011-08-02  Robert Dewar  <dewar@adacore.com>
15557
15558         * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
15559         (Has_Default_Component_Value): Removed
15560         * einfo.ads Comment updates
15561         (Has_Default_Aspect): Replaces Has_Default_Value
15562         (Has_Default_Component_Value): Removed
15563         * exp_ch13.adb
15564         (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
15565         * exp_ch3.adb
15566         (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
15567         (Get_Simple_Init_Val): Handle Default_Value aspect
15568         (Needs_Simple_Initialization): Handle Default_Value aspect
15569         * exp_ch3.ads: Needs_Simple_Initialization
15570         * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
15571         * par-prag.adb (Pragma_Default[_Component]Value) Removed
15572         * sem_ch13.adb
15573         (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
15574         * sem_prag.adb (Pragma_Default[_Component]Value) Removed
15575         * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
15576
15577 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15578
15579         * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
15580         package containing iteration primitives.
15581         exp_ch5.adb (Expand_Iterator_Loop): ditto.
15582
15583 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15584
15585         * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
15586         "of", pre-analyze expression in case it is a function call with
15587         finalization actions that must be placed ahead of the loop.
15588         * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
15589         on an Ada2012 iterator, insert them ahead of the rewritten loop.
15590
15591 2011-08-02  Geert Bosch  <bosch@adacore.com>
15592
15593         * cstand.adb (Create_Float_Types): Only consider C's long double for
15594         Long_Long_Float, in addition to double.
15595
15596 2011-08-02  Robert Dewar  <dewar@adacore.com>
15597
15598         * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
15599         sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
15600         prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
15601         Minor reformatting.
15602
15603 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15604
15605         * sem_attr.adb: handle properly 'Result when it is a prefix of an
15606         indexed component.
15607
15608 2011-08-02  Javier Miranda  <miranda@adacore.com>
15609
15610         * einfo.ads, einfo.adb
15611         (Original_Access_Type): Move this attribute to Node26 since there was
15612         an undocumented use of Node21 in E_Access_Subprogram_Type entities
15613         which causes conflicts and breaks the generation of the .NET compiler.
15614         (Interface_Name): Add missing documentation on JGNAT only uses of
15615         this attribute.
15616
15617 2011-08-02  Geert Bosch  <bosch@adacore.com>
15618
15619         * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
15620         (Find_Back_End_Float_Type): Likewise
15621         (Create_Back_End_Float_Types): Likewise
15622         (Create_Float_Types): Likewise
15623         (Register_Float_Type): Likewise
15624         * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
15625         Nlist and split out type selection in new local Find_Base_Type function.
15626         * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
15627         Nlist
15628         * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
15629
15630 2011-08-02  Robert Dewar  <dewar@adacore.com>
15631
15632         * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
15633         alpha order).
15634         * opt.ads: Minor comment change.
15635         * sem_ch12.adb: Minor code reorganization.
15636
15637 2011-08-02  Gary Dismukes  <dismukes@adacore.com>
15638
15639         * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
15640         subtype's list of rep items to the list on the full subtype in the case
15641         where the lists are the same.
15642
15643 2011-08-02  Geert Bosch  <bosch@adacore.com>
15644
15645         * switch-c.adb (Free): New deallocation procedure to avoid implicitly
15646         using the one from System.Strings, which also deallocates all strings.
15647
15648 2011-08-02  Geert Bosch  <bosch@adacore.com>
15649
15650         * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
15651         function.
15652         * gcc-interface/Make-lang.in: Update dependencies.
15653
15654 2011-08-02  Olivier Hainque  <hainque@adacore.com>
15655
15656         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
15657         end_locus.
15658
15659 2011-08-02  Javier Miranda  <miranda@adacore.com>
15660
15661         * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
15662         associated with anonymous access to subprograms.
15663
15664 2011-08-02  Geert Bosch  <bosch@adacore.com>
15665
15666         * opt.ads
15667         (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
15668         (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
15669         * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
15670         (Add_Symbol_Definition): Move to switch-c.adb
15671         (Process_Command_Line_Symbol_Definitions): Adjust references to above.
15672         * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
15673         (Add_Symbol_Definition): Move to switch-c.adb.
15674         * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
15675         * sem_warn.adb
15676         (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15677         Move to warnsw.adb.
15678         * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
15679         Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
15680         Move to warnsw.adb.
15681         * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
15682         (Add_Symbol_Definition): Moved from Prepcomp.
15683         * switch-c.ads: Update copyright notice. Use String_List instead of
15684         Argument_List, removing dependency on System.OS_Lib.
15685
15686 2011-08-02  Yannick Moy  <moy@adacore.com>
15687
15688         * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
15689         mode on initialization expression which does not respect SPARK
15690         restrictions.
15691         * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
15692         if the tree referenced by its argument represents an initialization
15693         expression in SPARK, suitable for initializing an object in an object
15694         declaration.
15695
15696 2011-08-02  Javier Miranda  <miranda@adacore.com>
15697
15698         * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
15699         internally generated access to subprogram with its associated protected
15700         subprogram type.
15701         * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
15702
15703 2011-08-02  Geert Bosch  <bosch@adacore.com>
15704
15705         * cstand.adb (Register_Float_Type): Print information about type to
15706         register, if the Debug_Flag_Dot_B is set.
15707         * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
15708         * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
15709         * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
15710         with a requested precision of more than Max_Digits digits and no more
15711         than Max_Base_Digits digits, if a range specification is present and the
15712         Predefined_Float_Types list has a suitable type to derive from.
15713         * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
15714         case of type completion with pragma Import
15715         * sem_prag.adb
15716         (Process_Import_Predefined_Type): Processing to complete a type
15717         with pragma Import. Currently supports floating point types only.
15718         (Set_Convention_From_Pragma): Do nothing without underlying type.
15719         (Process_Convention): Guard against absence of underlying type,
15720         which may happen when importing incomplete types.
15721         (Process_Import_Or_Interface): Handle case of importing predefined
15722         types. Tweak error message.
15723
15724 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15725
15726         * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
15727         functions to previous change.  Reorganize code slightly.
15728
15729 2011-08-02  Geert Bosch  <bosch@adacore.com>
15730
15731         * back_end.ads (Register_Type_Proc): New call back procedure type for
15732         allowing the back end to provide information about available types.
15733         (Register_Back_End_Types): New procedure to register back end types.
15734         * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
15735         available types.
15736         * cstand.adb (Back_End_Float_Types): New list for floating point types
15737         supported by the back end.
15738         (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
15739         (Copy_Float_Type): New procedure to make new copies of predefined types.
15740         (Register_Float_Type): New call back procedure to populate the BEFT list
15741         (Find_Back_End_Float_Type): New procedure to find a BEFT by name
15742         (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
15743         (Create_Float_Types): New procedure to create entities for floating
15744         point types predefined in Standard, and put these and any remaining
15745         BEFTs on the Predefined_Float_Types list.
15746         * stand.ads (Predefined_Float_Types): New list for predefined floating
15747         point types that do not have declarations in package Standard.
15748
15749 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15750
15751         * inline.adb (Get_Code_Unit_Entity): New local function.  Returns the
15752         entity node for the unit containing the parameter.
15753         (Add_Inlined_Body): Use it to find the unit containing the subprogram.
15754         (Add_Inlined_Subprogram): Likewise.
15755         * gcc-interface/Make-lang.in: Update dependencies.
15756
15757 2011-08-02  Thomas Quinot  <quinot@adacore.com>
15758
15759         * s-stusta.adb (Print): Make sure Pos is always initialized to a
15760         suitable value.
15761
15762 2011-08-02  Geert Bosch  <bosch@adacore.com>
15763
15764         * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
15765
15766 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15767
15768         * sem_type.adb (Covers): Move trivial case to the top and reuse the
15769         computed value of Base_Type.
15770
15771 2011-08-02  Yannick Moy  <moy@adacore.com>
15772
15773         * restrict.adb (Check_Restriction): issue an error for any use of
15774         class-wide, even if the No_Dispatch restriction is not set.
15775         * sem_aggr.adb: Correct typos in comments and messages in formal mode
15776         * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
15777         when completing a private extension, the type named in the private part
15778         is not the same as that named in the visible part.
15779         * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
15780         of an inherited primitive operations of a tagged type or type extension
15781         that returns the tagged type.
15782         * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
15783         function which returns True for an implicit operation inherited by the
15784         derived type declaration for the argument type.
15785         (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
15786         order.
15787
15788 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15789
15790         * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
15791         Process_Bounds, to perform analysis with expansion of a range or an
15792         expression that is the iteration scheme for a loop.
15793         (Analyze_Iterator_Specification): If domain of iteration is given by a
15794         function call with a controlled result, as is the case if call returns
15795         a predefined container, ensure that finalization actions are properly
15796         generated.
15797         * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
15798
15799 2011-08-02  Javier Miranda  <miranda@adacore.com>
15800
15801         * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
15802         * gcc-interface/Make-lang.in: Update dependencies.
15803
15804 2011-08-02  Javier Miranda  <miranda@adacore.com>
15805
15806         * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
15807         determine if the analysis is performed using N or Original_Node (N).
15808         * exp_util.adb (Side_Effect_Free): Code cleanup since the new
15809         functionality of routine Is_Variable avoids code duplication.
15810         * checks.adb (Determine_Range): Handle temporaries generated by
15811         Remove_Side_Effects.
15812
15813 2011-08-02  Javier Miranda  <miranda@adacore.com>
15814
15815         * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
15816         expansion of the condition. Required since the previous analysis was
15817         done with expansion disabled (see Resolve_Quantified_Expression) and
15818         hence checks were not inserted and record comparisons have not been
15819         expanded.
15820
15821 2011-08-02  Ed Falis  <falis@adacore.com>
15822
15823         * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
15824         Update header.
15825
15826 2011-08-02  Bob Duff  <duff@adacore.com>
15827
15828         * opt.ads: Minor comment fix.
15829
15830 2011-08-02  Bob Duff  <duff@adacore.com>
15831
15832         * sem_ch12.adb (Analyze_Package_Instantiation,
15833         Analyze_Subprogram_Instantiation): Turn off style checking while
15834         analyzing an instance. Whatever style checks that apply to the generic
15835         unit should apply, so it makes no sense to apply them in an instance.
15836         This was causing trouble when compiling an instance of a runtime
15837         unit that violates the -gnatyO switch.
15838         * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
15839         one of the two case statements, causing spurious errors.
15840
15841 2011-08-02  Robert Dewar  <dewar@adacore.com>
15842
15843         * uname.adb: Minor reformatting.
15844         * gnatcmd.adb: Minor reformatting.
15845         * exp_attr.adb: Minor reformatting.
15846
15847 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15848
15849         * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
15850         No_Dispatching_Calls, do not look for the Assign primitive, because
15851         predefined primitives are not created in this case.
15852
15853 2011-08-02  Bob Duff  <duff@adacore.com>
15854
15855         * stylesw.ads: Minor comment fixes.
15856
15857 2011-08-02  Robert Dewar  <dewar@adacore.com>
15858
15859         * freeze.adb (Add_To_Result): New procedure.
15860
15861 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
15862
15863         * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
15864         time, if the specific run-time routines for handling streams of strings
15865         are not available, use the default mechanism.
15866
15867 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
15868
15869         * s-regpat.ads: Fix typo.
15870
15871 2011-08-02  Vincent Celier  <celier@adacore.com>
15872
15873         * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
15874         not null, call it to create the in memory config project file without
15875         parsing an existing default config project file.
15876
15877 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15878
15879         * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
15880
15881 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15882
15883         * sem_elim.adb: an abstract subprogram does not need an eliminate
15884         pragma for its descendant to be eliminable.
15885
15886 2011-08-02  Ed Falis  <falis@adacore.com>
15887
15888         * init.c: revert to handling before previous checkin for VxWorks
15889         * s-intman-vxworks.adb: delete unnecessary declarations related to
15890         using Ada interrupt facilities for handling signals.
15891         Delete Initialize_Interrupts. Use __gnat_install_handler instead.
15892         * s-intman-vxworks.ads: Import __gnat_install_handler as
15893         Initialize_Interrupts.
15894         * s-taprop-vxworks.adb: Delete Signal_Mask.
15895         (Abort_Handler): change construction of mask to unblock exception
15896         signals.
15897
15898 2011-08-02  Jerome Guitton  <guitton@adacore.com>
15899
15900         * a-except-2005.adb (Raise_From_Signal_Handler): Call
15901         Debug_Raise_Exception before propagation starts.
15902
15903 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
15904
15905         * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
15906         to Restriction_Check_Required.
15907         * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
15908         * sem_res.adb (Resolve_Call): Likewise.
15909         * sem_attr.adb (Check_Stream_Attribute): Likewise.
15910
15911 2011-08-02  Bob Duff  <duff@adacore.com>
15912
15913         * stylesw.ads: Update comment.
15914         * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
15915         * errout.ads: Remove obsolete comment.
15916
15917 2011-08-02  Javier Miranda  <miranda@adacore.com>
15918
15919         * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
15920         (Set_Is_Safe_To_Reevaluate): new procedure.
15921         * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
15922         assignment is allowed on safe-to-reevaluate variables.
15923         (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
15924         temporary created to remove side effects in expressions that use
15925         the secondary stack as safe-to-reevaluate.
15926         * exp_util.adb (Side_Effect_Free): Add missing code to handle well
15927         variables that are not true constants.
15928
15929 2011-08-02  Robert Dewar  <dewar@adacore.com>
15930
15931         * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
15932         sem_res.adb, sem_ch6.adb: Minor reformatting.
15933
15934 2011-08-02  Jerome Guitton  <guitton@adacore.com>
15935
15936         * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
15937
15938 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
15939
15940         * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
15941         not set Overridden_Operation if subprogram is an initialization
15942         procedure.
15943
15944 2011-08-02  Yannick Moy  <moy@adacore.com>
15945
15946         * par-ch6.adb: Correct obsolete name in comments
15947         * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
15948         which takes two message arguments (existing function takes one), with
15949         second message used for continuation.
15950         * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
15951         block statements that originate from a source block statement, not
15952         generated block statements
15953         * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
15954         symmetry with procedure case
15955         * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
15956         function to issue an error in formal mode if a package specification
15957         contains more than one tagged type or type extension.
15958         * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
15959         parameters matching formals of tagged types are objects (or ancestor
15960         type conversions of objects), not general expressions. Issue an error
15961         on view conversions that are not involving ancestor conversion of an
15962         extended type.
15963         (Resolve_Type_Conversion): in formal mode, issue an error on the
15964         operand of an ancestor type conversion which is not an object
15965         * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
15966         procedure so that it works also for actuals of function calls
15967         (Is_Actual_Tagged_Parameter): new function which determines if its
15968         argument is an actual parameter of a formal of tagged type in a
15969         subprogram call
15970         (Is_SPARK_Object_Reference): new function which determines if the tree
15971         referenced by its argument represents an object in SPARK
15972
15973 2011-08-02  Robert Dewar  <dewar@adacore.com>
15974
15975         * sem_ch3.adb: Minor reformatting
15976         Minor comment addition
15977         Minor error msg text change
15978
15979 2011-08-02  Javier Miranda  <miranda@adacore.com>
15980
15981         * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
15982         function. Used to be more precise when we generate a variable plus one
15983         assignment to remove side effects in the evaluation of the Bound
15984         expressions.
15985         (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
15986         of the bound expression to force its re-analysis and thus expand the
15987         associated transient scope (if required). Code cleanup replacing the
15988         previous code that declared the constant entity by an invocation to
15989         routine Force_Evaluation which centralizes this work in the frontend.
15990
15991 2011-08-02  Robert Dewar  <dewar@adacore.com>
15992
15993         * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
15994         (Base_Type): Now uses improved Is_Base_Type function
15995         * einfo.ads (Base_Type): Inline this function
15996
15997 2011-08-02  Robert Dewar  <dewar@adacore.com>
15998
15999         * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
16000         (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
16001
16002 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
16003
16004         * gcc-interface/Make-lang.in: Update dependencies.
16005         * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
16006         targets.
16007
16008 2011-08-02  Yannick Moy  <moy@adacore.com>
16009
16010         * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
16011         non-simple expression used in delta constraint
16012         (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
16013         index constraint which is not a subtype mark
16014         * par.adb: With and use Restrict
16015         * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
16016         mode on component type which is not a subtype mark and default
16017         expression on component
16018         (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
16019         of string which does not have a lower index bound equal to 1
16020         (Array_Type_Declaration): issue an error in formal mode on index or
16021         component type which is not a subtype mark, and on aliased keyword on
16022         component
16023         (Derived_Type_Declaration): issue an error in formal mode on interface,
16024         limited or abstract type
16025         (Record_Type_Declaration): issue an error in formal mode on interface
16026         (Record_Type_Definition): issue an error in formal mode on tagged types
16027         and type extensions not declared in the specification of a library unit
16028         package; on null non-tagged record; on variant part
16029
16030 2011-08-02  Vincent Celier  <celier@adacore.com>
16031
16032         * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
16033         not declared for qualified library project when Library_Name is not
16034         declared, but Library_Dir is.
16035
16036 2011-08-02  Robert Dewar  <dewar@adacore.com>
16037
16038         * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
16039         pragmas (affects aspects [Component_]Default_Value
16040         (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
16041         component type for the resolution
16042
16043 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
16044
16045         * einfo.adb (Base_Type): Tune implementation for speed.
16046
16047 2011-08-02  Robert Dewar  <dewar@adacore.com>
16048
16049         * freeze.adb: Minor reformatting.
16050
16051 2011-08-02  Thomas Quinot  <quinot@adacore.com>
16052
16053         * scos.ads: Update comments.
16054
16055 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16056
16057         * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
16058         base type, because the parent may be a subtype of a private type whose
16059         convention is established in a private part.
16060
16061 2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>
16062
16063         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
16064         statement in a block when the expansion of the return expression has
16065         created a finalization chain.
16066         * freeze.adb (Freeze_Expression): Alphabetize all choices associated
16067         with the parent node.
16068         Add N_Extended_Return_Statement to handle the case where a transient
16069         object declaration appears in the Return_Object_Declarations list of
16070         an extended return statement.
16071
16072 2011-08-02  Matthew Gingell  <gingell@adacore.com>
16073
16074         * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
16075         unused parameter 'name'.
16076
16077 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16078
16079         * sem_elim.adb (Set_Eliminated): If the overridden operation is an
16080         inherited operation, check whether its alias, which is the source
16081         operastion that it renames, has been marked eliminated.
16082
16083 2011-08-02  Javier Miranda  <miranda@adacore.com>
16084
16085         * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
16086         in-mode parameter whose type is an access type since it can be used to
16087         modify its designated object. Enforce code that handles as safe an
16088         access type that is not access-to-constant but it is the result of a
16089         previous removal of side-effects.
16090         (Remove_Side_Effects): Minor code reorganization of cases which require
16091         no action. Done to incorporate documentation on new cases uncovered
16092         working in this ticket: no action needed if this routine was invoked
16093         too early and the nodes are not yet decorated.
16094         * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
16095         to routine Remove_Side_Effects by calls to Force_Evaluation since they
16096         were issued with actuals that are implicitly provided by
16097         Force_Evaluation.
16098
16099 2011-08-02  Robert Dewar  <dewar@adacore.com>
16100
16101         * sem_ch3.adb, sem_res.adb: Minor reformatting.
16102
16103 2011-08-02  Yannick Moy  <moy@adacore.com>
16104
16105         * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
16106         to issue an error in formal mode on attribute not supported in this mode
16107         (Analyze_Attribute): issue errors on standard attributes not supported
16108         in formal mode.
16109         * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
16110         comment, and issue error in formal mode on modulus which is not a power
16111         of 2.
16112         (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
16113         range.
16114         * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
16115         subtype mark.
16116         * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
16117         operator on modular type (except 'not').
16118
16119 2011-08-02  Robert Dewar  <dewar@adacore.com>
16120
16121         * gnat_rm.texi: Minor reformatting.
16122
16123 2011-08-02  Arnaud Charlet  <charlet@adacore.com>
16124
16125         * s-osinte-linux.ads: Minor comment update and reformatting.
16126         * i-cexten.ads: Make this unit pure, as for its parent.
16127         Will allow its usage in more contexts if needed.
16128
16129 2011-08-02  Robert Dewar  <dewar@adacore.com>
16130
16131         * s-utf_32.ads: Minor comment fix.
16132
16133 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16134
16135         * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
16136         operation of a tagged synchronized type, handle the case where the
16137         controlling argument is overloaded.
16138
16139 2011-08-02  Yannick Moy  <moy@adacore.com>
16140
16141         * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
16142         Replace pragma SPARK_95 with pragma Restrictions (SPARK)
16143         * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
16144         SPARK mode and formal verification mode on processing SPARK restriction
16145         * s-rident.ads (Restriction_Id): add SPARK restriction in those not
16146         requiring consistency checking.
16147
16148 2011-08-02  Robert Dewar  <dewar@adacore.com>
16149
16150         * sem_res.adb: Minor reformatting.
16151
16152 2011-08-02  Robert Dewar  <dewar@adacore.com>
16153
16154         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16155         a-cforse.ads: Remove unneeded with of Ada.Containers
16156         Remove commented out pragma Inline's
16157         Move specifications of new subprograms to the actual specs
16158
16159 2011-08-02  Yannick Moy  <moy@adacore.com>
16160
16161         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16162         a-cforse.ads: Update comments.
16163
16164 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16165
16166         * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
16167
16168 2011-08-02  Robert Dewar  <dewar@adacore.com>
16169
16170         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
16171         a-cforse.ads, a-cofove.ads: Minor reformatting.
16172
16173 2011-08-02  Claire Dross  <dross@adacore.com>
16174
16175         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
16176         a-cofove.ads: Add comments.
16177
16178 2011-08-02  Yannick Moy  <moy@adacore.com>
16179
16180         * gnat_rm.texi: Document formal containers.
16181
16182 2011-08-02  Emmanuel Briot  <briot@adacore.com>
16183
16184         * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
16185         are empty sections.
16186
16187 2011-08-02  Robert Dewar  <dewar@adacore.com>
16188
16189         * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
16190         reformatting.
16191
16192 2011-08-02  Robert Dewar  <dewar@adacore.com>
16193
16194         * aspects.adb: New aspects Default_Value and Default_Component_Value
16195         New format of Aspect_Names table checks for omitted entries
16196         * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
16197         handling of boolean aspects for derived types.
16198         New aspects Default_Value and Default_Component_Value
16199         New format of Aspect_Names table checks for omitted entries
16200         * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
16201         (Has_Default_Value): New flag
16202         (Has_Default_Component_Value): New flag
16203         (Has_Default_Value): New flag
16204         * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
16205         table.
16206         * par-prag.adb: New pragmas Default_Value and Default_Component_Value
16207         * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
16208         Default_Value and Default_Component_Value
16209         * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
16210         New aspects Default_Value and Default_Component_Value
16211         * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
16212         * sprint.adb: Print N_Aspect_Specification node when called from gdb
16213
16214 2011-08-02  Vincent Celier  <celier@adacore.com>
16215
16216         * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
16217         inherit library kind.
16218
16219 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16220
16221         * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
16222         Minor reformatting.
16223
16224 2011-08-02  Robert Dewar  <dewar@adacore.com>
16225
16226         * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
16227
16228 2011-08-02  Yannick Moy  <moy@adacore.com>
16229
16230         * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
16231
16232 2011-08-02  Robert Dewar  <dewar@adacore.com>
16233
16234         * impunit.adb: Add comment.
16235
16236 2011-08-02  Yannick Moy  <moy@adacore.com>
16237
16238         * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
16239         qualification of aggregates in formal mode
16240         (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
16241         another aggregate
16242         (Resolve_Aggregate): complete the test that an aggregate is adequately
16243         qualified in formal mode
16244
16245 2011-08-02  Pascal Obry  <obry@adacore.com>
16246
16247         * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
16248         * mlib-prj.adb: Supress warning when compiling binder generated file.
16249         (Build_Library): Supress all warnings when compiling the binder
16250         generated file.
16251
16252 2011-08-02  Yannick Moy  <moy@adacore.com>
16253
16254         * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
16255         from here...
16256         * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
16257         * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
16258         Add with/use clauses to make Check_Formal_Restriction visible
16259
16260 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16261
16262         * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
16263         in-parameters when type of the generic formal is private in the generic
16264         spec and non-private in the body.
16265
16266 2011-08-02  Claire Dross  <dross@adacore.com>
16267
16268         * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
16269         a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
16270         a-cofove.adb, a-cofove.ads: New files implementing formal containers.
16271         * impunit.adb, Makefile.rtl: Take new files into account.
16272
16273 2011-08-02  Robert Dewar  <dewar@adacore.com>
16274
16275         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
16276         sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
16277
16278 2011-08-02  Yannick Moy  <moy@adacore.com>
16279
16280         * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
16281         formal mode
16282         * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
16283         matching static array bounds, taking into account the special case of
16284         string literals
16285         * sem_ch3.adb: Typo in comment.
16286
16287 2011-08-02  Yannick Moy  <moy@adacore.com>
16288
16289         * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
16290         which issues an error in formal mode if its argument node is originally
16291         from source
16292         * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
16293         has a discriminant specification so that it does not include the case
16294         of derived types
16295         (Derived_Type_Declaration): move here the test that a derived type has a
16296         discriminant specification
16297         * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
16298         first element of a component association before accessing its choices
16299         (presence of component association is not enough)
16300         * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
16301         declaration is a library item before accessing the next element in a
16302         list, as library items are not member of lists
16303         * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
16304         sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
16305         Check_Formal_Restriction whenever possible.
16306
16307 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16308
16309         * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
16310         reference when needed.
16311
16312 2011-08-02  Bob Duff  <duff@adacore.com>
16313
16314         * gnat_ugn.texi: Fix typo.
16315
16316 2011-08-02  Vincent Celier  <celier@adacore.com>
16317
16318         * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
16319         archive file name. Do not use the full path name of archives for Open
16320         VMS.
16321
16322 2011-08-02  Robert Dewar  <dewar@adacore.com>
16323
16324         * sem_ch12.adb, sem_ch11.adb: New calling sequence for
16325         Analyze_Aspect_Specifications
16326         * sem_ch13.adb
16327         (Analyze_Aspect_Specifications): New handling for boolean aspects
16328         * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
16329         * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
16330         sequence for Analyze_Aspect_Specifications
16331         * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
16332         * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
16333
16334 2011-08-02  Robert Dewar  <dewar@adacore.com>
16335
16336         * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
16337         aspects, since these no longer exist.
16338
16339 2011-08-02  Robert Dewar  <dewar@adacore.com>
16340
16341         * par-ch13.adb (Aspect_Specifications_Present): Always return false on
16342         semicolon, do not try to see if there are aspects following it.
16343         * par-ch3.adb (P_Declarative_Items): Better message for unexpected
16344         aspect spec.
16345
16346 2011-08-02  Robert Dewar  <dewar@adacore.com>
16347
16348         * sem_ch8.adb, aspects.ads: Minor reformatting.
16349
16350 2011-08-02  Eric Botcazou  <ebotcazou@adacore.com>
16351
16352         * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
16353         * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
16354         extracted from...
16355         (Analyze_Aspect_Specifications): ...here.  Call above procedure.
16356
16357 2011-08-02  Yannick Moy  <moy@adacore.com>
16358
16359         * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
16360         mode on subprogram declaration outside of package specification, unless
16361         it is followed by a pragma Import
16362         * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
16363         Access_Type_Declaration): issue error in formal mode on access type
16364         (Analyze_Incomplete_Type_Decl): issue error in formal mode on
16365         incomplete type
16366         (Analyze_Object_Declaration): issue error in formal mode on object
16367         declaration which does not respect SPARK restrictions
16368         (Analyze_Subtype_Declaration): issue error in formal mode on subtype
16369         declaration which does not respect SPARK restrictions
16370         (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
16371         error in formal mode on digits or delta constraint
16372         (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
16373         decimal fixed point type
16374         (Derived_Type_Declaration): issue error in formal mode on derived type
16375         other than type extensions of tagged record types
16376         * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
16377         with check on access definition
16378         * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
16379         mode on protected definition.
16380         (Analyze_Task_Definition): issue error in formal mode on task definition
16381
16382 2011-08-02  Robert Dewar  <dewar@adacore.com>
16383
16384         * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
16385
16386 2011-08-02  Javier Miranda  <miranda@adacore.com>
16387
16388         * sem_ch6.adb (Can_Override_Operator): New function.
16389         (Verify_Overriding_Indicator): Add missing code to check overriding
16390         indicator in operators. Fixes regression.
16391         (Check_Overriding_Indicator): Minor reformating after replacing the
16392         code that evaluates if the subprogram can override an operator by
16393         invocations to the above new function.
16394         * einfo.adb
16395         (Write_Field26_Name): Add missing code to ensure that, following
16396         the documentation in einfo.ads, this field is not shown as attribute
16397         "Static_Initialization" on non-dispatching functions.
16398
16399 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
16400
16401         * sem_res.adb (Resolve_Call): A call to
16402         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
16403         No_Relative_Delay (AI-0211) only when it sets a relative timing event,
16404         i.e., when the second parameter is of type Time_Span.
16405
16406 2011-08-02  Vincent Celier  <celier@adacore.com>
16407
16408         * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
16409         with an archive instead of -L<library dir> -l<library name>.
16410
16411 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16412
16413         * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
16414         mark the base types In_Use in addition to making the operations
16415         use_visible.
16416
16417 2011-08-02  Ed Falis  <falis@adacore.com>
16418
16419         * init.c: add and setup __gnat_signal_mask for the exception signals
16420         * s-inmaop-vxworks.adb: new file.
16421         * s-intman-vxworks.adb: remove unnecessary initializations and
16422         simplify remaining
16423         * s-intman-vxworks.ads: remove unnecessary variable
16424         * s-taprop-vxworks.adb: simplify signal initialization
16425
16426 2011-08-02  Robert Dewar  <dewar@adacore.com>
16427
16428         * sem_ch8.adb: Minor code reorganization, comment updates.
16429
16430 2011-08-02  Robert Dewar  <dewar@adacore.com>
16431
16432         * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
16433         * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
16434         here from Sem_Res.
16435         (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
16436         (Matching_Static_Array_Bounds): Moved here from Sem_Res
16437
16438 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16439
16440         * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
16441         * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
16442         * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
16443         use_type_clauses, to handle more efficiently use_type and use_all_type
16444         constructs.
16445         * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
16446         Ada2012 Use_All_Type clause.
16447         (Use_Class_Wide_Operations): new procedure.
16448
16449 2011-08-02  Robert Dewar  <dewar@adacore.com>
16450
16451         * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
16452         sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
16453         expression to expression function.
16454
16455 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16456
16457         * sem_ch4.adb: transform simple Ada2012 membership into equality only
16458         if types are compatible.
16459
16460 2011-08-02  Yannick Moy  <moy@adacore.com>
16461
16462         * sem_res.adb (Matching_Static_Array_Bounds): new function which
16463         returns True if its argument array types have same dimension and same
16464         static bounds at each index.
16465         (Resolve_Actuals): issue an error in formal mode on actuals passed as
16466         OUT or IN OUT paramaters which are not view conversions in SPARK.
16467         (Resolve_Arithmetic_Op): issue an error in formal mode on
16468         multiplication or division with operands of fixed point types which are
16469         not qualified or explicitly converted.
16470         (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
16471         Boolean or array type (except String) operands.
16472         (Resolve_Equality_Op): issue an error in formal mode on equality
16473         operators for array types other than String with non-matching static
16474         bounds.
16475         (Resolve_Logical_Op): issue an error in formal mode on logical operators
16476         for array types with non-matching static bounds. Factorize the code in
16477         Matching_Static_Array_Bounds.
16478         (Resolve_Qualified_Expression): issue an error in formal mode on
16479         qualified expressions for array types with non-matching static bounds.
16480         (Resolve_Type_Conversion): issue an error in formal mode on type
16481         conversion for array types with non-matching static bounds
16482
16483 2011-08-02  Robert Dewar  <dewar@adacore.com>
16484
16485         * par-ch10.adb: Minor code reorganization (use Nkind_In).
16486
16487 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
16488
16489         * par-ch9.adb: save location of entry for proper error message.
16490
16491 2011-08-02  Javier Miranda  <miranda@adacore.com>
16492
16493         * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
16494         (Use_Full_View) which permits this routine to climb through the
16495         ancestors using the full-view of private parents.
16496         * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
16497         Use_Full_View to true in calls to Is_Ancestor.
16498         * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
16499         true in call to Is_Ancestor.
16500         * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
16501         Use_Full_View to true in call to Is_Ancestor.
16502         * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
16503         call to Is_Ancestor.
16504         * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
16505         Use_Full_View to true in calls to Is_Ancestor.
16506         * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
16507         Make_Select_Specific_Data_Table, Register_Primitive,
16508         Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
16509         * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
16510         to true in call to Is_Ancestor.
16511         * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
16512         Use_Full_View to true in calls to Is_Ancestor.
16513         * exp_cg.adb
16514         (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
16515         (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
16516
16517 2011-08-02  Robert Dewar  <dewar@adacore.com>
16518
16519         * gnat_rm.texi: Minor reformatting.
16520         * sem_prag.adb: Minor reformatting.
16521
16522 2011-08-02  Tristan Gingold  <gingold@adacore.com>
16523
16524         * vms_data.ads: Add VMS qualifier for -gnateP.
16525
16526 2011-08-02  Robert Dewar  <dewar@adacore.com>
16527
16528         * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
16529         * par-ch7.adb (P_Package): Proper placement of aspects for package
16530         decl/instantiation.
16531         * par-endh.adb (Check_End): Ad Is_Sloc parameter
16532         (End_Statements): Add Is_Sloc parameterr
16533         * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
16534         (Check_End): Ad Is_Sloc parameter
16535         (End_Statements): Add Is_Sloc parameterr
16536
16537 2011-08-02  Vincent Celier  <celier@adacore.com>
16538
16539         * ug_words: Add VMS qualifier equivalent to -gnateP:
16540         /SYMBOL_PREPROCESSING.
16541
16542 2011-08-02  Jose Ruiz  <ruiz@adacore.com>
16543
16544         * gnat-style.texi: For hexadecimal numeric literals the typical
16545         grouping of digits is 4 to represent 2 bytes.
16546         A procedure spec which is split into several lines is indented two
16547         characters.
16548
16549 2011-08-02  Yannick Moy  <moy@adacore.com>
16550
16551         * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
16552         * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
16553         (Resolve_Aggregate): issue errors in formal modes when aggregate is not
16554         properly qualified
16555         (Resolve_Array_Aggregate): issue errors in formal modes on non-static
16556         choice in array aggregate
16557         (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
16558         mark as ancestor
16559         (Resolve_Record_Aggregate): issue errors in formal modes on mixed
16560         positional and named aggregate for record, or others in record
16561         aggregate, or multiple choice in record aggregate
16562         * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
16563         array operands to logical operations AND, OR and XOR do not have the
16564         same static lower and higher bounds
16565         * sem_ch5.adb, sinfo.ads: Correct typos in comments
16566
16567 2011-08-01  Robert Dewar  <dewar@adacore.com>
16568
16569         * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
16570         Replaces Last_Source_Node_In_Sequence.
16571         * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
16572         * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
16573         parens and blank in string (this was inconsistently implemented).
16574         * errout.ads
16575         (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
16576         blank in string (this was inconsistently implemented).
16577         * gnat1drv.adb
16578         (Set_Global_Switches): Set formal mode switches appropriately
16579         * opt.ads, opt.adb: Formal mode is now global switches, more consistent
16580         * par-prag.adb
16581         (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
16582         call Set_Error_Msg_Lang to set "spark" as language name.
16583         * par.adb: Remove unnecessary call to set formal language for errout
16584         * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
16585         appropriately and call Set_Error_Msg_Lang to set "spark" as language
16586         name.
16587         * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
16588         calls to it, moved after resolution so that types are known
16589         * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
16590         result of concatenation is not of type String
16591         (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
16592         concatenation is not properly restricted
16593         * gnat_rm.texi: Add doc on pragma Spark_95.
16594         * gcc-interface/Makefile.in: Remove obsolete target pairs for
16595         Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
16596         * gcc-interface/Make-lang.in: Update dependencies.
16597
16598 2011-08-01  Javier Miranda  <miranda@adacore.com>
16599
16600         * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
16601         condition that detects if the overridden operation must replace an
16602         existing entity.
16603
16604 2011-08-01  Javier Miranda  <miranda@adacore.com>
16605
16606         * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
16607         code declarations inserted by Insert_Actions in each alternative of the
16608         N_Case_Expression node.
16609
16610 2011-08-01  Robert Dewar  <dewar@adacore.com>
16611
16612         * sem_ch6.adb: Minor code reorganization.
16613         * sem_util.adb: Minor reformatting.
16614
16615 2011-08-01  Pascal Obry  <obry@adacore.com>
16616
16617         * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
16618         * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
16619
16620 2011-08-01  Yannick Moy  <moy@adacore.com>
16621
16622         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
16623         literal or operator symbol which is prefixed
16624         * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
16625         mode on access attributes.
16626         * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
16627         that concatenation operands are properly restricted in formal mode
16628         (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
16629         Analyze_Concatenation_Operand. Issue an error in formal mode if the
16630         result of the concatenation has a type different from String.
16631         (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
16632         Analyze_Quantified_Expression, Analyze_Slice,
16633         Analyze_Null): issue an error in formal mode on unsupported constructs
16634         * sem_ch5.adb
16635         (Analyze_Block_Statement): only issue error on source block statement
16636         * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
16637         function which returns the last node in a list of nodes for which
16638         Comes_From_Source returns True, if any
16639         * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
16640         Last_Source_Node_In_Sequence
16641         * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
16642         Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
16643         mode on unsupported constructs
16644         * sem_ch9.adb Do not return after issuing error in formal mode, as the
16645         rest of the actions may be needed later on since the error is marked as
16646         not serious.
16647         * sinfo.ads: Typos in comments.
16648
16649 2011-08-01  Pascal Obry  <obry@adacore.com>
16650
16651         * projects.texi: Minor editing.
16652
16653 2011-08-01  Yannick Moy  <moy@adacore.com>
16654
16655         * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
16656         insertion character ~~
16657         * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
16658         (Set_Error_Msg_Lang): new procedure which fixes the language for use
16659         with insertion character ~~
16660         (Set_Msg_Text): treat insertion character ~~
16661         * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
16662         sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
16663         Formal_Error_Msg_... procedures by equivalent Error_Msg_...
16664         procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
16665         errors related to the formal language restriction not serious
16666         (insertion character |).
16667         * par.adb (Par): set formal language for error messages if needed
16668         * sem_ch6.adb (Check_Missing_Return): take into account possible
16669         generated statements at the end of the function
16670         * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
16671         enumeration value to define a new pragma SPARK_95
16672         * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
16673         SPARK_Version): new type and variables to store the SPARK version
16674         (none by default).
16675         (SPARK_Mode): return True when SPARK_Version is set
16676         * par-prag.adb: Correct indentation
16677         (Prag): take Pragma_SPARK_95 into account
16678         * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
16679         into account.
16680
16681 2011-08-01  Robert Dewar  <dewar@adacore.com>
16682
16683         * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
16684         sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
16685         sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
16686
16687 2011-08-01  Pascal Obry  <obry@adacore.com>
16688
16689         * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
16690         Target_Name to Get_Path call.
16691         (Parse_Single_Project): Likewise.
16692         (Post_Parse_Context_Clause): Likewise.
16693         * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
16694         Call Initialise_Project_Path with the proper Target_Name.
16695         (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
16696         search path.
16697         (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
16698         with the proper Target_Name.
16699         * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
16700         Part.Parse routine.
16701         (Parse_Project_And_Apply_Config): Likewise.
16702         * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
16703         This is fine as this part of the code is supporting only native
16704         compilation.
16705         * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
16706         is fine as this part of the code is supporting only native compilation.
16707
16708 2011-08-01  Yannick Moy  <moy@adacore.com>
16709
16710         * sem_util.adb (Enter_Name): issue error in formal mode on declaration
16711         of homonym, unless the homonym is one of the cases allowed in SPARK
16712         * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
16713         package declaration occurring after a body.
16714
16715 2011-08-01  Robert Dewar  <dewar@adacore.com>
16716
16717         * checks.adb, exp_ch4.adb: Minor reformatting.
16718
16719 2011-08-01  Javier Miranda  <miranda@adacore.com>
16720
16721         * einfo.ads (Access_Disp_Table): Fix documentation.
16722         (Dispatch_Table_Wrappers): Fix documentation.
16723
16724 2011-08-01  Pascal Obry  <obry@adacore.com>
16725
16726         * prj-env.adb, prj-env.ads: Minor reformatting.
16727
16728 2011-08-01  Yannick Moy  <moy@adacore.com>
16729
16730         * sem_util.ads, sem_util.adb, par.adb, par_util.adb
16731         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16732         procedures out of these packages.
16733         * errout.ads, errout.adb
16734         (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
16735         procedures in of this package
16736         (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
16737         * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
16738         on misplaced later vs initial declarations, like in Ada 83
16739         * sem_attr.adb (Processing for Analyze_Attribute): issue error in
16740         formal mode on attribute of private type whose full type declaration
16741         is not visible
16742         * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
16743         package declaration inside a package specification
16744         (Analyze_Full_Type_Declaration): issue error in formal mode on
16745         controlled type or discriminant type
16746         * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
16747         user-defined operator means that it should come from the source
16748         (New_Overloaded_Entity): issue error in formal mode on overloaded
16749         entity.
16750         * sem_ch6.ads, sem_ch13.ads: typos in comments.
16751
16752 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16753
16754         * atree.adb: Minor reformatting.
16755         * checks.adb: Minor reformatting.
16756
16757 2011-08-01  Vincent Celier  <celier@adacore.com>
16758
16759         * s-parame-vms-ia64.ads: Fix typo in comment
16760         Minor reformatting
16761         * s-parame-vms-restrict.ads: Removed, unused.
16762
16763 2011-08-01  Javier Miranda  <miranda@adacore.com>
16764
16765         * exp_ch3.adb
16766         (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
16767         * sem_ch3.adb
16768         (Constrain_Index): Remove side effects in the evaluation of the bounds.
16769         * sem_ch3.ads, sem_ch3.adb
16770         (Is_Constant_Bound): New extended version of the subprogram that was
16771         previously located inside function Exp_Ch3.Is_Variable_Size_Array.
16772         Moved here since it is shared by routines of sem_ch3 and exp_ch3.
16773         * sem_aux.ads (Constant_Value): Fix typo in comment.
16774         * checks.adb (Generate_Index_Checks): New implementation which, for
16775         array objects with constant bounds, generates the runtime check
16776         referencing the bounds of the array type. For other cases this routine
16777         provides its previous behavior obtaining such values from the array
16778         object.
16779         * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
16780         parent type.
16781         * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
16782         we cannot have semantic interpretations of the new node.
16783
16784 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16785
16786         * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
16787         expressions.
16788
16789 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16790
16791         * sem_ch8.adb: Minor code editing.
16792         * s-vxwext.adb: Remove trailing space.
16793         * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
16794         consistency with other files.
16795
16796 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16797
16798         * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
16799
16800 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16801
16802         * par-ch10.adb: reject parameterized expressions as compilation unit.
16803         * sem_ch4.adb: handle properly conditional expression with overloaded
16804         then_clause and no else_clause.
16805
16806 2011-08-01  Tristan Gingold  <gingold@adacore.com>
16807
16808         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
16809         like done by System.Aux_DEC.
16810         * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
16811
16812 2011-08-01  Yannick Moy  <moy@adacore.com>
16813
16814         * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
16815         missing label at end of declaration (subprogram or package)
16816         * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
16817         of positional and named parameter association
16818         * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
16819         Error_Msg_SP which adds a prefix to the error message giving the name
16820         of the formal language analyzed
16821         * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
16822         access result type in subprogram, unconstrained array as result type,.
16823         (Analyze_Subprogram_Declaration): issue an error in formal mode for null
16824         procedure
16825         * sem_ch8.adb: Code clean up.
16826
16827 2011-08-01  Javier Miranda  <miranda@adacore.com>
16828
16829         * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
16830         * einfo.ads (Access_Disp_Table): Fix documentation.
16831         (Dispatch_Table_Wrappers): Fix documentation.
16832         * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
16833         Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
16834         to enforce the documentation of this attribute.
16835         (Set_Is_Interface): Cleanup the assertion.
16836         * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
16837         the Underlying_Type entity before reading attribute Access_Disp_Table.
16838         * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
16839         Locate the Underlying_Type before reading attribute Access_Disp_Table.
16840         * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
16841         the Underlying_Type entity before reading attribute Access_Disp_Table.
16842         * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
16843         Locate the Underlying_Type entity before reading attribute
16844         Access_Disp_Table.
16845
16846 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16847
16848         * s-poosiz.ads: Additional overriding indicators.
16849
16850 2011-08-01  Yannick Moy  <moy@adacore.com>
16851
16852         * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
16853         formal mode.
16854         (Analyze_Iteration_Scheme): issue error in formal mode when loop
16855         parameter specification does not include a subtype mark.
16856         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
16857         formal mode on abstract subprogram.
16858         (Analyze_Subprogram_Specification): issue error in formal mode on
16859         user-defined operator.
16860         (Process_Formals): issue error in formal mode on access parameter and
16861         default expression.
16862         * sem_ch9.adb (Analyze_Abort_Statement,
16863         Analyze_Accept_Statement, Analyze_Asynchronous_Select,
16864         Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
16865         Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
16866         Analyze_Requeue, Analyze_Selective_Accept,
16867         Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
16868         * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
16869         issue error in formal mode on user-defined raise statement.
16870
16871 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16872
16873         * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
16874         declaration being hidden when overriding an implicit inherited
16875         subprogram.
16876         * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
16877         (-gnats), do not complain about a source file that contains only a
16878         pragma No_Body.
16879
16880 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
16881
16882         * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
16883         variable if already set.
16884
16885 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
16886
16887         * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
16888         g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
16889         s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
16890         g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
16891         g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
16892         g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
16893         g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
16894         g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
16895         g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
16896         g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
16897         g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
16898         s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
16899         g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
16900         s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
16901         g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
16902         g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
16903         g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
16904         g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
16905         g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
16906         g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
16907         s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
16908         s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
16909         a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
16910         s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
16911         s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
16912         g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
16913         g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
16914         g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
16915         g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
16916         g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
16917         g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
16918         s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
16919         s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
16920         g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
16921         g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
16922         s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
16923         s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
16924         g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
16925         g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
16926         g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
16927         s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
16928         g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
16929         g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
16930         g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
16931         s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
16932         g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
16933         g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
16934         g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
16935         s-osinte-mingw.ads: Update to GPLv3 run-time license.
16936         Use GNAT instead of GNARL.
16937
16938 2011-08-01  Bob Duff  <duff@adacore.com>
16939
16940         * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
16941         a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
16942         a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
16943         reformatting.
16944
16945 2011-08-01  Yannick Moy  <moy@adacore.com>
16946
16947         * debug.adb (d.D) reverve flag for the SPARK mode
16948         (d.E) reverve flag for SPARK generation mode
16949         (d.F) reverve flag for Why generation mode
16950         * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
16951         ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode):  New
16952         functions which return True when the corresponding modes are set
16953         (Formal_Language): return "spark" or "alfa" when in formal verification
16954         mode.
16955         * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
16956         Error_Msg to prefix the error message with a tag giving the formal
16957         language
16958         (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
16959         message with a tag giving the formal language
16960         * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
16961         block statement
16962         (Analyze_Case_Statement): issue error in formal mode on case statement
16963         with a single "others" case alternative
16964         (Analyze_Exit_Statement): issue errors in formal mode on exit
16965         statements which do not respect SPARK restrictions
16966         (Analyze_Goto_Statement): issue error in formal mode on goto statement
16967         (Check_Unreachable_Code): always issue an error (not a warning) in
16968         formal mode on unreachable code (concerns both code after an infinite
16969         loop and after an unconditional jump, both not allowed in SPARK)
16970         * sem_ch6.adb (Analyze_Return_Statement): add call to
16971         Set_Return_Present for a procedure containing a return statement
16972         (already done for functions in Analyze_Function_Return)
16973         (Analyze_Function_Return): issue error in formal mode on extended
16974         return or if return is not last statement in function
16975         (Check_Missing_Return): issue error in formal mode if function does
16976         not end with return or if procedure contains a return
16977         * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
16978         function to detect if there is an inner scope of its parameter S which
16979         is a loop.
16980
16981 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16982
16983         * sem_ch6.ads: Minor reformatting.
16984
16985 2011-08-01  Javier Miranda  <miranda@adacore.com>
16986
16987         * sem_util.adb (Abstract_Interface_List): Complete condition when
16988         processing private type declarations to avoid reading unavailable
16989         attribute.
16990         (Is_Synchronized_Tagged_Type): Complete condition when processing
16991         private extension declaration nodes to avoid reading unavailable
16992         attribute.
16993
16994 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16995
16996         * sem_ch3.adb: Minor reformatting.
16997
16998 2011-08-01  Thomas Quinot  <quinot@adacore.com>
16999
17000         * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
17001         i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
17002         s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
17003         s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
17004         for VMS, instead parametrize the common implementation with
17005         System.Parameters declarations.
17006
17007 2011-08-01  Eric Botcazou  <ebotcazou@adacore.com>
17008
17009         * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
17010
17011 2011-08-01  Tristan Gingold  <gingold@adacore.com>
17012
17013         * seh_init.c: Fix SEH handler installation on win64.
17014
17015 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17016
17017         * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
17018         double analysis of an anonymous access to subprogram, because it can
17019         lead to improper sharing of profiles and a back-end crash.
17020
17021 2011-08-01  Robert Dewar  <dewar@adacore.com>
17022
17023         * make.adb, sem_ch4.adb: Minor reformatting.
17024         * gcc-interface/Make-lang.in: Update dependencies.
17025         * sem_util.adb, exp_ch5.adb: Minor reformatting.
17026
17027 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
17028
17029         * gnat_rm.texi: Fix definition of Long_Integer.
17030
17031 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17032
17033         * exp_aggr.adb: check limit size of static aggregate unconditionally,
17034         to prevent storage exhaustion.
17035         * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
17036         finalized is a function body, insert the cleanup code before the final
17037         return statement, to prevent spurious warnings.
17038         * s-pooglo.ads: add overriding indicator.
17039
17040 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17041
17042         * sem_ch4.adb (Operator_Check): improve error message when both a
17043         with_clause and a use_clause are needed to make operator usage legal.
17044         * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
17045         determine whether a compilation unit is visible within an other,
17046         either through a with_clause in the current unit, or a with_clause in
17047         its library unit or one one of its parents.
17048
17049 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17050
17051         * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
17052         over an arbitrary expression of an array or container type.
17053         * lib-xref.adb: clarify comment.
17054
17055 2011-08-01  Bob Duff  <duff@adacore.com>
17056
17057         * einfo.ads: Minor reformatting.
17058         * debug.adb: Minor comment improvement.
17059
17060 2011-08-01  Javier Miranda  <miranda@adacore.com>
17061
17062         * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
17063         consider hidden subprograms as valid candidates.
17064
17065 2011-08-01  Arnaud Charlet  <charlet@adacore.com>
17066
17067         * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
17068
17069 2011-08-01  Vasiliy Fofanov  <fofanov@adacore.com>
17070
17071         * gnat_ugn.texi: Fix typo.
17072
17073 2011-08-01  Robert Dewar  <dewar@adacore.com>
17074
17075         * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
17076         lib-xref.adb: Minor reformatting
17077
17078 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
17079
17080         * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
17081         when to generate a call to Move_Final_List.
17082         (Has_Controlled_Parts): Remove this function.
17083
17084 2011-08-01  Geert Bosch  <bosch@adacore.com>
17085
17086         * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
17087         "," in choice list.
17088
17089 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17090
17091         * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
17092         explicit raise of a predefined exception as Comes_From_Source if the
17093         original N_Raise_Statement comes from source.
17094
17095 2011-08-01  Robert Dewar  <dewar@adacore.com>
17096
17097         * sinfo.ads: Add comment.
17098         * sem_ch6.adb: Minor reformatting.
17099
17100 2011-08-01  Robert Dewar  <dewar@adacore.com>
17101
17102         * freeze.adb (Freeze_Entity): Refine check for bad component size
17103         clause to avoid rejecting confirming clause when atomic/aliased present.
17104
17105 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17106
17107         * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
17108         better determine whether an entity reference is a write.
17109         * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
17110         subcomponent.
17111         * lib-xref.adb (Output_References): Do no suppress a read reference at
17112         the same location as an immediately preceeding modify-reference, to
17113         handle properly in-out actuals.
17114
17115 2011-08-01  Tristan Gingold  <gingold@adacore.com>
17116
17117         * env.c (__gnat_setenv) [VMS]: Refine previous change.
17118
17119 2011-08-01  Quentin Ochem  <ochem@adacore.com>
17120
17121         * i-cstrin.adb (New_String): Changed implementation, now uses only the
17122         heap to compute the result.
17123
17124 2011-08-01  Robert Dewar  <dewar@adacore.com>
17125
17126         * atree.ads: Minor reformatting.
17127
17128 2011-08-01  Emmanuel Briot  <briot@adacore.com>
17129
17130         * g-expect.adb (Get_Command_Output): Fix memory leak.
17131
17132 2011-08-01  Geert Bosch  <bosch@adacore.com>
17133
17134         * cstand.adb (P_Float_Type): New procedure to print the definition of
17135         predefined fpt types.
17136         (P_Mixed_Name): New procedure to print a name using mixed case
17137         (Print_Standard): Use P_Float_Type for printing floating point types
17138         * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
17139         precision IEEE float.
17140
17141 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17142
17143         * sem_ch3.adb: Minor reformatting.
17144
17145 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17146
17147         * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
17148         the completion of a generic function, insert the new body rather than
17149         rewriting the original.
17150
17151 2011-08-01  Yannick Moy  <moy@adacore.com>
17152
17153         * sinfo.ads, errout.ads: Typos in comments.
17154
17155 2011-08-01  Robert Dewar  <dewar@adacore.com>
17156
17157         * par-endh.adb: Minor reformatting.
17158
17159 2011-08-01  Robert Dewar  <dewar@adacore.com>
17160
17161         * aspects.ads, aspects.adb: Add aspects for library unit pragmas
17162         (Pre_Post_Aspects): New subtype.
17163         * par-ch12.adb (P_Generic): New syntax for aspects in packages
17164         * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
17165         * par-ch7.adb (P_Package): Remove Decl parameter
17166         (P_Package): Handle new syntax for aspects (before IS)
17167         * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
17168         new aspect syntax
17169         (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
17170         * par.adb (P_Aspect_Specifications): Add Semicolon parameter
17171         (P_Package): Remove Decl parameter
17172         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
17173         aspects
17174         * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
17175         specs
17176         * sem_util.ads, sem_util.adb (Static_Boolean): New function
17177         * sinfo.ads: Document new syntax for aspects in packages etc.
17178         * sprint.adb: Handle new syntax of aspects before IS in package
17179
17180 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17181
17182         * atree.ads: Minor reformatting.
17183         * sem_prag.adb: Minor reformatting.
17184
17185 2011-08-01  Robert Dewar  <dewar@adacore.com>
17186
17187         * exp_util.adb (Insert_Actions): Fix error in handling Actions for
17188         case expr alternative.
17189
17190 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17191
17192         * sem_ch12.adb: Fix typo.
17193
17194 2011-08-01  Geert Bosch  <bosch@adacore.com>
17195
17196         * sem_prag.adb (Check_No_Link_Name): New procedure.
17197         (Process_Import_Or_Interface): Use Check_No_Link_Name.
17198         * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
17199         instead of Standard_Long_Long_Float_Size global. Preparation for
17200         eventual removal of per type constants.
17201         * exp_util.ads (Get_Stream_Size): New function returning the stream
17202         size value of subtype E.
17203         * exp_util.adb (Get_Stream_Size): Implement new function.
17204         * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
17205         function.
17206         * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
17207         * einfo.adb:
17208         (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
17209
17210 2011-08-01  Geert Bosch  <bosch@adacore.com>
17211
17212         * cstand.adb: Fix comments.
17213         * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
17214         count of arguments.
17215
17216 2011-08-01  Robert Dewar  <dewar@adacore.com>
17217
17218         * exp_ch4.adb, sem_cat.adb: Minor reformatting.
17219
17220 2011-08-01  Geert Bosch  <bosch@adacore.com>
17221
17222         * atree.ads: Fix comment.
17223
17224 2011-08-01  Robert Dewar  <dewar@adacore.com>
17225
17226         * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
17227         * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
17228         * par.adb: Add with for Namet.Sp.
17229         * par-tchk.adb: Minor reformatting.
17230
17231 2011-08-01  Vincent Celier  <celier@adacore.com>
17232
17233         * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
17234         (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
17235         of the init procedure of a SAL.
17236         * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
17237         New procedure.
17238
17239 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17240
17241         * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
17242         reformatting.
17243
17244 2011-08-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17245
17246         * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
17247
17248 2011-08-01  Thomas Quinot  <quinot@adacore.com>
17249
17250         * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
17251         conformant with its spec (return True only for types that have
17252         an overriding Initialize primitive operation that prevents them from
17253         having preelaborable initialization).
17254         * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
17255         initialization for controlled types in Ada 2005 or later mode.
17256
17257 2011-08-01  Robert Dewar  <dewar@adacore.com>
17258
17259         * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
17260         Postcondition.
17261         (Same_Aspect): New function.
17262         * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
17263         Type_Invariant, Precondition, Postcondition.
17264         * snames.ads-tmpl: Add Name_Type_Invariant.
17265
17266 2011-08-01  Robert Dewar  <dewar@adacore.com>
17267
17268         * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
17269         here.
17270         (Freeze_All_Ent): Fix error in handling inherited aspects.
17271         * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
17272         already analyzed, but don't skip entire processing of a declaration,
17273         that's wrong in some cases of declarations being rewritten.
17274         (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
17275         Don't delay for integer, string literals
17276         Treat predicates in usual manner for delay, remove special case code,
17277         not needed.
17278         (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
17279         (Build_Predicate_Function): Update saved expression in aspect
17280         (Build_Invariant_Procedure): Update saved expression in aspect
17281         * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
17282         of replacement of discriminant references if the reference is simple.
17283
17284 2011-08-01  Robert Dewar  <dewar@adacore.com>
17285
17286         * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
17287         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
17288         Static_Predicate and Dynamic_Predicate.
17289         (Build_Predicate_Function): Add processing for Static_Predicate
17290         and Dynamic_Predicate.
17291         * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
17292         (From_Static_Predicate): New flag
17293         * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
17294
17295 2011-08-01  Robert Dewar  <dewar@adacore.com>
17296
17297         * usage.adb: Documentation cleanup for Ada version modes in usage.
17298         * expander.adb: Minor reformatting.
17299
17300 2011-08-01  Robert Dewar  <dewar@adacore.com>
17301
17302         * atree.ads: Minor comment fix.
17303         * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
17304         a-witeio.ads, sem_prag.adb: Minor reformatting.
17305
17306 2011-08-01  Doug Rupp  <rupp@adacore.com>
17307
17308         * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
17309         pointers. Use descrip.h header file for convenience. Add some
17310         comments.
17311
17312 2011-08-01  Robert Dewar  <dewar@adacore.com>
17313
17314         * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
17315         (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
17316         * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
17317         New procedure.
17318         (Check_Aspect_At_End_Of_Declarations): New procedure
17319         (Analye_Aspect_Specification): Minor changes for above procedures
17320         * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
17321         specification node as well.
17322
17323 2011-08-01  Pascal Obry  <obry@adacore.com>
17324
17325         * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
17326         Windows files. Use GetFilesAttributes() in this case to check for file
17327         existence instead of returning with an error code.
17328
17329 2011-08-01  Vincent Celier  <celier@adacore.com>
17330
17331         * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
17332         High is above Source length.
17333
17334 2011-08-01  Robert Dewar  <dewar@adacore.com>
17335
17336         * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
17337
17338 2011-08-01  Robert Dewar  <dewar@adacore.com>
17339
17340         * aspects.ads (Boolean_Aspects): New subtype.
17341         * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
17342         for derived types in cases where the parent type and derived type have
17343         aspects.
17344         * freeze.adb (Freeze_Entity): Fix problems in handling derived type
17345         with aspects when parent type also has aspects.
17346         (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
17347         boolean expression at this point).
17348         * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
17349         accordance with final decision on the Ada 2012 feature.
17350         * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
17351
17352 2011-08-01  Matthew Heaney  <heaney@adacore.com>
17353
17354         * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
17355
17356 2011-08-01  Pascal Obry  <obry@adacore.com>
17357
17358         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
17359         Fix Replace_Slice when High is above current string size.
17360         (Replace_Slice): Fix DL computation when High is above current
17361         string length.
17362
17363 2011-08-01  Gary Dismukes  <dismukes@adacore.com>
17364
17365         * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
17366
17367 2011-08-01  Matthew Heaney  <heaney@adacore.com>
17368
17369         * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
17370         of node.
17371
17372 2011-08-01  Pascal Obry  <obry@adacore.com>
17373
17374         * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
17375         reformatting.
17376
17377 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17378
17379         * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
17380         access to protected subprograms in generic bodies.
17381         * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
17382         protected type, indicate that the convention of the subprogram is
17383         Convention_Protected, because it may be used in subsequent declarations
17384         within the protected declaration.
17385
17386 2011-08-01  Vincent Celier  <celier@adacore.com>
17387
17388         * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
17389         and "final" procedures when the name of the library is "ada", to avoid
17390         duplicate symbols "adainit" and "adafinal" in executables.
17391
17392 2011-08-01  Ed Schonberg  <schonberg@adacore.com>
17393
17394         * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
17395         quantified expression that appears within a postcondition and uses the
17396         Ada2012 'Result attribute.
17397
17398 2011-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17399
17400         * init.c (__gnat_error_handler): Cast reason to int.
17401         (__gnat_install_handler): Explain sa_sigaction use.
17402
17403 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
17404
17405         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
17406         subprogram has copy-in copy-out parameters, try to promote the mode of
17407         the return type if it is passed in registers.
17408
17409 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
17410
17411         * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
17412         left operand as addressable.
17413
17414 2011-07-24  Eric Botcazou  <ebotcazou@adacore.com>
17415
17416         * gcc-interface/gigi.h (build_function_stub): Remove.
17417         (build_return_expr): Likewise.
17418         (convert_vms_descriptor): Declare.
17419         * gcc-interface/utils.c (convert_vms_descriptor): Make global.
17420         (build_function_stub): Move to...
17421         * gcc-interface/utils2.c (build_return_expr): Move to...
17422         * gcc-interface/trans.c (build_function_stub): ...here.
17423         (build_return_expr): ...here.
17424         (Subprogram_Body_to_gnu): Add local variable for language_function.
17425         Disconnect the parameter attributes cache, if any, once done with it.
17426         Call end_subprog_body only after setting the end_locus.
17427         Build the stub associated with the function, if any, at the very end.
17428         (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
17429         variables and streamline control flow.
17430
17431 2011-07-23  Arnaud Charlet  <charlet@adacore.com>
17432
17433         PR ada/49819
17434         * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
17435         g-trasym-dwarf.adb.
17436
17437 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17438
17439         PR bootstrap/49794
17440         * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
17441         Assign to act.sa_sigaction.
17442         * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
17443         current->return_address to char * before arithmetic.
17444
17445 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17446
17447         * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
17448         Correct argument types.
17449         Extract code from reason.
17450         (__gnat_install_handler): Assign to act.sa_sigaction.
17451
17452 2011-07-21  Eric Botcazou  <ebotcazou@adacore.com>
17453
17454         * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
17455         (GNAT1_OBJS): ...here.
17456
17457 2011-07-15  Eric Botcazou  <ebotcazou@adacore.com>
17458
17459         PR ada/48711
17460         * g-socthi-mingw.adb (Fill): Fix formatting.
17461
17462         * gcc-interface/gigi.h: Move around comment.
17463
17464 2011-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
17465
17466         PR ada/46350
17467         * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
17468
17469 2011-07-14  Florian Weimer  <fw@deneb.enyo.de>
17470
17471         PR ada/48711
17472         * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
17473
17474 2011-07-13  Eric Botcazou  <ebotcazou@adacore.com>
17475
17476         * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
17477         range comparison if Pmode is SImode.
17478
17479 2011-07-12  Laurent GUERBY  <laurent@guerby.net>
17480             Eric Botcazou  <ebotcazou@adacore.com>
17481
17482         * adadecode.c: Wrap up in extern "C" block.
17483         * adadecode.h: Likewise.
17484         * adaint.c: Likewise.  Remove 'const' keyword.
17485         * adaint.h: Likewise.
17486         * argv.c: Likewise.
17487         * atree.h: Likewise.
17488         * cio.c: Likewise.
17489         * cstreams.c: Likewise.
17490         * env.c: Likewise.
17491         * exit.c: Likewise.
17492         * fe.h: Likewise.
17493         * final.c: Likewise.
17494         * init.c: Likewise.
17495         * initialize.c: Likewise.
17496         * link.c: Likewise.
17497         * namet.h: Likewise.
17498         * nlists.h: Likewise.
17499         * raise.c: Likewise.
17500         * raise.h: Likewise.
17501         * repinfo.h: Likewise.
17502         * seh_init.c: Likewise.
17503         * targext.c: Likewise.
17504         * tracebak.c: Likewise.
17505         * uintp.h: Likewise.
17506         * urealp.h: Likewise.
17507         * xeinfo.adb: Wrap up generated C code in extern "C" block.
17508         * xsinfo.adb: Likewise.
17509         * xsnamest.adb: Likewise.
17510         * gcc-interface/gadaint.h: Wrap up in extern "C" block.
17511         * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
17512         * gcc-interface/misc.c: Likewise.
17513         * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
17514         (GNAT1_C_OBJS): Remove ada/b_gnat1.o.  List ada/seh_init.o and
17515         ada/targext.o here...
17516         (GNAT_ADA_OBJS): ...and not here.
17517         (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
17518         (GNATBIND_OBJS): Reorder.
17519
17520 2011-07-07  Richard Henderson  <rth@redhat.com>
17521
17522         * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
17523         dwarf2out_frame_init.
17524
17525 2011-07-07  Eric Botcazou  <ebotcazou@adacore.com>
17526
17527         * gcc-interface/misc.c (gnat_init): Tweak previous change.
17528
17529 2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17530
17531         PR target/39150
17532         * gcc-interface/Makefile.in: Handle x86_64-solaris2.
17533
17534 2011-07-06  Richard Guenther  <rguenther@suse.de>
17535
17536         * gcc-interface/misc.c (gnat_init): Merge calls to
17537         build_common_tree_nodes and build_common_tree_nodes_2.
17538         Re-initialize boolean_false_node.
17539
17540 2011-07-02  Eric Botcazou  <ebotcazou@adacore.com>
17541             Olivier Hainque  <hainque@adacore.com>
17542             Nicolas Setton  <setton@adacore.com>
17543
17544         * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
17545         the type according to the ARTIFICIAL_P parameter.
17546         (create_type_decl): Likewise.
17547         (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
17548
17549 2011-07-01  Eric Botcazou  <ebotcazou@adacore.com>
17550
17551         * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
17552         (gnatbind): Likewise.
17553
17554 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17555
17556         * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
17557
17558 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17559
17560         * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
17561         local variable throughout.  Remove useless call to Base_Type.
17562         (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
17563         Take it also into account for the volatileness of the field.  Set the
17564         TREE_SIDE_EFFECTS flag as well in this case.  Reorder some warnings.
17565
17566 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17567
17568         * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
17569         on a dereference built for a by-ref object if it has an address clause.
17570
17571 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17572
17573         * einfo.ads (Address_Taken): Document use for the second argument of
17574         Asm_Input and Asm_Output attributes.
17575         * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
17576         argument is an entity name, then set Address_Taken on it.
17577         <Attribute_Asm_Output>: Likewise.
17578         * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
17579         Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
17580         (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
17581         memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
17582
17583 2011-06-16  Joern Rennecke  <joern.rennecke@embecosm.com>
17584
17585         PR middle-end/46500
17586         * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
17587
17588 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
17589
17590         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
17591         (ada/utils.o): Update dependencies.
17592         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
17593         ../../../libcpp/libcpp.a.
17594         * gcc-interface/utils.c: Include common/common-target.h.
17595         (process_attributes): Use targetm_common.have_named_sections.
17596
17597 2011-06-07  Richard Guenther  <rguenther@suse.de>
17598
17599         * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
17600         set_sizetype.
17601
17602 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17603
17604         * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
17605         TREE_THIS_NOTRAP flag.
17606
17607 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17608
17609         * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
17610         Fix thinko.
17611
17612 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17613
17614         * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
17615         constants whose full view has discriminants specially.
17616
17617 2011-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17618
17619         * gcc-interface/utils.c: Include diagnostic.h.
17620         (gnat_write_global_declarations): Output debug information for all
17621         global type declarations before finalizing the compilation unit.
17622         * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
17623
17624 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
17625
17626         * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
17627
17628 2011-05-25  Kai Tietz  <ktietz@redhat.com>
17629
17630         * adaint.c (__gnat_to_canonical_file_list_next): Use array
17631         initialization instead of const/none-const pointer assignment.
17632
17633 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
17634
17635         * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
17636         $(EXTRA_GNAT1_OBJS).
17637         (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
17638         (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
17639         (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
17640         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
17641         libcommon-target.a instead of prefix.o.
17642
17643 2011-05-21  Joseph Myers  <joseph@codesourcery.com>
17644
17645         PR ada/49097
17646         * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
17647
17648 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
17649
17650         * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
17651         * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
17652         instead of version.o.
17653
17654 2011-05-18  Kai Tietz  <ktietz@redhat.com>
17655
17656         * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
17657         boolean_false_node instead of integer_zero_node.
17658         (convert_with_check): Likewise.
17659         * gcc-interface/decl.c (choices_to_gnu): Likewise.
17660
17661 2011-05-12  Eric Botcazou  <ebotcazou@adacore.com>
17662
17663         * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
17664         type of the parameter is an unconstrained array, convert the actual to
17665         the type of the formal in the In Out and Out cases as well.
17666
17667 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
17668
17669         * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
17670         call build_function_type_array or build_varargs_function_type_array
17671         instead.
17672         (create_subprog_type): Don't call build_function_type; call
17673         build_function_type_vec instead.
17674
17675 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
17676
17677         * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
17678         (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
17679         (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
17680
17681 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
17682
17683         * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
17684
17685         * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
17686         * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
17687
17688 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
17689
17690         * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
17691
17692 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
17693
17694         * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
17695         instead of accessing TYPE_ARG_TYPES directly.
17696         * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
17697
17698 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17699
17700         PR ada/48844
17701         * gcc-interface/gigi.h (get_variant_part): Declare.
17702         * gcc-interface/decl.c (get_variant_part): Make global.
17703         * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
17704         types have the same constant size, are record types and T1 has a
17705         variant part while T2 doesn't.
17706
17707 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
17708
17709         * gcc-interface/utils.c (begin_subprog_body): Do not call
17710         get_pending_sizes.
17711         (end_subprog_body): Likewise.
17712
17713 2011-05-04  Richard Guenther  <rguenther@suse.de>
17714
17715         * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
17716         int_const_binop.
17717         (pos_to_constructor): Likewise.
17718
17719 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
17720             Eric Botcazou  <ebotcazou@adacore.com>
17721
17722         * gcc-interface/trans.c (gigi): Call build_function_type_list instead
17723         of build_function_type.  Adjust calls to...
17724         (build_raise_check): ...this.  Do not take a void_tree parameter.
17725         Call build_function_type_list instead of build_function_type.
17726         Fix head comment and swap couple of conditional blocks.
17727
17728 2011-04-30  Eric Botcazou  <ebotcazou@adacore.com>
17729
17730         * gnatvsn.ads (Library_Version): Bump to 4.7.
17731         (Current_Year): Bump to 2011.
17732
17733 2011-04-29  Michael Matz  <matz@suse.de>
17734
17735         * gcc-interface/misc.c (gnat_handle_option): Set
17736         warn_maybe_uninitialized.
17737
17738 2011-04-23  Gerald Pfeifer  <gerald@pfeifer.com>
17739
17740         * gnat_ugn.texi (Complexity Metrics Control): Update link to
17741         the Watson/McCabe paper.
17742
17743 2011-04-23  Jim Meyering  <meyering@redhat.com>
17744
17745         * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
17746
17747 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
17748
17749         * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
17750         onto the new type.
17751
17752 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>
17753
17754         * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
17755         parameter.
17756         * gcc-interface/utils.c (create_subprog_decl): Likewise.  Set
17757         DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
17758         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
17759         ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
17760         <all>: Do not set flags on the reused DECL node coming from an alias.
17761         Set DECL_IGNORED_P on the DECL node built for subprograms if they
17762         don't need debug info here...
17763         * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
17764         (gigi): Adjust calls to create_subprog_decl.
17765         (build_raise_check): Likewise.
17766         (establish_gnat_vms_condition_handler): Likewise.
17767         (Compilation_Unit_to_gnu): Likewise.
17768         (gnat_to_gnu): Likewise.
17769
17770 2011-04-21  Eric Botcazou  <ebotcazou@adacore.com>
17771
17772         * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
17773         (NO_REORDER_ADAFLAGS): New variable.
17774         (EXTRA_GNATTOOLS): Always define.
17775         (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
17776         Clean up and adjust list of files compiled with special options.
17777         * gcc-interface/Make-lang.in: Likewise.
17778         (ada/decl.o): Cosmetical change.
17779         (ada/misc.o): Remove dependency on $(PLUGIN_H).
17780
17781 2011-04-20  Jim Meyering  <meyering@redhat.com>
17782
17783         * initialize.c (__gnat_initialize): Remove useless if-before-free.
17784
17785 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
17786
17787         * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
17788         $(CFLAGS) on the link line.
17789
17790 2011-04-17  Eric Botcazou  <ebotcazou@adacore.com>
17791
17792         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
17793         padded type built for the return type if it is unconstrained.
17794
17795 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
17796
17797         * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
17798
17799 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
17800
17801         * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
17802         before calling TREE_CHAIN.
17803         * gcc-interface/misc.c (gnat_init_ts): New function.
17804         (LANG_HOOKS_INIT_TS): Define.
17805
17806 2011-04-12  Martin Jambor  <mjambor@suse.cz>
17807
17808         * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
17809         instead of cgraph_node.
17810
17811 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
17812
17813         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
17814         alignment on fields of the RETURN type built for the Copy-In Copy-Out
17815         mechanism.
17816
17817 2011-04-08  Eric Botcazou  <ebotcazou@adacore.com>
17818
17819         * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
17820         of aggregate types that contain a placeholder.
17821
17822 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
17823
17824         * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
17825         TYPE_ARG_TYPES.
17826         (handle_type_generic_attribute): Likewise.
17827
17828 2011-04-04  Eric Botcazou  <ebotcazou@adacore.com>
17829
17830         PR ada/47163
17831         * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
17832
17833 2011-04-04  Kai Tietz  <ktietz@redhat.com>
17834
17835         PR ada/47163
17836         * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
17837         to flag value.
17838
17839 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17840
17841         * gcc-interface/utils2.c (build_allocator): In the unconstrained array
17842         type case, do not strip a padding type around the array type.
17843
17844 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17845
17846         * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
17847         types.
17848
17849 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17850
17851         * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
17852         * gcc-interface/misc.c (gnat_handle_option): Remove special handling
17853         code for -feliminate-unused-debug-types.
17854         (gnat_post_options): Likewise.
17855
17856 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17857
17858         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17859         declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
17860         distinct copy.
17861
17862 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17863
17864         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
17865         DECL_ARTIFICIAL flag on enumeration types.
17866
17867 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17868
17869         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
17870         fat pointer types artificial unconditionally.
17871         <E_Array_Subtype>: Attach the base array type as a parallel type if it
17872         isn't artificial.
17873
17874 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17875
17876         * gcc-interface/gigi.h (get_dummy_type): Declare.
17877         (build_dummy_unc_pointer_types): Likewise.
17878         (finish_fat_pointer_type): Likewise.
17879         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
17880         fat pointer type has been built, complete it in place.
17881         <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
17882         and thin pointers.  Remove useless variable.
17883         (finish_fat_pointer_type): Make global and move to...
17884         * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
17885         (get_dummy_type): New function.
17886         (build_dummy_unc_pointer_types): Likewise.
17887         (gnat_pushdecl): Propage the name to the anonymous variants only.
17888         (update_pointer_to): Only adjust the pointer types in the unconstrained
17889         array case.
17890
17891 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17892
17893         * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
17894         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
17895         if this is a Taft amendment type and the full declaration is available.
17896         * gcc-interface/trans.c (process_type): Likewise.
17897         If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
17898         (process_freeze_entity): Likewise.
17899         * gcc-interface/utils.c (dummy_global): New static variable.
17900         (gnat_write_global_declarations): If there are types declared as used
17901         at the global level, insert them in the global hash table.
17902
17903 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17904
17905         * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
17906         * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
17907         declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
17908         copy.
17909         (record_builtin_type): Add ARTIFICIAL_P parameter.  Set DECL_ARTIFICIAL
17910         flag of the type accordingly.
17911         * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
17912
17913 2011-04-02  Eric Botcazou  <ebotcazou@adacore.com>
17914
17915         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17916         finalizing types when updating the pointers to the designated type.
17917         <all>: Finalize the deferred types even if we didn't defer processing
17918         of incomplete types in this invocation.
17919
17920 2011-04-01  Olivier Hainque  <hainque@adacore.com>
17921             Nicolas Setton  <setton@adacore.com>
17922             Eric Botcazou  <ebotcazou@adacore.com>
17923
17924         * gcc-interface/misc.c (gnat_descriptive_type): New function.
17925         (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
17926
17927 2011-03-28  Kai Tietz  <ktietz@redhat.com>
17928
17929         * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
17930         Windows targets.
17931         (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
17932         * system-mingw.ads (System): Change ZCX_By_Default default to True.
17933
17934         * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
17935
17936 2011-03-28  Tristan Gingold  <gingold@adacore.com>
17937
17938         PR ada/44431
17939         * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
17940         Use ada output of gnatbind.
17941         (ada/b_gnatb.adb): Ditto.
17942         (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
17943         (ada.mostlyclean, ada.stage1)
17944         (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
17945         (ada.stagefeedback): Adjust.
17946         * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
17947         Use ada output of gnatbind.
17948         (b_gnatm.adb): Ditto.
17949         (b_gnatl.o, b_gnatm.o): New rules.
17950
17951 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17952
17953         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
17954         for the padded type built to support a specified size or alignment.
17955
17956 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17957
17958         * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
17959         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
17960         unconditionally to the end of the unit when the designated type is
17961         limited_with'ed.
17962         <all>: Rename local variable.  Attempt to un-defer types only and do it
17963         for limited_with'ed types as well.
17964         (finalize_from_with_types): Adjust comment.  Rename variable and tidy.
17965         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
17966         consistently and remove redundant call to finalize_from_with_types.
17967
17968 2011-03-26  Eric Botcazou  <ebotcazou@adacore.com>
17969
17970         * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
17971         subprograms without a previous spec declared in the same unit.
17972         * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
17973         subprograms at the end of the unit instead of at the beginning.
17974         * gcc-interface/utils.c (create_subprog_decl): Check that the entity
17975         isn't public for the special handling of non-inline functions nested
17976         inside inline external functions.
17977
17978 2011-03-25  Jeff Law  <law@redhat.com>
17979
17980         * gcc-interface/utils.c (def_fn_type): Add missing va_end.
17981
17982 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
17983
17984         * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
17985         * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
17986         to compute Set_Size_Depends_On_Discriminant.
17987         (Layout_Type): Call it on array types in back-end layout mode.
17988         * sem_util.adb (Requires_Transient_Scope): Return true for array
17989         types only if the size depends on the value of discriminants.
17990         * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
17991         type if the RHS is a call to a function that returns an unconstrained
17992         type with default discriminant.
17993
17994 2011-03-24  Eric Botcazou  <ebotcazou@adacore.com>
17995
17996         * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
17997         non-conversion to the nominal result type at the end.
17998
17999 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
18000
18001         * gcc-interface/trans.c (create_temporary): New function taken from...
18002         (create_init_temporary): ...here.  Call it.
18003         (call_to_gnu): Create the temporary for the return value early, if any.
18004         Create it for a function with copy-in/copy-out parameters if there is
18005         no target; in other cases of copy-in/copy-out, use another temporary.
18006         Push the new binding level lazily.  Add and rename local variables.
18007
18008 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
18009
18010         * gcc-interface/decl.c (validate_size): Improve comments and tweak
18011         error message.
18012         (set_rm_size): Likewise.
18013
18014 2011-03-23  Eric Botcazou  <ebotcazou@adacore.com>
18015
18016         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
18017         for the padded type built in order to support a specified alignment.
18018         Fix incorrect formatting.
18019
18020 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
18021
18022         PR bootstrap/48216
18023         * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
18024
18025 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
18026
18027         * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
18028         rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
18029         to the end of the list.  Adjust recursive call.  Rename local variable.
18030         If REORDER is true, reorder components of the record type.
18031         (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
18032         components_to_record and adjust the parameter list.
18033
18034 2011-03-21  Eric Botcazou  <ebotcazou@adacore.com>
18035
18036         * gcc-interface/decl.c (elaborate_expression_1): When optimization is
18037         disabled, use the variable for bounds of loop iteration scheme.
18038
18039 2011-03-21  Kai Tietz  <ktietz@redhat.com>
18040
18041         PR target/12171
18042         * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
18043
18044 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
18045
18046         * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
18047         out whether the expression is read-only.  Short-circuit placeholder
18048         case and rename a couple of local variables.
18049
18050 2011-03-17  Eric Botcazou  <ebotcazou@adacore.com>
18051
18052         * gcc-interface/gigi.h (smaller_form_type_p): Declare.
18053         * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
18054         * gcc-interface/utils.c (smaller_form_type_p): ...to here.
18055         (convert): Deal with conversions from a smaller form type specially.
18056
18057 2011-02-14  Eric Botcazou  <ebotcazou@adacore.com>
18058
18059         * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
18060         its argument, except for the special -I- switch.
18061
18062 2011-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
18063
18064         * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
18065         "Ada Issues".
18066
18067 2011-02-08  Eric Botcazou  <ebotcazou@adacore.com>
18068
18069         * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
18070
18071 2011-02-03  Eric Botcazou  <ebotcazou@adacore.com>
18072
18073         * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
18074         GNAT_FORMAL.
18075         * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
18076         * gcc-interface/utils.c (fill_vms_descriptor): ...here.  Take GNU_TYPE
18077         instead of GNAT_FORMAL.  Protect the expression against multiple uses.
18078         Do not generate the check directly, instead instantiate the template
18079         check present in the descriptor.
18080         (make_descriptor_field): Move around.
18081         (build_vms_descriptor32): Build a template check in the POINTER field.
18082         (build_vms_descriptor): Remove useless suffixes.
18083         * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
18084
18085 2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
18086
18087         PR bootstrap/47467
18088         * targext.c: Include target files if IN_RTS is defined.
18089
18090 2011-01-26  Richard Guenther  <rguenther@suse.de>
18091
18092         PR bootstrap/47467
18093         * targext.c: Include config.h.
18094         * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
18095         dependency.
18096
18097 2011-01-04  Pascal Obry  <obry@adacore.com>
18098             Eric Botcazou  <ebotcazou@adacore.com>
18099
18100         * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
18101
18102 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
18103
18104         * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
18105         end-of-case on the end label and its associated gotos, if any.
18106
18107 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
18108
18109         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
18110         expressions of the parameter cache within the statement group of
18111         the CICO mechanism.
18112
18113 2011-01-04  Olivier Hainque  <hainque@adacore.com>
18114             Eric Botcazou  <ebotcazou@adacore.com>
18115
18116         * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
18117         (set_end_locus_from_node): New function.
18118         (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
18119         make and the function end_locus.
18120         (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
18121         for the elaboration subprogram.
18122         (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
18123         set the end_locus of the expression as well.
18124
18125 2011-01-04  Eric Botcazou  <ebotcazou@adacore.com>
18126
18127         PR ada/47131
18128         * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
18129         variables that are referenced in exception handlers volatile.
18130
18131
18132 \f
18133 Copyright (C) 2011 Free Software Foundation, Inc.
18134
18135 Copying and distribution of this file, with or without modification,
18136 are permitted in any medium without royalty provided the copyright
18137 notice and this notice are preserved.